Class CreateContentPolicyRequest.Builder (3.103.0)

public static final class CreateContentPolicyRequest.Builder extends GeneratedMessage.Builder<CreateContentPolicyRequest.Builder> implements CreateContentPolicyRequestOrBuilder

Request message for CreateContentPolicy.

Protobuf type google.privacy.dlp.v2.CreateContentPolicyRequest

Static Methods

getDescriptor()

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

Methods

build()

public CreateContentPolicyRequest build()
Returns
Type Description
CreateContentPolicyRequest

buildPartial()

public CreateContentPolicyRequest buildPartial()
Returns
Type Description
CreateContentPolicyRequest

clear()

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

clearContentPolicy()

public CreateContentPolicyRequest.Builder clearContentPolicy()

Required. The content_policy resource.

.google.privacy.dlp.v2.ContentPolicy content_policy = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CreateContentPolicyRequest.Builder

clearContentPolicyId()

public CreateContentPolicyRequest.Builder clearContentPolicyId()

Optional. The content policy ID can contain uppercase and lowercase letters, numbers, and hyphens; that is, it must match the regular expression: [a-zA-Z\d-_]+. The maximum length is 100 characters. If empty, the system will generate a random id.

string content_policy_id = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CreateContentPolicyRequest.Builder

This builder for chaining.

clearParent()

public CreateContentPolicyRequest.Builder clearParent()

Required. Parent resource name.

The format of this value varies depending on the scope of the request (project):

  • Projects scope: projects/{project_id}/locations/{location_id}

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
CreateContentPolicyRequest.Builder

This builder for chaining.

getContentPolicy()

public ContentPolicy getContentPolicy()

Required. The content_policy resource.

.google.privacy.dlp.v2.ContentPolicy content_policy = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ContentPolicy

The contentPolicy.

getContentPolicyBuilder()

public ContentPolicy.Builder getContentPolicyBuilder()

Required. The content_policy resource.

.google.privacy.dlp.v2.ContentPolicy content_policy = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ContentPolicy.Builder

getContentPolicyId()

public String getContentPolicyId()

Optional. The content policy ID can contain uppercase and lowercase letters, numbers, and hyphens; that is, it must match the regular expression: [a-zA-Z\d-_]+. The maximum length is 100 characters. If empty, the system will generate a random id.

string content_policy_id = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The contentPolicyId.

getContentPolicyIdBytes()

public ByteString getContentPolicyIdBytes()

Optional. The content policy ID can contain uppercase and lowercase letters, numbers, and hyphens; that is, it must match the regular expression: [a-zA-Z\d-_]+. The maximum length is 100 characters. If empty, the system will generate a random id.

string content_policy_id = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for contentPolicyId.

getContentPolicyOrBuilder()

public ContentPolicyOrBuilder getContentPolicyOrBuilder()

Required. The content_policy resource.

.google.privacy.dlp.v2.ContentPolicy content_policy = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ContentPolicyOrBuilder

getDefaultInstanceForType()

public CreateContentPolicyRequest getDefaultInstanceForType()
Returns
Type Description
CreateContentPolicyRequest

getDescriptorForType()

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

getParent()

public String getParent()

Required. Parent resource name.

The format of this value varies depending on the scope of the request (project):

  • Projects scope: projects/{project_id}/locations/{location_id}

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The parent.

getParentBytes()

public ByteString getParentBytes()

Required. Parent resource name.

The format of this value varies depending on the scope of the request (project):

  • Projects scope: projects/{project_id}/locations/{location_id}

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for parent.

hasContentPolicy()

public boolean hasContentPolicy()

Required. The content_policy resource.

.google.privacy.dlp.v2.ContentPolicy content_policy = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the contentPolicy field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeContentPolicy(ContentPolicy value)

public CreateContentPolicyRequest.Builder mergeContentPolicy(ContentPolicy value)

Required. The content_policy resource.

.google.privacy.dlp.v2.ContentPolicy content_policy = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ContentPolicy
Returns
Type Description
CreateContentPolicyRequest.Builder

mergeFrom(CreateContentPolicyRequest other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setContentPolicy(ContentPolicy value)

public CreateContentPolicyRequest.Builder setContentPolicy(ContentPolicy value)

Required. The content_policy resource.

.google.privacy.dlp.v2.ContentPolicy content_policy = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ContentPolicy
Returns
Type Description
CreateContentPolicyRequest.Builder

setContentPolicy(ContentPolicy.Builder builderForValue)

public CreateContentPolicyRequest.Builder setContentPolicy(ContentPolicy.Builder builderForValue)

Required. The content_policy resource.

.google.privacy.dlp.v2.ContentPolicy content_policy = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue ContentPolicy.Builder
Returns
Type Description
CreateContentPolicyRequest.Builder

setContentPolicyId(String value)

public CreateContentPolicyRequest.Builder setContentPolicyId(String value)

Optional. The content policy ID can contain uppercase and lowercase letters, numbers, and hyphens; that is, it must match the regular expression: [a-zA-Z\d-_]+. The maximum length is 100 characters. If empty, the system will generate a random id.

string content_policy_id = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The contentPolicyId to set.

Returns
Type Description
CreateContentPolicyRequest.Builder

This builder for chaining.

setContentPolicyIdBytes(ByteString value)

public CreateContentPolicyRequest.Builder setContentPolicyIdBytes(ByteString value)

Optional. The content policy ID can contain uppercase and lowercase letters, numbers, and hyphens; that is, it must match the regular expression: [a-zA-Z\d-_]+. The maximum length is 100 characters. If empty, the system will generate a random id.

string content_policy_id = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for contentPolicyId to set.

Returns
Type Description
CreateContentPolicyRequest.Builder

This builder for chaining.

setParent(String value)

public CreateContentPolicyRequest.Builder setParent(String value)

Required. Parent resource name.

The format of this value varies depending on the scope of the request (project):

  • Projects scope: projects/{project_id}/locations/{location_id}

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The parent to set.

Returns
Type Description
CreateContentPolicyRequest.Builder

This builder for chaining.

setParentBytes(ByteString value)

public CreateContentPolicyRequest.Builder setParentBytes(ByteString value)

Required. Parent resource name.

The format of this value varies depending on the scope of the request (project):

  • Projects scope: projects/{project_id}/locations/{location_id}

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for parent to set.

Returns
Type Description
CreateContentPolicyRequest.Builder

This builder for chaining.