Class ApiKeyConfig.Builder (0.1.0)

public static final class ApiKeyConfig.Builder extends GeneratedMessage.Builder<ApiKeyConfig.Builder> implements ApiKeyConfigOrBuilder

Configurations for authentication with API key.

Protobuf type google.cloud.ces.v1.ApiKeyConfig

Static Methods

getDescriptor()

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

Methods

build()

public ApiKeyConfig build()
Returns
Type Description
ApiKeyConfig

buildPartial()

public ApiKeyConfig buildPartial()
Returns
Type Description
ApiKeyConfig

clear()

public ApiKeyConfig.Builder clear()
Returns
Type Description
ApiKeyConfig.Builder
Overrides

clearApiKeySecretVersion()

public ApiKeyConfig.Builder clearApiKeySecretVersion()

Required. The name of the SecretManager secret version resource storing the API key. Format: projects/{project}/secrets/{secret}/versions/{version}

Note: You should grant roles/secretmanager.secretAccessor role to the CES service agent service-<PROJECT-NUMBER>@gcp-sa-ces.iam.gserviceaccount.com.

string api_key_secret_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ApiKeyConfig.Builder

This builder for chaining.

clearKeyName()

public ApiKeyConfig.Builder clearKeyName()

Required. The parameter name or the header name of the API key. E.g., If the API request is "https://example.com/act?X-Api-Key=<API KEY>", "X-Api-Key" would be the parameter name.

string key_name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ApiKeyConfig.Builder

This builder for chaining.

clearRequestLocation()

public ApiKeyConfig.Builder clearRequestLocation()

Required. Key location in the request.

.google.cloud.ces.v1.ApiKeyConfig.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ApiKeyConfig.Builder

This builder for chaining.

getApiKeySecretVersion()

public String getApiKeySecretVersion()

Required. The name of the SecretManager secret version resource storing the API key. Format: projects/{project}/secrets/{secret}/versions/{version}

Note: You should grant roles/secretmanager.secretAccessor role to the CES service agent service-<PROJECT-NUMBER>@gcp-sa-ces.iam.gserviceaccount.com.

string api_key_secret_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The apiKeySecretVersion.

getApiKeySecretVersionBytes()

public ByteString getApiKeySecretVersionBytes()

Required. The name of the SecretManager secret version resource storing the API key. Format: projects/{project}/secrets/{secret}/versions/{version}

Note: You should grant roles/secretmanager.secretAccessor role to the CES service agent service-<PROJECT-NUMBER>@gcp-sa-ces.iam.gserviceaccount.com.

string api_key_secret_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for apiKeySecretVersion.

getDefaultInstanceForType()

public ApiKeyConfig getDefaultInstanceForType()
Returns
Type Description
ApiKeyConfig

getDescriptorForType()

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

getKeyName()

public String getKeyName()

Required. The parameter name or the header name of the API key. E.g., If the API request is "https://example.com/act?X-Api-Key=<API KEY>", "X-Api-Key" would be the parameter name.

string key_name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The keyName.

getKeyNameBytes()

public ByteString getKeyNameBytes()

Required. The parameter name or the header name of the API key. E.g., If the API request is "https://example.com/act?X-Api-Key=<API KEY>", "X-Api-Key" would be the parameter name.

string key_name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for keyName.

getRequestLocation()

public ApiKeyConfig.RequestLocation getRequestLocation()

Required. Key location in the request.

.google.cloud.ces.v1.ApiKeyConfig.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ApiKeyConfig.RequestLocation

The requestLocation.

getRequestLocationValue()

public int getRequestLocationValue()

Required. Key location in the request.

.google.cloud.ces.v1.ApiKeyConfig.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for requestLocation.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ApiKeyConfig other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setApiKeySecretVersion(String value)

public ApiKeyConfig.Builder setApiKeySecretVersion(String value)

Required. The name of the SecretManager secret version resource storing the API key. Format: projects/{project}/secrets/{secret}/versions/{version}

Note: You should grant roles/secretmanager.secretAccessor role to the CES service agent service-<PROJECT-NUMBER>@gcp-sa-ces.iam.gserviceaccount.com.

string api_key_secret_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The apiKeySecretVersion to set.

Returns
Type Description
ApiKeyConfig.Builder

This builder for chaining.

setApiKeySecretVersionBytes(ByteString value)

public ApiKeyConfig.Builder setApiKeySecretVersionBytes(ByteString value)

Required. The name of the SecretManager secret version resource storing the API key. Format: projects/{project}/secrets/{secret}/versions/{version}

Note: You should grant roles/secretmanager.secretAccessor role to the CES service agent service-<PROJECT-NUMBER>@gcp-sa-ces.iam.gserviceaccount.com.

string api_key_secret_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for apiKeySecretVersion to set.

Returns
Type Description
ApiKeyConfig.Builder

This builder for chaining.

setKeyName(String value)

public ApiKeyConfig.Builder setKeyName(String value)

Required. The parameter name or the header name of the API key. E.g., If the API request is "https://example.com/act?X-Api-Key=<API KEY>", "X-Api-Key" would be the parameter name.

string key_name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The keyName to set.

Returns
Type Description
ApiKeyConfig.Builder

This builder for chaining.

setKeyNameBytes(ByteString value)

public ApiKeyConfig.Builder setKeyNameBytes(ByteString value)

Required. The parameter name or the header name of the API key. E.g., If the API request is "https://example.com/act?X-Api-Key=<API KEY>", "X-Api-Key" would be the parameter name.

string key_name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for keyName to set.

Returns
Type Description
ApiKeyConfig.Builder

This builder for chaining.

setRequestLocation(ApiKeyConfig.RequestLocation value)

public ApiKeyConfig.Builder setRequestLocation(ApiKeyConfig.RequestLocation value)

Required. Key location in the request.

.google.cloud.ces.v1.ApiKeyConfig.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ApiKeyConfig.RequestLocation

The requestLocation to set.

Returns
Type Description
ApiKeyConfig.Builder

This builder for chaining.

setRequestLocationValue(int value)

public ApiKeyConfig.Builder setRequestLocationValue(int value)

Required. Key location in the request.

.google.cloud.ces.v1.ApiKeyConfig.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for requestLocation to set.

Returns
Type Description
ApiKeyConfig.Builder

This builder for chaining.