Class DeviceCredential (2.8.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
TypeDescription
int

PUBLIC_KEY_FIELD_NUMBER

public static final int PUBLIC_KEY_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static DeviceCredential getDefaultInstance()
Returns
TypeDescription
DeviceCredential

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static DeviceCredential.Builder newBuilder()
Returns
TypeDescription
DeviceCredential.Builder

newBuilder(DeviceCredential prototype)

public static DeviceCredential.Builder newBuilder(DeviceCredential prototype)
Parameter
NameDescription
prototypeDeviceCredential
Returns
TypeDescription
DeviceCredential.Builder

parseDelimitedFrom(InputStream input)

public static DeviceCredential parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
DeviceCredential
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DeviceCredential parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DeviceCredential
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static DeviceCredential parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
DeviceCredential
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static DeviceCredential parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DeviceCredential
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static DeviceCredential parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
DeviceCredential
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static DeviceCredential parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DeviceCredential
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static DeviceCredential parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
DeviceCredential
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static DeviceCredential parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DeviceCredential
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static DeviceCredential parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
DeviceCredential
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DeviceCredential parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DeviceCredential
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static DeviceCredential parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
DeviceCredential
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static DeviceCredential parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DeviceCredential
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<DeviceCredential> parser()
Returns
TypeDescription
Parser<DeviceCredential>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getCredentialCase()

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

getDefaultInstanceForType()

public DeviceCredential getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
TimestampOrBuilder

getParserForType()

public Parser<DeviceCredential> getParserForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
PublicKeyCredentialOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
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
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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public DeviceCredential.Builder newBuilderForType()
Returns
TypeDescription
DeviceCredential.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected DeviceCredential.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
DeviceCredential.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public DeviceCredential.Builder toBuilder()
Returns
TypeDescription
DeviceCredential.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException