/* * 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.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateAppRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The domain ID. *
*/ private String domainId; /** *
* The user profile name. If this value is not set, then SpaceName
must be set.
*
* The type of app. *
*/ private String appType; /** ** The name of the app. *
*/ private String appName; /** ** Each tag consists of a key and an optional value. Tag keys must be unique per resource. *
*/ private java.util.List* The instance type and the Amazon Resource Name (ARN) of the SageMaker image created on the instance. *
*
* The value of InstanceType
passed as part of the ResourceSpec
in the
* CreateApp
call overrides the value passed as part of the ResourceSpec
configured for
* the user profile or the domain. If InstanceType
is not specified in any of those three
* ResourceSpec
values for a KernelGateway
app, the CreateApp
call fails with
* a request validation error.
*
* The name of the space. If this value is not set, then UserProfileName
must be set.
*
* The domain ID. *
* * @param domainId * The domain ID. */ public void setDomainId(String domainId) { this.domainId = domainId; } /** ** The domain ID. *
* * @return The domain ID. */ public String getDomainId() { return this.domainId; } /** ** The domain ID. *
* * @param domainId * The domain ID. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest withDomainId(String domainId) { setDomainId(domainId); return this; } /** *
* The user profile name. If this value is not set, then SpaceName
must be set.
*
SpaceName
must be set.
*/
public void setUserProfileName(String userProfileName) {
this.userProfileName = userProfileName;
}
/**
*
* The user profile name. If this value is not set, then SpaceName
must be set.
*
SpaceName
must be set.
*/
public String getUserProfileName() {
return this.userProfileName;
}
/**
*
* The user profile name. If this value is not set, then SpaceName
must be set.
*
SpaceName
must be set.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateAppRequest withUserProfileName(String userProfileName) {
setUserProfileName(userProfileName);
return this;
}
/**
* * The type of app. *
* * @param appType * The type of app. * @see AppType */ public void setAppType(String appType) { this.appType = appType; } /** ** The type of app. *
* * @return The type of app. * @see AppType */ public String getAppType() { return this.appType; } /** ** The type of app. *
* * @param appType * The type of app. * @return Returns a reference to this object so that method calls can be chained together. * @see AppType */ public CreateAppRequest withAppType(String appType) { setAppType(appType); return this; } /** ** The type of app. *
* * @param appType * The type of app. * @return Returns a reference to this object so that method calls can be chained together. * @see AppType */ public CreateAppRequest withAppType(AppType appType) { this.appType = appType.toString(); return this; } /** ** The name of the app. *
* * @param appName * The name of the app. */ public void setAppName(String appName) { this.appName = appName; } /** ** The name of the app. *
* * @return The name of the app. */ public String getAppName() { return this.appName; } /** ** The name of the app. *
* * @param appName * The name of the app. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest withAppName(String appName) { setAppName(appName); return this; } /** ** Each tag consists of a key and an optional value. Tag keys must be unique per resource. *
* * @return Each tag consists of a key and an optional value. Tag keys must be unique per resource. */ public java.util.List* Each tag consists of a key and an optional value. Tag keys must be unique per resource. *
* * @param tags * Each tag consists of a key and an optional value. Tag keys must be unique per resource. */ public void setTags(java.util.Collection* Each tag consists of a key and an optional value. Tag keys must be unique per resource. *
** 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 * Each tag consists of a key and an optional value. Tag keys must be unique per resource. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList* Each tag consists of a key and an optional value. Tag keys must be unique per resource. *
* * @param tags * Each tag consists of a key and an optional value. Tag keys must be unique per resource. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest withTags(java.util.Collection* The instance type and the Amazon Resource Name (ARN) of the SageMaker image created on the instance. *
*
* The value of InstanceType
passed as part of the ResourceSpec
in the
* CreateApp
call overrides the value passed as part of the ResourceSpec
configured for
* the user profile or the domain. If InstanceType
is not specified in any of those three
* ResourceSpec
values for a KernelGateway
app, the CreateApp
call fails with
* a request validation error.
*
* The value of InstanceType
passed as part of the ResourceSpec
in the
* CreateApp
call overrides the value passed as part of the ResourceSpec
configured
* for the user profile or the domain. If InstanceType
is not specified in any of those three
* ResourceSpec
values for a KernelGateway
app, the CreateApp
call
* fails with a request validation error.
*
* The instance type and the Amazon Resource Name (ARN) of the SageMaker image created on the instance. *
*
* The value of InstanceType
passed as part of the ResourceSpec
in the
* CreateApp
call overrides the value passed as part of the ResourceSpec
configured for
* the user profile or the domain. If InstanceType
is not specified in any of those three
* ResourceSpec
values for a KernelGateway
app, the CreateApp
call fails with
* a request validation error.
*
* The value of InstanceType
passed as part of the ResourceSpec
in the
* CreateApp
call overrides the value passed as part of the ResourceSpec
* configured for the user profile or the domain. If InstanceType
is not specified in any of
* those three ResourceSpec
values for a KernelGateway
app, the
* CreateApp
call fails with a request validation error.
*
* The instance type and the Amazon Resource Name (ARN) of the SageMaker image created on the instance. *
*
* The value of InstanceType
passed as part of the ResourceSpec
in the
* CreateApp
call overrides the value passed as part of the ResourceSpec
configured for
* the user profile or the domain. If InstanceType
is not specified in any of those three
* ResourceSpec
values for a KernelGateway
app, the CreateApp
call fails with
* a request validation error.
*
* The value of InstanceType
passed as part of the ResourceSpec
in the
* CreateApp
call overrides the value passed as part of the ResourceSpec
configured
* for the user profile or the domain. If InstanceType
is not specified in any of those three
* ResourceSpec
values for a KernelGateway
app, the CreateApp
call
* fails with a request validation error.
*
* The name of the space. If this value is not set, then UserProfileName
must be set.
*
UserProfileName
must be set.
*/
public void setSpaceName(String spaceName) {
this.spaceName = spaceName;
}
/**
*
* The name of the space. If this value is not set, then UserProfileName
must be set.
*
UserProfileName
must be set.
*/
public String getSpaceName() {
return this.spaceName;
}
/**
*
* The name of the space. If this value is not set, then UserProfileName
must be set.
*
UserProfileName
must be set.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateAppRequest withSpaceName(String spaceName) {
setSpaceName(spaceName);
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 (getUserProfileName() != null)
sb.append("UserProfileName: ").append(getUserProfileName()).append(",");
if (getAppType() != null)
sb.append("AppType: ").append(getAppType()).append(",");
if (getAppName() != null)
sb.append("AppName: ").append(getAppName()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getResourceSpec() != null)
sb.append("ResourceSpec: ").append(getResourceSpec()).append(",");
if (getSpaceName() != null)
sb.append("SpaceName: ").append(getSpaceName());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateAppRequest == false)
return false;
CreateAppRequest other = (CreateAppRequest) obj;
if (other.getDomainId() == null ^ this.getDomainId() == null)
return false;
if (other.getDomainId() != null && other.getDomainId().equals(this.getDomainId()) == false)
return false;
if (other.getUserProfileName() == null ^ this.getUserProfileName() == null)
return false;
if (other.getUserProfileName() != null && other.getUserProfileName().equals(this.getUserProfileName()) == false)
return false;
if (other.getAppType() == null ^ this.getAppType() == null)
return false;
if (other.getAppType() != null && other.getAppType().equals(this.getAppType()) == false)
return false;
if (other.getAppName() == null ^ this.getAppName() == null)
return false;
if (other.getAppName() != null && other.getAppName().equals(this.getAppName()) == 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.getResourceSpec() == null ^ this.getResourceSpec() == null)
return false;
if (other.getResourceSpec() != null && other.getResourceSpec().equals(this.getResourceSpec()) == false)
return false;
if (other.getSpaceName() == null ^ this.getSpaceName() == null)
return false;
if (other.getSpaceName() != null && other.getSpaceName().equals(this.getSpaceName()) == 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 + ((getUserProfileName() == null) ? 0 : getUserProfileName().hashCode());
hashCode = prime * hashCode + ((getAppType() == null) ? 0 : getAppType().hashCode());
hashCode = prime * hashCode + ((getAppName() == null) ? 0 : getAppName().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getResourceSpec() == null) ? 0 : getResourceSpec().hashCode());
hashCode = prime * hashCode + ((getSpaceName() == null) ? 0 : getSpaceName().hashCode());
return hashCode;
}
@Override
public CreateAppRequest clone() {
return (CreateAppRequest) super.clone();
}
}