/* * 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.omics.model; import java.io.Serializable; import javax.annotation.Generated; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class GetRunGroupResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable { /** *

* The group's ARN. *

*/ private String arn; /** *

* The group's ID. *

*/ private String id; /** *

* The group's name. *

*/ private String name; /** *

* The group's maximum number of CPUs to use. *

*/ private Integer maxCpus; /** *

* The maximum number of concurrent runs for the group. *

*/ private Integer maxRuns; /** *

* The group's maximum run time in minutes. *

*/ private Integer maxDuration; /** *

* When the group was created. *

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

* The group's tags. *

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

* The maximum GPUs that can be used by a run group. *

*/ private Integer maxGpus; /** *

* The group's ARN. *

* * @param arn * The group's ARN. */ public void setArn(String arn) { this.arn = arn; } /** *

* The group's ARN. *

* * @return The group's ARN. */ public String getArn() { return this.arn; } /** *

* The group's ARN. *

* * @param arn * The group's ARN. * @return Returns a reference to this object so that method calls can be chained together. */ public GetRunGroupResult withArn(String arn) { setArn(arn); return this; } /** *

* The group's ID. *

* * @param id * The group's ID. */ public void setId(String id) { this.id = id; } /** *

* The group's ID. *

* * @return The group's ID. */ public String getId() { return this.id; } /** *

* The group's ID. *

* * @param id * The group's ID. * @return Returns a reference to this object so that method calls can be chained together. */ public GetRunGroupResult withId(String id) { setId(id); return this; } /** *

* The group's name. *

* * @param name * The group's name. */ public void setName(String name) { this.name = name; } /** *

* The group's name. *

* * @return The group's name. */ public String getName() { return this.name; } /** *

* The group's name. *

* * @param name * The group's name. * @return Returns a reference to this object so that method calls can be chained together. */ public GetRunGroupResult withName(String name) { setName(name); return this; } /** *

* The group's maximum number of CPUs to use. *

* * @param maxCpus * The group's maximum number of CPUs to use. */ public void setMaxCpus(Integer maxCpus) { this.maxCpus = maxCpus; } /** *

* The group's maximum number of CPUs to use. *

* * @return The group's maximum number of CPUs to use. */ public Integer getMaxCpus() { return this.maxCpus; } /** *

* The group's maximum number of CPUs to use. *

* * @param maxCpus * The group's maximum number of CPUs to use. * @return Returns a reference to this object so that method calls can be chained together. */ public GetRunGroupResult withMaxCpus(Integer maxCpus) { setMaxCpus(maxCpus); return this; } /** *

* The maximum number of concurrent runs for the group. *

* * @param maxRuns * The maximum number of concurrent runs for the group. */ public void setMaxRuns(Integer maxRuns) { this.maxRuns = maxRuns; } /** *

* The maximum number of concurrent runs for the group. *

* * @return The maximum number of concurrent runs for the group. */ public Integer getMaxRuns() { return this.maxRuns; } /** *

* The maximum number of concurrent runs for the group. *

* * @param maxRuns * The maximum number of concurrent runs for the group. * @return Returns a reference to this object so that method calls can be chained together. */ public GetRunGroupResult withMaxRuns(Integer maxRuns) { setMaxRuns(maxRuns); return this; } /** *

* The group's maximum run time in minutes. *

* * @param maxDuration * The group's maximum run time in minutes. */ public void setMaxDuration(Integer maxDuration) { this.maxDuration = maxDuration; } /** *

* The group's maximum run time in minutes. *

* * @return The group's maximum run time in minutes. */ public Integer getMaxDuration() { return this.maxDuration; } /** *

* The group's maximum run time in minutes. *

* * @param maxDuration * The group's maximum run time in minutes. * @return Returns a reference to this object so that method calls can be chained together. */ public GetRunGroupResult withMaxDuration(Integer maxDuration) { setMaxDuration(maxDuration); return this; } /** *

* When the group was created. *

* * @param creationTime * When the group was created. */ public void setCreationTime(java.util.Date creationTime) { this.creationTime = creationTime; } /** *

* When the group was created. *

* * @return When the group was created. */ public java.util.Date getCreationTime() { return this.creationTime; } /** *

* When the group was created. *

* * @param creationTime * When the group was created. * @return Returns a reference to this object so that method calls can be chained together. */ public GetRunGroupResult withCreationTime(java.util.Date creationTime) { setCreationTime(creationTime); return this; } /** *

* The group's tags. *

* * @return The group's tags. */ public java.util.Map getTags() { return tags; } /** *

* The group's tags. *

* * @param tags * The group's tags. */ public void setTags(java.util.Map tags) { this.tags = tags; } /** *

* The group's tags. *

* * @param tags * The group's tags. * @return Returns a reference to this object so that method calls can be chained together. */ public GetRunGroupResult withTags(java.util.Map tags) { setTags(tags); return this; } /** * Add a single Tags entry * * @see GetRunGroupResult#withTags * @returns a reference to this object so that method calls can be chained together. */ public GetRunGroupResult addTagsEntry(String key, String value) { if (null == this.tags) { this.tags = new java.util.HashMap(); } if (this.tags.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.tags.put(key, value); return this; } /** * Removes all the entries added into Tags. * * @return Returns a reference to this object so that method calls can be chained together. */ public GetRunGroupResult clearTagsEntries() { this.tags = null; return this; } /** *

* The maximum GPUs that can be used by a run group. *

* * @param maxGpus * The maximum GPUs that can be used by a run group. */ public void setMaxGpus(Integer maxGpus) { this.maxGpus = maxGpus; } /** *

* The maximum GPUs that can be used by a run group. *

* * @return The maximum GPUs that can be used by a run group. */ public Integer getMaxGpus() { return this.maxGpus; } /** *

* The maximum GPUs that can be used by a run group. *

* * @param maxGpus * The maximum GPUs that can be used by a run group. * @return Returns a reference to this object so that method calls can be chained together. */ public GetRunGroupResult withMaxGpus(Integer maxGpus) { setMaxGpus(maxGpus); 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 (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getMaxCpus() != null) sb.append("MaxCpus: ").append(getMaxCpus()).append(","); if (getMaxRuns() != null) sb.append("MaxRuns: ").append(getMaxRuns()).append(","); if (getMaxDuration() != null) sb.append("MaxDuration: ").append(getMaxDuration()).append(","); if (getCreationTime() != null) sb.append("CreationTime: ").append(getCreationTime()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getMaxGpus() != null) sb.append("MaxGpus: ").append(getMaxGpus()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetRunGroupResult == false) return false; GetRunGroupResult other = (GetRunGroupResult) obj; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getMaxCpus() == null ^ this.getMaxCpus() == null) return false; if (other.getMaxCpus() != null && other.getMaxCpus().equals(this.getMaxCpus()) == false) return false; if (other.getMaxRuns() == null ^ this.getMaxRuns() == null) return false; if (other.getMaxRuns() != null && other.getMaxRuns().equals(this.getMaxRuns()) == false) return false; if (other.getMaxDuration() == null ^ this.getMaxDuration() == null) return false; if (other.getMaxDuration() != null && other.getMaxDuration().equals(this.getMaxDuration()) == 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.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; if (other.getMaxGpus() == null ^ this.getMaxGpus() == null) return false; if (other.getMaxGpus() != null && other.getMaxGpus().equals(this.getMaxGpus()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getMaxCpus() == null) ? 0 : getMaxCpus().hashCode()); hashCode = prime * hashCode + ((getMaxRuns() == null) ? 0 : getMaxRuns().hashCode()); hashCode = prime * hashCode + ((getMaxDuration() == null) ? 0 : getMaxDuration().hashCode()); hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getMaxGpus() == null) ? 0 : getMaxGpus().hashCode()); return hashCode; } @Override public GetRunGroupResult clone() { try { return (GetRunGroupResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }