public static final class Secret.Builder extends GeneratedMessage.Builder<Secret.Builder> implements SecretOrBuilderA confidential piece of information where the actual value is either directly specified in the message as a raw string or stored in GCP secret manager.
Protobuf type google.cloud.datastream.v1.Secret
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > Secret.BuilderImplements
SecretOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public Secret build()| Returns | |
|---|---|
| Type | Description |
Secret |
|
buildPartial()
public Secret buildPartial()| Returns | |
|---|---|
| Type | Description |
Secret |
|
clear()
public Secret.Builder clear()| Returns | |
|---|---|
| Type | Description |
Secret.Builder |
|
clearRawValue()
public Secret.Builder clearRawValue()Optional. Input only. The actual raw value of the secret as plain text.
string raw_value = 1 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Secret.Builder |
This builder for chaining. |
clearSecretVersion()
public Secret.Builder clearSecretVersion()Optional. A Secret Manager resource name storing the actual value of the secret. Supported formats:
- projects/{project}/locations/{location}/secrets/{secret}/versions/{version}
- projects/{project}/secrets/{secret}/versions/{version}
string secret_version = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Secret.Builder |
This builder for chaining. |
clearValue()
public Secret.Builder clearValue()| Returns | |
|---|---|
| Type | Description |
Secret.Builder |
|
getDefaultInstanceForType()
public Secret getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
Secret |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getRawValue()
public String getRawValue()Optional. Input only. The actual raw value of the secret as plain text.
string raw_value = 1 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
String |
The rawValue. |
getRawValueBytes()
public ByteString getRawValueBytes()Optional. Input only. The actual raw value of the secret as plain text.
string raw_value = 1 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for rawValue. |
getSecretVersion()
public String getSecretVersion()Optional. A Secret Manager resource name storing the actual value of the secret. Supported formats:
- projects/{project}/locations/{location}/secrets/{secret}/versions/{version}
- projects/{project}/secrets/{secret}/versions/{version}
string secret_version = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
String |
The secretVersion. |
getSecretVersionBytes()
public ByteString getSecretVersionBytes()Optional. A Secret Manager resource name storing the actual value of the secret. Supported formats:
- projects/{project}/locations/{location}/secrets/{secret}/versions/{version}
- projects/{project}/secrets/{secret}/versions/{version}
string secret_version = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for secretVersion. |
getValueCase()
public Secret.ValueCase getValueCase()| Returns | |
|---|---|
| Type | Description |
Secret.ValueCase |
|
hasRawValue()
public boolean hasRawValue()Optional. Input only. The actual raw value of the secret as plain text.
string raw_value = 1 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the rawValue field is set. |
hasSecretVersion()
public boolean hasSecretVersion()Optional. A Secret Manager resource name storing the actual value of the secret. Supported formats:
- projects/{project}/locations/{location}/secrets/{secret}/versions/{version}
- projects/{project}/secrets/{secret}/versions/{version}
string secret_version = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the secretVersion field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(Secret other)
public Secret.Builder mergeFrom(Secret other)| Parameter | |
|---|---|
| Name | Description |
other |
Secret |
| Returns | |
|---|---|
| Type | Description |
Secret.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Secret.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
Secret.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public Secret.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
Secret.Builder |
|
setRawValue(String value)
public Secret.Builder setRawValue(String value)Optional. Input only. The actual raw value of the secret as plain text.
string raw_value = 1 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe rawValue to set. |
| Returns | |
|---|---|
| Type | Description |
Secret.Builder |
This builder for chaining. |
setRawValueBytes(ByteString value)
public Secret.Builder setRawValueBytes(ByteString value)Optional. Input only. The actual raw value of the secret as plain text.
string raw_value = 1 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for rawValue to set. |
| Returns | |
|---|---|
| Type | Description |
Secret.Builder |
This builder for chaining. |
setSecretVersion(String value)
public Secret.Builder setSecretVersion(String value)Optional. A Secret Manager resource name storing the actual value of the secret. Supported formats:
- projects/{project}/locations/{location}/secrets/{secret}/versions/{version}
- projects/{project}/secrets/{secret}/versions/{version}
string secret_version = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe secretVersion to set. |
| Returns | |
|---|---|
| Type | Description |
Secret.Builder |
This builder for chaining. |
setSecretVersionBytes(ByteString value)
public Secret.Builder setSecretVersionBytes(ByteString value)Optional. A Secret Manager resource name storing the actual value of the secret. Supported formats:
- projects/{project}/locations/{location}/secrets/{secret}/versions/{version}
- projects/{project}/secrets/{secret}/versions/{version}
string secret_version = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for secretVersion to set. |
| Returns | |
|---|---|
| Type | Description |
Secret.Builder |
This builder for chaining. |