Class DeviceCredential (2.54.0)

public final class DeviceCredential extends GeneratedMessageV3 implements DeviceCredentialOrBuilder

A server-stored device credential used for authentication.

Protobuf type google.cloud.iot.v1.DeviceCredential

Static Fields

EXPIRATION_TIME_FIELD_NUMBER

public static final int EXPIRATION_TIME_FIELD_NUMBER
Field Value
Type Description
int

PUBLIC_KEY_FIELD_NUMBER

public static final int PUBLIC_KEY_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static DeviceCredential getDefaultInstance()
Returns
Type Description
DeviceCredential

getDescriptor()

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

newBuilder()

public static DeviceCredential.Builder newBuilder()
Returns
Type Description
DeviceCredential.Builder

newBuilder(DeviceCredential prototype)

public static DeviceCredential.Builder newBuilder(DeviceCredential prototype)
Parameter
Name Description
prototype DeviceCredential
Returns
Type Description
DeviceCredential.Builder

parseDelimitedFrom(InputStream input)

public static DeviceCredential parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
DeviceCredential
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DeviceCredential parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DeviceCredential
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static DeviceCredential parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
DeviceCredential
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static DeviceCredential parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DeviceCredential
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static DeviceCredential parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
DeviceCredential
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static DeviceCredential parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DeviceCredential
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static DeviceCredential parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
DeviceCredential
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static DeviceCredential parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DeviceCredential
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static DeviceCredential parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
DeviceCredential
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DeviceCredential parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DeviceCredential
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static DeviceCredential parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
DeviceCredential
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static DeviceCredential parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DeviceCredential
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<DeviceCredential> parser()
Returns
Type Description
Parser<DeviceCredential>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getCredentialCase()

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

getDefaultInstanceForType()

public DeviceCredential getDefaultInstanceForType()
Returns
Type Description
DeviceCredential

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.

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

getParserForType()

public Parser<DeviceCredential> getParserForType()
Returns
Type Description
Parser<DeviceCredential>
Overrides

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.

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected DeviceCredential.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
DeviceCredential.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException