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

software.amazon.awssdk.services.iot.model.CertificateDescription Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Iot Service module holds the client classes that are used for communicating with AWS IoT Service

There is a newer version: 2.30.1
Show newest version
/*
 * Copyright 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.iot.model;

import java.io.Serializable;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Describes a certificate. *

*/ @Generated("software.amazon.awssdk:codegen") public final class CertificateDescription implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField CERTIFICATE_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("certificateArn").getter(getter(CertificateDescription::certificateArn)) .setter(setter(Builder::certificateArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("certificateArn").build()).build(); private static final SdkField CERTIFICATE_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("certificateId").getter(getter(CertificateDescription::certificateId)) .setter(setter(Builder::certificateId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("certificateId").build()).build(); private static final SdkField CA_CERTIFICATE_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("caCertificateId").getter(getter(CertificateDescription::caCertificateId)) .setter(setter(Builder::caCertificateId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("caCertificateId").build()).build(); private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING).memberName("status") .getter(getter(CertificateDescription::statusAsString)).setter(setter(Builder::status)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("status").build()).build(); private static final SdkField CERTIFICATE_PEM_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("certificatePem").getter(getter(CertificateDescription::certificatePem)) .setter(setter(Builder::certificatePem)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("certificatePem").build()).build(); private static final SdkField OWNED_BY_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ownedBy").getter(getter(CertificateDescription::ownedBy)).setter(setter(Builder::ownedBy)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ownedBy").build()).build(); private static final SdkField PREVIOUS_OWNED_BY_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("previousOwnedBy").getter(getter(CertificateDescription::previousOwnedBy)) .setter(setter(Builder::previousOwnedBy)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("previousOwnedBy").build()).build(); private static final SdkField CREATION_DATE_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("creationDate").getter(getter(CertificateDescription::creationDate)) .setter(setter(Builder::creationDate)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("creationDate").build()).build(); private static final SdkField LAST_MODIFIED_DATE_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("lastModifiedDate").getter(getter(CertificateDescription::lastModifiedDate)) .setter(setter(Builder::lastModifiedDate)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("lastModifiedDate").build()).build(); private static final SdkField CUSTOMER_VERSION_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("customerVersion").getter(getter(CertificateDescription::customerVersion)) .setter(setter(Builder::customerVersion)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("customerVersion").build()).build(); private static final SdkField TRANSFER_DATA_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("transferData").getter(getter(CertificateDescription::transferData)) .setter(setter(Builder::transferData)).constructor(TransferData::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("transferData").build()).build(); private static final SdkField GENERATION_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("generationId").getter(getter(CertificateDescription::generationId)) .setter(setter(Builder::generationId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("generationId").build()).build(); private static final SdkField VALIDITY_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("validity") .getter(getter(CertificateDescription::validity)).setter(setter(Builder::validity)) .constructor(CertificateValidity::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("validity").build()).build(); private static final SdkField CERTIFICATE_MODE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("certificateMode").getter(getter(CertificateDescription::certificateModeAsString)) .setter(setter(Builder::certificateMode)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("certificateMode").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(CERTIFICATE_ARN_FIELD, CERTIFICATE_ID_FIELD, CA_CERTIFICATE_ID_FIELD, STATUS_FIELD, CERTIFICATE_PEM_FIELD, OWNED_BY_FIELD, PREVIOUS_OWNED_BY_FIELD, CREATION_DATE_FIELD, LAST_MODIFIED_DATE_FIELD, CUSTOMER_VERSION_FIELD, TRANSFER_DATA_FIELD, GENERATION_ID_FIELD, VALIDITY_FIELD, CERTIFICATE_MODE_FIELD)); private static final Map> SDK_NAME_TO_FIELD = memberNameToFieldInitializer(); private static final long serialVersionUID = 1L; private final String certificateArn; private final String certificateId; private final String caCertificateId; private final String status; private final String certificatePem; private final String ownedBy; private final String previousOwnedBy; private final Instant creationDate; private final Instant lastModifiedDate; private final Integer customerVersion; private final TransferData transferData; private final String generationId; private final CertificateValidity validity; private final String certificateMode; private CertificateDescription(BuilderImpl builder) { this.certificateArn = builder.certificateArn; this.certificateId = builder.certificateId; this.caCertificateId = builder.caCertificateId; this.status = builder.status; this.certificatePem = builder.certificatePem; this.ownedBy = builder.ownedBy; this.previousOwnedBy = builder.previousOwnedBy; this.creationDate = builder.creationDate; this.lastModifiedDate = builder.lastModifiedDate; this.customerVersion = builder.customerVersion; this.transferData = builder.transferData; this.generationId = builder.generationId; this.validity = builder.validity; this.certificateMode = builder.certificateMode; } /** *

* The ARN of the certificate. *

* * @return The ARN of the certificate. */ public final String certificateArn() { return certificateArn; } /** *

* The ID of the certificate. *

* * @return The ID of the certificate. */ public final String certificateId() { return certificateId; } /** *

* The certificate ID of the CA certificate used to sign this certificate. *

* * @return The certificate ID of the CA certificate used to sign this certificate. */ public final String caCertificateId() { return caCertificateId; } /** *

* The status of the certificate. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #status} will * return {@link CertificateStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #statusAsString}. *

* * @return The status of the certificate. * @see CertificateStatus */ public final CertificateStatus status() { return CertificateStatus.fromValue(status); } /** *

* The status of the certificate. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #status} will * return {@link CertificateStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #statusAsString}. *

* * @return The status of the certificate. * @see CertificateStatus */ public final String statusAsString() { return status; } /** *

* The certificate data, in PEM format. *

* * @return The certificate data, in PEM format. */ public final String certificatePem() { return certificatePem; } /** *

* The ID of the Amazon Web Services account that owns the certificate. *

* * @return The ID of the Amazon Web Services account that owns the certificate. */ public final String ownedBy() { return ownedBy; } /** *

* The ID of the Amazon Web Services account of the previous owner of the certificate. *

* * @return The ID of the Amazon Web Services account of the previous owner of the certificate. */ public final String previousOwnedBy() { return previousOwnedBy; } /** *

* The date and time the certificate was created. *

* * @return The date and time the certificate was created. */ public final Instant creationDate() { return creationDate; } /** *

* The date and time the certificate was last modified. *

* * @return The date and time the certificate was last modified. */ public final Instant lastModifiedDate() { return lastModifiedDate; } /** *

* The customer version of the certificate. *

* * @return The customer version of the certificate. */ public final Integer customerVersion() { return customerVersion; } /** *

* The transfer data. *

* * @return The transfer data. */ public final TransferData transferData() { return transferData; } /** *

* The generation ID of the certificate. *

* * @return The generation ID of the certificate. */ public final String generationId() { return generationId; } /** *

* When the certificate is valid. *

* * @return When the certificate is valid. */ public final CertificateValidity validity() { return validity; } /** *

* The mode of the certificate. *

*

* DEFAULT: A certificate in DEFAULT mode is either generated by Amazon Web Services IoT * Core or registered with an issuer certificate authority (CA) in DEFAULT mode. Devices with * certificates in DEFAULT mode aren't required to send the Server Name Indication (SNI) extension when * connecting to Amazon Web Services IoT Core. However, to use features such as custom domains and VPC endpoints, we * recommend that you use the SNI extension when connecting to Amazon Web Services IoT Core. *

*

* SNI_ONLY: A certificate in SNI_ONLY mode is registered without an issuer CA. Devices * with certificates in SNI_ONLY mode must send the SNI extension when connecting to Amazon Web * Services IoT Core. *

*

* For more information about the value for SNI extension, see Transport security in * IoT. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #certificateMode} * will return {@link CertificateMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available * from {@link #certificateModeAsString}. *

* * @return The mode of the certificate.

*

* DEFAULT: A certificate in DEFAULT mode is either generated by Amazon Web * Services IoT Core or registered with an issuer certificate authority (CA) in DEFAULT mode. * Devices with certificates in DEFAULT mode aren't required to send the Server Name Indication * (SNI) extension when connecting to Amazon Web Services IoT Core. However, to use features such as custom * domains and VPC endpoints, we recommend that you use the SNI extension when connecting to Amazon Web * Services IoT Core. *

*

* SNI_ONLY: A certificate in SNI_ONLY mode is registered without an issuer CA. * Devices with certificates in SNI_ONLY mode must send the SNI extension when connecting to * Amazon Web Services IoT Core. *

*

* For more information about the value for SNI extension, see Transport security * in IoT. * @see CertificateMode */ public final CertificateMode certificateMode() { return CertificateMode.fromValue(certificateMode); } /** *

* The mode of the certificate. *

*

* DEFAULT: A certificate in DEFAULT mode is either generated by Amazon Web Services IoT * Core or registered with an issuer certificate authority (CA) in DEFAULT mode. Devices with * certificates in DEFAULT mode aren't required to send the Server Name Indication (SNI) extension when * connecting to Amazon Web Services IoT Core. However, to use features such as custom domains and VPC endpoints, we * recommend that you use the SNI extension when connecting to Amazon Web Services IoT Core. *

*

* SNI_ONLY: A certificate in SNI_ONLY mode is registered without an issuer CA. Devices * with certificates in SNI_ONLY mode must send the SNI extension when connecting to Amazon Web * Services IoT Core. *

*

* For more information about the value for SNI extension, see Transport security in * IoT. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #certificateMode} * will return {@link CertificateMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available * from {@link #certificateModeAsString}. *

* * @return The mode of the certificate.

*

* DEFAULT: A certificate in DEFAULT mode is either generated by Amazon Web * Services IoT Core or registered with an issuer certificate authority (CA) in DEFAULT mode. * Devices with certificates in DEFAULT mode aren't required to send the Server Name Indication * (SNI) extension when connecting to Amazon Web Services IoT Core. However, to use features such as custom * domains and VPC endpoints, we recommend that you use the SNI extension when connecting to Amazon Web * Services IoT Core. *

*

* SNI_ONLY: A certificate in SNI_ONLY mode is registered without an issuer CA. * Devices with certificates in SNI_ONLY mode must send the SNI extension when connecting to * Amazon Web Services IoT Core. *

*

* For more information about the value for SNI extension, see Transport security * in IoT. * @see CertificateMode */ public final String certificateModeAsString() { return certificateMode; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(certificateArn()); hashCode = 31 * hashCode + Objects.hashCode(certificateId()); hashCode = 31 * hashCode + Objects.hashCode(caCertificateId()); hashCode = 31 * hashCode + Objects.hashCode(statusAsString()); hashCode = 31 * hashCode + Objects.hashCode(certificatePem()); hashCode = 31 * hashCode + Objects.hashCode(ownedBy()); hashCode = 31 * hashCode + Objects.hashCode(previousOwnedBy()); hashCode = 31 * hashCode + Objects.hashCode(creationDate()); hashCode = 31 * hashCode + Objects.hashCode(lastModifiedDate()); hashCode = 31 * hashCode + Objects.hashCode(customerVersion()); hashCode = 31 * hashCode + Objects.hashCode(transferData()); hashCode = 31 * hashCode + Objects.hashCode(generationId()); hashCode = 31 * hashCode + Objects.hashCode(validity()); hashCode = 31 * hashCode + Objects.hashCode(certificateModeAsString()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof CertificateDescription)) { return false; } CertificateDescription other = (CertificateDescription) obj; return Objects.equals(certificateArn(), other.certificateArn()) && Objects.equals(certificateId(), other.certificateId()) && Objects.equals(caCertificateId(), other.caCertificateId()) && Objects.equals(statusAsString(), other.statusAsString()) && Objects.equals(certificatePem(), other.certificatePem()) && Objects.equals(ownedBy(), other.ownedBy()) && Objects.equals(previousOwnedBy(), other.previousOwnedBy()) && Objects.equals(creationDate(), other.creationDate()) && Objects.equals(lastModifiedDate(), other.lastModifiedDate()) && Objects.equals(customerVersion(), other.customerVersion()) && Objects.equals(transferData(), other.transferData()) && Objects.equals(generationId(), other.generationId()) && Objects.equals(validity(), other.validity()) && Objects.equals(certificateModeAsString(), other.certificateModeAsString()); } /** * 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. */ @Override public final String toString() { return ToString.builder("CertificateDescription").add("CertificateArn", certificateArn()) .add("CertificateId", certificateId()).add("CaCertificateId", caCertificateId()).add("Status", statusAsString()) .add("CertificatePem", certificatePem()).add("OwnedBy", ownedBy()).add("PreviousOwnedBy", previousOwnedBy()) .add("CreationDate", creationDate()).add("LastModifiedDate", lastModifiedDate()) .add("CustomerVersion", customerVersion()).add("TransferData", transferData()) .add("GenerationId", generationId()).add("Validity", validity()) .add("CertificateMode", certificateModeAsString()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "certificateArn": return Optional.ofNullable(clazz.cast(certificateArn())); case "certificateId": return Optional.ofNullable(clazz.cast(certificateId())); case "caCertificateId": return Optional.ofNullable(clazz.cast(caCertificateId())); case "status": return Optional.ofNullable(clazz.cast(statusAsString())); case "certificatePem": return Optional.ofNullable(clazz.cast(certificatePem())); case "ownedBy": return Optional.ofNullable(clazz.cast(ownedBy())); case "previousOwnedBy": return Optional.ofNullable(clazz.cast(previousOwnedBy())); case "creationDate": return Optional.ofNullable(clazz.cast(creationDate())); case "lastModifiedDate": return Optional.ofNullable(clazz.cast(lastModifiedDate())); case "customerVersion": return Optional.ofNullable(clazz.cast(customerVersion())); case "transferData": return Optional.ofNullable(clazz.cast(transferData())); case "generationId": return Optional.ofNullable(clazz.cast(generationId())); case "validity": return Optional.ofNullable(clazz.cast(validity())); case "certificateMode": return Optional.ofNullable(clazz.cast(certificateModeAsString())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } @Override public final Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } private static Map> memberNameToFieldInitializer() { Map> map = new HashMap<>(); map.put("certificateArn", CERTIFICATE_ARN_FIELD); map.put("certificateId", CERTIFICATE_ID_FIELD); map.put("caCertificateId", CA_CERTIFICATE_ID_FIELD); map.put("status", STATUS_FIELD); map.put("certificatePem", CERTIFICATE_PEM_FIELD); map.put("ownedBy", OWNED_BY_FIELD); map.put("previousOwnedBy", PREVIOUS_OWNED_BY_FIELD); map.put("creationDate", CREATION_DATE_FIELD); map.put("lastModifiedDate", LAST_MODIFIED_DATE_FIELD); map.put("customerVersion", CUSTOMER_VERSION_FIELD); map.put("transferData", TRANSFER_DATA_FIELD); map.put("generationId", GENERATION_ID_FIELD); map.put("validity", VALIDITY_FIELD); map.put("certificateMode", CERTIFICATE_MODE_FIELD); return Collections.unmodifiableMap(map); } private static Function getter(Function g) { return obj -> g.apply((CertificateDescription) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The ARN of the certificate. *

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

* The ID of the certificate. *

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

* The certificate ID of the CA certificate used to sign this certificate. *

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

* The status of the certificate. *

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

* The status of the certificate. *

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

* The certificate data, in PEM format. *

* * @param certificatePem * The certificate data, in PEM format. * @return Returns a reference to this object so that method calls can be chained together. */ Builder certificatePem(String certificatePem); /** *

* The ID of the Amazon Web Services account that owns the certificate. *

* * @param ownedBy * The ID of the Amazon Web Services account that owns the certificate. * @return Returns a reference to this object so that method calls can be chained together. */ Builder ownedBy(String ownedBy); /** *

* The ID of the Amazon Web Services account of the previous owner of the certificate. *

* * @param previousOwnedBy * The ID of the Amazon Web Services account of the previous owner of the certificate. * @return Returns a reference to this object so that method calls can be chained together. */ Builder previousOwnedBy(String previousOwnedBy); /** *

* The date and time the certificate was created. *

* * @param creationDate * The date and time the certificate was created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder creationDate(Instant creationDate); /** *

* The date and time the certificate was last modified. *

* * @param lastModifiedDate * The date and time the certificate was last modified. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lastModifiedDate(Instant lastModifiedDate); /** *

* The customer version of the certificate. *

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

* The transfer data. *

* * @param transferData * The transfer data. * @return Returns a reference to this object so that method calls can be chained together. */ Builder transferData(TransferData transferData); /** *

* The transfer data. *

* This is a convenience method that creates an instance of the {@link TransferData.Builder} avoiding the need * to create one manually via {@link TransferData#builder()}. * *

* When the {@link Consumer} completes, {@link TransferData.Builder#build()} is called immediately and its * result is passed to {@link #transferData(TransferData)}. * * @param transferData * a consumer that will call methods on {@link TransferData.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #transferData(TransferData) */ default Builder transferData(Consumer transferData) { return transferData(TransferData.builder().applyMutation(transferData).build()); } /** *

* The generation ID of the certificate. *

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

* When the certificate is valid. *

* * @param validity * When the certificate is valid. * @return Returns a reference to this object so that method calls can be chained together. */ Builder validity(CertificateValidity validity); /** *

* When the certificate is valid. *

* This is a convenience method that creates an instance of the {@link CertificateValidity.Builder} avoiding the * need to create one manually via {@link CertificateValidity#builder()}. * *

* When the {@link Consumer} completes, {@link CertificateValidity.Builder#build()} is called immediately and * its result is passed to {@link #validity(CertificateValidity)}. * * @param validity * a consumer that will call methods on {@link CertificateValidity.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #validity(CertificateValidity) */ default Builder validity(Consumer validity) { return validity(CertificateValidity.builder().applyMutation(validity).build()); } /** *

* The mode of the certificate. *

*

* DEFAULT: A certificate in DEFAULT mode is either generated by Amazon Web Services * IoT Core or registered with an issuer certificate authority (CA) in DEFAULT mode. Devices with * certificates in DEFAULT mode aren't required to send the Server Name Indication (SNI) extension * when connecting to Amazon Web Services IoT Core. However, to use features such as custom domains and VPC * endpoints, we recommend that you use the SNI extension when connecting to Amazon Web Services IoT Core. *

*

* SNI_ONLY: A certificate in SNI_ONLY mode is registered without an issuer CA. * Devices with certificates in SNI_ONLY mode must send the SNI extension when connecting to Amazon * Web Services IoT Core. *

*

* For more information about the value for SNI extension, see Transport security in * IoT. *

* * @param certificateMode * The mode of the certificate.

*

* DEFAULT: A certificate in DEFAULT mode is either generated by Amazon Web * Services IoT Core or registered with an issuer certificate authority (CA) in DEFAULT * mode. Devices with certificates in DEFAULT mode aren't required to send the Server Name * Indication (SNI) extension when connecting to Amazon Web Services IoT Core. However, to use features * such as custom domains and VPC endpoints, we recommend that you use the SNI extension when connecting * to Amazon Web Services IoT Core. *

*

* SNI_ONLY: A certificate in SNI_ONLY mode is registered without an issuer CA. * Devices with certificates in SNI_ONLY mode must send the SNI extension when connecting to * Amazon Web Services IoT Core. *

*

* For more information about the value for SNI extension, see Transport * security in IoT. * @see CertificateMode * @return Returns a reference to this object so that method calls can be chained together. * @see CertificateMode */ Builder certificateMode(String certificateMode); /** *

* The mode of the certificate. *

*

* DEFAULT: A certificate in DEFAULT mode is either generated by Amazon Web Services * IoT Core or registered with an issuer certificate authority (CA) in DEFAULT mode. Devices with * certificates in DEFAULT mode aren't required to send the Server Name Indication (SNI) extension * when connecting to Amazon Web Services IoT Core. However, to use features such as custom domains and VPC * endpoints, we recommend that you use the SNI extension when connecting to Amazon Web Services IoT Core. *

*

* SNI_ONLY: A certificate in SNI_ONLY mode is registered without an issuer CA. * Devices with certificates in SNI_ONLY mode must send the SNI extension when connecting to Amazon * Web Services IoT Core. *

*

* For more information about the value for SNI extension, see Transport security in * IoT. *

* * @param certificateMode * The mode of the certificate.

*

* DEFAULT: A certificate in DEFAULT mode is either generated by Amazon Web * Services IoT Core or registered with an issuer certificate authority (CA) in DEFAULT * mode. Devices with certificates in DEFAULT mode aren't required to send the Server Name * Indication (SNI) extension when connecting to Amazon Web Services IoT Core. However, to use features * such as custom domains and VPC endpoints, we recommend that you use the SNI extension when connecting * to Amazon Web Services IoT Core. *

*

* SNI_ONLY: A certificate in SNI_ONLY mode is registered without an issuer CA. * Devices with certificates in SNI_ONLY mode must send the SNI extension when connecting to * Amazon Web Services IoT Core. *

*

* For more information about the value for SNI extension, see Transport * security in IoT. * @see CertificateMode * @return Returns a reference to this object so that method calls can be chained together. * @see CertificateMode */ Builder certificateMode(CertificateMode certificateMode); } static final class BuilderImpl implements Builder { private String certificateArn; private String certificateId; private String caCertificateId; private String status; private String certificatePem; private String ownedBy; private String previousOwnedBy; private Instant creationDate; private Instant lastModifiedDate; private Integer customerVersion; private TransferData transferData; private String generationId; private CertificateValidity validity; private String certificateMode; private BuilderImpl() { } private BuilderImpl(CertificateDescription model) { certificateArn(model.certificateArn); certificateId(model.certificateId); caCertificateId(model.caCertificateId); status(model.status); certificatePem(model.certificatePem); ownedBy(model.ownedBy); previousOwnedBy(model.previousOwnedBy); creationDate(model.creationDate); lastModifiedDate(model.lastModifiedDate); customerVersion(model.customerVersion); transferData(model.transferData); generationId(model.generationId); validity(model.validity); certificateMode(model.certificateMode); } public final String getCertificateArn() { return certificateArn; } public final void setCertificateArn(String certificateArn) { this.certificateArn = certificateArn; } @Override public final Builder certificateArn(String certificateArn) { this.certificateArn = certificateArn; return this; } public final String getCertificateId() { return certificateId; } public final void setCertificateId(String certificateId) { this.certificateId = certificateId; } @Override public final Builder certificateId(String certificateId) { this.certificateId = certificateId; return this; } public final String getCaCertificateId() { return caCertificateId; } public final void setCaCertificateId(String caCertificateId) { this.caCertificateId = caCertificateId; } @Override public final Builder caCertificateId(String caCertificateId) { this.caCertificateId = caCertificateId; return this; } public final String getStatus() { return status; } public final void setStatus(String status) { this.status = status; } @Override public final Builder status(String status) { this.status = status; return this; } @Override public final Builder status(CertificateStatus status) { this.status(status == null ? null : status.toString()); return this; } public final String getCertificatePem() { return certificatePem; } public final void setCertificatePem(String certificatePem) { this.certificatePem = certificatePem; } @Override public final Builder certificatePem(String certificatePem) { this.certificatePem = certificatePem; return this; } public final String getOwnedBy() { return ownedBy; } public final void setOwnedBy(String ownedBy) { this.ownedBy = ownedBy; } @Override public final Builder ownedBy(String ownedBy) { this.ownedBy = ownedBy; return this; } public final String getPreviousOwnedBy() { return previousOwnedBy; } public final void setPreviousOwnedBy(String previousOwnedBy) { this.previousOwnedBy = previousOwnedBy; } @Override public final Builder previousOwnedBy(String previousOwnedBy) { this.previousOwnedBy = previousOwnedBy; return this; } public final Instant getCreationDate() { return creationDate; } public final void setCreationDate(Instant creationDate) { this.creationDate = creationDate; } @Override public final Builder creationDate(Instant creationDate) { this.creationDate = creationDate; return this; } public final Instant getLastModifiedDate() { return lastModifiedDate; } public final void setLastModifiedDate(Instant lastModifiedDate) { this.lastModifiedDate = lastModifiedDate; } @Override public final Builder lastModifiedDate(Instant lastModifiedDate) { this.lastModifiedDate = lastModifiedDate; return this; } public final Integer getCustomerVersion() { return customerVersion; } public final void setCustomerVersion(Integer customerVersion) { this.customerVersion = customerVersion; } @Override public final Builder customerVersion(Integer customerVersion) { this.customerVersion = customerVersion; return this; } public final TransferData.Builder getTransferData() { return transferData != null ? transferData.toBuilder() : null; } public final void setTransferData(TransferData.BuilderImpl transferData) { this.transferData = transferData != null ? transferData.build() : null; } @Override public final Builder transferData(TransferData transferData) { this.transferData = transferData; return this; } public final String getGenerationId() { return generationId; } public final void setGenerationId(String generationId) { this.generationId = generationId; } @Override public final Builder generationId(String generationId) { this.generationId = generationId; return this; } public final CertificateValidity.Builder getValidity() { return validity != null ? validity.toBuilder() : null; } public final void setValidity(CertificateValidity.BuilderImpl validity) { this.validity = validity != null ? validity.build() : null; } @Override public final Builder validity(CertificateValidity validity) { this.validity = validity; return this; } public final String getCertificateMode() { return certificateMode; } public final void setCertificateMode(String certificateMode) { this.certificateMode = certificateMode; } @Override public final Builder certificateMode(String certificateMode) { this.certificateMode = certificateMode; return this; } @Override public final Builder certificateMode(CertificateMode certificateMode) { this.certificateMode(certificateMode == null ? null : certificateMode.toString()); return this; } @Override public CertificateDescription build() { return new CertificateDescription(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy