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

software.amazon.awssdk.services.apigateway.model.GetClientCertificateResponse Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon API Gateway module holds the client classes that are used for communicating with Amazon API Gateway

There is a newer version: 2.0.0-preview-11
Show newest version
/*
 * Copyright 2013-2018 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 software.amazon.awssdk.services.apigateway.model;

import java.time.Instant;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Generated;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Represents a client certificate used to configure client-side SSL authentication while sending requests to the * integration endpoint. *

*
Client certificates are used to authenticate an API by the backend server. To authenticate an * API client (or user), use IAM roles and policies, a custom Authorizer or an Amazon Cognito user pool.
* */ @Generated("software.amazon.awssdk:codegen") public class GetClientCertificateResponse extends APIGatewayResponse implements ToCopyableBuilder { private final String clientCertificateId; private final String description; private final String pemEncodedCertificate; private final Instant createdDate; private final Instant expirationDate; private GetClientCertificateResponse(BuilderImpl builder) { super(builder); this.clientCertificateId = builder.clientCertificateId; this.description = builder.description; this.pemEncodedCertificate = builder.pemEncodedCertificate; this.createdDate = builder.createdDate; this.expirationDate = builder.expirationDate; } /** *

* The identifier of the client certificate. *

* * @return The identifier of the client certificate. */ public String clientCertificateId() { return clientCertificateId; } /** *

* The description of the client certificate. *

* * @return The description of the client certificate. */ public String description() { return description; } /** *

* The PEM-encoded public key of the client certificate, which can be used to configure certificate authentication * in the integration endpoint . *

* * @return The PEM-encoded public key of the client certificate, which can be used to configure certificate * authentication in the integration endpoint . */ public String pemEncodedCertificate() { return pemEncodedCertificate; } /** *

* The timestamp when the client certificate was created. *

* * @return The timestamp when the client certificate was created. */ public Instant createdDate() { return createdDate; } /** *

* The timestamp when the client certificate will expire. *

* * @return The timestamp when the client certificate will expire. */ public Instant expirationDate() { return expirationDate; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(clientCertificateId()); hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(pemEncodedCertificate()); hashCode = 31 * hashCode + Objects.hashCode(createdDate()); hashCode = 31 * hashCode + Objects.hashCode(expirationDate()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof GetClientCertificateResponse)) { return false; } GetClientCertificateResponse other = (GetClientCertificateResponse) obj; return Objects.equals(clientCertificateId(), other.clientCertificateId()) && Objects.equals(description(), other.description()) && Objects.equals(pemEncodedCertificate(), other.pemEncodedCertificate()) && Objects.equals(createdDate(), other.createdDate()) && Objects.equals(expirationDate(), other.expirationDate()); } @Override public String toString() { return ToString.builder("GetClientCertificateResponse").add("ClientCertificateId", clientCertificateId()) .add("Description", description()).add("PemEncodedCertificate", pemEncodedCertificate()) .add("CreatedDate", createdDate()).add("ExpirationDate", expirationDate()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "clientCertificateId": return Optional.of(clazz.cast(clientCertificateId())); case "description": return Optional.of(clazz.cast(description())); case "pemEncodedCertificate": return Optional.of(clazz.cast(pemEncodedCertificate())); case "createdDate": return Optional.of(clazz.cast(createdDate())); case "expirationDate": return Optional.of(clazz.cast(expirationDate())); default: return Optional.empty(); } } public interface Builder extends APIGatewayResponse.Builder, CopyableBuilder { /** *

* The identifier of the client certificate. *

* * @param clientCertificateId * The identifier of the client certificate. * @return Returns a reference to this object so that method calls can be chained together. */ Builder clientCertificateId(String clientCertificateId); /** *

* The description of the client certificate. *

* * @param description * The description of the client certificate. * @return Returns a reference to this object so that method calls can be chained together. */ Builder description(String description); /** *

* The PEM-encoded public key of the client certificate, which can be used to configure certificate * authentication in the integration endpoint . *

* * @param pemEncodedCertificate * The PEM-encoded public key of the client certificate, which can be used to configure certificate * authentication in the integration endpoint . * @return Returns a reference to this object so that method calls can be chained together. */ Builder pemEncodedCertificate(String pemEncodedCertificate); /** *

* The timestamp when the client certificate was created. *

* * @param createdDate * The timestamp when the client certificate was created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder createdDate(Instant createdDate); /** *

* The timestamp when the client certificate will expire. *

* * @param expirationDate * The timestamp when the client certificate will expire. * @return Returns a reference to this object so that method calls can be chained together. */ Builder expirationDate(Instant expirationDate); } static final class BuilderImpl extends APIGatewayResponse.BuilderImpl implements Builder { private String clientCertificateId; private String description; private String pemEncodedCertificate; private Instant createdDate; private Instant expirationDate; private BuilderImpl() { } private BuilderImpl(GetClientCertificateResponse model) { clientCertificateId(model.clientCertificateId); description(model.description); pemEncodedCertificate(model.pemEncodedCertificate); createdDate(model.createdDate); expirationDate(model.expirationDate); } public final String getClientCertificateId() { return clientCertificateId; } @Override public final Builder clientCertificateId(String clientCertificateId) { this.clientCertificateId = clientCertificateId; return this; } public final void setClientCertificateId(String clientCertificateId) { this.clientCertificateId = clientCertificateId; } public final String getDescription() { return description; } @Override public final Builder description(String description) { this.description = description; return this; } public final void setDescription(String description) { this.description = description; } public final String getPemEncodedCertificate() { return pemEncodedCertificate; } @Override public final Builder pemEncodedCertificate(String pemEncodedCertificate) { this.pemEncodedCertificate = pemEncodedCertificate; return this; } public final void setPemEncodedCertificate(String pemEncodedCertificate) { this.pemEncodedCertificate = pemEncodedCertificate; } public final Instant getCreatedDate() { return createdDate; } @Override public final Builder createdDate(Instant createdDate) { this.createdDate = createdDate; return this; } public final void setCreatedDate(Instant createdDate) { this.createdDate = createdDate; } public final Instant getExpirationDate() { return expirationDate; } @Override public final Builder expirationDate(Instant expirationDate) { this.expirationDate = expirationDate; return this; } public final void setExpirationDate(Instant expirationDate) { this.expirationDate = expirationDate; } @Override public GetClientCertificateResponse build() { return new GetClientCertificateResponse(this); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy