Class PublicKey (2.43.0)

public final class PublicKey extends GeneratedMessageV3 implements PublicKeyOrBuilder

A PublicKey describes a public key.

Protobuf type google.cloud.security.privateca.v1.PublicKey

Implements

PublicKeyOrBuilder

Static Fields

FORMAT_FIELD_NUMBER

public static final int FORMAT_FIELD_NUMBER
Field Value
TypeDescription
int

KEY_FIELD_NUMBER

public static final int KEY_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static PublicKey getDefaultInstance()
Returns
TypeDescription
PublicKey

getDescriptor()

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

newBuilder()

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

newBuilder(PublicKey prototype)

public static PublicKey.Builder newBuilder(PublicKey prototype)
Parameter
NameDescription
prototypePublicKey
Returns
TypeDescription
PublicKey.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public PublicKey getDefaultInstanceForType()
Returns
TypeDescription
PublicKey

getFormat()

public PublicKey.KeyFormat getFormat()

Required. The format of the public key.

.google.cloud.security.privateca.v1.PublicKey.KeyFormat format = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
PublicKey.KeyFormat

The format.

getFormatValue()

public int getFormatValue()

Required. The format of the public key.

.google.cloud.security.privateca.v1.PublicKey.KeyFormat format = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
int

The enum numeric value on the wire for format.

getKey()

public ByteString getKey()

Required. A public key. The padding and encoding must match with the KeyFormat value specified for the format field.

bytes key = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ByteString

The key.

getParserForType()

public Parser<PublicKey> getParserForType()
Returns
TypeDescription
Parser<PublicKey>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

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 PublicKey.Builder newBuilderForType()
Returns
TypeDescription
PublicKey.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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