Class DeviceCredential.Builder (2.54.0)

public static final class DeviceCredential.Builder extends GeneratedMessageV3.Builder<DeviceCredential.Builder> implements DeviceCredentialOrBuilder

A server-stored device credential used for authentication.

Protobuf type google.cloud.iot.v1.DeviceCredential

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public DeviceCredential.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
DeviceCredential.Builder
Overrides

build()

public DeviceCredential build()
Returns
Type Description
DeviceCredential

buildPartial()

public DeviceCredential buildPartial()
Returns
Type Description
DeviceCredential

clear()

public DeviceCredential.Builder clear()
Returns
Type Description
DeviceCredential.Builder
Overrides

clearCredential()

public DeviceCredential.Builder clearCredential()
Returns
Type Description
DeviceCredential.Builder

clearExpirationTime()

public DeviceCredential.Builder clearExpirationTime()

[Optional] The time at which this credential becomes invalid. This credential will be ignored for new client authentication requests after this timestamp; however, it will not be automatically deleted.

.google.protobuf.Timestamp expiration_time = 6;

Returns
Type Description
DeviceCredential.Builder

clearField(Descriptors.FieldDescriptor field)

public DeviceCredential.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
DeviceCredential.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public DeviceCredential.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
DeviceCredential.Builder
Overrides

clearPublicKey()

public DeviceCredential.Builder clearPublicKey()

A public key used to verify the signature of JSON Web Tokens (JWTs). When adding a new device credential, either via device creation or via modifications, this public key credential may be required to be signed by one of the registry level certificates. More specifically, if the registry contains at least one certificate, any new device credential must be signed by one of the registry certificates. As a result, when the registry contains certificates, only X.509 certificates are accepted as device credentials. However, if the registry does not contain a certificate, self-signed certificates and public keys will be accepted. New device credentials must be different from every registry-level certificate.

.google.cloud.iot.v1.PublicKeyCredential public_key = 2;

Returns
Type Description
DeviceCredential.Builder

clone()

public DeviceCredential.Builder clone()
Returns
Type Description
DeviceCredential.Builder
Overrides

getCredentialCase()

public DeviceCredential.CredentialCase getCredentialCase()
Returns
Type Description
DeviceCredential.CredentialCase

getDefaultInstanceForType()

public DeviceCredential getDefaultInstanceForType()
Returns
Type Description
DeviceCredential

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getExpirationTime()

public Timestamp getExpirationTime()

[Optional] The time at which this credential becomes invalid. This credential will be ignored for new client authentication requests after this timestamp; however, it will not be automatically deleted.

.google.protobuf.Timestamp expiration_time = 6;

Returns
Type Description
Timestamp

The expirationTime.

getExpirationTimeBuilder()

public Timestamp.Builder getExpirationTimeBuilder()

[Optional] The time at which this credential becomes invalid. This credential will be ignored for new client authentication requests after this timestamp; however, it will not be automatically deleted.

.google.protobuf.Timestamp expiration_time = 6;

Returns
Type Description
Builder

getExpirationTimeOrBuilder()

public TimestampOrBuilder getExpirationTimeOrBuilder()

[Optional] The time at which this credential becomes invalid. This credential will be ignored for new client authentication requests after this timestamp; however, it will not be automatically deleted.

.google.protobuf.Timestamp expiration_time = 6;

Returns
Type Description
TimestampOrBuilder

getPublicKey()

public PublicKeyCredential getPublicKey()

A public key used to verify the signature of JSON Web Tokens (JWTs). When adding a new device credential, either via device creation or via modifications, this public key credential may be required to be signed by one of the registry level certificates. More specifically, if the registry contains at least one certificate, any new device credential must be signed by one of the registry certificates. As a result, when the registry contains certificates, only X.509 certificates are accepted as device credentials. However, if the registry does not contain a certificate, self-signed certificates and public keys will be accepted. New device credentials must be different from every registry-level certificate.

.google.cloud.iot.v1.PublicKeyCredential public_key = 2;

Returns
Type Description
PublicKeyCredential

The publicKey.

getPublicKeyBuilder()

public PublicKeyCredential.Builder getPublicKeyBuilder()

A public key used to verify the signature of JSON Web Tokens (JWTs). When adding a new device credential, either via device creation or via modifications, this public key credential may be required to be signed by one of the registry level certificates. More specifically, if the registry contains at least one certificate, any new device credential must be signed by one of the registry certificates. As a result, when the registry contains certificates, only X.509 certificates are accepted as device credentials. However, if the registry does not contain a certificate, self-signed certificates and public keys will be accepted. New device credentials must be different from every registry-level certificate.

.google.cloud.iot.v1.PublicKeyCredential public_key = 2;

Returns
Type Description
PublicKeyCredential.Builder

getPublicKeyOrBuilder()

public PublicKeyCredentialOrBuilder getPublicKeyOrBuilder()

A public key used to verify the signature of JSON Web Tokens (JWTs). When adding a new device credential, either via device creation or via modifications, this public key credential may be required to be signed by one of the registry level certificates. More specifically, if the registry contains at least one certificate, any new device credential must be signed by one of the registry certificates. As a result, when the registry contains certificates, only X.509 certificates are accepted as device credentials. However, if the registry does not contain a certificate, self-signed certificates and public keys will be accepted. New device credentials must be different from every registry-level certificate.

.google.cloud.iot.v1.PublicKeyCredential public_key = 2;

Returns
Type Description
PublicKeyCredentialOrBuilder

hasExpirationTime()

public boolean hasExpirationTime()

[Optional] The time at which this credential becomes invalid. This credential will be ignored for new client authentication requests after this timestamp; however, it will not be automatically deleted.

.google.protobuf.Timestamp expiration_time = 6;

Returns
Type Description
boolean

Whether the expirationTime field is set.

hasPublicKey()

public boolean hasPublicKey()

A public key used to verify the signature of JSON Web Tokens (JWTs). When adding a new device credential, either via device creation or via modifications, this public key credential may be required to be signed by one of the registry level certificates. More specifically, if the registry contains at least one certificate, any new device credential must be signed by one of the registry certificates. As a result, when the registry contains certificates, only X.509 certificates are accepted as device credentials. However, if the registry does not contain a certificate, self-signed certificates and public keys will be accepted. New device credentials must be different from every registry-level certificate.

.google.cloud.iot.v1.PublicKeyCredential public_key = 2;

Returns
Type Description
boolean

Whether the publicKey field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeExpirationTime(Timestamp value)

public DeviceCredential.Builder mergeExpirationTime(Timestamp value)

[Optional] The time at which this credential becomes invalid. This credential will be ignored for new client authentication requests after this timestamp; however, it will not be automatically deleted.

.google.protobuf.Timestamp expiration_time = 6;

Parameter
Name Description
value Timestamp
Returns
Type Description
DeviceCredential.Builder

mergeFrom(DeviceCredential other)

public DeviceCredential.Builder mergeFrom(DeviceCredential other)
Parameter
Name Description
other DeviceCredential
Returns
Type Description
DeviceCredential.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public DeviceCredential.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DeviceCredential.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public DeviceCredential.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
DeviceCredential.Builder
Overrides

mergePublicKey(PublicKeyCredential value)

public DeviceCredential.Builder mergePublicKey(PublicKeyCredential value)

A public key used to verify the signature of JSON Web Tokens (JWTs). When adding a new device credential, either via device creation or via modifications, this public key credential may be required to be signed by one of the registry level certificates. More specifically, if the registry contains at least one certificate, any new device credential must be signed by one of the registry certificates. As a result, when the registry contains certificates, only X.509 certificates are accepted as device credentials. However, if the registry does not contain a certificate, self-signed certificates and public keys will be accepted. New device credentials must be different from every registry-level certificate.

.google.cloud.iot.v1.PublicKeyCredential public_key = 2;

Parameter
Name Description
value PublicKeyCredential
Returns
Type Description
DeviceCredential.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final DeviceCredential.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
DeviceCredential.Builder
Overrides

setExpirationTime(Timestamp value)

public DeviceCredential.Builder setExpirationTime(Timestamp value)

[Optional] The time at which this credential becomes invalid. This credential will be ignored for new client authentication requests after this timestamp; however, it will not be automatically deleted.

.google.protobuf.Timestamp expiration_time = 6;

Parameter
Name Description
value Timestamp
Returns
Type Description
DeviceCredential.Builder

setExpirationTime(Timestamp.Builder builderForValue)

public DeviceCredential.Builder setExpirationTime(Timestamp.Builder builderForValue)

[Optional] The time at which this credential becomes invalid. This credential will be ignored for new client authentication requests after this timestamp; however, it will not be automatically deleted.

.google.protobuf.Timestamp expiration_time = 6;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
DeviceCredential.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public DeviceCredential.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
DeviceCredential.Builder
Overrides

setPublicKey(PublicKeyCredential value)

public DeviceCredential.Builder setPublicKey(PublicKeyCredential value)

A public key used to verify the signature of JSON Web Tokens (JWTs). When adding a new device credential, either via device creation or via modifications, this public key credential may be required to be signed by one of the registry level certificates. More specifically, if the registry contains at least one certificate, any new device credential must be signed by one of the registry certificates. As a result, when the registry contains certificates, only X.509 certificates are accepted as device credentials. However, if the registry does not contain a certificate, self-signed certificates and public keys will be accepted. New device credentials must be different from every registry-level certificate.

.google.cloud.iot.v1.PublicKeyCredential public_key = 2;

Parameter
Name Description
value PublicKeyCredential
Returns
Type Description
DeviceCredential.Builder

setPublicKey(PublicKeyCredential.Builder builderForValue)

public DeviceCredential.Builder setPublicKey(PublicKeyCredential.Builder builderForValue)

A public key used to verify the signature of JSON Web Tokens (JWTs). When adding a new device credential, either via device creation or via modifications, this public key credential may be required to be signed by one of the registry level certificates. More specifically, if the registry contains at least one certificate, any new device credential must be signed by one of the registry certificates. As a result, when the registry contains certificates, only X.509 certificates are accepted as device credentials. However, if the registry does not contain a certificate, self-signed certificates and public keys will be accepted. New device credentials must be different from every registry-level certificate.

.google.cloud.iot.v1.PublicKeyCredential public_key = 2;

Parameter
Name Description
builderForValue PublicKeyCredential.Builder
Returns
Type Description
DeviceCredential.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public DeviceCredential.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
DeviceCredential.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final DeviceCredential.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
DeviceCredential.Builder
Overrides