/* * 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.sagemaker.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* The space's details. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class SpaceDetails implements Serializable, Cloneable, StructuredPojo { /** *

* The ID of the associated Domain. *

*/ private String domainId; /** *

* The name of the space. *

*/ private String spaceName; /** *

* The status. *

*/ private String status; /** *

* The creation time. *

*/ private java.util.Date creationTime; /** *

* The last modified time. *

*/ private java.util.Date lastModifiedTime; /** *

* The ID of the associated Domain. *

* * @param domainId * The ID of the associated Domain. */ public void setDomainId(String domainId) { this.domainId = domainId; } /** *

* The ID of the associated Domain. *

* * @return The ID of the associated Domain. */ public String getDomainId() { return this.domainId; } /** *

* The ID of the associated Domain. *

* * @param domainId * The ID of the associated Domain. * @return Returns a reference to this object so that method calls can be chained together. */ public SpaceDetails withDomainId(String domainId) { setDomainId(domainId); return this; } /** *

* The name of the space. *

* * @param spaceName * The name of the space. */ public void setSpaceName(String spaceName) { this.spaceName = spaceName; } /** *

* The name of the space. *

* * @return The name of the space. */ public String getSpaceName() { return this.spaceName; } /** *

* The name of the space. *

* * @param spaceName * The name of the space. * @return Returns a reference to this object so that method calls can be chained together. */ public SpaceDetails withSpaceName(String spaceName) { setSpaceName(spaceName); return this; } /** *

* The status. *

* * @param status * The status. * @see SpaceStatus */ public void setStatus(String status) { this.status = status; } /** *

* The status. *

* * @return The status. * @see SpaceStatus */ public String getStatus() { return this.status; } /** *

* The status. *

* * @param status * The status. * @return Returns a reference to this object so that method calls can be chained together. * @see SpaceStatus */ public SpaceDetails withStatus(String status) { setStatus(status); return this; } /** *

* The status. *

* * @param status * The status. * @return Returns a reference to this object so that method calls can be chained together. * @see SpaceStatus */ public SpaceDetails withStatus(SpaceStatus status) { this.status = status.toString(); return this; } /** *

* The creation time. *

* * @param creationTime * The creation time. */ public void setCreationTime(java.util.Date creationTime) { this.creationTime = creationTime; } /** *

* The creation time. *

* * @return The creation time. */ public java.util.Date getCreationTime() { return this.creationTime; } /** *

* The creation time. *

* * @param creationTime * The creation time. * @return Returns a reference to this object so that method calls can be chained together. */ public SpaceDetails withCreationTime(java.util.Date creationTime) { setCreationTime(creationTime); return this; } /** *

* The last modified time. *

* * @param lastModifiedTime * The last modified time. */ public void setLastModifiedTime(java.util.Date lastModifiedTime) { this.lastModifiedTime = lastModifiedTime; } /** *

* The last modified time. *

* * @return The last modified time. */ public java.util.Date getLastModifiedTime() { return this.lastModifiedTime; } /** *

* The last modified time. *

* * @param lastModifiedTime * The last modified time. * @return Returns a reference to this object so that method calls can be chained together. */ public SpaceDetails withLastModifiedTime(java.util.Date lastModifiedTime) { setLastModifiedTime(lastModifiedTime); 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 (getDomainId() != null) sb.append("DomainId: ").append(getDomainId()).append(","); if (getSpaceName() != null) sb.append("SpaceName: ").append(getSpaceName()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getCreationTime() != null) sb.append("CreationTime: ").append(getCreationTime()).append(","); if (getLastModifiedTime() != null) sb.append("LastModifiedTime: ").append(getLastModifiedTime()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SpaceDetails == false) return false; SpaceDetails other = (SpaceDetails) obj; if (other.getDomainId() == null ^ this.getDomainId() == null) return false; if (other.getDomainId() != null && other.getDomainId().equals(this.getDomainId()) == false) return false; if (other.getSpaceName() == null ^ this.getSpaceName() == null) return false; if (other.getSpaceName() != null && other.getSpaceName().equals(this.getSpaceName()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getCreationTime() == null ^ this.getCreationTime() == null) return false; if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == false) return false; if (other.getLastModifiedTime() == null ^ this.getLastModifiedTime() == null) return false; if (other.getLastModifiedTime() != null && other.getLastModifiedTime().equals(this.getLastModifiedTime()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDomainId() == null) ? 0 : getDomainId().hashCode()); hashCode = prime * hashCode + ((getSpaceName() == null) ? 0 : getSpaceName().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode()); hashCode = prime * hashCode + ((getLastModifiedTime() == null) ? 0 : getLastModifiedTime().hashCode()); return hashCode; } @Override public SpaceDetails clone() { try { return (SpaceDetails) 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.sagemaker.model.transform.SpaceDetailsMarshaller.getInstance().marshall(this, protocolMarshaller); } }