com.amazonaws.services.appmesh.model.ListGatewayRoutesResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-appmesh Show documentation
/*
* 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.appmesh.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ListGatewayRoutesResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The list of existing gateway routes for the specified service mesh and virtual gateway.
*
*/
private java.util.List gatewayRoutes;
/**
*
* The nextToken
value to include in a future ListGatewayRoutes
request. When the results
* of a ListGatewayRoutes
request exceed limit
, you can use this value to retrieve the
* next page of results. This value is null
when there are no more results to return.
*
*/
private String nextToken;
/**
*
* The list of existing gateway routes for the specified service mesh and virtual gateway.
*
*
* @return The list of existing gateway routes for the specified service mesh and virtual gateway.
*/
public java.util.List getGatewayRoutes() {
return gatewayRoutes;
}
/**
*
* The list of existing gateway routes for the specified service mesh and virtual gateway.
*
*
* @param gatewayRoutes
* The list of existing gateway routes for the specified service mesh and virtual gateway.
*/
public void setGatewayRoutes(java.util.Collection gatewayRoutes) {
if (gatewayRoutes == null) {
this.gatewayRoutes = null;
return;
}
this.gatewayRoutes = new java.util.ArrayList(gatewayRoutes);
}
/**
*
* The list of existing gateway routes for the specified service mesh and virtual gateway.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setGatewayRoutes(java.util.Collection)} or {@link #withGatewayRoutes(java.util.Collection)} if you want
* to override the existing values.
*
*
* @param gatewayRoutes
* The list of existing gateway routes for the specified service mesh and virtual gateway.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListGatewayRoutesResult withGatewayRoutes(GatewayRouteRef... gatewayRoutes) {
if (this.gatewayRoutes == null) {
setGatewayRoutes(new java.util.ArrayList(gatewayRoutes.length));
}
for (GatewayRouteRef ele : gatewayRoutes) {
this.gatewayRoutes.add(ele);
}
return this;
}
/**
*
* The list of existing gateway routes for the specified service mesh and virtual gateway.
*
*
* @param gatewayRoutes
* The list of existing gateway routes for the specified service mesh and virtual gateway.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListGatewayRoutesResult withGatewayRoutes(java.util.Collection gatewayRoutes) {
setGatewayRoutes(gatewayRoutes);
return this;
}
/**
*
* The nextToken
value to include in a future ListGatewayRoutes
request. When the results
* of a ListGatewayRoutes
request exceed limit
, you can use this value to retrieve the
* next page of results. This value is null
when there are no more results to return.
*
*
* @param nextToken
* The nextToken
value to include in a future ListGatewayRoutes
request. When the
* results of a ListGatewayRoutes
request exceed limit
, you can use this value to
* retrieve the next page of results. This value is null
when there are no more results to
* return.
*/
public void setNextToken(String nextToken) {
this.nextToken = nextToken;
}
/**
*
* The nextToken
value to include in a future ListGatewayRoutes
request. When the results
* of a ListGatewayRoutes
request exceed limit
, you can use this value to retrieve the
* next page of results. This value is null
when there are no more results to return.
*
*
* @return The nextToken
value to include in a future ListGatewayRoutes
request. When the
* results of a ListGatewayRoutes
request exceed limit
, you can use this value to
* retrieve the next page of results. This value is null
when there are no more results to
* return.
*/
public String getNextToken() {
return this.nextToken;
}
/**
*
* The nextToken
value to include in a future ListGatewayRoutes
request. When the results
* of a ListGatewayRoutes
request exceed limit
, you can use this value to retrieve the
* next page of results. This value is null
when there are no more results to return.
*
*
* @param nextToken
* The nextToken
value to include in a future ListGatewayRoutes
request. When the
* results of a ListGatewayRoutes
request exceed limit
, you can use this value to
* retrieve the next page of results. This value is null
when there are no more results to
* return.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListGatewayRoutesResult withNextToken(String nextToken) {
setNextToken(nextToken);
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 (getGatewayRoutes() != null)
sb.append("GatewayRoutes: ").append(getGatewayRoutes()).append(",");
if (getNextToken() != null)
sb.append("NextToken: ").append(getNextToken());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ListGatewayRoutesResult == false)
return false;
ListGatewayRoutesResult other = (ListGatewayRoutesResult) obj;
if (other.getGatewayRoutes() == null ^ this.getGatewayRoutes() == null)
return false;
if (other.getGatewayRoutes() != null && other.getGatewayRoutes().equals(this.getGatewayRoutes()) == false)
return false;
if (other.getNextToken() == null ^ this.getNextToken() == null)
return false;
if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getGatewayRoutes() == null) ? 0 : getGatewayRoutes().hashCode());
hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
return hashCode;
}
@Override
public ListGatewayRoutesResult clone() {
try {
return (ListGatewayRoutesResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}