Class CertificateTemplate (2.54.0)

public final class CertificateTemplate extends GeneratedMessageV3 implements CertificateTemplateOrBuilder

A CertificateTemplate refers to a managed template for certificate issuance.

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

Static Fields

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
Type Description
int

IDENTITY_CONSTRAINTS_FIELD_NUMBER

public static final int IDENTITY_CONSTRAINTS_FIELD_NUMBER
Field Value
Type Description
int

LABELS_FIELD_NUMBER

public static final int LABELS_FIELD_NUMBER
Field Value
Type Description
int

MAXIMUM_LIFETIME_FIELD_NUMBER

public static final int MAXIMUM_LIFETIME_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

PASSTHROUGH_EXTENSIONS_FIELD_NUMBER

public static final int PASSTHROUGH_EXTENSIONS_FIELD_NUMBER
Field Value
Type Description
int

PREDEFINED_VALUES_FIELD_NUMBER

public static final int PREDEFINED_VALUES_FIELD_NUMBER
Field Value
Type Description
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static CertificateTemplate getDefaultInstance()
Returns
Type Description
CertificateTemplate

getDescriptor()

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

newBuilder()

public static CertificateTemplate.Builder newBuilder()
Returns
Type Description
CertificateTemplate.Builder

newBuilder(CertificateTemplate prototype)

public static CertificateTemplate.Builder newBuilder(CertificateTemplate prototype)
Parameter
Name Description
prototype CertificateTemplate
Returns
Type Description
CertificateTemplate.Builder

parseDelimitedFrom(InputStream input)

public static CertificateTemplate parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
CertificateTemplate
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CertificateTemplate parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CertificateTemplate
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static CertificateTemplate parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
CertificateTemplate
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static CertificateTemplate parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CertificateTemplate
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static CertificateTemplate parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
CertificateTemplate
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static CertificateTemplate parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CertificateTemplate
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static CertificateTemplate parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
CertificateTemplate
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static CertificateTemplate parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CertificateTemplate
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static CertificateTemplate parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
CertificateTemplate
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CertificateTemplate parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CertificateTemplate
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static CertificateTemplate parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
CertificateTemplate
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static CertificateTemplate parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CertificateTemplate
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<CertificateTemplate> parser()
Returns
Type Description
Parser<CertificateTemplate>

Methods

containsLabels(String key)

public boolean containsLabels(String key)

Optional. Labels with user-defined metadata.

map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getCreateTime()

public Timestamp getCreateTime()

Output only. The time at which this CertificateTemplate was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The time at which this CertificateTemplate was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public CertificateTemplate getDefaultInstanceForType()
Returns
Type Description
CertificateTemplate

getDescription()

public String getDescription()

Optional. A human-readable description of scenarios this template is intended for.

string description = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. A human-readable description of scenarios this template is intended for.

string description = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for description.

getIdentityConstraints()

public CertificateIdentityConstraints getIdentityConstraints()

Optional. Describes constraints on identities that may be appear in Certificates issued using this template. If this is omitted, then this template will not add restrictions on a certificate's identity.

.google.cloud.security.privateca.v1.CertificateIdentityConstraints identity_constraints = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CertificateIdentityConstraints

The identityConstraints.

getIdentityConstraintsOrBuilder()

public CertificateIdentityConstraintsOrBuilder getIdentityConstraintsOrBuilder()

Optional. Describes constraints on identities that may be appear in Certificates issued using this template. If this is omitted, then this template will not add restrictions on a certificate's identity.

.google.cloud.security.privateca.v1.CertificateIdentityConstraints identity_constraints = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CertificateIdentityConstraintsOrBuilder

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Optional. Labels with user-defined metadata.

map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Optional. Labels with user-defined metadata.

map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Optional. Labels with user-defined metadata.

map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Optional. Labels with user-defined metadata.

map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
String

getMaximumLifetime()

public Duration getMaximumLifetime()

Optional. The maximum lifetime allowed for issued Certificates that use this template. If the issuing CaPool resource's IssuancePolicy specifies a maximum_lifetime the minimum of the two durations will be the maximum lifetime for issued Certificates. Note that if the issuing CertificateAuthority expires before a Certificate's requested maximum_lifetime, the effective lifetime will be explicitly truncated to match it.

.google.protobuf.Duration maximum_lifetime = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Duration

The maximumLifetime.

getMaximumLifetimeOrBuilder()

public DurationOrBuilder getMaximumLifetimeOrBuilder()

Optional. The maximum lifetime allowed for issued Certificates that use this template. If the issuing CaPool resource's IssuancePolicy specifies a maximum_lifetime the minimum of the two durations will be the maximum lifetime for issued Certificates. Note that if the issuing CertificateAuthority expires before a Certificate's requested maximum_lifetime, the effective lifetime will be explicitly truncated to match it.

.google.protobuf.Duration maximum_lifetime = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DurationOrBuilder

getName()

public String getName()

Output only. The resource name for this CertificateTemplate in the format projects/*/locations/*/certificateTemplates/*.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. The resource name for this CertificateTemplate in the format projects/*/locations/*/certificateTemplates/*.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<CertificateTemplate> getParserForType()
Returns
Type Description
Parser<CertificateTemplate>
Overrides

getPassthroughExtensions()

public CertificateExtensionConstraints getPassthroughExtensions()

Optional. Describes the set of X.509 extensions that may appear in a Certificate issued using this CertificateTemplate. If a certificate request sets extensions that don't appear in the passthrough_extensions, those extensions will be dropped. If the issuing CaPool's IssuancePolicy defines baseline_values that don't appear here, the certificate issuance request will fail. If this is omitted, then this template will not add restrictions on a certificate's X.509 extensions. These constraints do not apply to X.509 extensions set in this CertificateTemplate's predefined_values.

.google.cloud.security.privateca.v1.CertificateExtensionConstraints passthrough_extensions = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CertificateExtensionConstraints

The passthroughExtensions.

getPassthroughExtensionsOrBuilder()

public CertificateExtensionConstraintsOrBuilder getPassthroughExtensionsOrBuilder()

Optional. Describes the set of X.509 extensions that may appear in a Certificate issued using this CertificateTemplate. If a certificate request sets extensions that don't appear in the passthrough_extensions, those extensions will be dropped. If the issuing CaPool's IssuancePolicy defines baseline_values that don't appear here, the certificate issuance request will fail. If this is omitted, then this template will not add restrictions on a certificate's X.509 extensions. These constraints do not apply to X.509 extensions set in this CertificateTemplate's predefined_values.

.google.cloud.security.privateca.v1.CertificateExtensionConstraints passthrough_extensions = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CertificateExtensionConstraintsOrBuilder

getPredefinedValues()

public X509Parameters getPredefinedValues()

Optional. A set of X.509 values that will be applied to all issued certificates that use this template. If the certificate request includes conflicting values for the same properties, they will be overwritten by the values defined here. If the issuing CaPool's IssuancePolicy defines conflicting baseline_values for the same properties, the certificate issuance request will fail.

.google.cloud.security.privateca.v1.X509Parameters predefined_values = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
X509Parameters

The predefinedValues.

getPredefinedValuesOrBuilder()

public X509ParametersOrBuilder getPredefinedValuesOrBuilder()

Optional. A set of X.509 values that will be applied to all issued certificates that use this template. If the certificate request includes conflicting values for the same properties, they will be overwritten by the values defined here. If the issuing CaPool's IssuancePolicy defines conflicting baseline_values for the same properties, the certificate issuance request will fail.

.google.cloud.security.privateca.v1.X509Parameters predefined_values = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
X509ParametersOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getUpdateTime()

public Timestamp getUpdateTime()

Output only. The time at which this CertificateTemplate was updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The time at which this CertificateTemplate was updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Output only. The time at which this CertificateTemplate was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasIdentityConstraints()

public boolean hasIdentityConstraints()

Optional. Describes constraints on identities that may be appear in Certificates issued using this template. If this is omitted, then this template will not add restrictions on a certificate's identity.

.google.cloud.security.privateca.v1.CertificateIdentityConstraints identity_constraints = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the identityConstraints field is set.

hasMaximumLifetime()

public boolean hasMaximumLifetime()

Optional. The maximum lifetime allowed for issued Certificates that use this template. If the issuing CaPool resource's IssuancePolicy specifies a maximum_lifetime the minimum of the two durations will be the maximum lifetime for issued Certificates. Note that if the issuing CertificateAuthority expires before a Certificate's requested maximum_lifetime, the effective lifetime will be explicitly truncated to match it.

.google.protobuf.Duration maximum_lifetime = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the maximumLifetime field is set.

hasPassthroughExtensions()

public boolean hasPassthroughExtensions()

Optional. Describes the set of X.509 extensions that may appear in a Certificate issued using this CertificateTemplate. If a certificate request sets extensions that don't appear in the passthrough_extensions, those extensions will be dropped. If the issuing CaPool's IssuancePolicy defines baseline_values that don't appear here, the certificate issuance request will fail. If this is omitted, then this template will not add restrictions on a certificate's X.509 extensions. These constraints do not apply to X.509 extensions set in this CertificateTemplate's predefined_values.

.google.cloud.security.privateca.v1.CertificateExtensionConstraints passthrough_extensions = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the passthroughExtensions field is set.

hasPredefinedValues()

public boolean hasPredefinedValues()

Optional. A set of X.509 values that will be applied to all issued certificates that use this template. If the certificate request includes conflicting values for the same properties, they will be overwritten by the values defined here. If the issuing CaPool's IssuancePolicy defines conflicting baseline_values for the same properties, the certificate issuance request will fail.

.google.cloud.security.privateca.v1.X509Parameters predefined_values = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the predefinedValues field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. The time at which this CertificateTemplate was updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public CertificateTemplate.Builder newBuilderForType()
Returns
Type Description
CertificateTemplate.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected CertificateTemplate.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
CertificateTemplate.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public CertificateTemplate.Builder toBuilder()
Returns
Type Description
CertificateTemplate.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException