blob: 92754a796811a93f0980b8317732d9251bd76376 [file] [log] [blame]
// Copyright 2018 Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated file. DO NOT EDIT.
// Package dlp provides access to the Cloud Data Loss Prevention (DLP) API.
//
// This package is DEPRECATED. Use package cloud.google.com/go/dlp/apiv2 instead.
//
// See https://cloud.google.com/dlp/docs/
//
// Usage example:
//
// import "google.golang.org/api/dlp/v2"
// ...
// dlpService, err := dlp.New(oauthHttpClient)
package dlp // import "google.golang.org/api/dlp/v2"
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"net/url"
"strconv"
"strings"
gensupport "google.golang.org/api/gensupport"
googleapi "google.golang.org/api/googleapi"
)
// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = gensupport.MarshalJSON
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Canceled
const apiId = "dlp:v2"
const apiName = "dlp"
const apiVersion = "v2"
const basePath = "https://dlp.googleapis.com/"
// OAuth2 scopes used by this API.
const (
// View and manage your data across Google Cloud Platform services
CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
)
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.InfoTypes = NewInfoTypesService(s)
s.Organizations = NewOrganizationsService(s)
s.Projects = NewProjectsService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
InfoTypes *InfoTypesService
Organizations *OrganizationsService
Projects *ProjectsService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewInfoTypesService(s *Service) *InfoTypesService {
rs := &InfoTypesService{s: s}
return rs
}
type InfoTypesService struct {
s *Service
}
func NewOrganizationsService(s *Service) *OrganizationsService {
rs := &OrganizationsService{s: s}
rs.DeidentifyTemplates = NewOrganizationsDeidentifyTemplatesService(s)
rs.InspectTemplates = NewOrganizationsInspectTemplatesService(s)
rs.StoredInfoTypes = NewOrganizationsStoredInfoTypesService(s)
return rs
}
type OrganizationsService struct {
s *Service
DeidentifyTemplates *OrganizationsDeidentifyTemplatesService
InspectTemplates *OrganizationsInspectTemplatesService
StoredInfoTypes *OrganizationsStoredInfoTypesService
}
func NewOrganizationsDeidentifyTemplatesService(s *Service) *OrganizationsDeidentifyTemplatesService {
rs := &OrganizationsDeidentifyTemplatesService{s: s}
return rs
}
type OrganizationsDeidentifyTemplatesService struct {
s *Service
}
func NewOrganizationsInspectTemplatesService(s *Service) *OrganizationsInspectTemplatesService {
rs := &OrganizationsInspectTemplatesService{s: s}
return rs
}
type OrganizationsInspectTemplatesService struct {
s *Service
}
func NewOrganizationsStoredInfoTypesService(s *Service) *OrganizationsStoredInfoTypesService {
rs := &OrganizationsStoredInfoTypesService{s: s}
return rs
}
type OrganizationsStoredInfoTypesService struct {
s *Service
}
func NewProjectsService(s *Service) *ProjectsService {
rs := &ProjectsService{s: s}
rs.Content = NewProjectsContentService(s)
rs.DeidentifyTemplates = NewProjectsDeidentifyTemplatesService(s)
rs.DlpJobs = NewProjectsDlpJobsService(s)
rs.Image = NewProjectsImageService(s)
rs.InspectTemplates = NewProjectsInspectTemplatesService(s)
rs.JobTriggers = NewProjectsJobTriggersService(s)
rs.StoredInfoTypes = NewProjectsStoredInfoTypesService(s)
return rs
}
type ProjectsService struct {
s *Service
Content *ProjectsContentService
DeidentifyTemplates *ProjectsDeidentifyTemplatesService
DlpJobs *ProjectsDlpJobsService
Image *ProjectsImageService
InspectTemplates *ProjectsInspectTemplatesService
JobTriggers *ProjectsJobTriggersService
StoredInfoTypes *ProjectsStoredInfoTypesService
}
func NewProjectsContentService(s *Service) *ProjectsContentService {
rs := &ProjectsContentService{s: s}
return rs
}
type ProjectsContentService struct {
s *Service
}
func NewProjectsDeidentifyTemplatesService(s *Service) *ProjectsDeidentifyTemplatesService {
rs := &ProjectsDeidentifyTemplatesService{s: s}
return rs
}
type ProjectsDeidentifyTemplatesService struct {
s *Service
}
func NewProjectsDlpJobsService(s *Service) *ProjectsDlpJobsService {
rs := &ProjectsDlpJobsService{s: s}
return rs
}
type ProjectsDlpJobsService struct {
s *Service
}
func NewProjectsImageService(s *Service) *ProjectsImageService {
rs := &ProjectsImageService{s: s}
return rs
}
type ProjectsImageService struct {
s *Service
}
func NewProjectsInspectTemplatesService(s *Service) *ProjectsInspectTemplatesService {
rs := &ProjectsInspectTemplatesService{s: s}
return rs
}
type ProjectsInspectTemplatesService struct {
s *Service
}
func NewProjectsJobTriggersService(s *Service) *ProjectsJobTriggersService {
rs := &ProjectsJobTriggersService{s: s}
return rs
}
type ProjectsJobTriggersService struct {
s *Service
}
func NewProjectsStoredInfoTypesService(s *Service) *ProjectsStoredInfoTypesService {
rs := &ProjectsStoredInfoTypesService{s: s}
return rs
}
type ProjectsStoredInfoTypesService struct {
s *Service
}
// GooglePrivacyDlpV2Action: A task to execute on the completion of a
// job.
// See https://cloud.google.com/dlp/docs/concepts-actions to learn more.
type GooglePrivacyDlpV2Action struct {
// PubSub: Publish a notification to a pubsub topic.
PubSub *GooglePrivacyDlpV2PublishToPubSub `json:"pubSub,omitempty"`
// PublishSummaryToCscc: Publish summary to Cloud Security Command
// Center (Alpha).
PublishSummaryToCscc *GooglePrivacyDlpV2PublishSummaryToCscc `json:"publishSummaryToCscc,omitempty"`
// SaveFindings: Save resulting findings in a provided location.
SaveFindings *GooglePrivacyDlpV2SaveFindings `json:"saveFindings,omitempty"`
// ForceSendFields is a list of field names (e.g. "PubSub") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "PubSub") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2Action) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2Action
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails: Result of a risk
// analysis operation request.
type GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails struct {
CategoricalStatsResult *GooglePrivacyDlpV2CategoricalStatsResult `json:"categoricalStatsResult,omitempty"`
DeltaPresenceEstimationResult *GooglePrivacyDlpV2DeltaPresenceEstimationResult `json:"deltaPresenceEstimationResult,omitempty"`
KAnonymityResult *GooglePrivacyDlpV2KAnonymityResult `json:"kAnonymityResult,omitempty"`
KMapEstimationResult *GooglePrivacyDlpV2KMapEstimationResult `json:"kMapEstimationResult,omitempty"`
LDiversityResult *GooglePrivacyDlpV2LDiversityResult `json:"lDiversityResult,omitempty"`
NumericalStatsResult *GooglePrivacyDlpV2NumericalStatsResult `json:"numericalStatsResult,omitempty"`
// RequestedPrivacyMetric: Privacy metric to compute.
RequestedPrivacyMetric *GooglePrivacyDlpV2PrivacyMetric `json:"requestedPrivacyMetric,omitempty"`
// RequestedSourceTable: Input dataset to compute metrics over.
RequestedSourceTable *GooglePrivacyDlpV2BigQueryTable `json:"requestedSourceTable,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "CategoricalStatsResult") to unconditionally include in API requests.
// By default, fields with empty values are omitted from API requests.
// However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CategoricalStatsResult")
// to include in API requests with the JSON null value. By default,
// fields with empty values are omitted from API requests. However, any
// field with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2AuxiliaryTable: An auxiliary table contains
// statistical information on the relative
// frequency of different quasi-identifiers values. It has one or
// several
// quasi-identifiers columns, and one column that indicates the
// relative
// frequency of each quasi-identifier tuple.
// If a tuple is present in the data but not in the auxiliary table,
// the
// corresponding relative frequency is assumed to be zero (and thus,
// the
// tuple is highly reidentifiable).
type GooglePrivacyDlpV2AuxiliaryTable struct {
// QuasiIds: Quasi-identifier columns. [required]
QuasiIds []*GooglePrivacyDlpV2QuasiIdField `json:"quasiIds,omitempty"`
// RelativeFrequency: The relative frequency column must contain a
// floating-point number
// between 0 and 1 (inclusive). Null values are assumed to be
// zero.
// [required]
RelativeFrequency *GooglePrivacyDlpV2FieldId `json:"relativeFrequency,omitempty"`
// Table: Auxiliary table location. [required]
Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"`
// ForceSendFields is a list of field names (e.g. "QuasiIds") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "QuasiIds") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2AuxiliaryTable) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2AuxiliaryTable
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2BigQueryField: Message defining a field of a
// BigQuery table.
type GooglePrivacyDlpV2BigQueryField struct {
// Field: Designated field in the BigQuery table.
Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"`
// Table: Source table of the field.
Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"`
// ForceSendFields is a list of field names (e.g. "Field") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Field") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2BigQueryField) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2BigQueryField
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2BigQueryKey: Row key for identifying a record in
// BigQuery table.
type GooglePrivacyDlpV2BigQueryKey struct {
// RowNumber: Absolute number of the row from the beginning of the table
// at the time
// of scanning.
RowNumber int64 `json:"rowNumber,omitempty,string"`
// TableReference: Complete BigQuery table reference.
TableReference *GooglePrivacyDlpV2BigQueryTable `json:"tableReference,omitempty"`
// ForceSendFields is a list of field names (e.g. "RowNumber") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "RowNumber") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2BigQueryKey) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2BigQueryKey
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2BigQueryOptions: Options defining BigQuery table
// and row identifiers.
type GooglePrivacyDlpV2BigQueryOptions struct {
// ExcludedFields: References to fields excluded from scanning. This
// allows you to skip
// inspection of entire columns which you know have no findings.
ExcludedFields []*GooglePrivacyDlpV2FieldId `json:"excludedFields,omitempty"`
// IdentifyingFields: References to fields uniquely identifying rows
// within the table.
// Nested fields in the format, like `person.birthdate.year`, are
// allowed.
IdentifyingFields []*GooglePrivacyDlpV2FieldId `json:"identifyingFields,omitempty"`
// RowsLimit: Max number of rows to scan. If the table has more rows
// than this value, the
// rest of the rows are omitted. If not set, or if set to 0, all rows
// will be
// scanned. Only one of rows_limit and rows_limit_percent can be
// specified.
// Cannot be used in conjunction with TimespanConfig.
RowsLimit int64 `json:"rowsLimit,omitempty,string"`
// RowsLimitPercent: Max percentage of rows to scan. The rest are
// omitted. The number of rows
// scanned is rounded down. Must be between 0 and 100, inclusively. Both
// 0 and
// 100 means no limit. Defaults to 0. Only one of rows_limit
// and
// rows_limit_percent can be specified. Cannot be used in conjunction
// with
// TimespanConfig.
RowsLimitPercent int64 `json:"rowsLimitPercent,omitempty"`
// Possible values:
// "SAMPLE_METHOD_UNSPECIFIED"
// "TOP" - Scan from the top (default).
// "RANDOM_START" - Randomly pick the row to start scanning. The
// scanned rows are contiguous.
SampleMethod string `json:"sampleMethod,omitempty"`
// TableReference: Complete BigQuery table reference.
TableReference *GooglePrivacyDlpV2BigQueryTable `json:"tableReference,omitempty"`
// ForceSendFields is a list of field names (e.g. "ExcludedFields") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ExcludedFields") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2BigQueryOptions) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2BigQueryOptions
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2BigQueryTable: Message defining the location of a
// BigQuery table. A table is uniquely
// identified by its project_id, dataset_id, and table_name. Within a
// query
// a table is often referenced with a string in the format
// of:
// `<project_id>:<dataset_id>.<table_id>`
// or
// `<project_id>.<dataset_id>.<table_id>`.
type GooglePrivacyDlpV2BigQueryTable struct {
// DatasetId: Dataset ID of the table.
DatasetId string `json:"datasetId,omitempty"`
// ProjectId: The Google Cloud Platform project ID of the project
// containing the table.
// If omitted, project ID is inferred from the API call.
ProjectId string `json:"projectId,omitempty"`
// TableId: Name of the table.
TableId string `json:"tableId,omitempty"`
// ForceSendFields is a list of field names (e.g. "DatasetId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DatasetId") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2BigQueryTable) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2BigQueryTable
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2BoundingBox: Bounding box encompassing detected
// text within an image.
type GooglePrivacyDlpV2BoundingBox struct {
// Height: Height of the bounding box in pixels.
Height int64 `json:"height,omitempty"`
// Left: Left coordinate of the bounding box. (0,0) is upper left.
Left int64 `json:"left,omitempty"`
// Top: Top coordinate of the bounding box. (0,0) is upper left.
Top int64 `json:"top,omitempty"`
// Width: Width of the bounding box in pixels.
Width int64 `json:"width,omitempty"`
// ForceSendFields is a list of field names (e.g. "Height") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Height") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2BoundingBox) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2BoundingBox
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2Bucket: Bucket is represented as a range, along
// with replacement values.
type GooglePrivacyDlpV2Bucket struct {
// Max: Upper bound of the range, exclusive; type must match min.
Max *GooglePrivacyDlpV2Value `json:"max,omitempty"`
// Min: Lower bound of the range, inclusive. Type should be the same as
// max if
// used.
Min *GooglePrivacyDlpV2Value `json:"min,omitempty"`
// ReplacementValue: Replacement value for this bucket. If not
// provided
// the default behavior will be to hyphenate the min-max range.
ReplacementValue *GooglePrivacyDlpV2Value `json:"replacementValue,omitempty"`
// ForceSendFields is a list of field names (e.g. "Max") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Max") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2Bucket) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2Bucket
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2BucketingConfig: Generalization function that
// buckets values based on ranges. The ranges and
// replacement values are dynamically provided by the user for custom
// behavior,
// such as 1-30 -> LOW 31-65 -> MEDIUM 66-100 -> HIGH
// This can be used on
// data of type: number, long, string, timestamp.
// If the bound `Value` type differs from the type of data being
// transformed, we
// will first attempt converting the type of the data to be transformed
// to match
// the type of the bound before comparing.
// See https://cloud.google.com/dlp/docs/concepts-bucketing to learn
// more.
type GooglePrivacyDlpV2BucketingConfig struct {
// Buckets: Set of buckets. Ranges must be non-overlapping.
Buckets []*GooglePrivacyDlpV2Bucket `json:"buckets,omitempty"`
// ForceSendFields is a list of field names (e.g. "Buckets") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Buckets") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2BucketingConfig) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2BucketingConfig
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2ByteContentItem: Container for bytes to inspect or
// redact.
type GooglePrivacyDlpV2ByteContentItem struct {
// Data: Content data to inspect or redact.
Data string `json:"data,omitempty"`
// Type: The type of data stored in the bytes string. Default will be
// TEXT_UTF8.
//
// Possible values:
// "BYTES_TYPE_UNSPECIFIED"
// "IMAGE"
// "IMAGE_JPEG"
// "IMAGE_BMP"
// "IMAGE_PNG"
// "IMAGE_SVG"
// "TEXT_UTF8"
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "Data") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Data") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2ByteContentItem) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2ByteContentItem
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2CancelDlpJobRequest: The request message for
// canceling a DLP job.
type GooglePrivacyDlpV2CancelDlpJobRequest struct {
}
// GooglePrivacyDlpV2CategoricalStatsConfig: Compute numerical stats
// over an individual column, including
// number of distinct values and value count distribution.
type GooglePrivacyDlpV2CategoricalStatsConfig struct {
// Field: Field to compute categorical stats on. All column types
// are
// supported except for arrays and structs. However, it may be
// more
// informative to use NumericalStats when the field type is
// supported,
// depending on the data.
Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"`
// ForceSendFields is a list of field names (e.g. "Field") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Field") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2CategoricalStatsConfig) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2CategoricalStatsConfig
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type GooglePrivacyDlpV2CategoricalStatsHistogramBucket struct {
// BucketSize: Total number of values in this bucket.
BucketSize int64 `json:"bucketSize,omitempty,string"`
// BucketValueCount: Total number of distinct values in this bucket.
BucketValueCount int64 `json:"bucketValueCount,omitempty,string"`
// BucketValues: Sample of value frequencies in this bucket. The total
// number of
// values returned per bucket is capped at 20.
BucketValues []*GooglePrivacyDlpV2ValueFrequency `json:"bucketValues,omitempty"`
// ValueFrequencyLowerBound: Lower bound on the value frequency of the
// values in this bucket.
ValueFrequencyLowerBound int64 `json:"valueFrequencyLowerBound,omitempty,string"`
// ValueFrequencyUpperBound: Upper bound on the value frequency of the
// values in this bucket.
ValueFrequencyUpperBound int64 `json:"valueFrequencyUpperBound,omitempty,string"`
// ForceSendFields is a list of field names (e.g. "BucketSize") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BucketSize") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2CategoricalStatsHistogramBucket) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2CategoricalStatsHistogramBucket
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2CategoricalStatsResult: Result of the categorical
// stats computation.
type GooglePrivacyDlpV2CategoricalStatsResult struct {
// ValueFrequencyHistogramBuckets: Histogram of value frequencies in the
// column.
ValueFrequencyHistogramBuckets []*GooglePrivacyDlpV2CategoricalStatsHistogramBucket `json:"valueFrequencyHistogramBuckets,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "ValueFrequencyHistogramBuckets") to unconditionally include in API
// requests. By default, fields with empty values are omitted from API
// requests. However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g.
// "ValueFrequencyHistogramBuckets") to include in API requests with the
// JSON null value. By default, fields with empty values are omitted
// from API requests. However, any field with an empty value appearing
// in NullFields will be sent to the server as null. It is an error if a
// field in this list has a non-empty value. This may be used to include
// null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2CategoricalStatsResult) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2CategoricalStatsResult
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2CharacterMaskConfig: Partially mask a string by
// replacing a given number of characters with a
// fixed character. Masking can start from the beginning or end of the
// string.
// This can be used on data of any type (numbers, longs, and so on) and
// when
// de-identifying structured data we'll attempt to preserve the original
// data's
// type. (This allows you to take a long like 123 and modify it to a
// string like
// **3.
type GooglePrivacyDlpV2CharacterMaskConfig struct {
// CharactersToIgnore: When masking a string, items in this list will be
// skipped when replacing.
// For example, if your string is 555-555-5555 and you ask us to skip
// `-` and
// mask 5 chars with * we would produce ***-*55-5555.
CharactersToIgnore []*GooglePrivacyDlpV2CharsToIgnore `json:"charactersToIgnore,omitempty"`
// MaskingCharacter: Character to mask the sensitive values&mdash;for
// example, "*" for an
// alphabetic string such as name, or "0" for a numeric string such as
// ZIP
// code or credit card number. String must have length 1. If not
// supplied, we
// will default to "*" for strings, 0 for digits.
MaskingCharacter string `json:"maskingCharacter,omitempty"`
// NumberToMask: Number of characters to mask. If not set, all matching
// chars will be
// masked. Skipped characters do not count towards this tally.
NumberToMask int64 `json:"numberToMask,omitempty"`
// ReverseOrder: Mask characters in reverse order. For example, if
// `masking_character` is
// '0', number_to_mask is 14, and `reverse_order` is false,
// then
// 1234-5678-9012-3456 -> 00000000000000-3456
// If `masking_character` is '*', `number_to_mask` is 3, and
// `reverse_order`
// is true, then 12345 -> 12***
ReverseOrder bool `json:"reverseOrder,omitempty"`
// ForceSendFields is a list of field names (e.g. "CharactersToIgnore")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CharactersToIgnore") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2CharacterMaskConfig) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2CharacterMaskConfig
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2CharsToIgnore: Characters to skip when doing
// deidentification of a value. These will be left
// alone and skipped.
type GooglePrivacyDlpV2CharsToIgnore struct {
CharactersToSkip string `json:"charactersToSkip,omitempty"`
// Possible values:
// "COMMON_CHARS_TO_IGNORE_UNSPECIFIED"
// "NUMERIC" - 0-9
// "ALPHA_UPPER_CASE" - A-Z
// "ALPHA_LOWER_CASE" - a-z
// "PUNCTUATION" - US Punctuation, one of
// !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
// "WHITESPACE" - Whitespace character, one of [ \t\n\x0B\f\r]
CommonCharactersToIgnore string `json:"commonCharactersToIgnore,omitempty"`
// ForceSendFields is a list of field names (e.g. "CharactersToSkip") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CharactersToSkip") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2CharsToIgnore) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2CharsToIgnore
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2CloudStorageFileSet: Message representing a set of
// files in Cloud Storage.
type GooglePrivacyDlpV2CloudStorageFileSet struct {
// Url: The url, in the format `gs://<bucket>/<path>`. Trailing wildcard
// in the
// path is allowed.
Url string `json:"url,omitempty"`
// ForceSendFields is a list of field names (e.g. "Url") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Url") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2CloudStorageFileSet) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2CloudStorageFileSet
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2CloudStorageOptions: Options defining a file or a
// set of files within a Google Cloud Storage
// bucket.
type GooglePrivacyDlpV2CloudStorageOptions struct {
// BytesLimitPerFile: Max number of bytes to scan from a file. If a
// scanned file's size is bigger
// than this value then the rest of the bytes are omitted. Only one
// of bytes_limit_per_file and bytes_limit_per_file_percent can be
// specified.
BytesLimitPerFile int64 `json:"bytesLimitPerFile,omitempty,string"`
// BytesLimitPerFilePercent: Max percentage of bytes to scan from a
// file. The rest are omitted. The
// number of bytes scanned is rounded down. Must be between 0 and
// 100,
// inclusively. Both 0 and 100 means no limit. Defaults to 0. Only
// one
// of bytes_limit_per_file and bytes_limit_per_file_percent can be
// specified.
BytesLimitPerFilePercent int64 `json:"bytesLimitPerFilePercent,omitempty"`
// FileSet: The set of one or more files to scan.
FileSet *GooglePrivacyDlpV2FileSet `json:"fileSet,omitempty"`
// FileTypes: List of file type groups to include in the scan.
// If empty, all files are scanned and available data format
// processors
// are applied. In addition, the binary content of the selected files
// is always scanned as well.
//
// Possible values:
// "FILE_TYPE_UNSPECIFIED" - Includes all files.
// "BINARY_FILE" - Includes all file extensions not covered by text
// file types.
// "TEXT_FILE" - Included file extensions:
// asc, brf, c, cc, cpp, csv, cxx, c++, cs, css, dart, eml, go, h, hh,
// hpp,
// hxx, h++, hs, html, htm, shtml, shtm, xhtml, lhs, ini, java, js,
// json,
// ocaml, md, mkd, markdown, m, ml, mli, pl, pm, php, phtml, pht, py,
// pyw,
// rb, rbw, rs, rc, scala, sh, sql, tex, txt, text, tsv, vcard, vcs,
// wml,
// xml, xsl, xsd, yml, yaml.
FileTypes []string `json:"fileTypes,omitempty"`
// FilesLimitPercent: Limits the number of files to scan to this
// percentage of the input FileSet.
// Number of files scanned is rounded down. Must be between 0 and
// 100,
// inclusively. Both 0 and 100 means no limit. Defaults to 0.
FilesLimitPercent int64 `json:"filesLimitPercent,omitempty"`
// Possible values:
// "SAMPLE_METHOD_UNSPECIFIED"
// "TOP" - Scan from the top (default).
// "RANDOM_START" - For each file larger than bytes_limit_per_file,
// randomly pick the offset
// to start scanning. The scanned bytes are contiguous.
SampleMethod string `json:"sampleMethod,omitempty"`
// ForceSendFields is a list of field names (e.g. "BytesLimitPerFile")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BytesLimitPerFile") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2CloudStorageOptions) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2CloudStorageOptions
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2CloudStoragePath: Message representing a single
// file or path in Cloud Storage.
type GooglePrivacyDlpV2CloudStoragePath struct {
// Path: A url representing a file or path (no wildcards) in Cloud
// Storage.
// Example: gs://[BUCKET_NAME]/dictionary.txt
Path string `json:"path,omitempty"`
// ForceSendFields is a list of field names (e.g. "Path") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Path") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2CloudStoragePath) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2CloudStoragePath
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2CloudStorageRegexFileSet: Message representing a
// set of files in a Cloud Storage bucket. Regular
// expressions are used to allow fine-grained control over which files
// in the
// bucket to include.
//
// Included files are those that match at least one item in
// `include_regex` and
// do not match any items in `exclude_regex`. Note that a file that
// matches
// items from both lists will _not_ be included. For a match to occur,
// the
// entire file path (i.e., everything in the url after the bucket name)
// must
// match the regular expression.
//
// For example, given the input `{bucket_name: "mybucket",
// include_regex:
// ["directory1/.*"], exclude_regex:
// ["directory1/excluded.*"]}`:
//
// * `gs://mybucket/directory1/myfile` will be included
// * `gs://mybucket/directory1/directory2/myfile` will be included (`.*`
// matches
// across `/`)
// * `gs://mybucket/directory0/directory1/myfile` will _not_ be included
// (the
// full path doesn't match any items in `include_regex`)
// * `gs://mybucket/directory1/excludedfile` will _not_ be included (the
// path
// matches an item in `exclude_regex`)
//
// If `include_regex` is left empty, it will match all files by
// default
// (this is equivalent to setting `include_regex: [".*"]`).
//
// Some other common use cases:
//
// * `{bucket_name: "mybucket", exclude_regex: [".*\.pdf"]}` will
// include all
// files in `mybucket` except for .pdf files
// * `{bucket_name: "mybucket", include_regex: ["directory/[^/]+"]}`
// will
// include all files directly under `gs://mybucket/directory/`, without
// matching
// across `/`
type GooglePrivacyDlpV2CloudStorageRegexFileSet struct {
// BucketName: The name of a Cloud Storage bucket. Required.
BucketName string `json:"bucketName,omitempty"`
// ExcludeRegex: A list of regular expressions matching file paths to
// exclude. All files in
// the bucket that match at least one of these regular expressions will
// be
// excluded from the scan.
//
// Regular expressions use
// RE2
// [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be
// found
// under the google/re2 repository on GitHub.
ExcludeRegex []string `json:"excludeRegex,omitempty"`
// IncludeRegex: A list of regular expressions matching file paths to
// include. All files in
// the bucket that match at least one of these regular expressions will
// be
// included in the set of files, except for those that also match an
// item in
// `exclude_regex`. Leaving this field empty will match all files by
// default
// (this is equivalent to including `.*` in the list).
//
// Regular expressions use
// RE2
// [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be
// found
// under the google/re2 repository on GitHub.
IncludeRegex []string `json:"includeRegex,omitempty"`
// ForceSendFields is a list of field names (e.g. "BucketName") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BucketName") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2CloudStorageRegexFileSet) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2CloudStorageRegexFileSet
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2Color: Represents a color in the RGB color space.
type GooglePrivacyDlpV2Color struct {
// Blue: The amount of blue in the color as a value in the interval [0,
// 1].
Blue float64 `json:"blue,omitempty"`
// Green: The amount of green in the color as a value in the interval
// [0, 1].
Green float64 `json:"green,omitempty"`
// Red: The amount of red in the color as a value in the interval [0,
// 1].
Red float64 `json:"red,omitempty"`
// ForceSendFields is a list of field names (e.g. "Blue") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Blue") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2Color) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2Color
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *GooglePrivacyDlpV2Color) UnmarshalJSON(data []byte) error {
type NoMethod GooglePrivacyDlpV2Color
var s1 struct {
Blue gensupport.JSONFloat64 `json:"blue"`
Green gensupport.JSONFloat64 `json:"green"`
Red gensupport.JSONFloat64 `json:"red"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.Blue = float64(s1.Blue)
s.Green = float64(s1.Green)
s.Red = float64(s1.Red)
return nil
}
// GooglePrivacyDlpV2Condition: The field type of `value` and `field` do
// not need to match to be
// considered equal, but not all comparisons are possible.
//
// A `value` of type:
//
// - `string` can be compared against all other types
// - `boolean` can only be compared against other booleans
// - `integer` can be compared against doubles or a string if the string
// value
// can be parsed as an integer.
// - `double` can be compared against integers or a string if the string
// can
// be parsed as a double.
// - `Timestamp` can be compared against strings in RFC 3339 date
// string
// format.
// - `TimeOfDay` can be compared against timestamps and strings in the
// format
// of 'HH:mm:ss'.
//
// If we fail to compare do to type mismatch, a warning will be given
// and
// the condition will evaluate to false.
type GooglePrivacyDlpV2Condition struct {
// Field: Field within the record this condition is evaluated against.
// [required]
Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"`
// Operator: Operator used to compare the field or infoType to the
// value. [required]
//
// Possible values:
// "RELATIONAL_OPERATOR_UNSPECIFIED"
// "EQUAL_TO" - Equal.
// "NOT_EQUAL_TO" - Not equal to.
// "GREATER_THAN" - Greater than.
// "LESS_THAN" - Less than.
// "GREATER_THAN_OR_EQUALS" - Greater than or equals.
// "LESS_THAN_OR_EQUALS" - Less than or equals.
// "EXISTS" - Exists
Operator string `json:"operator,omitempty"`
// Value: Value to compare against. [Required, except for `EXISTS`
// tests.]
Value *GooglePrivacyDlpV2Value `json:"value,omitempty"`
// ForceSendFields is a list of field names (e.g. "Field") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Field") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2Condition) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2Condition
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2Conditions: A collection of conditions.
type GooglePrivacyDlpV2Conditions struct {
Conditions []*GooglePrivacyDlpV2Condition `json:"conditions,omitempty"`
// ForceSendFields is a list of field names (e.g. "Conditions") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Conditions") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2Conditions) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2Conditions
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2ContentItem: Container structure for the content to
// inspect.
type GooglePrivacyDlpV2ContentItem struct {
// ByteItem: Content data to inspect or redact. Replaces `type` and
// `data`.
ByteItem *GooglePrivacyDlpV2ByteContentItem `json:"byteItem,omitempty"`
// Table: Structured content for inspection.
// See
// https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_tab
// le to
// learn more.
Table *GooglePrivacyDlpV2Table `json:"table,omitempty"`
// Value: String data to inspect or redact.
Value string `json:"value,omitempty"`
// ForceSendFields is a list of field names (e.g. "ByteItem") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ByteItem") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2ContentItem) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2ContentItem
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2ContentLocation: Findings container location data.
type GooglePrivacyDlpV2ContentLocation struct {
// ContainerName: Name of the container where the finding is
// located.
// The top level name is the source file name or table name. Names of
// some
// common storage containers are formatted as follows:
//
// * BigQuery tables: `<project_id>:<dataset_id>.<table_id>`
// * Cloud Storage files: `gs://<bucket>/<path>`
// * Datastore namespace: <namespace>
//
// Nested names could be absent if the embedded object has no
// string
// identifier (for an example an image contained within a document).
ContainerName string `json:"containerName,omitempty"`
// ContainerTimestamp: Findings container modification timestamp, if
// applicable.
// For Google Cloud Storage contains last file modification
// timestamp.
// For BigQuery table contains last_modified_time property.
// For Datastore - not populated.
ContainerTimestamp string `json:"containerTimestamp,omitempty"`
// ContainerVersion: Findings container version, if
// available
// ("generation" for Google Cloud Storage).
ContainerVersion string `json:"containerVersion,omitempty"`
// DocumentLocation: Location data for document files.
DocumentLocation *GooglePrivacyDlpV2DocumentLocation `json:"documentLocation,omitempty"`
// ImageLocation: Location within an image's pixels.
ImageLocation *GooglePrivacyDlpV2ImageLocation `json:"imageLocation,omitempty"`
// RecordLocation: Location within a row or record of a database table.
RecordLocation *GooglePrivacyDlpV2RecordLocation `json:"recordLocation,omitempty"`
// ForceSendFields is a list of field names (e.g. "ContainerName") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ContainerName") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2ContentLocation) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2ContentLocation
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2CreateDeidentifyTemplateRequest: Request message
// for CreateDeidentifyTemplate.
type GooglePrivacyDlpV2CreateDeidentifyTemplateRequest struct {
// DeidentifyTemplate: The DeidentifyTemplate to create.
DeidentifyTemplate *GooglePrivacyDlpV2DeidentifyTemplate `json:"deidentifyTemplate,omitempty"`
// TemplateId: The template 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. Can be empty to allow the system to generate one.
TemplateId string `json:"templateId,omitempty"`
// ForceSendFields is a list of field names (e.g. "DeidentifyTemplate")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DeidentifyTemplate") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2CreateDeidentifyTemplateRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2CreateDlpJobRequest: Request message for
// CreateDlpJobRequest. Used to initiate long running
// jobs such as calculating risk metrics or inspecting Google
// Cloud
// Storage.
type GooglePrivacyDlpV2CreateDlpJobRequest struct {
InspectJob *GooglePrivacyDlpV2InspectJobConfig `json:"inspectJob,omitempty"`
// JobId: The job 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. Can be empty to allow the system to generate one.
JobId string `json:"jobId,omitempty"`
RiskJob *GooglePrivacyDlpV2RiskAnalysisJobConfig `json:"riskJob,omitempty"`
// ForceSendFields is a list of field names (e.g. "InspectJob") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "InspectJob") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2CreateDlpJobRequest) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2CreateDlpJobRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2CreateInspectTemplateRequest: Request message for
// CreateInspectTemplate.
type GooglePrivacyDlpV2CreateInspectTemplateRequest struct {
// InspectTemplate: The InspectTemplate to create.
InspectTemplate *GooglePrivacyDlpV2InspectTemplate `json:"inspectTemplate,omitempty"`
// TemplateId: The template 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. Can be empty to allow the system to generate one.
TemplateId string `json:"templateId,omitempty"`
// ForceSendFields is a list of field names (e.g. "InspectTemplate") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "InspectTemplate") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2CreateInspectTemplateRequest) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2CreateInspectTemplateRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2CreateJobTriggerRequest: Request message for
// CreateJobTrigger.
type GooglePrivacyDlpV2CreateJobTriggerRequest struct {
// JobTrigger: The JobTrigger to create.
JobTrigger *GooglePrivacyDlpV2JobTrigger `json:"jobTrigger,omitempty"`
// TriggerId: The trigger 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. Can be empty to allow the system to generate one.
TriggerId string `json:"triggerId,omitempty"`
// ForceSendFields is a list of field names (e.g. "JobTrigger") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "JobTrigger") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2CreateJobTriggerRequest) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2CreateJobTriggerRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2CreateStoredInfoTypeRequest: Request message for
// CreateStoredInfoType.
type GooglePrivacyDlpV2CreateStoredInfoTypeRequest struct {
// Config: Configuration of the storedInfoType to create.
Config *GooglePrivacyDlpV2StoredInfoTypeConfig `json:"config,omitempty"`
// StoredInfoTypeId: The storedInfoType 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. Can be empty to allow the system to generate one.
StoredInfoTypeId string `json:"storedInfoTypeId,omitempty"`
// ForceSendFields is a list of field names (e.g. "Config") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Config") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2CreateStoredInfoTypeRequest) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2CreateStoredInfoTypeRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2CryptoHashConfig: Pseudonymization method that
// generates surrogates via cryptographic hashing.
// Uses SHA-256.
// The key size must be either 32 or 64 bytes.
// Outputs a 32 byte digest as an uppercase hex string
// (for example, 41D1567F7F99F1DC2A5FAB886DEE5BEE).
// Currently, only string and integer values can be hashed.
type GooglePrivacyDlpV2CryptoHashConfig struct {
// CryptoKey: The key used by the hash function.
CryptoKey *GooglePrivacyDlpV2CryptoKey `json:"cryptoKey,omitempty"`
// ForceSendFields is a list of field names (e.g. "CryptoKey") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CryptoKey") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2CryptoHashConfig) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2CryptoHashConfig
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2CryptoKey: This is a data encryption key (DEK) (as
// opposed to
// a key encryption key (KEK) stored by KMS).
// When using KMS to wrap/unwrap DEKs, be sure to set an appropriate
// IAM policy on the KMS CryptoKey (KEK) to ensure an attacker
// cannot
// unwrap the data crypto key.
type GooglePrivacyDlpV2CryptoKey struct {
KmsWrapped *GooglePrivacyDlpV2KmsWrappedCryptoKey `json:"kmsWrapped,omitempty"`
Transient *GooglePrivacyDlpV2TransientCryptoKey `json:"transient,omitempty"`
Unwrapped *GooglePrivacyDlpV2UnwrappedCryptoKey `json:"unwrapped,omitempty"`
// ForceSendFields is a list of field names (e.g. "KmsWrapped") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "KmsWrapped") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2CryptoKey) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2CryptoKey
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig: Replaces an identifier
// with a surrogate using FPE with the FFX
// mode of operation; however when used in the `ReidentifyContent` API
// method,
// it serves the opposite function by reversing the surrogate back
// into
// the original identifier.
// The identifier must be encoded as ASCII.
// For a given crypto key and context, the same identifier will
// be
// replaced with the same surrogate.
// Identifiers must be at least two characters long.
// In the case that the identifier is the empty string, it will be
// skipped.
// See https://cloud.google.com/dlp/docs/pseudonymization to learn more.
type GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig struct {
// Possible values:
// "FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED"
// "NUMERIC" - [0-9] (radix of 10)
// "HEXADECIMAL" - [0-9A-F] (radix of 16)
// "UPPER_CASE_ALPHA_NUMERIC" - [0-9A-Z] (radix of 36)
// "ALPHA_NUMERIC" - [0-9A-Za-z] (radix of 62)
CommonAlphabet string `json:"commonAlphabet,omitempty"`
// Context: The 'tweak', a context may be used for higher security since
// the same
// identifier in two different contexts won't be given the same
// surrogate. If
// the context is not set, a default tweak will be used.
//
// If the context is set but:
//
// 1. there is no record present when transforming a given value or
// 1. the field is not present when transforming a given value,
//
// a default tweak will be used.
//
// Note that case (1) is expected when an `InfoTypeTransformation`
// is
// applied to both structured and non-structured
// `ContentItem`s.
// Currently, the referenced field may be of value type integer or
// string.
//
// The tweak is constructed as a sequence of bytes in big endian byte
// order
// such that:
//
// - a 64 bit integer is encoded followed by a single byte of value 1
// - a string is encoded in UTF-8 format followed by a single byte of
// value 2
Context *GooglePrivacyDlpV2FieldId `json:"context,omitempty"`
// CryptoKey: The key used by the encryption algorithm. [required]
CryptoKey *GooglePrivacyDlpV2CryptoKey `json:"cryptoKey,omitempty"`
// CustomAlphabet: This is supported by mapping these to the
// alphanumeric characters
// that the FFX mode natively supports. This happens
// before/after
// encryption/decryption.
// Each character listed must appear only once.
// Number of characters must be in the range [2, 62].
// This must be encoded as ASCII.
// The order of characters does not matter.
CustomAlphabet string `json:"customAlphabet,omitempty"`
// Radix: The native way to select the alphabet. Must be in the range
// [2, 62].
Radix int64 `json:"radix,omitempty"`
// SurrogateInfoType: The custom infoType to annotate the surrogate
// with.
// This annotation will be applied to the surrogate by prefixing it
// with
// the name of the custom infoType followed by the number of
// characters comprising the surrogate. The following scheme defines
// the
// format: info_type_name(surrogate_character_count):surrogate
//
// For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE'
// and
// the surrogate is 'abc', the full replacement value
// will be: 'MY_TOKEN_INFO_TYPE(3):abc'
//
// This annotation identifies the surrogate when inspecting content
// using the
// custom
// infoType
// [`SurrogateType`](/dlp/docs/reference/rest/v2/InspectConfig#s
// urrogatetype).
// This facilitates reversal of the surrogate when it occurs in free
// text.
//
// In order for inspection to work properly, the name of this infoType
// must
// not occur naturally anywhere in your data; otherwise, inspection
// may
// find a surrogate that does not correspond to an actual
// identifier.
// Therefore, choose your custom infoType name carefully after
// considering
// what your data looks like. One way to select a name that has a high
// chance
// of yielding reliable detection is to include one or more unicode
// characters
// that are highly improbable to exist in your data.
// For example, assuming your data is entered from a regular ASCII
// keyboard,
// the symbol with the hex code point 29DD might be used like
// so:
// ⧝MY_TOKEN_TYPE
SurrogateInfoType *GooglePrivacyDlpV2InfoType `json:"surrogateInfoType,omitempty"`
// ForceSendFields is a list of field names (e.g. "CommonAlphabet") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CommonAlphabet") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2CustomInfoType: Custom information type provided by
// the user. Used to find domain-specific
// sensitive information configurable to the data in question.
type GooglePrivacyDlpV2CustomInfoType struct {
// DetectionRules: Set of detection rules to apply to all findings of
// this CustomInfoType.
// Rules are applied in order that they are specified. Not supported for
// the
// `surrogate_type` CustomInfoType.
DetectionRules []*GooglePrivacyDlpV2DetectionRule `json:"detectionRules,omitempty"`
// Dictionary: A list of phrases to detect as a CustomInfoType.
Dictionary *GooglePrivacyDlpV2Dictionary `json:"dictionary,omitempty"`
// ExclusionType: If set to EXCLUSION_TYPE_EXCLUDE this infoType will
// not cause a finding
// to be returned. It still can be used for rules matching.
//
// Possible values:
// "EXCLUSION_TYPE_UNSPECIFIED" - A finding of this custom info type
// will not be excluded from results.
// "EXCLUSION_TYPE_EXCLUDE" - A finding of this custom info type will
// be excluded from final results,
// but can still affect rule execution.
ExclusionType string `json:"exclusionType,omitempty"`
// InfoType: CustomInfoType can either be a new infoType, or an
// extension of built-in
// infoType, when the name matches one of existing infoTypes and that
// infoType
// is specified in `InspectContent.info_types` field. Specifying the
// latter
// adds findings to the one detected by the system. If built-in info
// type is
// not specified in `InspectContent.info_types` list then the name is
// treated
// as a custom info type.
InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"`
// Likelihood: Likelihood to return for this CustomInfoType. This base
// value can be
// altered by a detection rule if the finding meets the criteria
// specified by
// the rule. Defaults to `VERY_LIKELY` if not specified.
//
// Possible values:
// "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE.
// "VERY_UNLIKELY" - Few matching elements.
// "UNLIKELY"
// "POSSIBLE" - Some matching elements.
// "LIKELY"
// "VERY_LIKELY" - Many matching elements.
Likelihood string `json:"likelihood,omitempty"`
// Regex: Regular expression based CustomInfoType.
Regex *GooglePrivacyDlpV2Regex `json:"regex,omitempty"`
// StoredType: Load an existing `StoredInfoType` resource for use
// in
// `InspectDataSource`. Not currently supported in `InspectContent`.
StoredType *GooglePrivacyDlpV2StoredType `json:"storedType,omitempty"`
// SurrogateType: Message for detecting output from deidentification
// transformations that
// support reversing.
SurrogateType *GooglePrivacyDlpV2SurrogateType `json:"surrogateType,omitempty"`
// ForceSendFields is a list of field names (e.g. "DetectionRules") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DetectionRules") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2CustomInfoType) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2CustomInfoType
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2DatastoreKey: Record key for a finding in Cloud
// Datastore.
type GooglePrivacyDlpV2DatastoreKey struct {
// EntityKey: Datastore entity key.
EntityKey *GooglePrivacyDlpV2Key `json:"entityKey,omitempty"`
// ForceSendFields is a list of field names (e.g. "EntityKey") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "EntityKey") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2DatastoreKey) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2DatastoreKey
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2DatastoreOptions: Options defining a data set
// within Google Cloud Datastore.
type GooglePrivacyDlpV2DatastoreOptions struct {
// Kind: The kind to process.
Kind *GooglePrivacyDlpV2KindExpression `json:"kind,omitempty"`
// PartitionId: A partition ID identifies a grouping of entities. The
// grouping is always
// by project and namespace, however the namespace ID may be empty.
PartitionId *GooglePrivacyDlpV2PartitionId `json:"partitionId,omitempty"`
// ForceSendFields is a list of field names (e.g. "Kind") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Kind") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2DatastoreOptions) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2DatastoreOptions
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2DateShiftConfig: Shifts dates by random number of
// days, with option to be consistent for the
// same context. See
// https://cloud.google.com/dlp/docs/concepts-date-shifting
// to learn more.
type GooglePrivacyDlpV2DateShiftConfig struct {
// Context: Points to the field that contains the context, for example,
// an entity id.
// If set, must also set method. If set, shift will be consistent for
// the
// given context.
Context *GooglePrivacyDlpV2FieldId `json:"context,omitempty"`
// CryptoKey: Causes the shift to be computed based on this key and the
// context. This
// results in the same shift for the same context and crypto_key.
CryptoKey *GooglePrivacyDlpV2CryptoKey `json:"cryptoKey,omitempty"`
// LowerBoundDays: For example, -5 means shift date to at most 5 days
// back in the past.
// [Required]
LowerBoundDays int64 `json:"lowerBoundDays,omitempty"`
// UpperBoundDays: Range of shift in days. Actual shift will be selected
// at random within this
// range (inclusive ends). Negative means shift to earlier in time. Must
// not
// be more than 365250 days (1000 years) each direction.
//
// For example, 3 means shift date to at most 3 days into the
// future.
// [Required]
UpperBoundDays int64 `json:"upperBoundDays,omitempty"`
// ForceSendFields is a list of field names (e.g. "Context") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Context") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2DateShiftConfig) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2DateShiftConfig
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2DateTime: Message for a date time object.
// e.g. 2018-01-01, 5th August.
type GooglePrivacyDlpV2DateTime struct {
// Date: One or more of the following must be set. All fields are
// optional, but
// when set must be valid date or time values.
Date *GoogleTypeDate `json:"date,omitempty"`
// Possible values:
// "DAY_OF_WEEK_UNSPECIFIED" - The unspecified day-of-week.
// "MONDAY" - The day-of-week of Monday.
// "TUESDAY" - The day-of-week of Tuesday.
// "WEDNESDAY" - The day-of-week of Wednesday.
// "THURSDAY" - The day-of-week of Thursday.
// "FRIDAY" - The day-of-week of Friday.
// "SATURDAY" - The day-of-week of Saturday.
// "SUNDAY" - The day-of-week of Sunday.
DayOfWeek string `json:"dayOfWeek,omitempty"`
Time *GoogleTypeTimeOfDay `json:"time,omitempty"`
TimeZone *GooglePrivacyDlpV2TimeZone `json:"timeZone,omitempty"`
// ForceSendFields is a list of field names (e.g. "Date") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Date") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2DateTime) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2DateTime
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2DeidentifyConfig: The configuration that controls
// how the data will change.
type GooglePrivacyDlpV2DeidentifyConfig struct {
// InfoTypeTransformations: Treat the dataset as free-form text and
// apply the same free text
// transformation everywhere.
InfoTypeTransformations *GooglePrivacyDlpV2InfoTypeTransformations `json:"infoTypeTransformations,omitempty"`
// RecordTransformations: Treat the dataset as structured.
// Transformations can be applied to
// specific locations within structured datasets, such as transforming
// a column within a table.
RecordTransformations *GooglePrivacyDlpV2RecordTransformations `json:"recordTransformations,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "InfoTypeTransformations") to unconditionally include in API
// requests. By default, fields with empty values are omitted from API
// requests. However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "InfoTypeTransformations")
// to include in API requests with the JSON null value. By default,
// fields with empty values are omitted from API requests. However, any
// field with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2DeidentifyConfig) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2DeidentifyConfig
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2DeidentifyContentRequest: Request to de-identify a
// list of items.
type GooglePrivacyDlpV2DeidentifyContentRequest struct {
// DeidentifyConfig: Configuration for the de-identification of the
// content item.
// Items specified here will override the template referenced by
// the
// deidentify_template_name argument.
DeidentifyConfig *GooglePrivacyDlpV2DeidentifyConfig `json:"deidentifyConfig,omitempty"`
// DeidentifyTemplateName: Optional template to use. Any configuration
// directly specified in
// deidentify_config will override those set in the template. Singular
// fields
// that are set in this request will replace their corresponding fields
// in the
// template. Repeated fields are appended. Singular sub-messages and
// groups
// are recursively merged.
DeidentifyTemplateName string `json:"deidentifyTemplateName,omitempty"`
// InspectConfig: Configuration for the inspector.
// Items specified here will override the template referenced by
// the
// inspect_template_name argument.
InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"`
// InspectTemplateName: Optional template to use. Any configuration
// directly specified in
// inspect_config will override those set in the template. Singular
// fields
// that are set in this request will replace their corresponding fields
// in the
// template. Repeated fields are appended. Singular sub-messages and
// groups
// are recursively merged.
InspectTemplateName string `json:"inspectTemplateName,omitempty"`
// Item: The item to de-identify. Will be treated as text.
Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"`
// ForceSendFields is a list of field names (e.g. "DeidentifyConfig") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DeidentifyConfig") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2DeidentifyContentRequest) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2DeidentifyContentRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2DeidentifyContentResponse: Results of
// de-identifying a ContentItem.
type GooglePrivacyDlpV2DeidentifyContentResponse struct {
// Item: The de-identified item.
Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"`
// Overview: An overview of the changes that were made on the `item`.
Overview *GooglePrivacyDlpV2TransformationOverview `json:"overview,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Item") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Item") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2DeidentifyContentResponse) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2DeidentifyContentResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2DeidentifyTemplate: The DeidentifyTemplates
// contains instructions on how to deidentify content.
// See https://cloud.google.com/dlp/docs/concepts-templates to learn
// more.
type GooglePrivacyDlpV2DeidentifyTemplate struct {
// CreateTime: The creation timestamp of a inspectTemplate, output only
// field.
CreateTime string `json:"createTime,omitempty"`
// DeidentifyConfig: ///////////// // The core content of the template
// // ///////////////
DeidentifyConfig *GooglePrivacyDlpV2DeidentifyConfig `json:"deidentifyConfig,omitempty"`
// Description: Short description (max 256 chars).
Description string `json:"description,omitempty"`
// DisplayName: Display name (max 256 chars).
DisplayName string `json:"displayName,omitempty"`
// Name: The template name. Output only.
//
// The template will have one of the following
// formats:
// `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID`
// OR
// `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
Name string `json:"name,omitempty"`
// UpdateTime: The last update timestamp of a inspectTemplate, output
// only field.
UpdateTime string `json:"updateTime,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "CreateTime") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CreateTime") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2DeidentifyTemplate) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2DeidentifyTemplate
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2DeltaPresenceEstimationConfig: δ-presence metric,
// used to estimate how likely it is for an attacker to
// figure out that one given individual appears in a de-identified
// dataset.
// Similarly to the k-map metric, we cannot compute δ-presence exactly
// without
// knowing the attack dataset, so we use a statistical model instead.
type GooglePrivacyDlpV2DeltaPresenceEstimationConfig struct {
// AuxiliaryTables: Several auxiliary tables can be used in the
// analysis. Each custom_tag
// used to tag a quasi-identifiers field must appear in exactly
// one
// field of one auxiliary table.
AuxiliaryTables []*GooglePrivacyDlpV2StatisticalTable `json:"auxiliaryTables,omitempty"`
// QuasiIds: Fields considered to be quasi-identifiers. No two fields
// can have the
// same tag. [required]
QuasiIds []*GooglePrivacyDlpV2QuasiId `json:"quasiIds,omitempty"`
// RegionCode: ISO 3166-1 alpha-2 region code to use in the statistical
// modeling.
// Required if no column is tagged with a region-specific InfoType
// (like
// US_ZIP_5) or a region code.
RegionCode string `json:"regionCode,omitempty"`
// ForceSendFields is a list of field names (e.g. "AuxiliaryTables") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AuxiliaryTables") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2DeltaPresenceEstimationConfig) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationConfig
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket: A
// DeltaPresenceEstimationHistogramBucket message with the
// following
// values:
// min_probability: 0.1
// max_probability: 0.2
// frequency: 42
// means that there are 42 records for which δ is in [0.1, 0.2).
// An
// important particular case is when min_probability = max_probability =
// 1:
// then, every individual who shares this quasi-identifier combination
// is in
// the dataset.
type GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket struct {
// BucketSize: Number of records within these probability bounds.
BucketSize int64 `json:"bucketSize,omitempty,string"`
// BucketValueCount: Total number of distinct quasi-identifier tuple
// values in this bucket.
BucketValueCount int64 `json:"bucketValueCount,omitempty,string"`
// BucketValues: Sample of quasi-identifier tuple values in this bucket.
// The total
// number of classes returned per bucket is capped at 20.
BucketValues []*GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues `json:"bucketValues,omitempty"`
// MaxProbability: Always greater than or equal to min_probability.
MaxProbability float64 `json:"maxProbability,omitempty"`
// MinProbability: Between 0 and 1.
MinProbability float64 `json:"minProbability,omitempty"`
// ForceSendFields is a list of field names (e.g. "BucketSize") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BucketSize") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket) UnmarshalJSON(data []byte) error {
type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket
var s1 struct {
MaxProbability gensupport.JSONFloat64 `json:"maxProbability"`
MinProbability gensupport.JSONFloat64 `json:"minProbability"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.MaxProbability = float64(s1.MaxProbability)
s.MinProbability = float64(s1.MinProbability)
return nil
}
// GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues: A tuple of
// values for the quasi-identifier columns.
type GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues struct {
// EstimatedProbability: The estimated probability that a given
// individual sharing these
// quasi-identifier values is in the dataset. This value, typically
// called
// δ, is the ratio between the number of records in the dataset with
// these
// quasi-identifier values, and the total number of individuals
// (inside
// *and* outside the dataset) with these quasi-identifier values.
// For example, if there are 15 individuals in the dataset who share
// the
// same quasi-identifier values, and an estimated 100 people in the
// entire
// population with these values, then δ is 0.15.
EstimatedProbability float64 `json:"estimatedProbability,omitempty"`
// QuasiIdsValues: The quasi-identifier values.
QuasiIdsValues []*GooglePrivacyDlpV2Value `json:"quasiIdsValues,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "EstimatedProbability") to unconditionally include in API requests.
// By default, fields with empty values are omitted from API requests.
// However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "EstimatedProbability") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues) UnmarshalJSON(data []byte) error {
type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues
var s1 struct {
EstimatedProbability gensupport.JSONFloat64 `json:"estimatedProbability"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.EstimatedProbability = float64(s1.EstimatedProbability)
return nil
}
// GooglePrivacyDlpV2DeltaPresenceEstimationResult: Result of the
// δ-presence computation. Note that these results are an
// estimation, not exact values.
type GooglePrivacyDlpV2DeltaPresenceEstimationResult struct {
// DeltaPresenceEstimationHistogram: The intervals [min_probability,
// max_probability) do not overlap. If a
// value doesn't correspond to any such interval, the associated
// frequency
// is zero. For example, the following records:
// {min_probability: 0, max_probability: 0.1, frequency: 17}
// {min_probability: 0.2, max_probability: 0.3, frequency: 42}
// {min_probability: 0.3, max_probability: 0.4, frequency: 99}
// mean that there are no record with an estimated probability in [0.1,
// 0.2)
// nor larger or equal to 0.4.
DeltaPresenceEstimationHistogram []*GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket `json:"deltaPresenceEstimationHistogram,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "DeltaPresenceEstimationHistogram") to unconditionally include in API
// requests. By default, fields with empty values are omitted from API
// requests. However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g.
// "DeltaPresenceEstimationHistogram") to include in API requests with
// the JSON null value. By default, fields with empty values are omitted
// from API requests. However, any field with an empty value appearing
// in NullFields will be sent to the server as null. It is an error if a
// field in this list has a non-empty value. This may be used to include
// null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2DeltaPresenceEstimationResult) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2DeltaPresenceEstimationResult
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2DetectionRule: Rule for modifying a CustomInfoType
// to alter behavior under certain
// circumstances, depending on the specific details of the rule. Not
// supported
// for the `surrogate_type` custom info type.
type GooglePrivacyDlpV2DetectionRule struct {
// HotwordRule: Hotword-based detection rule.
HotwordRule *GooglePrivacyDlpV2HotwordRule `json:"hotwordRule,omitempty"`
// ForceSendFields is a list of field names (e.g. "HotwordRule") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "HotwordRule") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2DetectionRule) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2DetectionRule
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2Dictionary: Custom information type based on a
// dictionary of words or phrases. This can
// be used to match sensitive information specific to the data, such as
// a list
// of employee IDs or job titles.
//
// Dictionary words are case-insensitive and all characters other than
// letters
// and digits in the unicode [Basic
// Multilingual
// Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#
// Basic_Multilingual_Plane)
// will be replaced with whitespace when scanning for matches, so
// the
// dictionary phrase "Sam Johnson" will match all three phrases "sam
// johnson",
// "Sam, Johnson", and "Sam (Johnson)". Additionally, the
// characters
// surrounding any match must be of a different type than the
// adjacent
// characters within the word, so letters must be next to non-letters
// and
// digits next to non-digits. For example, the dictionary word "jen"
// will
// match the first three letters of the text "jen123" but will return
// no
// matches for "jennifer".
//
// Dictionary words containing a large number of characters that are
// not
// letters or digits may result in unexpected findings because such
// characters
// are treated as whitespace.
// The
// [limits](https://cloud.google.com/dlp/limits) page contains details
// about
// the size limits of dictionaries. For dictionaries that do not fit
// within
// these constraints, consider using `LargeCustomDictionaryConfig` in
// the
// `StoredInfoType` API.
type GooglePrivacyDlpV2Dictionary struct {
// CloudStoragePath: Newline-delimited file of words in Cloud Storage.
// Only a single file
// is accepted.
CloudStoragePath *GooglePrivacyDlpV2CloudStoragePath `json:"cloudStoragePath,omitempty"`
// WordList: List of words or phrases to search for.
WordList *GooglePrivacyDlpV2WordList `json:"wordList,omitempty"`
// ForceSendFields is a list of field names (e.g. "CloudStoragePath") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CloudStoragePath") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2Dictionary) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2Dictionary
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2DlpJob: Combines all of the information about a DLP
// job.
type GooglePrivacyDlpV2DlpJob struct {
// CreateTime: Time when the job was created.
CreateTime string `json:"createTime,omitempty"`
// EndTime: Time when the job finished.
EndTime string `json:"endTime,omitempty"`
// Errors: A stream of errors encountered running the job.
Errors []*GooglePrivacyDlpV2Error `json:"errors,omitempty"`
// InspectDetails: Results from inspecting a data source.
InspectDetails *GooglePrivacyDlpV2InspectDataSourceDetails `json:"inspectDetails,omitempty"`
// JobTriggerName: If created by a job trigger, the resource name of the
// trigger that
// instantiated the job.
JobTriggerName string `json:"jobTriggerName,omitempty"`
// Name: The server-assigned name.
Name string `json:"name,omitempty"`
// RiskDetails: Results from analyzing risk of a data source.
RiskDetails *GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails `json:"riskDetails,omitempty"`
// StartTime: Time when the job started.
StartTime string `json:"startTime,omitempty"`
// State: State of a job.
//
// Possible values:
// "JOB_STATE_UNSPECIFIED"
// "PENDING" - The job has not yet started.
// "RUNNING" - The job is currently running.
// "DONE" - The job is no longer running.
// "CANCELED" - The job was canceled before it could complete.
// "FAILED" - The job had an error and did not complete.
State string `json:"state,omitempty"`
// Type: The type of job.
//
// Possible values:
// "DLP_JOB_TYPE_UNSPECIFIED"
// "INSPECT_JOB" - The job inspected Google Cloud for sensitive data.
// "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation.
Type string `json:"type,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "CreateTime") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CreateTime") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2DlpJob) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2DlpJob
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2DocumentLocation: Location of a finding within a
// document.
type GooglePrivacyDlpV2DocumentLocation struct {
// FileOffset: Offset of the line, from the beginning of the file, where
// the finding
// is located.
FileOffset int64 `json:"fileOffset,omitempty,string"`
// ForceSendFields is a list of field names (e.g. "FileOffset") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "FileOffset") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2DocumentLocation) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2DocumentLocation
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2EntityId: An entity in a dataset is a field or set
// of fields that correspond to a
// single person. For example, in medical records the `EntityId` might
// be a
// patient identifier, or for financial records it might be an
// account
// identifier. This message is used when generalizations or analysis
// must take
// into account that multiple rows correspond to the same entity.
type GooglePrivacyDlpV2EntityId struct {
// Field: Composite key indicating which field contains the entity
// identifier.
Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"`
// ForceSendFields is a list of field names (e.g. "Field") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Field") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2EntityId) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2EntityId
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2Error: Details information about an error
// encountered during job execution or
// the results of an unsuccessful activation of the JobTrigger.
// Output only field.
type GooglePrivacyDlpV2Error struct {
Details *GoogleRpcStatus `json:"details,omitempty"`
// Timestamps: The times the error occurred.
Timestamps []string `json:"timestamps,omitempty"`
// ForceSendFields is a list of field names (e.g. "Details") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Details") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2Error) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2Error
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2ExcludeInfoTypes: List of exclude infoTypes.
type GooglePrivacyDlpV2ExcludeInfoTypes struct {
// InfoTypes: InfoType list in ExclusionRule rule drops a finding when
// it overlaps or
// contained within with a finding of an infoType from this list.
// For
// example, for `InspectionRuleSet.info_types` containing
// "PHONE_NUMBER" and
// `exclusion_rule` containing `exclude_info_types.info_types`
// with
// "EMAIL_ADDRESS" the phone number findings are dropped if they
// overlap
// with EMAIL_ADDRESS finding.
// That leads to "555-222-2222@example.org" to generate only a
// single
// finding, namely email address.
InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"`
// ForceSendFields is a list of field names (e.g. "InfoTypes") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "InfoTypes") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2ExcludeInfoTypes) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2ExcludeInfoTypes
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2ExclusionRule: The rule that specifies conditions
// when findings of infoTypes specified in
// `InspectionRuleSet` are removed from results.
type GooglePrivacyDlpV2ExclusionRule struct {
// Dictionary: Dictionary which defines the rule.
Dictionary *GooglePrivacyDlpV2Dictionary `json:"dictionary,omitempty"`
// ExcludeInfoTypes: Set of infoTypes for which findings would affect
// this rule.
ExcludeInfoTypes *GooglePrivacyDlpV2ExcludeInfoTypes `json:"excludeInfoTypes,omitempty"`
// MatchingType: How the rule is applied, see MatchingType documentation
// for details.
//
// Possible values:
// "MATCHING_TYPE_UNSPECIFIED" - Invalid.
// "MATCHING_TYPE_FULL_MATCH" - Full match.
//
// - Dictionary: join of Dictionary results matched complete finding
// quote
// - Regex: all regex matches fill a finding quote start to end
// - Exclude info type: completely inside affecting info types findings
// "MATCHING_TYPE_PARTIAL_MATCH" - Partial match.
//
// - Dictionary: at least one of the tokens in the finding matches
// - Regex: substring of the finding matches
// - Exclude info type: intersects with affecting info types findings
// "MATCHING_TYPE_INVERSE_MATCH" - Inverse match.
//
// - Dictionary: no tokens in the finding match the dictionary
// - Regex: finding doesn't match the regex
// - Exclude info type: no intersection with affecting info types
// findings
MatchingType string `json:"matchingType,omitempty"`
// Regex: Regular expression which defines the rule.
Regex *GooglePrivacyDlpV2Regex `json:"regex,omitempty"`
// ForceSendFields is a list of field names (e.g. "Dictionary") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Dictionary") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2ExclusionRule) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2ExclusionRule
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2Expressions: An expression, consisting or an
// operator and conditions.
type GooglePrivacyDlpV2Expressions struct {
Conditions *GooglePrivacyDlpV2Conditions `json:"conditions,omitempty"`
// LogicalOperator: The operator to apply to the result of conditions.
// Default and currently
// only supported value is `AND`.
//
// Possible values:
// "LOGICAL_OPERATOR_UNSPECIFIED"
// "AND"
LogicalOperator string `json:"logicalOperator,omitempty"`
// ForceSendFields is a list of field names (e.g. "Conditions") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Conditions") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2Expressions) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2Expressions
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2FieldId: General identifier of a data field in a
// storage service.
type GooglePrivacyDlpV2FieldId struct {
// Name: Name describing the field.
Name string `json:"name,omitempty"`
// ForceSendFields is a list of field names (e.g. "Name") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Name") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2FieldId) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2FieldId
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2FieldTransformation: The transformation to apply to
// the field.
type GooglePrivacyDlpV2FieldTransformation struct {
// Condition: Only apply the transformation if the condition evaluates
// to true for the
// given `RecordCondition`. The conditions are allowed to reference
// fields
// that are not used in the actual transformation. [optional]
//
// Example Use Cases:
//
// - Apply a different bucket transformation to an age column if the zip
// code
// column for the same record is within a specific range.
// - Redact a field if the date of birth field is greater than 85.
Condition *GooglePrivacyDlpV2RecordCondition `json:"condition,omitempty"`
// Fields: Input field(s) to apply the transformation to. [required]
Fields []*GooglePrivacyDlpV2FieldId `json:"fields,omitempty"`
// InfoTypeTransformations: Treat the contents of the field as free
// text, and selectively
// transform content that matches an `InfoType`.
InfoTypeTransformations *GooglePrivacyDlpV2InfoTypeTransformations `json:"infoTypeTransformations,omitempty"`
// PrimitiveTransformation: Apply the transformation to the entire
// field.
PrimitiveTransformation *GooglePrivacyDlpV2PrimitiveTransformation `json:"primitiveTransformation,omitempty"`
// ForceSendFields is a list of field names (e.g. "Condition") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Condition") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2FieldTransformation) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2FieldTransformation
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2FileSet: Set of files to scan.
type GooglePrivacyDlpV2FileSet struct {
// RegexFileSet: The regex-filtered set of files to scan. Exactly one of
// `url` or
// `regex_file_set` must be set.
RegexFileSet *GooglePrivacyDlpV2CloudStorageRegexFileSet `json:"regexFileSet,omitempty"`
// Url: The Cloud Storage url of the file(s) to scan, in the
// format
// `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
// Exactly
// one of `url` or `regex_file_set` must be set.
Url string `json:"url,omitempty"`
// ForceSendFields is a list of field names (e.g. "RegexFileSet") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "RegexFileSet") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2FileSet) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2FileSet
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2Finding: Represents a piece of potentially
// sensitive content.
type GooglePrivacyDlpV2Finding struct {
// CreateTime: Timestamp when finding was detected.
CreateTime string `json:"createTime,omitempty"`
// InfoType: The type of content that might have been found.
// Provided if `excluded_types` is false.
InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"`
// Likelihood: Confidence of how likely it is that the `info_type` is
// correct.
//
// Possible values:
// "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE.
// "VERY_UNLIKELY" - Few matching elements.
// "UNLIKELY"
// "POSSIBLE" - Some matching elements.
// "LIKELY"
// "VERY_LIKELY" - Many matching elements.
Likelihood string `json:"likelihood,omitempty"`
// Location: Where the content was found.
Location *GooglePrivacyDlpV2Location `json:"location,omitempty"`
// Quote: The content that was found. Even if the content is not
// textual, it
// may be converted to a textual representation here.
// Provided if `include_quote` is true and the finding is
// less than or equal to 4096 bytes long. If the finding exceeds 4096
// bytes
// in length, the quote may be omitted.
Quote string `json:"quote,omitempty"`
// QuoteInfo: Contains data parsed from quotes. Only populated if
// include_quote was set
// to true and a supported infoType was requested. Currently
// supported
// infoTypes: DATE, DATE_OF_BIRTH and TIME.
QuoteInfo *GooglePrivacyDlpV2QuoteInfo `json:"quoteInfo,omitempty"`
// ForceSendFields is a list of field names (e.g. "CreateTime") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CreateTime") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2Finding) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2Finding
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type GooglePrivacyDlpV2FindingLimits struct {
// MaxFindingsPerInfoType: Configuration of findings limit given for
// specified infoTypes.
MaxFindingsPerInfoType []*GooglePrivacyDlpV2InfoTypeLimit `json:"maxFindingsPerInfoType,omitempty"`
// MaxFindingsPerItem: Max number of findings that will be returned for
// each item scanned.
// When set within `InspectDataSourceRequest`,
// the maximum returned is 1000 regardless if this is set higher.
// When set within `InspectContentRequest`, this field is ignored.
MaxFindingsPerItem int64 `json:"maxFindingsPerItem,omitempty"`
// MaxFindingsPerRequest: Max number of findings that will be returned
// per request/job.
// When set within `InspectContentRequest`, the maximum returned is
// 1000
// regardless if this is set higher.
MaxFindingsPerRequest int64 `json:"maxFindingsPerRequest,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "MaxFindingsPerInfoType") to unconditionally include in API requests.
// By default, fields with empty values are omitted from API requests.
// However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "MaxFindingsPerInfoType")
// to include in API requests with the JSON null value. By default,
// fields with empty values are omitted from API requests. However, any
// field with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2FindingLimits) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2FindingLimits
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2FixedSizeBucketingConfig: Buckets values based on
// fixed size ranges. The
// Bucketing transformation can provide all of this functionality,
// but requires more configuration. This message is provided as a
// convenience to
// the user for simple bucketing strategies.
//
// The transformed value will be a hyphenated string
// of
// <lower_bound>-<upper_bound>, i.e if lower_bound = 10 and upper_bound
// = 20
// all values that are within this bucket will be replaced with
// "10-20".
//
// This can be used on data of type: double, long.
//
// If the bound Value type differs from the type of data
// being transformed, we will first attempt converting the type of the
// data to
// be transformed to match the type of the bound before comparing.
//
// See https://cloud.google.com/dlp/docs/concepts-bucketing to learn
// more.
type GooglePrivacyDlpV2FixedSizeBucketingConfig struct {
// BucketSize: Size of each bucket (except for minimum and maximum
// buckets). So if
// `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then
// the
// following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50,
// 50-60,
// 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works.
// [Required].
BucketSize float64 `json:"bucketSize,omitempty"`
// LowerBound: Lower bound value of buckets. All values less than
// `lower_bound` are
// grouped together into a single bucket; for example if `lower_bound` =
// 10,
// then all values less than 10 are replaced with the value “-10”.
// [Required].
LowerBound *GooglePrivacyDlpV2Value `json:"lowerBound,omitempty"`
// UpperBound: Upper bound value of buckets. All values greater than
// upper_bound are
// grouped together into a single bucket; for example if `upper_bound` =
// 89,
// then all values greater than 89 are replaced with the value
// “89+”.
// [Required].
UpperBound *GooglePrivacyDlpV2Value `json:"upperBound,omitempty"`
// ForceSendFields is a list of field names (e.g. "BucketSize") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BucketSize") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2FixedSizeBucketingConfig) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2FixedSizeBucketingConfig
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *GooglePrivacyDlpV2FixedSizeBucketingConfig) UnmarshalJSON(data []byte) error {
type NoMethod GooglePrivacyDlpV2FixedSizeBucketingConfig
var s1 struct {
BucketSize gensupport.JSONFloat64 `json:"bucketSize"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.BucketSize = float64(s1.BucketSize)
return nil
}
// GooglePrivacyDlpV2HotwordRule: The rule that adjusts the likelihood
// of findings within a certain
// proximity of hotwords.
type GooglePrivacyDlpV2HotwordRule struct {
// HotwordRegex: Regular expression pattern defining what qualifies as a
// hotword.
HotwordRegex *GooglePrivacyDlpV2Regex `json:"hotwordRegex,omitempty"`
// LikelihoodAdjustment: Likelihood adjustment to apply to all matching
// findings.
LikelihoodAdjustment *GooglePrivacyDlpV2LikelihoodAdjustment `json:"likelihoodAdjustment,omitempty"`
// Proximity: Proximity of the finding within which the entire hotword
// must reside.
// The total length of the window cannot exceed 1000 characters. Note
// that
// the finding itself will be included in the window, so that hotwords
// may
// be used to match substrings of the finding itself. For example,
// the
// certainty of a phone number regex "\(\d{3}\) \d{3}-\d{4}" could
// be
// adjusted upwards if the area code is known to be the local area code
// of
// a company office using the hotword regex "\(xxx\)", where "xxx"
// is the area code in question.
Proximity *GooglePrivacyDlpV2Proximity `json:"proximity,omitempty"`
// ForceSendFields is a list of field names (e.g. "HotwordRegex") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "HotwordRegex") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2HotwordRule) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2HotwordRule
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2ImageLocation: Location of the finding within an
// image.
type GooglePrivacyDlpV2ImageLocation struct {
// BoundingBoxes: Bounding boxes locating the pixels within the image
// containing the finding.
BoundingBoxes []*GooglePrivacyDlpV2BoundingBox `json:"boundingBoxes,omitempty"`
// ForceSendFields is a list of field names (e.g. "BoundingBoxes") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BoundingBoxes") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2ImageLocation) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2ImageLocation
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2ImageRedactionConfig: Configuration for determining
// how redaction of images should occur.
type GooglePrivacyDlpV2ImageRedactionConfig struct {
// InfoType: Only one per info_type should be provided per request. If
// not
// specified, and redact_all_text is false, the DLP API will redact
// all
// text that it matches against all info_types that are found, but
// not
// specified in another ImageRedactionConfig.
InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"`
// RedactAllText: If true, all text found in the image, regardless
// whether it matches an
// info_type, is redacted. Only one should be provided.
RedactAllText bool `json:"redactAllText,omitempty"`
// RedactionColor: The color to use when redacting content from an
// image. If not specified,
// the default is black.
RedactionColor *GooglePrivacyDlpV2Color `json:"redactionColor,omitempty"`
// ForceSendFields is a list of field names (e.g. "InfoType") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "InfoType") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2ImageRedactionConfig) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2ImageRedactionConfig
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2InfoType: Type of information detected by the API.
type GooglePrivacyDlpV2InfoType struct {
// Name: Name of the information type. Either a name of your choosing
// when
// creating a CustomInfoType, or one of the names listed
// at https://cloud.google.com/dlp/docs/infotypes-reference when
// specifying
// a built-in type. InfoType names should conform to the
// pattern
// [a-zA-Z0-9_]{1,64}.
Name string `json:"name,omitempty"`
// ForceSendFields is a list of field names (e.g. "Name") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Name") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2InfoType) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2InfoType
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2InfoTypeDescription: InfoType description.
type GooglePrivacyDlpV2InfoTypeDescription struct {
// DisplayName: Human readable form of the infoType name.
DisplayName string `json:"displayName,omitempty"`
// Name: Internal name of the infoType.
Name string `json:"name,omitempty"`
// SupportedBy: Which parts of the API supports this InfoType.
//
// Possible values:
// "ENUM_TYPE_UNSPECIFIED"
// "INSPECT" - Supported by the inspect operations.
// "RISK_ANALYSIS" - Supported by the risk analysis operations.
SupportedBy []string `json:"supportedBy,omitempty"`
// ForceSendFields is a list of field names (e.g. "DisplayName") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DisplayName") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2InfoTypeDescription) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2InfoTypeDescription
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2InfoTypeLimit: Max findings configuration per
// infoType, per content item or long
// running DlpJob.
type GooglePrivacyDlpV2InfoTypeLimit struct {
// InfoType: Type of information the findings limit applies to. Only one
// limit per
// info_type should be provided. If InfoTypeLimit does not have
// an
// info_type, the DLP API applies the limit against all info_types
// that
// are found but not specified in another InfoTypeLimit.
InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"`
// MaxFindings: Max findings limit for the given infoType.
MaxFindings int64 `json:"maxFindings,omitempty"`
// ForceSendFields is a list of field names (e.g. "InfoType") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "InfoType") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2InfoTypeLimit) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2InfoTypeLimit
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2InfoTypeStats: Statistics regarding a specific
// InfoType.
type GooglePrivacyDlpV2InfoTypeStats struct {
// Count: Number of findings for this infoType.
Count int64 `json:"count,omitempty,string"`
// InfoType: The type of finding this stat is for.
InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"`
// ForceSendFields is a list of field names (e.g. "Count") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Count") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2InfoTypeStats) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2InfoTypeStats
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2InfoTypeTransformation: A transformation to apply
// to text that is identified as a specific
// info_type.
type GooglePrivacyDlpV2InfoTypeTransformation struct {
// InfoTypes: InfoTypes to apply the transformation to. An empty list
// will cause
// this transformation to apply to all findings that correspond
// to
// infoTypes that were requested in `InspectConfig`.
InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"`
// PrimitiveTransformation: Primitive transformation to apply to the
// infoType. [required]
PrimitiveTransformation *GooglePrivacyDlpV2PrimitiveTransformation `json:"primitiveTransformation,omitempty"`
// ForceSendFields is a list of field names (e.g. "InfoTypes") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "InfoTypes") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GooglePrivacyDlpV2InfoTypeTransformation) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2InfoTypeTransformation
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2InfoTypeTransformations: A type of transformation
// that will scan unstructured text and
// apply various `PrimitiveTransformation`s to each finding, where
// the
// transformation is applied to only values that were identified as a
// specific
// info_type.
type GooglePrivacyDlpV2InfoTypeTransformations struct {
// Transformations: Transformation for each infoType. Cannot specify
// more than one
// for a given infoType. [required]
Transformations []*GooglePrivacyDlpV2InfoTypeTransformation `json:"transformations,omitempty"`
// ForceSendFields is a list of field names (e.g. "Transformations") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Transformations") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patc