Class CreateKeyRingRequest.Builder (2.3.1)
Note: Some or all of the information on this page might not apply
to Trusted Cloud. For a list of services that are available in
Trusted Cloud, see Services available for
Trusted Cloud .
Version 2.3.1keyboard_arrow_down
public static final class CreateKeyRingRequest . Builder extends GeneratedMessageV3 . Builder<CreateKeyRingRequest . Builder > implements CreateKeyRingRequestOrBuilder
Request message for KeyManagementService.CreateKeyRing .
Protobuf type google.cloud.kms.v1.CreateKeyRingRequest
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public CreateKeyRingRequest . Builder addRepeatedField ( Descriptors . FieldDescriptor field , Object value )
Parameters
Returns
Overrides
build()
public CreateKeyRingRequest build ()
Returns
buildPartial()
public CreateKeyRingRequest buildPartial ()
Returns
clear()
public CreateKeyRingRequest . Builder clear ()
Returns
Overrides
clearField(Descriptors.FieldDescriptor field)
public CreateKeyRingRequest . Builder clearField ( Descriptors . FieldDescriptor field )
Parameter
Returns
Overrides
clearKeyRing()
public CreateKeyRingRequest . Builder clearKeyRing ()
Required. A KeyRing with initial field values.
.google.cloud.kms.v1.KeyRing key_ring = 3 [(.google.api.field_behavior) = REQUIRED];
Returns
clearKeyRingId()
public CreateKeyRingRequest . Builder clearKeyRingId ()
Required. It must be unique within a location and match the regular
expression [a-zA-Z0-9_-]{1,63}
string key_ring_id = 2 [(.google.api.field_behavior) = REQUIRED];
Returns
clearOneof(Descriptors.OneofDescriptor oneof)
public CreateKeyRingRequest . Builder clearOneof ( Descriptors . OneofDescriptor oneof )
Parameter
Returns
Overrides
clearParent()
public CreateKeyRingRequest . Builder clearParent ()
Required. The resource name of the location associated with the
KeyRings , in the format projects/*/locations/*
.
string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Returns
clone()
public CreateKeyRingRequest . Builder clone ()
Returns
Overrides
getDefaultInstanceForType()
public CreateKeyRingRequest getDefaultInstanceForType ()
Returns
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
Returns
getDescriptorForType()
public Descriptors . Descriptor getDescriptorForType ()
Returns
Overrides
getKeyRing()
public KeyRing getKeyRing ()
Required. A KeyRing with initial field values.
.google.cloud.kms.v1.KeyRing key_ring = 3 [(.google.api.field_behavior) = REQUIRED];
Returns
Type
Description
KeyRing
The keyRing.
getKeyRingBuilder()
public KeyRing . Builder getKeyRingBuilder ()
Required. A KeyRing with initial field values.
.google.cloud.kms.v1.KeyRing key_ring = 3 [(.google.api.field_behavior) = REQUIRED];
Returns
getKeyRingId()
public String getKeyRingId ()
Required. It must be unique within a location and match the regular
expression [a-zA-Z0-9_-]{1,63}
string key_ring_id = 2 [(.google.api.field_behavior) = REQUIRED];
Returns
Type
Description
String
The keyRingId.
getKeyRingIdBytes()
public ByteString getKeyRingIdBytes ()
Required. It must be unique within a location and match the regular
expression [a-zA-Z0-9_-]{1,63}
string key_ring_id = 2 [(.google.api.field_behavior) = REQUIRED];
Returns
Type
Description
ByteString
The bytes for keyRingId.
getKeyRingOrBuilder()
public KeyRingOrBuilder getKeyRingOrBuilder ()
Required. A KeyRing with initial field values.
.google.cloud.kms.v1.KeyRing key_ring = 3 [(.google.api.field_behavior) = REQUIRED];
Returns
getParent()
public String getParent ()
Required. The resource name of the location associated with the
KeyRings , in the format projects/*/locations/*
.
string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Returns
Type
Description
String
The parent.
getParentBytes()
public ByteString getParentBytes ()
Required. The resource name of the location associated with the
KeyRings , in the format projects/*/locations/*
.
string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Returns
hasKeyRing()
public boolean hasKeyRing ()
Required. A KeyRing with initial field values.
.google.cloud.kms.v1.KeyRing key_ring = 3 [(.google.api.field_behavior) = REQUIRED];
Returns
Type
Description
boolean
Whether the keyRing field is set.
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Returns
Overrides
isInitialized()
public final boolean isInitialized ()
Returns
Overrides
mergeFrom(CreateKeyRingRequest other)
public CreateKeyRingRequest . Builder mergeFrom ( CreateKeyRingRequest other )
Parameter
Returns
public CreateKeyRingRequest . Builder mergeFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public CreateKeyRingRequest . Builder mergeFrom ( Message other )
Parameter
Returns
Overrides
mergeKeyRing(KeyRing value)
public CreateKeyRingRequest . Builder mergeKeyRing ( KeyRing value )
Required. A KeyRing with initial field values.
.google.cloud.kms.v1.KeyRing key_ring = 3 [(.google.api.field_behavior) = REQUIRED];
Parameter
Returns
mergeUnknownFields(UnknownFieldSet unknownFields)
public final CreateKeyRingRequest . Builder mergeUnknownFields ( UnknownFieldSet unknownFields )
Parameter
Returns
Overrides
setField(Descriptors.FieldDescriptor field, Object value)
public CreateKeyRingRequest . Builder setField ( Descriptors . FieldDescriptor field , Object value )
Parameters
Returns
Overrides
setKeyRing(KeyRing value)
public CreateKeyRingRequest . Builder setKeyRing ( KeyRing value )
Required. A KeyRing with initial field values.
.google.cloud.kms.v1.KeyRing key_ring = 3 [(.google.api.field_behavior) = REQUIRED];
Parameter
Returns
setKeyRing(KeyRing.Builder builderForValue)
public CreateKeyRingRequest . Builder setKeyRing ( KeyRing . Builder builderForValue )
Required. A KeyRing with initial field values.
.google.cloud.kms.v1.KeyRing key_ring = 3 [(.google.api.field_behavior) = REQUIRED];
Parameter
Returns
setKeyRingId(String value)
public CreateKeyRingRequest . Builder setKeyRingId ( String value )
Required. It must be unique within a location and match the regular
expression [a-zA-Z0-9_-]{1,63}
string key_ring_id = 2 [(.google.api.field_behavior) = REQUIRED];
Parameter
Name
Description
value
String
The keyRingId to set.
Returns
setKeyRingIdBytes(ByteString value)
public CreateKeyRingRequest . Builder setKeyRingIdBytes ( ByteString value )
Required. It must be unique within a location and match the regular
expression [a-zA-Z0-9_-]{1,63}
string key_ring_id = 2 [(.google.api.field_behavior) = REQUIRED];
Parameter
Name
Description
value
ByteString
The bytes for keyRingId to set.
Returns
setParent(String value)
public CreateKeyRingRequest . Builder setParent ( String value )
Required. The resource name of the location associated with the
KeyRings , in the format projects/*/locations/*
.
string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Parameter
Name
Description
value
String
The parent to set.
Returns
setParentBytes(ByteString value)
public CreateKeyRingRequest . Builder setParentBytes ( ByteString value )
Required. The resource name of the location associated with the
KeyRings , in the format projects/*/locations/*
.
string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Parameter
Name
Description
value
ByteString
The bytes for parent to set.
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public CreateKeyRingRequest . Builder setRepeatedField ( Descriptors . FieldDescriptor field , int index , Object value )
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final CreateKeyRingRequest . Builder setUnknownFields ( UnknownFieldSet unknownFields )
Parameter
Returns
Overrides
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[]]