Class KeyUsage.KeyUsageOptions.Builder (2.17.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.v1.KeyUsage.KeyUsageOptions

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public KeyUsage.KeyUsageOptions.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
KeyUsage.KeyUsageOptions.Builder
Overrides

build()

public KeyUsage.KeyUsageOptions build()
Returns
TypeDescription
KeyUsage.KeyUsageOptions

buildPartial()

public KeyUsage.KeyUsageOptions buildPartial()
Returns
TypeDescription
KeyUsage.KeyUsageOptions

clear()

public KeyUsage.KeyUsageOptions.Builder clear()
Returns
TypeDescription
KeyUsage.KeyUsageOptions.Builder
Overrides

clearCertSign()

public KeyUsage.KeyUsageOptions.Builder clearCertSign()

The key may be used to sign certificates.

bool cert_sign = 6;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
KeyUsage.KeyUsageOptions.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public KeyUsage.KeyUsageOptions.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
KeyUsage.KeyUsageOptions.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public KeyUsage.KeyUsageOptions.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
KeyUsage.KeyUsageOptions.Builder
Overrides

clone()

public KeyUsage.KeyUsageOptions.Builder clone()
Returns
TypeDescription
KeyUsage.KeyUsageOptions.Builder
Overrides

getCertSign()

public boolean getCertSign()

The key may be used to sign certificates.

bool cert_sign = 6;

Returns
TypeDescription
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
TypeDescription
boolean

The contentCommitment.

getCrlSign()

public boolean getCrlSign()

The key may be used sign certificate revocation lists.

bool crl_sign = 7;

Returns
TypeDescription
boolean

The crlSign.

getDataEncipherment()

public boolean getDataEncipherment()

The key may be used to encipher data.

bool data_encipherment = 4;

Returns
TypeDescription
boolean

The dataEncipherment.

getDecipherOnly()

public boolean getDecipherOnly()

The key may be used to decipher only.

bool decipher_only = 9;

Returns
TypeDescription
boolean

The decipherOnly.

getDefaultInstanceForType()

public KeyUsage.KeyUsageOptions getDefaultInstanceForType()
Returns
TypeDescription
KeyUsage.KeyUsageOptions

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDigitalSignature()

public boolean getDigitalSignature()

The key may be used for digital signatures.

bool digital_signature = 1;

Returns
TypeDescription
boolean

The digitalSignature.

getEncipherOnly()

public boolean getEncipherOnly()

The key may be used to encipher only.

bool encipher_only = 8;

Returns
TypeDescription
boolean

The encipherOnly.

getKeyAgreement()

public boolean getKeyAgreement()

The key may be used in a key agreement protocol.

bool key_agreement = 5;

Returns
TypeDescription
boolean

The keyAgreement.

getKeyEncipherment()

public boolean getKeyEncipherment()

The key may be used to encipher other keys.

bool key_encipherment = 3;

Returns
TypeDescription
boolean

The keyEncipherment.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(KeyUsage.KeyUsageOptions other)

public KeyUsage.KeyUsageOptions.Builder mergeFrom(KeyUsage.KeyUsageOptions other)
Parameter
NameDescription
otherKeyUsage.KeyUsageOptions
Returns
TypeDescription
KeyUsage.KeyUsageOptions.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public KeyUsage.KeyUsageOptions.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
KeyUsage.KeyUsageOptions.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public KeyUsage.KeyUsageOptions.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
KeyUsage.KeyUsageOptions.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final KeyUsage.KeyUsageOptions.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueboolean

The certSign to set.

Returns
TypeDescription
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
NameDescription
valueboolean

The contentCommitment to set.

Returns
TypeDescription
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
NameDescription
valueboolean

The crlSign to set.

Returns
TypeDescription
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
NameDescription
valueboolean

The dataEncipherment to set.

Returns
TypeDescription
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
NameDescription
valueboolean

The decipherOnly to set.

Returns
TypeDescription
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
NameDescription
valueboolean

The digitalSignature to set.

Returns
TypeDescription
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
NameDescription
valueboolean

The encipherOnly to set.

Returns
TypeDescription
KeyUsage.KeyUsageOptions.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public KeyUsage.KeyUsageOptions.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueboolean

The keyAgreement to set.

Returns
TypeDescription
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
NameDescription
valueboolean

The keyEncipherment to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
KeyUsage.KeyUsageOptions.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final KeyUsage.KeyUsageOptions.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
KeyUsage.KeyUsageOptions.Builder
Overrides