/* * 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.apigatewayv2.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Represents a route response. *
*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class RouteResponse implements Serializable, Cloneable, StructuredPojo { /** ** Represents the model selection expression of a route response. Supported only for WebSocket APIs. *
*/ private String modelSelectionExpression; /** ** Represents the response models of a route response. *
*/ private java.util.Map* Represents the response parameters of a route response. *
*/ private java.util.Map* Represents the identifier of a route response. *
*/ private String routeResponseId; /** ** Represents the route response key of a route response. *
*/ private String routeResponseKey; /** ** Represents the model selection expression of a route response. Supported only for WebSocket APIs. *
* * @param modelSelectionExpression * Represents the model selection expression of a route response. Supported only for WebSocket APIs. */ public void setModelSelectionExpression(String modelSelectionExpression) { this.modelSelectionExpression = modelSelectionExpression; } /** ** Represents the model selection expression of a route response. Supported only for WebSocket APIs. *
* * @return Represents the model selection expression of a route response. Supported only for WebSocket APIs. */ public String getModelSelectionExpression() { return this.modelSelectionExpression; } /** ** Represents the model selection expression of a route response. Supported only for WebSocket APIs. *
* * @param modelSelectionExpression * Represents the model selection expression of a route response. Supported only for WebSocket APIs. * @return Returns a reference to this object so that method calls can be chained together. */ public RouteResponse withModelSelectionExpression(String modelSelectionExpression) { setModelSelectionExpression(modelSelectionExpression); return this; } /** ** Represents the response models of a route response. *
* * @return Represents the response models of a route response. */ public java.util.Map* Represents the response models of a route response. *
* * @param responseModels * Represents the response models of a route response. */ public void setResponseModels(java.util.Map* Represents the response models of a route response. *
* * @param responseModels * Represents the response models of a route response. * @return Returns a reference to this object so that method calls can be chained together. */ public RouteResponse withResponseModels(java.util.Map* Represents the response parameters of a route response. *
* * @return Represents the response parameters of a route response. */ public java.util.Map* Represents the response parameters of a route response. *
* * @param responseParameters * Represents the response parameters of a route response. */ public void setResponseParameters(java.util.Map* Represents the response parameters of a route response. *
* * @param responseParameters * Represents the response parameters of a route response. * @return Returns a reference to this object so that method calls can be chained together. */ public RouteResponse withResponseParameters(java.util.Map* Represents the identifier of a route response. *
* * @param routeResponseId * Represents the identifier of a route response. */ public void setRouteResponseId(String routeResponseId) { this.routeResponseId = routeResponseId; } /** ** Represents the identifier of a route response. *
* * @return Represents the identifier of a route response. */ public String getRouteResponseId() { return this.routeResponseId; } /** ** Represents the identifier of a route response. *
* * @param routeResponseId * Represents the identifier of a route response. * @return Returns a reference to this object so that method calls can be chained together. */ public RouteResponse withRouteResponseId(String routeResponseId) { setRouteResponseId(routeResponseId); return this; } /** ** Represents the route response key of a route response. *
* * @param routeResponseKey * Represents the route response key of a route response. */ public void setRouteResponseKey(String routeResponseKey) { this.routeResponseKey = routeResponseKey; } /** ** Represents the route response key of a route response. *
* * @return Represents the route response key of a route response. */ public String getRouteResponseKey() { return this.routeResponseKey; } /** ** Represents the route response key of a route response. *
* * @param routeResponseKey * Represents the route response key of a route response. * @return Returns a reference to this object so that method calls can be chained together. */ public RouteResponse withRouteResponseKey(String routeResponseKey) { setRouteResponseKey(routeResponseKey); 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 (getModelSelectionExpression() != null) sb.append("ModelSelectionExpression: ").append(getModelSelectionExpression()).append(","); if (getResponseModels() != null) sb.append("ResponseModels: ").append(getResponseModels()).append(","); if (getResponseParameters() != null) sb.append("ResponseParameters: ").append(getResponseParameters()).append(","); if (getRouteResponseId() != null) sb.append("RouteResponseId: ").append(getRouteResponseId()).append(","); if (getRouteResponseKey() != null) sb.append("RouteResponseKey: ").append(getRouteResponseKey()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RouteResponse == false) return false; RouteResponse other = (RouteResponse) obj; if (other.getModelSelectionExpression() == null ^ this.getModelSelectionExpression() == null) return false; if (other.getModelSelectionExpression() != null && other.getModelSelectionExpression().equals(this.getModelSelectionExpression()) == false) return false; if (other.getResponseModels() == null ^ this.getResponseModels() == null) return false; if (other.getResponseModels() != null && other.getResponseModels().equals(this.getResponseModels()) == false) return false; if (other.getResponseParameters() == null ^ this.getResponseParameters() == null) return false; if (other.getResponseParameters() != null && other.getResponseParameters().equals(this.getResponseParameters()) == false) return false; if (other.getRouteResponseId() == null ^ this.getRouteResponseId() == null) return false; if (other.getRouteResponseId() != null && other.getRouteResponseId().equals(this.getRouteResponseId()) == false) return false; if (other.getRouteResponseKey() == null ^ this.getRouteResponseKey() == null) return false; if (other.getRouteResponseKey() != null && other.getRouteResponseKey().equals(this.getRouteResponseKey()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getModelSelectionExpression() == null) ? 0 : getModelSelectionExpression().hashCode()); hashCode = prime * hashCode + ((getResponseModels() == null) ? 0 : getResponseModels().hashCode()); hashCode = prime * hashCode + ((getResponseParameters() == null) ? 0 : getResponseParameters().hashCode()); hashCode = prime * hashCode + ((getRouteResponseId() == null) ? 0 : getRouteResponseId().hashCode()); hashCode = prime * hashCode + ((getRouteResponseKey() == null) ? 0 : getRouteResponseKey().hashCode()); return hashCode; } @Override public RouteResponse clone() { try { return (RouteResponse) 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.apigatewayv2.model.transform.RouteResponseMarshaller.getInstance().marshall(this, protocolMarshaller); } }