com.amazonaws.services.sagemaker.model.CreateSpaceRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-sagemaker 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.sagemaker.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 CreateSpaceRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The ID of the associated domain.
*
*/
private String domainId;
/**
*
* The name of the space.
*
*/
private String spaceName;
/**
*
* Tags to associated with the space. Each tag consists of a key and an optional value. Tag keys must be unique for
* each resource. Tags are searchable using the Search
API.
*
*/
private java.util.List tags;
/**
*
* A collection of space settings.
*
*/
private SpaceSettings spaceSettings;
/**
*
* A collection of ownership settings.
*
*/
private OwnershipSettings ownershipSettings;
/**
*
* A collection of space sharing settings.
*
*/
private SpaceSharingSettings spaceSharingSettings;
/**
*
* The name of the space that appears in the SageMaker Studio UI.
*
*/
private String spaceDisplayName;
/**
*
* 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 CreateSpaceRequest 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 CreateSpaceRequest withSpaceName(String spaceName) {
setSpaceName(spaceName);
return this;
}
/**
*
* Tags to associated with the space. Each tag consists of a key and an optional value. Tag keys must be unique for
* each resource. Tags are searchable using the Search
API.
*
*
* @return Tags to associated with the space. Each tag consists of a key and an optional value. Tag keys must be
* unique for each resource. Tags are searchable using the Search
API.
*/
public java.util.List getTags() {
return tags;
}
/**
*
* Tags to associated with the space. Each tag consists of a key and an optional value. Tag keys must be unique for
* each resource. Tags are searchable using the Search
API.
*
*
* @param tags
* Tags to associated with the space. Each tag consists of a key and an optional value. Tag keys must be
* unique for each resource. Tags are searchable using the Search
API.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new java.util.ArrayList(tags);
}
/**
*
* Tags to associated with the space. Each tag consists of a key and an optional value. Tag keys must be unique for
* each resource. Tags are searchable using the Search
API.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param tags
* Tags to associated with the space. Each tag consists of a key and an optional value. Tag keys must be
* unique for each resource. Tags are searchable using the Search
API.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSpaceRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new java.util.ArrayList(tags.length));
}
for (Tag ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
*
* Tags to associated with the space. Each tag consists of a key and an optional value. Tag keys must be unique for
* each resource. Tags are searchable using the Search
API.
*
*
* @param tags
* Tags to associated with the space. Each tag consists of a key and an optional value. Tag keys must be
* unique for each resource. Tags are searchable using the Search
API.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSpaceRequest withTags(java.util.Collection tags) {
setTags(tags);
return this;
}
/**
*
* A collection of space settings.
*
*
* @param spaceSettings
* A collection of space settings.
*/
public void setSpaceSettings(SpaceSettings spaceSettings) {
this.spaceSettings = spaceSettings;
}
/**
*
* A collection of space settings.
*
*
* @return A collection of space settings.
*/
public SpaceSettings getSpaceSettings() {
return this.spaceSettings;
}
/**
*
* A collection of space settings.
*
*
* @param spaceSettings
* A collection of space settings.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSpaceRequest withSpaceSettings(SpaceSettings spaceSettings) {
setSpaceSettings(spaceSettings);
return this;
}
/**
*
* A collection of ownership settings.
*
*
* @param ownershipSettings
* A collection of ownership settings.
*/
public void setOwnershipSettings(OwnershipSettings ownershipSettings) {
this.ownershipSettings = ownershipSettings;
}
/**
*
* A collection of ownership settings.
*
*
* @return A collection of ownership settings.
*/
public OwnershipSettings getOwnershipSettings() {
return this.ownershipSettings;
}
/**
*
* A collection of ownership settings.
*
*
* @param ownershipSettings
* A collection of ownership settings.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSpaceRequest withOwnershipSettings(OwnershipSettings ownershipSettings) {
setOwnershipSettings(ownershipSettings);
return this;
}
/**
*
* A collection of space sharing settings.
*
*
* @param spaceSharingSettings
* A collection of space sharing settings.
*/
public void setSpaceSharingSettings(SpaceSharingSettings spaceSharingSettings) {
this.spaceSharingSettings = spaceSharingSettings;
}
/**
*
* A collection of space sharing settings.
*
*
* @return A collection of space sharing settings.
*/
public SpaceSharingSettings getSpaceSharingSettings() {
return this.spaceSharingSettings;
}
/**
*
* A collection of space sharing settings.
*
*
* @param spaceSharingSettings
* A collection of space sharing settings.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSpaceRequest withSpaceSharingSettings(SpaceSharingSettings spaceSharingSettings) {
setSpaceSharingSettings(spaceSharingSettings);
return this;
}
/**
*
* The name of the space that appears in the SageMaker Studio UI.
*
*
* @param spaceDisplayName
* The name of the space that appears in the SageMaker Studio UI.
*/
public void setSpaceDisplayName(String spaceDisplayName) {
this.spaceDisplayName = spaceDisplayName;
}
/**
*
* The name of the space that appears in the SageMaker Studio UI.
*
*
* @return The name of the space that appears in the SageMaker Studio UI.
*/
public String getSpaceDisplayName() {
return this.spaceDisplayName;
}
/**
*
* The name of the space that appears in the SageMaker Studio UI.
*
*
* @param spaceDisplayName
* The name of the space that appears in the SageMaker Studio UI.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSpaceRequest withSpaceDisplayName(String spaceDisplayName) {
setSpaceDisplayName(spaceDisplayName);
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 (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getSpaceSettings() != null)
sb.append("SpaceSettings: ").append(getSpaceSettings()).append(",");
if (getOwnershipSettings() != null)
sb.append("OwnershipSettings: ").append(getOwnershipSettings()).append(",");
if (getSpaceSharingSettings() != null)
sb.append("SpaceSharingSettings: ").append(getSpaceSharingSettings()).append(",");
if (getSpaceDisplayName() != null)
sb.append("SpaceDisplayName: ").append(getSpaceDisplayName());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateSpaceRequest == false)
return false;
CreateSpaceRequest other = (CreateSpaceRequest) 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.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
if (other.getSpaceSettings() == null ^ this.getSpaceSettings() == null)
return false;
if (other.getSpaceSettings() != null && other.getSpaceSettings().equals(this.getSpaceSettings()) == false)
return false;
if (other.getOwnershipSettings() == null ^ this.getOwnershipSettings() == null)
return false;
if (other.getOwnershipSettings() != null && other.getOwnershipSettings().equals(this.getOwnershipSettings()) == false)
return false;
if (other.getSpaceSharingSettings() == null ^ this.getSpaceSharingSettings() == null)
return false;
if (other.getSpaceSharingSettings() != null && other.getSpaceSharingSettings().equals(this.getSpaceSharingSettings()) == false)
return false;
if (other.getSpaceDisplayName() == null ^ this.getSpaceDisplayName() == null)
return false;
if (other.getSpaceDisplayName() != null && other.getSpaceDisplayName().equals(this.getSpaceDisplayName()) == 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 + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getSpaceSettings() == null) ? 0 : getSpaceSettings().hashCode());
hashCode = prime * hashCode + ((getOwnershipSettings() == null) ? 0 : getOwnershipSettings().hashCode());
hashCode = prime * hashCode + ((getSpaceSharingSettings() == null) ? 0 : getSpaceSharingSettings().hashCode());
hashCode = prime * hashCode + ((getSpaceDisplayName() == null) ? 0 : getSpaceDisplayName().hashCode());
return hashCode;
}
@Override
public CreateSpaceRequest clone() {
return (CreateSpaceRequest) super.clone();
}
}