public static final class PublicKey.Builder extends GeneratedMessageV3.Builder<PublicKey.Builder> implements PublicKeyOrBuilder
A PublicKey describes a public key.
Protobuf type google.cloud.security.privateca.v1.PublicKey
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public PublicKey.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
Returns
buildPartial()
public PublicKey buildPartial()
Returns
clear()
public PublicKey.Builder clear()
Returns
Overrides
clearField(Descriptors.FieldDescriptor field)
public PublicKey.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
public PublicKey.Builder clearFormat()
Required. The format of the public key.
.google.cloud.security.privateca.v1.PublicKey.KeyFormat format = 2 [(.google.api.field_behavior) = REQUIRED];
Returns
clearKey()
public PublicKey.Builder clearKey()
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
clearOneof(Descriptors.OneofDescriptor oneof)
public PublicKey.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clone()
public PublicKey.Builder clone()
Returns
Overrides
getDefaultInstanceForType()
public PublicKey getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
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
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
Type | Description |
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
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(PublicKey other)
public PublicKey.Builder mergeFrom(PublicKey other)
Parameter
Returns
public PublicKey.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public PublicKey.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final PublicKey.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
setField(Descriptors.FieldDescriptor field, Object value)
public PublicKey.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
public PublicKey.Builder setFormat(PublicKey.KeyFormat value)
Required. The format of the public key.
.google.cloud.security.privateca.v1.PublicKey.KeyFormat format = 2 [(.google.api.field_behavior) = REQUIRED];
Parameter
Returns
public PublicKey.Builder setFormatValue(int value)
Required. The format of the public key.
.google.cloud.security.privateca.v1.PublicKey.KeyFormat format = 2 [(.google.api.field_behavior) = REQUIRED];
Parameter
Name | Description |
value | int
The enum numeric value on the wire for format to set.
|
Returns
setKey(ByteString value)
public PublicKey.Builder setKey(ByteString value)
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];
Parameter
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public PublicKey.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final PublicKey.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides