Class CreateContentPolicyRequest (3.103.0)

public final class CreateContentPolicyRequest extends GeneratedMessage implements CreateContentPolicyRequestOrBuilder

Request message for CreateContentPolicy.

Protobuf type google.privacy.dlp.v2.CreateContentPolicyRequest

Static Fields

CONTENT_POLICY_FIELD_NUMBER

public static final int CONTENT_POLICY_FIELD_NUMBER
Field Value
Type Description
int

CONTENT_POLICY_ID_FIELD_NUMBER

public static final int CONTENT_POLICY_ID_FIELD_NUMBER
Field Value
Type Description
int

PARENT_FIELD_NUMBER

public static final int PARENT_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static CreateContentPolicyRequest getDefaultInstance()
Returns
Type Description
CreateContentPolicyRequest

getDescriptor()

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

newBuilder()

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

newBuilder(CreateContentPolicyRequest prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

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.

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

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.

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

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

newBuilderForType(AbstractMessage.BuilderParent parent)

protected CreateContentPolicyRequest.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
CreateContentPolicyRequest.Builder
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

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