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

com.amazonaws.services.apigateway.model.CreateAuthorizerRequest 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;
import com.amazonaws.AmazonWebServiceRequest;

/**
 * 

* Request to add a new Authorizer to an existing RestApi * resource. *

*/ public class CreateAuthorizerRequest extends AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The RestApi identifier under which the Authorizer will be * created. *

*/ private String restApiId; /** *

* [Required] The name of the authorizer. *

*/ private String name; /** *

* [Required] The type of the authorizer. *

*/ private String type; /** *

* Optional customer-defined field, used in Swagger imports/exports. Has no * functional impact. *

*/ private String authType; /** *

* [Required] Specifies the authorizer's Uniform Resource Identifier (URI). *

*/ private String authorizerUri; /** *

* Specifies the credentials required for the authorizer, if any. *

*/ private String authorizerCredentials; /** *

* [Required] The source of the identity in an incoming request. *

*/ private String identitySource; /** *

* A validation expression for the incoming identity. *

*/ private String identityValidationExpression; /** *

* The TTL of cached authorizer results. *

*/ private Integer authorizerResultTtlInSeconds; /** *

* The RestApi identifier under which the Authorizer will be * created. *

* * @param restApiId * The RestApi identifier under which the Authorizer * will be created. */ public void setRestApiId(String restApiId) { this.restApiId = restApiId; } /** *

* The RestApi identifier under which the Authorizer will be * created. *

* * @return The RestApi identifier under which the Authorizer * will be created. */ public String getRestApiId() { return this.restApiId; } /** *

* The RestApi identifier under which the Authorizer will be * created. *

* * @param restApiId * The RestApi identifier under which the Authorizer * will be created. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateAuthorizerRequest withRestApiId(String restApiId) { setRestApiId(restApiId); return this; } /** *

* [Required] The name of the authorizer. *

* * @param name * [Required] The name of the authorizer. */ public void setName(String name) { this.name = name; } /** *

* [Required] The name of the authorizer. *

* * @return [Required] The name of the authorizer. */ public String getName() { return this.name; } /** *

* [Required] The name of the authorizer. *

* * @param name * [Required] The name of the authorizer. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateAuthorizerRequest withName(String name) { setName(name); return this; } /** *

* [Required] The type of the authorizer. *

* * @param type * [Required] The type of the authorizer. * @see AuthorizerType */ public void setType(String type) { this.type = type; } /** *

* [Required] The type of the authorizer. *

* * @return [Required] The type of the authorizer. * @see AuthorizerType */ public String getType() { return this.type; } /** *

* [Required] The type of the authorizer. *

* * @param type * [Required] The type of the authorizer. * @return Returns a reference to this object so that method calls can be * chained together. * @see AuthorizerType */ public CreateAuthorizerRequest withType(String type) { setType(type); return this; } /** *

* [Required] The type of the authorizer. *

* * @param type * [Required] The type of the authorizer. * @see AuthorizerType */ public void setType(AuthorizerType type) { this.type = type.toString(); } /** *

* [Required] The type of the authorizer. *

* * @param type * [Required] The type of the authorizer. * @return Returns a reference to this object so that method calls can be * chained together. * @see AuthorizerType */ public CreateAuthorizerRequest withType(AuthorizerType type) { setType(type); return this; } /** *

* Optional customer-defined field, used in Swagger imports/exports. Has no * functional impact. *

* * @param authType * Optional customer-defined field, used in Swagger imports/exports. * Has no functional impact. */ public void setAuthType(String authType) { this.authType = authType; } /** *

* Optional customer-defined field, used in Swagger imports/exports. Has no * functional impact. *

* * @return Optional customer-defined field, used in Swagger imports/exports. * Has no functional impact. */ public String getAuthType() { return this.authType; } /** *

* Optional customer-defined field, used in Swagger imports/exports. Has no * functional impact. *

* * @param authType * Optional customer-defined field, used in Swagger imports/exports. * Has no functional impact. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateAuthorizerRequest withAuthType(String authType) { setAuthType(authType); return this; } /** *

* [Required] Specifies the authorizer's Uniform Resource Identifier (URI). *

* * @param authorizerUri * [Required] Specifies the authorizer's Uniform Resource Identifier * (URI). */ public void setAuthorizerUri(String authorizerUri) { this.authorizerUri = authorizerUri; } /** *

* [Required] Specifies the authorizer's Uniform Resource Identifier (URI). *

* * @return [Required] Specifies the authorizer's Uniform Resource Identifier * (URI). */ public String getAuthorizerUri() { return this.authorizerUri; } /** *

* [Required] Specifies the authorizer's Uniform Resource Identifier (URI). *

* * @param authorizerUri * [Required] Specifies the authorizer's Uniform Resource Identifier * (URI). * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateAuthorizerRequest withAuthorizerUri(String authorizerUri) { setAuthorizerUri(authorizerUri); return this; } /** *

* Specifies the credentials required for the authorizer, if any. *

* * @param authorizerCredentials * Specifies the credentials required for the authorizer, if any. */ public void setAuthorizerCredentials(String authorizerCredentials) { this.authorizerCredentials = authorizerCredentials; } /** *

* Specifies the credentials required for the authorizer, if any. *

* * @return Specifies the credentials required for the authorizer, if any. */ public String getAuthorizerCredentials() { return this.authorizerCredentials; } /** *

* Specifies the credentials required for the authorizer, if any. *

* * @param authorizerCredentials * Specifies the credentials required for the authorizer, if any. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateAuthorizerRequest withAuthorizerCredentials( String authorizerCredentials) { setAuthorizerCredentials(authorizerCredentials); return this; } /** *

* [Required] The source of the identity in an incoming request. *

* * @param identitySource * [Required] The source of the identity in an incoming request. */ public void setIdentitySource(String identitySource) { this.identitySource = identitySource; } /** *

* [Required] The source of the identity in an incoming request. *

* * @return [Required] The source of the identity in an incoming request. */ public String getIdentitySource() { return this.identitySource; } /** *

* [Required] The source of the identity in an incoming request. *

* * @param identitySource * [Required] The source of the identity in an incoming request. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateAuthorizerRequest withIdentitySource(String identitySource) { setIdentitySource(identitySource); return this; } /** *

* A validation expression for the incoming identity. *

* * @param identityValidationExpression * A validation expression for the incoming identity. */ public void setIdentityValidationExpression( String identityValidationExpression) { this.identityValidationExpression = identityValidationExpression; } /** *

* A validation expression for the incoming identity. *

* * @return A validation expression for the incoming identity. */ public String getIdentityValidationExpression() { return this.identityValidationExpression; } /** *

* A validation expression for the incoming identity. *

* * @param identityValidationExpression * A validation expression for the incoming identity. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateAuthorizerRequest withIdentityValidationExpression( String identityValidationExpression) { setIdentityValidationExpression(identityValidationExpression); return this; } /** *

* The TTL of cached authorizer results. *

* * @param authorizerResultTtlInSeconds * The TTL of cached authorizer results. */ public void setAuthorizerResultTtlInSeconds( Integer authorizerResultTtlInSeconds) { this.authorizerResultTtlInSeconds = authorizerResultTtlInSeconds; } /** *

* The TTL of cached authorizer results. *

* * @return The TTL of cached authorizer results. */ public Integer getAuthorizerResultTtlInSeconds() { return this.authorizerResultTtlInSeconds; } /** *

* The TTL of cached authorizer results. *

* * @param authorizerResultTtlInSeconds * The TTL of cached authorizer results. * @return Returns a reference to this object so that method calls can be * chained together. */ public CreateAuthorizerRequest withAuthorizerResultTtlInSeconds( Integer authorizerResultTtlInSeconds) { setAuthorizerResultTtlInSeconds(authorizerResultTtlInSeconds); 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 (getRestApiId() != null) sb.append("RestApiId: " + getRestApiId() + ","); if (getName() != null) sb.append("Name: " + getName() + ","); if (getType() != null) sb.append("Type: " + getType() + ","); if (getAuthType() != null) sb.append("AuthType: " + getAuthType() + ","); if (getAuthorizerUri() != null) sb.append("AuthorizerUri: " + getAuthorizerUri() + ","); if (getAuthorizerCredentials() != null) sb.append("AuthorizerCredentials: " + getAuthorizerCredentials() + ","); if (getIdentitySource() != null) sb.append("IdentitySource: " + getIdentitySource() + ","); if (getIdentityValidationExpression() != null) sb.append("IdentityValidationExpression: " + getIdentityValidationExpression() + ","); if (getAuthorizerResultTtlInSeconds() != null) sb.append("AuthorizerResultTtlInSeconds: " + getAuthorizerResultTtlInSeconds()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateAuthorizerRequest == false) return false; CreateAuthorizerRequest other = (CreateAuthorizerRequest) obj; if (other.getRestApiId() == null ^ this.getRestApiId() == null) return false; if (other.getRestApiId() != null && other.getRestApiId().equals(this.getRestApiId()) == 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.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getAuthType() == null ^ this.getAuthType() == null) return false; if (other.getAuthType() != null && other.getAuthType().equals(this.getAuthType()) == false) return false; if (other.getAuthorizerUri() == null ^ this.getAuthorizerUri() == null) return false; if (other.getAuthorizerUri() != null && other.getAuthorizerUri().equals(this.getAuthorizerUri()) == false) return false; if (other.getAuthorizerCredentials() == null ^ this.getAuthorizerCredentials() == null) return false; if (other.getAuthorizerCredentials() != null && other.getAuthorizerCredentials().equals( this.getAuthorizerCredentials()) == false) return false; if (other.getIdentitySource() == null ^ this.getIdentitySource() == null) return false; if (other.getIdentitySource() != null && other.getIdentitySource().equals(this.getIdentitySource()) == false) return false; if (other.getIdentityValidationExpression() == null ^ this.getIdentityValidationExpression() == null) return false; if (other.getIdentityValidationExpression() != null && other.getIdentityValidationExpression().equals( this.getIdentityValidationExpression()) == false) return false; if (other.getAuthorizerResultTtlInSeconds() == null ^ this.getAuthorizerResultTtlInSeconds() == null) return false; if (other.getAuthorizerResultTtlInSeconds() != null && other.getAuthorizerResultTtlInSeconds().equals( this.getAuthorizerResultTtlInSeconds()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRestApiId() == null) ? 0 : getRestApiId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getAuthType() == null) ? 0 : getAuthType().hashCode()); hashCode = prime * hashCode + ((getAuthorizerUri() == null) ? 0 : getAuthorizerUri() .hashCode()); hashCode = prime * hashCode + ((getAuthorizerCredentials() == null) ? 0 : getAuthorizerCredentials().hashCode()); hashCode = prime * hashCode + ((getIdentitySource() == null) ? 0 : getIdentitySource() .hashCode()); hashCode = prime * hashCode + ((getIdentityValidationExpression() == null) ? 0 : getIdentityValidationExpression().hashCode()); hashCode = prime * hashCode + ((getAuthorizerResultTtlInSeconds() == null) ? 0 : getAuthorizerResultTtlInSeconds().hashCode()); return hashCode; } @Override public CreateAuthorizerRequest clone() { return (CreateAuthorizerRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy