Class DeviceCredential.Builder (2.32.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public DeviceCredential.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
DeviceCredential.Builder
Overrides

build()

public DeviceCredential build()
Returns
TypeDescription
DeviceCredential

buildPartial()

public DeviceCredential buildPartial()
Returns
TypeDescription
DeviceCredential

clear()

public DeviceCredential.Builder clear()
Returns
TypeDescription
DeviceCredential.Builder
Overrides

clearCredential()

public DeviceCredential.Builder clearCredential()
Returns
TypeDescription
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
TypeDescription
DeviceCredential.Builder

clearField(Descriptors.FieldDescriptor field)

public DeviceCredential.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
DeviceCredential.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public DeviceCredential.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
DeviceCredential.Builder

clone()

public DeviceCredential.Builder clone()
Returns
TypeDescription
DeviceCredential.Builder
Overrides

getCredentialCase()

public DeviceCredential.CredentialCase getCredentialCase()
Returns
TypeDescription
DeviceCredential.CredentialCase

getDefaultInstanceForType()

public DeviceCredential getDefaultInstanceForType()
Returns
TypeDescription
DeviceCredential

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the publicKey field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
DeviceCredential.Builder

mergeFrom(DeviceCredential other)

public DeviceCredential.Builder mergeFrom(DeviceCredential other)
Parameter
NameDescription
otherDeviceCredential
Returns
TypeDescription
DeviceCredential.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public DeviceCredential.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DeviceCredential.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public DeviceCredential.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valuePublicKeyCredential
Returns
TypeDescription
DeviceCredential.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final DeviceCredential.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
DeviceCredential.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public DeviceCredential.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valuePublicKeyCredential
Returns
TypeDescription
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
NameDescription
builderForValuePublicKeyCredential.Builder
Returns
TypeDescription
DeviceCredential.Builder

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

public DeviceCredential.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
DeviceCredential.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final DeviceCredential.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
DeviceCredential.Builder
Overrides