@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getRegion() == null) ? 0 : getRegion().hashCode()); hashCode = prime * hashCode + ((getContents() == null) ? 0 : getContents().hashCode()); hashCode = prime * hashCode + ((getSnapshotId() == null) ? 0 : getSnapshotId().hashCode()); return hashCode; }
/** * <p> * ZIP or YAML file which contains configuration settings to be used when creating the project. This may be the * contents of the file downloaded from the URL provided in an export project operation. * </p> * <p> * The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service. * Users of the SDK should not perform Base64 encoding on this field. * </p> * <p> * Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will * be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or * ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future * major version of the SDK. * </p> * * @param contents * ZIP or YAML file which contains configuration settings to be used when creating the project. This may be * the contents of the file downloaded from the URL provided in an export project operation. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateProjectRequest withContents(java.nio.ByteBuffer contents) { setContents(contents); return this; }
/** * <p> * Name of the project. * </p> * * @param name * Name of the project. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateProjectRequest withName(String name) { setName(name); return this; }
/** * <p> * Default region where project resources should be created. * </p> * * @param region * Default region where project resources should be created. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateProjectRequest withRegion(String region) { setRegion(region); return this; }
/** * <p> * Unique identifier for an exported snapshot of project configuration. This snapshot identifier is included in the * share URL when a project is exported. * </p> * * @param snapshotId * Unique identifier for an exported snapshot of project configuration. This snapshot identifier is included * in the share URL when a project is exported. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateProjectRequest withSnapshotId(String snapshotId) { setSnapshotId(snapshotId); return this; }
/** * <p> * Default region where project resources should be created. * </p> * * @param region * Default region where project resources should be created. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateProjectRequest withRegion(String region) { setRegion(region); return this; }
/** * <p> * Unique identifier for an exported snapshot of project configuration. This snapshot identifier is included in the * share URL when a project is exported. * </p> * * @param snapshotId * Unique identifier for an exported snapshot of project configuration. This snapshot identifier is included * in the share URL when a project is exported. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateProjectRequest withSnapshotId(String snapshotId) { setSnapshotId(snapshotId); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateProjectRequest == false) return false; CreateProjectRequest other = (CreateProjectRequest) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getRegion() == null ^ this.getRegion() == null) return false; if (other.getRegion() != null && other.getRegion().equals(this.getRegion()) == false) return false; if (other.getContents() == null ^ this.getContents() == null) return false; if (other.getContents() != null && other.getContents().equals(this.getContents()) == false) return false; if (other.getSnapshotId() == null ^ this.getSnapshotId() == null) return false; if (other.getSnapshotId() != null && other.getSnapshotId().equals(this.getSnapshotId()) == false) return false; return true; }
/** * <p> * Name of the project. * </p> * * @param name * Name of the project. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateProjectRequest withName(String name) { setName(name); return this; }
/** * <p> * ZIP or YAML file which contains configuration settings to be used when creating the project. This may be the * contents of the file downloaded from the URL provided in an export project operation. * </p> * <p> * The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service. * Users of the SDK should not perform Base64 encoding on this field. * </p> * <p> * Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will * be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or * ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future * major version of the SDK. * </p> * * @param contents * ZIP or YAML file which contains configuration settings to be used when creating the project. This may be * the contents of the file downloaded from the URL provided in an export project operation. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateProjectRequest withContents(java.nio.ByteBuffer contents) { setContents(contents); 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 (getRegion() != null) sb.append("Region: ").append(getRegion()).append(","); if (getContents() != null) sb.append("Contents: ").append(getContents()).append(","); if (getSnapshotId() != null) sb.append("SnapshotId: ").append(getSnapshotId()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(CreateProjectRequest createProjectRequest, ProtocolMarshaller protocolMarshaller) { if (createProjectRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(createProjectRequest.getName(), NAME_BINDING); protocolMarshaller.marshall(createProjectRequest.getRegion(), REGION_BINDING); protocolMarshaller.marshall(createProjectRequest.getContents(), CONTENTS_BINDING); protocolMarshaller.marshall(createProjectRequest.getSnapshotId(), SNAPSHOTID_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getRegion() == null) ? 0 : getRegion().hashCode()); hashCode = prime * hashCode + ((getContents() == null) ? 0 : getContents().hashCode()); hashCode = prime * hashCode + ((getSnapshotId() == null) ? 0 : getSnapshotId().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateProjectRequest == false) return false; CreateProjectRequest other = (CreateProjectRequest) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getRegion() == null ^ this.getRegion() == null) return false; if (other.getRegion() != null && other.getRegion().equals(this.getRegion()) == false) return false; if (other.getContents() == null ^ this.getContents() == null) return false; if (other.getContents() != null && other.getContents().equals(this.getContents()) == false) return false; if (other.getSnapshotId() == null ^ this.getSnapshotId() == null) return false; if (other.getSnapshotId() != null && other.getSnapshotId().equals(this.getSnapshotId()) == false) return false; return true; }
/** * 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 (getRegion() != null) sb.append("Region: ").append(getRegion()).append(","); if (getContents() != null) sb.append("Contents: ").append(getContents()).append(","); if (getSnapshotId() != null) sb.append("SnapshotId: ").append(getSnapshotId()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(CreateProjectRequest createProjectRequest, ProtocolMarshaller protocolMarshaller) { if (createProjectRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(createProjectRequest.getName(), NAME_BINDING); protocolMarshaller.marshall(createProjectRequest.getRegion(), REGION_BINDING); protocolMarshaller.marshall(createProjectRequest.getContents(), CONTENTS_BINDING); protocolMarshaller.marshall(createProjectRequest.getSnapshotId(), SNAPSHOTID_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }