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

com.amazonaws.services.apigateway.model.CreateRestApiResult Maven / Gradle / Ivy

Go to download

The AWS SDK for Java with support for OSGi. The AWS SDK for Java provides Java APIs for building software on AWS' cost-effective, scalable, and reliable infrastructure products. The AWS Java SDK allows developers to code against APIs for all of Amazon's infrastructure web services (Amazon S3, Amazon EC2, Amazon SQS, Amazon Relational Database Service, Amazon AutoScaling, etc).

There is a newer version: 1.11.60
Show newest version
/*
 * Copyright 2011-2016 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.apigateway.model;

import java.io.Serializable;

/**
 * 

* Represents a REST API. *

*/ public class CreateRestApiResult implements Serializable, Cloneable { /** *

* The API's identifier. This identifier is unique across all of your APIs * in Amazon API Gateway. *

*/ private String id; /** *

* The API's name. *

*/ private String name; /** *

* The API's description. *

*/ private String description; /** *

* The date when the API was created, in ISO 8601 format. *

*/ private java.util.Date createdDate; private java.util.List warnings; /** *

* The API's identifier. This identifier is unique across all of your APIs * in Amazon API Gateway. *

* * @param id * The API's identifier. This identifier is unique across all of your * APIs in Amazon API Gateway. */ public void setId(String id) { this.id = id; } /** *

* The API's identifier. This identifier is unique across all of your APIs * in Amazon API Gateway. *

* * @return The API's identifier. This identifier is unique across all of * your APIs in Amazon API Gateway. */ public String getId() { return this.id; } /** *

* The API's identifier. This identifier is unique across all of your APIs * in Amazon API Gateway. *

* * @param id * The API's identifier. This identifier is unique across all of your * APIs in Amazon API Gateway. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateRestApiResult withId(String id) { setId(id); return this; } /** *

* The API's name. *

* * @param name * The API's name. */ public void setName(String name) { this.name = name; } /** *

* The API's name. *

* * @return The API's name. */ public String getName() { return this.name; } /** *

* The API's name. *

* * @param name * The API's name. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateRestApiResult withName(String name) { setName(name); return this; } /** *

* The API's description. *

* * @param description * The API's description. */ public void setDescription(String description) { this.description = description; } /** *

* The API's description. *

* * @return The API's description. */ public String getDescription() { return this.description; } /** *

* The API's description. *

* * @param description * The API's description. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateRestApiResult withDescription(String description) { setDescription(description); return this; } /** *

* The date when the API was created, in ISO 8601 format. *

* * @param createdDate * The date when the API was created, in ISO 8601 format. */ public void setCreatedDate(java.util.Date createdDate) { this.createdDate = createdDate; } /** *

* The date when the API was created, in ISO 8601 format. *

* * @return The date when the API was created, in ISO 8601 format. */ public java.util.Date getCreatedDate() { return this.createdDate; } /** *

* The date when the API was created, in ISO 8601 format. *

* * @param createdDate * The date when the API was created, in ISO 8601 format. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateRestApiResult withCreatedDate(java.util.Date createdDate) { setCreatedDate(createdDate); return this; } /** * @return */ public java.util.List getWarnings() { return warnings; } /** * @param warnings */ public void setWarnings(java.util.Collection warnings) { if (warnings == null) { this.warnings = null; return; } this.warnings = new java.util.ArrayList(warnings); } /** *

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

* * @param warnings * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateRestApiResult withWarnings(String... warnings) { if (this.warnings == null) { setWarnings(new java.util.ArrayList(warnings.length)); } for (String ele : warnings) { this.warnings.add(ele); } return this; } /** * @param warnings * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateRestApiResult withWarnings( java.util.Collection warnings) { setWarnings(warnings); 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 (getId() != null) sb.append("Id: " + getId() + ","); if (getName() != null) sb.append("Name: " + getName() + ","); if (getDescription() != null) sb.append("Description: " + getDescription() + ","); if (getCreatedDate() != null) sb.append("CreatedDate: " + getCreatedDate() + ","); if (getWarnings() != null) sb.append("Warnings: " + getWarnings()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateRestApiResult == false) return false; CreateRestApiResult other = (CreateRestApiResult) obj; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getCreatedDate() == null ^ this.getCreatedDate() == null) return false; if (other.getCreatedDate() != null && other.getCreatedDate().equals(this.getCreatedDate()) == false) return false; if (other.getWarnings() == null ^ this.getWarnings() == null) return false; if (other.getWarnings() != null && other.getWarnings().equals(this.getWarnings()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getCreatedDate() == null) ? 0 : getCreatedDate().hashCode()); hashCode = prime * hashCode + ((getWarnings() == null) ? 0 : getWarnings().hashCode()); return hashCode; } @Override public CreateRestApiResult clone() { try { return (CreateRestApiResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException( "Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy