/* * 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 CreateHubRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The name of the hub to create. *

*/ private String hubName; /** *

* A description of the hub. *

*/ private String hubDescription; /** *

* The display name of the hub. *

*/ private String hubDisplayName; /** *

* The searchable keywords for the hub. *

*/ private java.util.List hubSearchKeywords; /** *

* The Amazon S3 storage configuration for the hub. *

*/ private HubS3StorageConfig s3StorageConfig; /** *

* Any tags to associate with the hub. *

*/ private java.util.List tags; /** *

* The name of the hub to create. *

* * @param hubName * The name of the hub to create. */ public void setHubName(String hubName) { this.hubName = hubName; } /** *

* The name of the hub to create. *

* * @return The name of the hub to create. */ public String getHubName() { return this.hubName; } /** *

* The name of the hub to create. *

* * @param hubName * The name of the hub to create. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateHubRequest withHubName(String hubName) { setHubName(hubName); return this; } /** *

* A description of the hub. *

* * @param hubDescription * A description of the hub. */ public void setHubDescription(String hubDescription) { this.hubDescription = hubDescription; } /** *

* A description of the hub. *

* * @return A description of the hub. */ public String getHubDescription() { return this.hubDescription; } /** *

* A description of the hub. *

* * @param hubDescription * A description of the hub. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateHubRequest withHubDescription(String hubDescription) { setHubDescription(hubDescription); return this; } /** *

* The display name of the hub. *

* * @param hubDisplayName * The display name of the hub. */ public void setHubDisplayName(String hubDisplayName) { this.hubDisplayName = hubDisplayName; } /** *

* The display name of the hub. *

* * @return The display name of the hub. */ public String getHubDisplayName() { return this.hubDisplayName; } /** *

* The display name of the hub. *

* * @param hubDisplayName * The display name of the hub. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateHubRequest withHubDisplayName(String hubDisplayName) { setHubDisplayName(hubDisplayName); return this; } /** *

* The searchable keywords for the hub. *

* * @return The searchable keywords for the hub. */ public java.util.List getHubSearchKeywords() { return hubSearchKeywords; } /** *

* The searchable keywords for the hub. *

* * @param hubSearchKeywords * The searchable keywords for the hub. */ public void setHubSearchKeywords(java.util.Collection hubSearchKeywords) { if (hubSearchKeywords == null) { this.hubSearchKeywords = null; return; } this.hubSearchKeywords = new java.util.ArrayList(hubSearchKeywords); } /** *

* The searchable keywords for the hub. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setHubSearchKeywords(java.util.Collection)} or {@link #withHubSearchKeywords(java.util.Collection)} if * you want to override the existing values. *

* * @param hubSearchKeywords * The searchable keywords for the hub. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateHubRequest withHubSearchKeywords(String... hubSearchKeywords) { if (this.hubSearchKeywords == null) { setHubSearchKeywords(new java.util.ArrayList(hubSearchKeywords.length)); } for (String ele : hubSearchKeywords) { this.hubSearchKeywords.add(ele); } return this; } /** *

* The searchable keywords for the hub. *

* * @param hubSearchKeywords * The searchable keywords for the hub. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateHubRequest withHubSearchKeywords(java.util.Collection hubSearchKeywords) { setHubSearchKeywords(hubSearchKeywords); return this; } /** *

* The Amazon S3 storage configuration for the hub. *

* * @param s3StorageConfig * The Amazon S3 storage configuration for the hub. */ public void setS3StorageConfig(HubS3StorageConfig s3StorageConfig) { this.s3StorageConfig = s3StorageConfig; } /** *

* The Amazon S3 storage configuration for the hub. *

* * @return The Amazon S3 storage configuration for the hub. */ public HubS3StorageConfig getS3StorageConfig() { return this.s3StorageConfig; } /** *

* The Amazon S3 storage configuration for the hub. *

* * @param s3StorageConfig * The Amazon S3 storage configuration for the hub. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateHubRequest withS3StorageConfig(HubS3StorageConfig s3StorageConfig) { setS3StorageConfig(s3StorageConfig); return this; } /** *

* Any tags to associate with the hub. *

* * @return Any tags to associate with the hub. */ public java.util.List getTags() { return tags; } /** *

* Any tags to associate with the hub. *

* * @param tags * Any tags to associate with the hub. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new java.util.ArrayList(tags); } /** *

* Any tags to associate with the hub. *

*

* 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 * Any tags to associate with the hub. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateHubRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; } /** *

* Any tags to associate with the hub. *

* * @param tags * Any tags to associate with the hub. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateHubRequest withTags(java.util.Collection tags) { setTags(tags); 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 (getHubName() != null) sb.append("HubName: ").append(getHubName()).append(","); if (getHubDescription() != null) sb.append("HubDescription: ").append(getHubDescription()).append(","); if (getHubDisplayName() != null) sb.append("HubDisplayName: ").append(getHubDisplayName()).append(","); if (getHubSearchKeywords() != null) sb.append("HubSearchKeywords: ").append(getHubSearchKeywords()).append(","); if (getS3StorageConfig() != null) sb.append("S3StorageConfig: ").append(getS3StorageConfig()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateHubRequest == false) return false; CreateHubRequest other = (CreateHubRequest) obj; if (other.getHubName() == null ^ this.getHubName() == null) return false; if (other.getHubName() != null && other.getHubName().equals(this.getHubName()) == false) return false; if (other.getHubDescription() == null ^ this.getHubDescription() == null) return false; if (other.getHubDescription() != null && other.getHubDescription().equals(this.getHubDescription()) == false) return false; if (other.getHubDisplayName() == null ^ this.getHubDisplayName() == null) return false; if (other.getHubDisplayName() != null && other.getHubDisplayName().equals(this.getHubDisplayName()) == false) return false; if (other.getHubSearchKeywords() == null ^ this.getHubSearchKeywords() == null) return false; if (other.getHubSearchKeywords() != null && other.getHubSearchKeywords().equals(this.getHubSearchKeywords()) == false) return false; if (other.getS3StorageConfig() == null ^ this.getS3StorageConfig() == null) return false; if (other.getS3StorageConfig() != null && other.getS3StorageConfig().equals(this.getS3StorageConfig()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getHubName() == null) ? 0 : getHubName().hashCode()); hashCode = prime * hashCode + ((getHubDescription() == null) ? 0 : getHubDescription().hashCode()); hashCode = prime * hashCode + ((getHubDisplayName() == null) ? 0 : getHubDisplayName().hashCode()); hashCode = prime * hashCode + ((getHubSearchKeywords() == null) ? 0 : getHubSearchKeywords().hashCode()); hashCode = prime * hashCode + ((getS3StorageConfig() == null) ? 0 : getS3StorageConfig().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public CreateHubRequest clone() { return (CreateHubRequest) super.clone(); } }