Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/google-privacy-dlp/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "./node_modules/gts"
"extends": "./node_modules/gts",
"root": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -1384,6 +1384,15 @@ message ContentItem {
// Content data to inspect or redact. Replaces `type` and `data`.
ByteContentItem byte_item = 5;
}

// User provided metadata for the content.
ContentMetadata content_metadata = 6;
}

// Metadata on content to be scanned.
message ContentMetadata {
// User provided key-value pairs of content metadata.
repeated KeyValueMetadataProperty properties = 2;
}

// Structured content to inspect. Up to 50,000 `Value`s per request allowed. See
Expand All @@ -1403,6 +1412,15 @@ message Table {
repeated Row rows = 2;
}

// A key-value pair in the Metadata.
message KeyValueMetadataProperty {
// The key of the property.
string key = 1;

// The value of the property.
string value = 2;
}

// All the findings for a single scanned item.
message InspectResult {
// List of findings for an item.
Expand Down Expand Up @@ -7478,6 +7496,9 @@ enum MetadataType {

// Metadata extracted from the files.
CONTENT_METADATA = 3;

// Metadata provided by the client.
CLIENT_PROVIDED_METADATA = 4;
}

// Parts of the APIs which use certain infoTypes.
Expand Down
209 changes: 208 additions & 1 deletion packages/google-privacy-dlp/protos/protos.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2788,6 +2788,9 @@ export namespace google {

/** ContentItem byteItem */
byteItem?: (google.privacy.dlp.v2.IByteContentItem|null);

/** ContentItem contentMetadata */
contentMetadata?: (google.privacy.dlp.v2.IContentMetadata|null);
}

/** Represents a ContentItem. */
Expand All @@ -2808,6 +2811,9 @@ export namespace google {
/** ContentItem byteItem. */
public byteItem?: (google.privacy.dlp.v2.IByteContentItem|null);

/** ContentItem contentMetadata. */
public contentMetadata?: (google.privacy.dlp.v2.IContentMetadata|null);

/** ContentItem dataItem. */
public dataItem?: ("value"|"table"|"byteItem");

Expand Down Expand Up @@ -2889,6 +2895,103 @@ export namespace google {
public static getTypeUrl(typeUrlPrefix?: string): string;
}

/** Properties of a ContentMetadata. */
interface IContentMetadata {

/** ContentMetadata properties */
properties?: (google.privacy.dlp.v2.IKeyValueMetadataProperty[]|null);
}

/** Represents a ContentMetadata. */
class ContentMetadata implements IContentMetadata {

/**
* Constructs a new ContentMetadata.
* @param [properties] Properties to set
*/
constructor(properties?: google.privacy.dlp.v2.IContentMetadata);

/** ContentMetadata properties. */
public properties: google.privacy.dlp.v2.IKeyValueMetadataProperty[];

/**
* Creates a new ContentMetadata instance using the specified properties.
* @param [properties] Properties to set
* @returns ContentMetadata instance
*/
public static create(properties?: google.privacy.dlp.v2.IContentMetadata): google.privacy.dlp.v2.ContentMetadata;

/**
* Encodes the specified ContentMetadata message. Does not implicitly {@link google.privacy.dlp.v2.ContentMetadata.verify|verify} messages.
* @param message ContentMetadata message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.privacy.dlp.v2.IContentMetadata, writer?: $protobuf.Writer): $protobuf.Writer;

/**
* Encodes the specified ContentMetadata message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ContentMetadata.verify|verify} messages.
* @param message ContentMetadata message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.privacy.dlp.v2.IContentMetadata, writer?: $protobuf.Writer): $protobuf.Writer;

/**
* Decodes a ContentMetadata message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns ContentMetadata
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ContentMetadata;

/**
* Decodes a ContentMetadata message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns ContentMetadata
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ContentMetadata;

/**
* Verifies a ContentMetadata message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);

/**
* Creates a ContentMetadata message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns ContentMetadata
*/
public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ContentMetadata;

/**
* Creates a plain object from a ContentMetadata message. Also converts values to other types if specified.
* @param message ContentMetadata
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.privacy.dlp.v2.ContentMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any };

/**
* Converts this ContentMetadata to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };

/**
* Gets the default type url for ContentMetadata
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}

/** Properties of a Table. */
interface ITable {

Expand Down Expand Up @@ -3092,6 +3195,109 @@ export namespace google {
}
}

/** Properties of a KeyValueMetadataProperty. */
interface IKeyValueMetadataProperty {

/** KeyValueMetadataProperty key */
key?: (string|null);

/** KeyValueMetadataProperty value */
value?: (string|null);
}

/** Represents a KeyValueMetadataProperty. */
class KeyValueMetadataProperty implements IKeyValueMetadataProperty {

/**
* Constructs a new KeyValueMetadataProperty.
* @param [properties] Properties to set
*/
constructor(properties?: google.privacy.dlp.v2.IKeyValueMetadataProperty);

/** KeyValueMetadataProperty key. */
public key: string;

/** KeyValueMetadataProperty value. */
public value: string;

/**
* Creates a new KeyValueMetadataProperty instance using the specified properties.
* @param [properties] Properties to set
* @returns KeyValueMetadataProperty instance
*/
public static create(properties?: google.privacy.dlp.v2.IKeyValueMetadataProperty): google.privacy.dlp.v2.KeyValueMetadataProperty;

/**
* Encodes the specified KeyValueMetadataProperty message. Does not implicitly {@link google.privacy.dlp.v2.KeyValueMetadataProperty.verify|verify} messages.
* @param message KeyValueMetadataProperty message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.privacy.dlp.v2.IKeyValueMetadataProperty, writer?: $protobuf.Writer): $protobuf.Writer;

/**
* Encodes the specified KeyValueMetadataProperty message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.KeyValueMetadataProperty.verify|verify} messages.
* @param message KeyValueMetadataProperty message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.privacy.dlp.v2.IKeyValueMetadataProperty, writer?: $protobuf.Writer): $protobuf.Writer;

/**
* Decodes a KeyValueMetadataProperty message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns KeyValueMetadataProperty
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.KeyValueMetadataProperty;

/**
* Decodes a KeyValueMetadataProperty message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns KeyValueMetadataProperty
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.KeyValueMetadataProperty;

/**
* Verifies a KeyValueMetadataProperty message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);

/**
* Creates a KeyValueMetadataProperty message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns KeyValueMetadataProperty
*/
public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.KeyValueMetadataProperty;

/**
* Creates a plain object from a KeyValueMetadataProperty message. Also converts values to other types if specified.
* @param message KeyValueMetadataProperty
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.privacy.dlp.v2.KeyValueMetadataProperty, options?: $protobuf.IConversionOptions): { [k: string]: any };

/**
* Converts this KeyValueMetadataProperty to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };

/**
* Gets the default type url for KeyValueMetadataProperty
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}

/** Properties of an InspectResult. */
interface IInspectResult {

Expand Down Expand Up @@ -32927,7 +33133,8 @@ export namespace google {
enum MetadataType {
METADATATYPE_UNSPECIFIED = 0,
STORAGE_METADATA = 2,
CONTENT_METADATA = 3
CONTENT_METADATA = 3,
CLIENT_PROVIDED_METADATA = 4
}

/** InfoTypeSupportedBy enum. */
Expand Down
Loading
Loading