All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.fis.model.ExperimentTemplateTarget Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Fault Injection Simulator module holds the client classes that are used for communicating with AWS Fault Injection Simulator Service

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2016-2021 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.fis.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Describes a target for an experiment template. *

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

* The resource type. *

*/ private String resourceType; /** *

* The Amazon Resource Names (ARNs) of the targets. *

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

* The tags for the target resources. *

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

* The filters to apply to identify target resources using specific attributes. *

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

* Scopes the identified resources to a specific count or percentage. *

*/ private String selectionMode; /** *

* The resource type. *

* * @param resourceType * The resource type. */ public void setResourceType(String resourceType) { this.resourceType = resourceType; } /** *

* The resource type. *

* * @return The resource type. */ public String getResourceType() { return this.resourceType; } /** *

* The resource type. *

* * @param resourceType * The resource type. * @return Returns a reference to this object so that method calls can be chained together. */ public ExperimentTemplateTarget withResourceType(String resourceType) { setResourceType(resourceType); return this; } /** *

* The Amazon Resource Names (ARNs) of the targets. *

* * @return The Amazon Resource Names (ARNs) of the targets. */ public java.util.List getResourceArns() { return resourceArns; } /** *

* The Amazon Resource Names (ARNs) of the targets. *

* * @param resourceArns * The Amazon Resource Names (ARNs) of the targets. */ public void setResourceArns(java.util.Collection resourceArns) { if (resourceArns == null) { this.resourceArns = null; return; } this.resourceArns = new java.util.ArrayList(resourceArns); } /** *

* The Amazon Resource Names (ARNs) of the targets. *

*

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

* * @param resourceArns * The Amazon Resource Names (ARNs) of the targets. * @return Returns a reference to this object so that method calls can be chained together. */ public ExperimentTemplateTarget withResourceArns(String... resourceArns) { if (this.resourceArns == null) { setResourceArns(new java.util.ArrayList(resourceArns.length)); } for (String ele : resourceArns) { this.resourceArns.add(ele); } return this; } /** *

* The Amazon Resource Names (ARNs) of the targets. *

* * @param resourceArns * The Amazon Resource Names (ARNs) of the targets. * @return Returns a reference to this object so that method calls can be chained together. */ public ExperimentTemplateTarget withResourceArns(java.util.Collection resourceArns) { setResourceArns(resourceArns); return this; } /** *

* The tags for the target resources. *

* * @return The tags for the target resources. */ public java.util.Map getResourceTags() { return resourceTags; } /** *

* The tags for the target resources. *

* * @param resourceTags * The tags for the target resources. */ public void setResourceTags(java.util.Map resourceTags) { this.resourceTags = resourceTags; } /** *

* The tags for the target resources. *

* * @param resourceTags * The tags for the target resources. * @return Returns a reference to this object so that method calls can be chained together. */ public ExperimentTemplateTarget withResourceTags(java.util.Map resourceTags) { setResourceTags(resourceTags); return this; } /** * Add a single ResourceTags entry * * @see ExperimentTemplateTarget#withResourceTags * @returns a reference to this object so that method calls can be chained together. */ public ExperimentTemplateTarget addResourceTagsEntry(String key, String value) { if (null == this.resourceTags) { this.resourceTags = new java.util.HashMap(); } if (this.resourceTags.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.resourceTags.put(key, value); return this; } /** * Removes all the entries added into ResourceTags. * * @return Returns a reference to this object so that method calls can be chained together. */ public ExperimentTemplateTarget clearResourceTagsEntries() { this.resourceTags = null; return this; } /** *

* The filters to apply to identify target resources using specific attributes. *

* * @return The filters to apply to identify target resources using specific attributes. */ public java.util.List getFilters() { return filters; } /** *

* The filters to apply to identify target resources using specific attributes. *

* * @param filters * The filters to apply to identify target resources using specific attributes. */ public void setFilters(java.util.Collection filters) { if (filters == null) { this.filters = null; return; } this.filters = new java.util.ArrayList(filters); } /** *

* The filters to apply to identify target resources using specific attributes. *

*

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

* * @param filters * The filters to apply to identify target resources using specific attributes. * @return Returns a reference to this object so that method calls can be chained together. */ public ExperimentTemplateTarget withFilters(ExperimentTemplateTargetFilter... filters) { if (this.filters == null) { setFilters(new java.util.ArrayList(filters.length)); } for (ExperimentTemplateTargetFilter ele : filters) { this.filters.add(ele); } return this; } /** *

* The filters to apply to identify target resources using specific attributes. *

* * @param filters * The filters to apply to identify target resources using specific attributes. * @return Returns a reference to this object so that method calls can be chained together. */ public ExperimentTemplateTarget withFilters(java.util.Collection filters) { setFilters(filters); return this; } /** *

* Scopes the identified resources to a specific count or percentage. *

* * @param selectionMode * Scopes the identified resources to a specific count or percentage. */ public void setSelectionMode(String selectionMode) { this.selectionMode = selectionMode; } /** *

* Scopes the identified resources to a specific count or percentage. *

* * @return Scopes the identified resources to a specific count or percentage. */ public String getSelectionMode() { return this.selectionMode; } /** *

* Scopes the identified resources to a specific count or percentage. *

* * @param selectionMode * Scopes the identified resources to a specific count or percentage. * @return Returns a reference to this object so that method calls can be chained together. */ public ExperimentTemplateTarget withSelectionMode(String selectionMode) { setSelectionMode(selectionMode); 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 (getResourceType() != null) sb.append("ResourceType: ").append(getResourceType()).append(","); if (getResourceArns() != null) sb.append("ResourceArns: ").append(getResourceArns()).append(","); if (getResourceTags() != null) sb.append("ResourceTags: ").append(getResourceTags()).append(","); if (getFilters() != null) sb.append("Filters: ").append(getFilters()).append(","); if (getSelectionMode() != null) sb.append("SelectionMode: ").append(getSelectionMode()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ExperimentTemplateTarget == false) return false; ExperimentTemplateTarget other = (ExperimentTemplateTarget) obj; if (other.getResourceType() == null ^ this.getResourceType() == null) return false; if (other.getResourceType() != null && other.getResourceType().equals(this.getResourceType()) == false) return false; if (other.getResourceArns() == null ^ this.getResourceArns() == null) return false; if (other.getResourceArns() != null && other.getResourceArns().equals(this.getResourceArns()) == false) return false; if (other.getResourceTags() == null ^ this.getResourceTags() == null) return false; if (other.getResourceTags() != null && other.getResourceTags().equals(this.getResourceTags()) == false) return false; if (other.getFilters() == null ^ this.getFilters() == null) return false; if (other.getFilters() != null && other.getFilters().equals(this.getFilters()) == false) return false; if (other.getSelectionMode() == null ^ this.getSelectionMode() == null) return false; if (other.getSelectionMode() != null && other.getSelectionMode().equals(this.getSelectionMode()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getResourceType() == null) ? 0 : getResourceType().hashCode()); hashCode = prime * hashCode + ((getResourceArns() == null) ? 0 : getResourceArns().hashCode()); hashCode = prime * hashCode + ((getResourceTags() == null) ? 0 : getResourceTags().hashCode()); hashCode = prime * hashCode + ((getFilters() == null) ? 0 : getFilters().hashCode()); hashCode = prime * hashCode + ((getSelectionMode() == null) ? 0 : getSelectionMode().hashCode()); return hashCode; } @Override public ExperimentTemplateTarget clone() { try { return (ExperimentTemplateTarget) 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.fis.model.transform.ExperimentTemplateTargetMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy