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

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

/*
 * 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.fis.model;

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

/**
 * 

* Describes a resolved target. *

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

* The resource type of the target. *

*/ private String resourceType; /** *

* The name of the target. *

*/ private String targetName; /** *

* Information about the target. *

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

* The resource type of the target. *

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

* The resource type of the target. *

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

* The resource type of the target. *

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

* The name of the target. *

* * @param targetName * The name of the target. */ public void setTargetName(String targetName) { this.targetName = targetName; } /** *

* The name of the target. *

* * @return The name of the target. */ public String getTargetName() { return this.targetName; } /** *

* The name of the target. *

* * @param targetName * The name of the target. * @return Returns a reference to this object so that method calls can be chained together. */ public ResolvedTarget withTargetName(String targetName) { setTargetName(targetName); return this; } /** *

* Information about the target. *

* * @return Information about the target. */ public java.util.Map getTargetInformation() { return targetInformation; } /** *

* Information about the target. *

* * @param targetInformation * Information about the target. */ public void setTargetInformation(java.util.Map targetInformation) { this.targetInformation = targetInformation; } /** *

* Information about the target. *

* * @param targetInformation * Information about the target. * @return Returns a reference to this object so that method calls can be chained together. */ public ResolvedTarget withTargetInformation(java.util.Map targetInformation) { setTargetInformation(targetInformation); return this; } /** * Add a single TargetInformation entry * * @see ResolvedTarget#withTargetInformation * @returns a reference to this object so that method calls can be chained together. */ public ResolvedTarget addTargetInformationEntry(String key, String value) { if (null == this.targetInformation) { this.targetInformation = new java.util.HashMap(); } if (this.targetInformation.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.targetInformation.put(key, value); return this; } /** * Removes all the entries added into TargetInformation. * * @return Returns a reference to this object so that method calls can be chained together. */ public ResolvedTarget clearTargetInformationEntries() { this.targetInformation = null; 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 (getTargetName() != null) sb.append("TargetName: ").append(getTargetName()).append(","); if (getTargetInformation() != null) sb.append("TargetInformation: ").append(getTargetInformation()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ResolvedTarget == false) return false; ResolvedTarget other = (ResolvedTarget) obj; if (other.getResourceType() == null ^ this.getResourceType() == null) return false; if (other.getResourceType() != null && other.getResourceType().equals(this.getResourceType()) == false) return false; if (other.getTargetName() == null ^ this.getTargetName() == null) return false; if (other.getTargetName() != null && other.getTargetName().equals(this.getTargetName()) == false) return false; if (other.getTargetInformation() == null ^ this.getTargetInformation() == null) return false; if (other.getTargetInformation() != null && other.getTargetInformation().equals(this.getTargetInformation()) == 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 + ((getTargetName() == null) ? 0 : getTargetName().hashCode()); hashCode = prime * hashCode + ((getTargetInformation() == null) ? 0 : getTargetInformation().hashCode()); return hashCode; } @Override public ResolvedTarget clone() { try { return (ResolvedTarget) 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.ResolvedTargetMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy