Class KeyUsage.KeyUsageOptions.Builder (2.45.0)

public static final class KeyUsage.KeyUsageOptions.Builder extends GeneratedMessageV3.Builder<KeyUsage.KeyUsageOptions.Builder> implements KeyUsage.KeyUsageOptionsOrBuilder

KeyUsage.KeyUsageOptions corresponds to the key usage values described in https://tools.ietf.org/html/rfc5280#section-4.2.1.3.

Protobuf type google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public KeyUsage.KeyUsageOptions.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
KeyUsage.KeyUsageOptions.Builder
Overrides

build()

public KeyUsage.KeyUsageOptions build()
Returns
Type Description
KeyUsage.KeyUsageOptions

buildPartial()

public KeyUsage.KeyUsageOptions buildPartial()
Returns
Type Description
KeyUsage.KeyUsageOptions

clear()

public KeyUsage.KeyUsageOptions.Builder clear()
Returns
Type Description
KeyUsage.KeyUsageOptions.Builder
Overrides

clearCertSign()

public KeyUsage.KeyUsageOptions.Builder clearCertSign()

The key may be used to sign certificates.

bool cert_sign = 6;

Returns
Type Description
KeyUsage.KeyUsageOptions.Builder

This builder for chaining.

clearContentCommitment()

public KeyUsage.KeyUsageOptions.Builder clearContentCommitment()

The key may be used for cryptographic commitments. Note that this may also be referred to as "non-repudiation".

bool content_commitment = 2;

Returns
Type Description
KeyUsage.KeyUsageOptions.Builder

This builder for chaining.

clearCrlSign()

public KeyUsage.KeyUsageOptions.Builder clearCrlSign()

The key may be used sign certificate revocation lists.

bool crl_sign = 7;

Returns
Type Description
KeyUsage.KeyUsageOptions.Builder

This builder for chaining.

clearDataEncipherment()

public KeyUsage.KeyUsageOptions.Builder clearDataEncipherment()

The key may be used to encipher data.

bool data_encipherment = 4;

Returns
Type Description
KeyUsage.KeyUsageOptions.Builder

This builder for chaining.

clearDecipherOnly()

public KeyUsage.KeyUsageOptions.Builder clearDecipherOnly()

The key may be used to decipher only.

bool decipher_only = 9;

Returns
Type Description
KeyUsage.KeyUsageOptions.Builder

This builder for chaining.

clearDigitalSignature()

public KeyUsage.KeyUsageOptions.Builder clearDigitalSignature()

The key may be used for digital signatures.

bool digital_signature = 1;

Returns
Type Description
KeyUsage.KeyUsageOptions.Builder

This builder for chaining.

clearEncipherOnly()

public KeyUsage.KeyUsageOptions.Builder clearEncipherOnly()

The key may be used to encipher only.

bool encipher_only = 8;

Returns
Type Description
KeyUsage.KeyUsageOptions.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public KeyUsage.KeyUsageOptions.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
KeyUsage.KeyUsageOptions.Builder
Overrides

clearKeyAgreement()

public KeyUsage.KeyUsageOptions.Builder clearKeyAgreement()

The key may be used in a key agreement protocol.

bool key_agreement = 5;

Returns
Type Description
KeyUsage.KeyUsageOptions.Builder

This builder for chaining.

clearKeyEncipherment()

public KeyUsage.KeyUsageOptions.Builder clearKeyEncipherment()

The key may be used to encipher other keys.

bool key_encipherment = 3;

Returns
Type Description
KeyUsage.KeyUsageOptions.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public KeyUsage.KeyUsageOptions.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
KeyUsage.KeyUsageOptions.Builder
Overrides

clone()

public KeyUsage.KeyUsageOptions.Builder clone()
Returns
Type Description
KeyUsage.KeyUsageOptions.Builder
Overrides

getCertSign()

public boolean getCertSign()

The key may be used to sign certificates.

bool cert_sign = 6;

Returns
Type Description
boolean

The certSign.

getContentCommitment()

public boolean getContentCommitment()

The key may be used for cryptographic commitments. Note that this may also be referred to as "non-repudiation".

bool content_commitment = 2;

Returns
Type Description
boolean

The contentCommitment.

getCrlSign()

public boolean getCrlSign()

The key may be used sign certificate revocation lists.

bool crl_sign = 7;

Returns
Type Description
boolean

The crlSign.

getDataEncipherment()

public boolean getDataEncipherment()

The key may be used to encipher data.

bool data_encipherment = 4;

Returns
Type Description
boolean

The dataEncipherment.

getDecipherOnly()

public boolean getDecipherOnly()

The key may be used to decipher only.

bool decipher_only = 9;

Returns
Type Description
boolean

The decipherOnly.

getDefaultInstanceForType()

public KeyUsage.KeyUsageOptions getDefaultInstanceForType()
Returns
Type Description
KeyUsage.KeyUsageOptions

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDigitalSignature()

