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

com.amazonaws.services.eventbridge.model.HttpParameters Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon EventBridge module holds the client classes that are used for communicating with Amazon EventBridge Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2017-2022 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.eventbridge.model;

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

/**
 * 

* These are custom parameter to be used when the target is an API Gateway REST APIs or EventBridge ApiDestinations. In * the latter case, these are merged with any InvocationParameters specified on the Connection, with any values from the * Connection taking precedence. *

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

* The path parameter values to be used to populate API Gateway REST API or EventBridge ApiDestination path * wildcards ("*"). *

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

* The headers that need to be sent as part of request invoking the API Gateway REST API or EventBridge * ApiDestination. *

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

* The query string keys/values that need to be sent as part of request invoking the API Gateway REST API or * EventBridge ApiDestination. *

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

* The path parameter values to be used to populate API Gateway REST API or EventBridge ApiDestination path * wildcards ("*"). *

* * @return The path parameter values to be used to populate API Gateway REST API or EventBridge ApiDestination path * wildcards ("*"). */ public java.util.List getPathParameterValues() { return pathParameterValues; } /** *

* The path parameter values to be used to populate API Gateway REST API or EventBridge ApiDestination path * wildcards ("*"). *

* * @param pathParameterValues * The path parameter values to be used to populate API Gateway REST API or EventBridge ApiDestination path * wildcards ("*"). */ public void setPathParameterValues(java.util.Collection pathParameterValues) { if (pathParameterValues == null) { this.pathParameterValues = null; return; } this.pathParameterValues = new java.util.ArrayList(pathParameterValues); } /** *

* The path parameter values to be used to populate API Gateway REST API or EventBridge ApiDestination path * wildcards ("*"). *

*

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

* * @param pathParameterValues * The path parameter values to be used to populate API Gateway REST API or EventBridge ApiDestination path * wildcards ("*"). * @return Returns a reference to this object so that method calls can be chained together. */ public HttpParameters withPathParameterValues(String... pathParameterValues) { if (this.pathParameterValues == null) { setPathParameterValues(new java.util.ArrayList(pathParameterValues.length)); } for (String ele : pathParameterValues) { this.pathParameterValues.add(ele); } return this; } /** *

* The path parameter values to be used to populate API Gateway REST API or EventBridge ApiDestination path * wildcards ("*"). *

* * @param pathParameterValues * The path parameter values to be used to populate API Gateway REST API or EventBridge ApiDestination path * wildcards ("*"). * @return Returns a reference to this object so that method calls can be chained together. */ public HttpParameters withPathParameterValues(java.util.Collection pathParameterValues) { setPathParameterValues(pathParameterValues); return this; } /** *

* The headers that need to be sent as part of request invoking the API Gateway REST API or EventBridge * ApiDestination. *

* * @return The headers that need to be sent as part of request invoking the API Gateway REST API or EventBridge * ApiDestination. */ public java.util.Map getHeaderParameters() { return headerParameters; } /** *

* The headers that need to be sent as part of request invoking the API Gateway REST API or EventBridge * ApiDestination. *

* * @param headerParameters * The headers that need to be sent as part of request invoking the API Gateway REST API or EventBridge * ApiDestination. */ public void setHeaderParameters(java.util.Map headerParameters) { this.headerParameters = headerParameters; } /** *

* The headers that need to be sent as part of request invoking the API Gateway REST API or EventBridge * ApiDestination. *

* * @param headerParameters * The headers that need to be sent as part of request invoking the API Gateway REST API or EventBridge * ApiDestination. * @return Returns a reference to this object so that method calls can be chained together. */ public HttpParameters withHeaderParameters(java.util.Map headerParameters) { setHeaderParameters(headerParameters); return this; } /** * Add a single HeaderParameters entry * * @see HttpParameters#withHeaderParameters * @returns a reference to this object so that method calls can be chained together. */ public HttpParameters addHeaderParametersEntry(String key, String value) { if (null == this.headerParameters) { this.headerParameters = new java.util.HashMap(); } if (this.headerParameters.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.headerParameters.put(key, value); return this; } /** * Removes all the entries added into HeaderParameters. * * @return Returns a reference to this object so that method calls can be chained together. */ public HttpParameters clearHeaderParametersEntries() { this.headerParameters = null; return this; } /** *

* The query string keys/values that need to be sent as part of request invoking the API Gateway REST API or * EventBridge ApiDestination. *

* * @return The query string keys/values that need to be sent as part of request invoking the API Gateway REST API or * EventBridge ApiDestination. */ public java.util.Map getQueryStringParameters() { return queryStringParameters; } /** *

* The query string keys/values that need to be sent as part of request invoking the API Gateway REST API or * EventBridge ApiDestination. *

* * @param queryStringParameters * The query string keys/values that need to be sent as part of request invoking the API Gateway REST API or * EventBridge ApiDestination. */ public void setQueryStringParameters(java.util.Map queryStringParameters) { this.queryStringParameters = queryStringParameters; } /** *

* The query string keys/values that need to be sent as part of request invoking the API Gateway REST API or * EventBridge ApiDestination. *

* * @param queryStringParameters * The query string keys/values that need to be sent as part of request invoking the API Gateway REST API or * EventBridge ApiDestination. * @return Returns a reference to this object so that method calls can be chained together. */ public HttpParameters withQueryStringParameters(java.util.Map queryStringParameters) { setQueryStringParameters(queryStringParameters); return this; } /** * Add a single QueryStringParameters entry * * @see HttpParameters#withQueryStringParameters * @returns a reference to this object so that method calls can be chained together. */ public HttpParameters addQueryStringParametersEntry(String key, String value) { if (null == this.queryStringParameters) { this.queryStringParameters = new java.util.HashMap(); } if (this.queryStringParameters.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.queryStringParameters.put(key, value); return this; } /** * Removes all the entries added into QueryStringParameters. * * @return Returns a reference to this object so that method calls can be chained together. */ public HttpParameters clearQueryStringParametersEntries() { this.queryStringParameters = 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 (getPathParameterValues() != null) sb.append("PathParameterValues: ").append(getPathParameterValues()).append(","); if (getHeaderParameters() != null) sb.append("HeaderParameters: ").append(getHeaderParameters()).append(","); if (getQueryStringParameters() != null) sb.append("QueryStringParameters: ").append(getQueryStringParameters()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof HttpParameters == false) return false; HttpParameters other = (HttpParameters) obj; if (other.getPathParameterValues() == null ^ this.getPathParameterValues() == null) return false; if (other.getPathParameterValues() != null && other.getPathParameterValues().equals(this.getPathParameterValues()) == false) return false; if (other.getHeaderParameters() == null ^ this.getHeaderParameters() == null) return false; if (other.getHeaderParameters() != null && other.getHeaderParameters().equals(this.getHeaderParameters()) == false) return false; if (other.getQueryStringParameters() == null ^ this.getQueryStringParameters() == null) return false; if (other.getQueryStringParameters() != null && other.getQueryStringParameters().equals(this.getQueryStringParameters()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPathParameterValues() == null) ? 0 : getPathParameterValues().hashCode()); hashCode = prime * hashCode + ((getHeaderParameters() == null) ? 0 : getHeaderParameters().hashCode()); hashCode = prime * hashCode + ((getQueryStringParameters() == null) ? 0 : getQueryStringParameters().hashCode()); return hashCode; } @Override public HttpParameters clone() { try { return (HttpParameters) 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.eventbridge.model.transform.HttpParametersMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy