
com.amazonaws.services.apigateway.model.CreateDocumentationPartResult Maven / Gradle / Ivy
/*
* 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.apigateway.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* A documentation part for a targeted API entity.
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateDocumentationPartResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The DocumentationPart identifier, generated by API Gateway when the DocumentationPart
is created.
*
*/
private String id;
/**
*
* The location of the API entity to which the documentation applies. Valid fields depend on the targeted API entity
* type. All the valid location fields are not required. If not explicitly specified, a valid location field is
* treated as a wildcard and associated documentation content may be inherited by matching entities, unless
* overridden.
*
*/
private DocumentationPartLocation location;
/**
*
* A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a
* JSON string, e.g., "{ \"description\": \"The API does ...\" }"
. Only OpenAPI-compliant
* documentation-related fields from the properties map are exported and, hence, published as part of the API entity
* definitions, while the original documentation parts are exported in a OpenAPI extension of
* x-amazon-apigateway-documentation
.
*
*/
private String properties;
/**
*
* The DocumentationPart identifier, generated by API Gateway when the DocumentationPart
is created.
*
*
* @param id
* The DocumentationPart identifier, generated by API Gateway when the DocumentationPart
is
* created.
*/
public void setId(String id) {
this.id = id;
}
/**
*
* The DocumentationPart identifier, generated by API Gateway when the DocumentationPart
is created.
*
*
* @return The DocumentationPart identifier, generated by API Gateway when the DocumentationPart
is
* created.
*/
public String getId() {
return this.id;
}
/**
*
* The DocumentationPart identifier, generated by API Gateway when the DocumentationPart
is created.
*
*
* @param id
* The DocumentationPart identifier, generated by API Gateway when the DocumentationPart
is
* created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDocumentationPartResult withId(String id) {
setId(id);
return this;
}
/**
*
* The location of the API entity to which the documentation applies. Valid fields depend on the targeted API entity
* type. All the valid location fields are not required. If not explicitly specified, a valid location field is
* treated as a wildcard and associated documentation content may be inherited by matching entities, unless
* overridden.
*
*
* @param location
* The location of the API entity to which the documentation applies. Valid fields depend on the targeted API
* entity type. All the valid location fields are not required. If not explicitly specified, a valid location
* field is treated as a wildcard and associated documentation content may be inherited by matching entities,
* unless overridden.
*/
public void setLocation(DocumentationPartLocation location) {
this.location = location;
}
/**
*
* The location of the API entity to which the documentation applies. Valid fields depend on the targeted API entity
* type. All the valid location fields are not required. If not explicitly specified, a valid location field is
* treated as a wildcard and associated documentation content may be inherited by matching entities, unless
* overridden.
*
*
* @return The location of the API entity to which the documentation applies. Valid fields depend on the targeted
* API entity type. All the valid location fields are not required. If not explicitly specified, a valid
* location field is treated as a wildcard and associated documentation content may be inherited by matching
* entities, unless overridden.
*/
public DocumentationPartLocation getLocation() {
return this.location;
}
/**
*
* The location of the API entity to which the documentation applies. Valid fields depend on the targeted API entity
* type. All the valid location fields are not required. If not explicitly specified, a valid location field is
* treated as a wildcard and associated documentation content may be inherited by matching entities, unless
* overridden.
*
*
* @param location
* The location of the API entity to which the documentation applies. Valid fields depend on the targeted API
* entity type. All the valid location fields are not required. If not explicitly specified, a valid location
* field is treated as a wildcard and associated documentation content may be inherited by matching entities,
* unless overridden.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDocumentationPartResult withLocation(DocumentationPartLocation location) {
setLocation(location);
return this;
}
/**
*
* A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a
* JSON string, e.g., "{ \"description\": \"The API does ...\" }"
. Only OpenAPI-compliant
* documentation-related fields from the properties map are exported and, hence, published as part of the API entity
* definitions, while the original documentation parts are exported in a OpenAPI extension of
* x-amazon-apigateway-documentation
.
*
*
* @param properties
* A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded
* as a JSON string, e.g., "{ \"description\": \"The API does ...\" }"
. Only OpenAPI-compliant
* documentation-related fields from the properties map are exported and, hence, published as part of the API
* entity definitions, while the original documentation parts are exported in a OpenAPI extension of
* x-amazon-apigateway-documentation
.
*/
public void setProperties(String properties) {
this.properties = properties;
}
/**
*
* A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a
* JSON string, e.g., "{ \"description\": \"The API does ...\" }"
. Only OpenAPI-compliant
* documentation-related fields from the properties map are exported and, hence, published as part of the API entity
* definitions, while the original documentation parts are exported in a OpenAPI extension of
* x-amazon-apigateway-documentation
.
*
*
* @return A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded
* as a JSON string, e.g., "{ \"description\": \"The API does ...\" }"
. Only OpenAPI-compliant
* documentation-related fields from the properties map are exported and, hence, published as part of the
* API entity definitions, while the original documentation parts are exported in a OpenAPI extension of
* x-amazon-apigateway-documentation
.
*/
public String getProperties() {
return this.properties;
}
/**
*
* A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a
* JSON string, e.g., "{ \"description\": \"The API does ...\" }"
. Only OpenAPI-compliant
* documentation-related fields from the properties map are exported and, hence, published as part of the API entity
* definitions, while the original documentation parts are exported in a OpenAPI extension of
* x-amazon-apigateway-documentation
.
*
*
* @param properties
* A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded
* as a JSON string, e.g., "{ \"description\": \"The API does ...\" }"
. Only OpenAPI-compliant
* documentation-related fields from the properties map are exported and, hence, published as part of the API
* entity definitions, while the original documentation parts are exported in a OpenAPI extension of
* x-amazon-apigateway-documentation
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDocumentationPartResult withProperties(String properties) {
setProperties(properties);
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 (getId() != null)
sb.append("Id: ").append(getId()).append(",");
if (getLocation() != null)
sb.append("Location: ").append(getLocation()).append(",");
if (getProperties() != null)
sb.append("Properties: ").append(getProperties());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateDocumentationPartResult == false)
return false;
CreateDocumentationPartResult other = (CreateDocumentationPartResult) obj;
if (other.getId() == null ^ this.getId() == null)
return false;
if (other.getId() != null && other.getId().equals(this.getId()) == false)
return false;
if (other.getLocation() == null ^ this.getLocation() == null)
return false;
if (other.getLocation() != null && other.getLocation().equals(this.getLocation()) == false)
return false;
if (other.getProperties() == null ^ this.getProperties() == null)
return false;
if (other.getProperties() != null && other.getProperties().equals(this.getProperties()) == 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 + ((getLocation() == null) ? 0 : getLocation().hashCode());
hashCode = prime * hashCode + ((getProperties() == null) ? 0 : getProperties().hashCode());
return hashCode;
}
@Override
public CreateDocumentationPartResult clone() {
try {
return (CreateDocumentationPartResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}