public boolean getDigitalSignature()

The key may be used for digital signatures.

bool digital_signature = 1;

Returns
Type Description
boolean

The digitalSignature.

getEncipherOnly()

public boolean getEncipherOnly()

The key may be used to encipher only.

bool encipher_only = 8;

Returns
Type Description
boolean

The encipherOnly.

getKeyAgreement()

public boolean getKeyAgreement()

The key may be used in a key agreement protocol.

bool key_agreement = 5;

Returns
Type Description
boolean

The keyAgreement.

getKeyEncipherment()

public boolean getKeyEncipherment()

The key may be used to encipher other keys.

bool key_encipherment = 3;

Returns
Type Description
boolean

The keyEncipherment.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(KeyUsage.KeyUsageOptions other)

public KeyUsage.KeyUsageOptions.Builder mergeFrom(KeyUsage.KeyUsageOptions other)
Parameter
Name Description
other KeyUsage.KeyUsageOptions
Returns
Type Description
KeyUsage.KeyUsageOptions.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public KeyUsage.KeyUsageOptions.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
KeyUsage.KeyUsageOptions.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public KeyUsage.KeyUsageOptions.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
KeyUsage.KeyUsageOptions.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final KeyUsage.KeyUsageOptions.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
KeyUsage.KeyUsageOptions.Builder
Overrides

setCertSign(boolean value)

public KeyUsage.KeyUsageOptions.Builder setCertSign(boolean value)

The key may be used to sign certificates.

bool cert_sign = 6;

Parameter
Name Description
value boolean

The certSign to set.

Returns
Type Description
KeyUsage.KeyUsageOptions.Builder

This builder for chaining.

setContentCommitment(boolean value)

public KeyUsage.KeyUsageOptions.Builder setContentCommitment(boolean value)

The key may be used for cryptographic commitments. Note that this may also be referred to as "non-repudiation".

bool content_commitment = 2;

Parameter
Name Description
value boolean

The contentCommitment to set.

Returns
Type Description
KeyUsage.KeyUsageOptions.Builder

This builder for chaining.

setCrlSign(boolean value)

public KeyUsage.KeyUsageOptions.Builder setCrlSign(boolean value)

The key may be used sign certificate revocation lists.

bool crl_sign = 7;

Parameter
Name Description
value boolean

The crlSign to set.

Returns
Type Description
KeyUsage.KeyUsageOptions.Builder

This builder for chaining.

setDataEncipherment(boolean value)

public KeyUsage.KeyUsageOptions.Builder setDataEncipherment(boolean value)

The key may be used to encipher data.

bool data_encipherment = 4;

Parameter
Name Description
value boolean

The dataEncipherment to set.

Returns
Type Description
KeyUsage.KeyUsageOptions.Builder

This builder for chaining.

setDecipherOnly(boolean value)

public KeyUsage.KeyUsageOptions.Builder setDecipherOnly(boolean value)

The key may be used to decipher only.

bool decipher_only = 9;

Parameter
Name Description
value boolean

The decipherOnly to set.

Returns
Type Description
KeyUsage.KeyUsageOptions.Builder

This builder for chaining.

setDigitalSignature(boolean value)

public KeyUsage.KeyUsageOptions.Builder setDigitalSignature(boolean value)

The key may be used for digital signatures.

bool digital_signature = 1;

Parameter
Name Description
value boolean

The digitalSignature to set.

Returns
Type Description
KeyUsage.KeyUsageOptions.Builder

This builder for chaining.

setEncipherOnly(boolean value)

public KeyUsage.KeyUsageOptions.Builder setEncipherOnly(boolean value)

The key may be used to encipher only.

bool encipher_only = 8;

Parameter
Name Description
value boolean

The encipherOnly to set.

Returns
Type Description
KeyUsage.KeyUsageOptions.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public KeyUsage.KeyUsageOptions.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
KeyUsage.KeyUsageOptions.Builder
Overrides

setKeyAgreement(boolean value)

public KeyUsage.KeyUsageOptions.Builder setKeyAgreement(boolean value)

The key may be used in a key agreement protocol.

bool key_agreement = 5;

Parameter
Name Description
value boolean

The keyAgreement to set.

Returns
Type Description
KeyUsage.KeyUsageOptions.Builder

This builder for chaining.

setKeyEncipherment(boolean value)

public KeyUsage.KeyUsageOptions.Builder setKeyEncipherment(boolean value)

The key may be used to encipher other keys.

bool key_encipherment = 3;

Parameter
Name Description
value boolean

The keyEncipherment to set.

Returns
Type Description
KeyUsage.KeyUsageOptions.Builder

This builder for chaining.

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

public KeyUsage.KeyUsageOptions.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
KeyUsage.KeyUsageOptions.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final KeyUsage.KeyUsageOptions.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
KeyUsage.KeyUsageOptions.Builder
Overrides