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

com.amazonaws.services.cloudwatchevents.model.InputTransformer Maven / Gradle / Ivy

/*
 * Copyright 2012-2017 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.cloudwatchevents.model;

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

/**
 * 

* Contains the parameters needed for you to provide custom input to a target based on one or more pieces of data * extracted from the event. *

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

* Map of JSON paths to be extracted from the event. These are key-value pairs, where each value is a JSON path. *

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

* Input template where you can use the values of the keys from InputPathsMap to customize the data * sent to the target. *

*/ private String inputTemplate; /** *

* Map of JSON paths to be extracted from the event. These are key-value pairs, where each value is a JSON path. *

* * @return Map of JSON paths to be extracted from the event. These are key-value pairs, where each value is a JSON * path. */ public java.util.Map getInputPathsMap() { return inputPathsMap; } /** *

* Map of JSON paths to be extracted from the event. These are key-value pairs, where each value is a JSON path. *

* * @param inputPathsMap * Map of JSON paths to be extracted from the event. These are key-value pairs, where each value is a JSON * path. */ public void setInputPathsMap(java.util.Map inputPathsMap) { this.inputPathsMap = inputPathsMap; } /** *

* Map of JSON paths to be extracted from the event. These are key-value pairs, where each value is a JSON path. *

* * @param inputPathsMap * Map of JSON paths to be extracted from the event. These are key-value pairs, where each value is a JSON * path. * @return Returns a reference to this object so that method calls can be chained together. */ public InputTransformer withInputPathsMap(java.util.Map inputPathsMap) { setInputPathsMap(inputPathsMap); return this; } public InputTransformer addInputPathsMapEntry(String key, String value) { if (null == this.inputPathsMap) { this.inputPathsMap = new java.util.HashMap(); } if (this.inputPathsMap.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.inputPathsMap.put(key, value); return this; } /** * Removes all the entries added into InputPathsMap. * * @return Returns a reference to this object so that method calls can be chained together. */ public InputTransformer clearInputPathsMapEntries() { this.inputPathsMap = null; return this; } /** *

* Input template where you can use the values of the keys from InputPathsMap to customize the data * sent to the target. *

* * @param inputTemplate * Input template where you can use the values of the keys from InputPathsMap to customize the * data sent to the target. */ public void setInputTemplate(String inputTemplate) { this.inputTemplate = inputTemplate; } /** *

* Input template where you can use the values of the keys from InputPathsMap to customize the data * sent to the target. *

* * @return Input template where you can use the values of the keys from InputPathsMap to customize the * data sent to the target. */ public String getInputTemplate() { return this.inputTemplate; } /** *

* Input template where you can use the values of the keys from InputPathsMap to customize the data * sent to the target. *

* * @param inputTemplate * Input template where you can use the values of the keys from InputPathsMap to customize the * data sent to the target. * @return Returns a reference to this object so that method calls can be chained together. */ public InputTransformer withInputTemplate(String inputTemplate) { setInputTemplate(inputTemplate); return this; } /** * Returns a string representation of this object; useful for testing and debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getInputPathsMap() != null) sb.append("InputPathsMap: ").append(getInputPathsMap()).append(","); if (getInputTemplate() != null) sb.append("InputTemplate: ").append(getInputTemplate()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof InputTransformer == false) return false; InputTransformer other = (InputTransformer) obj; if (other.getInputPathsMap() == null ^ this.getInputPathsMap() == null) return false; if (other.getInputPathsMap() != null && other.getInputPathsMap().equals(this.getInputPathsMap()) == false) return false; if (other.getInputTemplate() == null ^ this.getInputTemplate() == null) return false; if (other.getInputTemplate() != null && other.getInputTemplate().equals(this.getInputTemplate()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getInputPathsMap() == null) ? 0 : getInputPathsMap().hashCode()); hashCode = prime * hashCode + ((getInputTemplate() == null) ? 0 : getInputTemplate().hashCode()); return hashCode; } @Override public InputTransformer clone() { try { return (InputTransformer) 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.cloudwatchevents.model.transform.InputTransformerMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy