blob: f5ace05a4ffe6772d484a0686f62de9096f63e93 [file] [log] [blame]
// Copyright 2020 Google LLC.
// 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.
//
// For product documentation, see: https://cloud.google.com/dlp/docs/
//
// Creating a client
//
// Usage example:
//
// import "google.golang.org/api/dlp/v2"
// ...
// ctx := context.Background()
// dlpService, err := dlp.NewService(ctx)
//
// In this example, Google Application Default Credentials are used for authentication.
//
// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
//
// Other authentication options
//
// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
//
// dlpService, err := dlp.NewService(ctx, option.WithAPIKey("AIza..."))
//
// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
//
// config := &oauth2.Config{...}
// // ...
// token, err := config.Exchange(ctx, ...)
// dlpService, err := dlp.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
//
// See https://godoc.org/google.golang.org/api/option/ for details on options.
package dlp // import "google.golang.org/api/dlp/v2"
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"net/url"
"strconv"
"strings"
googleapi "google.golang.org/api/googleapi"
gensupport "google.golang.org/api/internal/gensupport"
option "google.golang.org/api/option"
internaloption "google.golang.org/api/option/internaloption"
htransport "google.golang.org/api/transport/http"
)
// 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
var _ = internaloption.WithDefaultEndpoint
const apiId = "dlp:v2"
const apiName = "dlp"
const apiVersion = "v2"
const basePath = "https://dlp.googleapis.com/"
const mtlsBasePath = "https://dlp.mtls.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"
)
// NewService creates a new Service.
func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
scopesOption := option.WithScopes(
"https://www.googleapis.com/auth/cloud-platform",
)
// NOTE: prepend, so we don't override user-specified scopes.
opts = append([]option.ClientOption{scopesOption}, opts...)
opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
client, endpoint, err := htransport.NewClient(ctx, opts...)
if err != nil {
return nil, err
}
s, err := New(client)
if err != nil {
return nil, err
}
if endpoint != "" {
s.BasePath = endpoint
}
return s, nil
}
// New creates a new Service. It uses the provided http.Client for requests.
//
// Deprecated: please use NewService instead.
// To provide a custom HTTP client, use option.WithHTTPClient.
// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
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.Locations = NewLocationsService(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
Locations *LocationsService
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 NewLocationsService(s *Service) *LocationsService {
rs := &LocationsService{s: s}
rs.InfoTypes = NewLocationsInfoTypesService(s)
return rs
}
type LocationsService struct {
s *Service
InfoTypes *LocationsInfoTypesService
}
func NewLocationsInfoTypesService(s *Service) *LocationsInfoTypesService {
rs := &LocationsInfoTypesService{s: s}
return rs
}
type LocationsInfoTypesService struct {
s *Service
}
func NewOrganizationsService(s *Service) *OrganizationsService {
rs := &OrganizationsService{s: s}
rs.DeidentifyTemplates = NewOrganizationsDeidentifyTemplatesService(s)
rs.InspectTemplates = NewOrganizationsInspectTemplatesService(s)
rs.Locations = NewOrganizationsLocationsService(s)
rs.StoredInfoTypes = NewOrganizationsStoredInfoTypesService(s)
return rs
}
type OrganizationsService struct {
s *Service
DeidentifyTemplates *OrganizationsDeidentifyTemplatesService
InspectTemplates *OrganizationsInspectTemplatesService
Locations *OrganizationsLocationsService
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 NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService {
rs := &OrganizationsLocationsService{s: s}
rs.DeidentifyTemplates = NewOrganizationsLocationsDeidentifyTemplatesService(s)
rs.InspectTemplates = NewOrganizationsLocationsInspectTemplatesService(s)
rs.StoredInfoTypes = NewOrganizationsLocationsStoredInfoTypesService(s)
return rs
}
type OrganizationsLocationsService struct {
s *Service
DeidentifyTemplates *OrganizationsLocationsDeidentifyTemplatesService
InspectTemplates *OrganizationsLocationsInspectTemplatesService
StoredInfoTypes *OrganizationsLocationsStoredInfoTypesService
}
func NewOrganizationsLocationsDeidentifyTemplatesService(s *Service) *OrganizationsLocationsDeidentifyTemplatesService {
rs := &OrganizationsLocationsDeidentifyTemplatesService{s: s}
return rs
}
type OrganizationsLocationsDeidentifyTemplatesService struct {
s *Service
}
func NewOrganizationsLocationsInspectTemplatesService(s *Service) *OrganizationsLocationsInspectTemplatesService {
rs := &OrganizationsLocationsInspectTemplatesService{s: s}
return rs
}
type OrganizationsLocationsInspectTemplatesService struct {
s *Service
}
func NewOrganizationsLocationsStoredInfoTypesService(s *Service) *OrganizationsLocationsStoredInfoTypesService {
rs := &OrganizationsLocationsStoredInfoTypesService{s: s}
return rs
}
type OrganizationsLocationsStoredInfoTypesService 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.Locations = NewProjectsLocationsService(s)
rs.StoredInfoTypes = NewProjectsStoredInfoTypesService(s)
return rs
}
type ProjectsService struct {
s *Service
Content *ProjectsContentService
DeidentifyTemplates *ProjectsDeidentifyTemplatesService
DlpJobs *ProjectsDlpJobsService
Image *ProjectsImageService
InspectTemplates *ProjectsInspectTemplatesService
JobTriggers *ProjectsJobTriggersService
Locations *ProjectsLocationsService
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 NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
rs := &ProjectsLocationsService{s: s}
rs.Content = NewProjectsLocationsContentService(s)
rs.DeidentifyTemplates = NewProjectsLocationsDeidentifyTemplatesService(s)
rs.DlpJobs = NewProjectsLocationsDlpJobsService(s)
rs.Image = NewProjectsLocationsImageService(s)
rs.InspectTemplates = NewProjectsLocationsInspectTemplatesService(s)
rs.JobTriggers = NewProjectsLocationsJobTriggersService(s)
rs.StoredInfoTypes = NewProjectsLocationsStoredInfoTypesService(s)
return rs
}
type ProjectsLocationsService struct {
s *Service
Content *ProjectsLocationsContentService
DeidentifyTemplates *ProjectsLocationsDeidentifyTemplatesService
DlpJobs *ProjectsLocationsDlpJobsService
Image *ProjectsLocationsImageService
InspectTemplates *ProjectsLocationsInspectTemplatesService
JobTriggers *ProjectsLocationsJobTriggersService
StoredInfoTypes *ProjectsLocationsStoredInfoTypesService
}
func NewProjectsLocationsContentService(s *Service) *ProjectsLocationsContentService {
rs := &ProjectsLocationsContentService{s: s}
return rs
}
type ProjectsLocationsContentService struct {
s *Service
}
func NewProjectsLocationsDeidentifyTemplatesService(s *Service) *ProjectsLocationsDeidentifyTemplatesService {
rs := &ProjectsLocationsDeidentifyTemplatesService{s: s}
return rs
}
type ProjectsLocationsDeidentifyTemplatesService struct {
s *Service
}
func NewProjectsLocationsDlpJobsService(s *Service) *ProjectsLocationsDlpJobsService {
rs := &ProjectsLocationsDlpJobsService{s: s}
return rs
}
type ProjectsLocationsDlpJobsService struct {
s *Service
}
func NewProjectsLocationsImageService(s *Service) *ProjectsLocationsImageService {
rs := &ProjectsLocationsImageService{s: s}
return rs
}
type ProjectsLocationsImageService struct {
s *Service
}
func NewProjectsLocationsInspectTemplatesService(s *Service) *ProjectsLocationsInspectTemplatesService {
rs := &ProjectsLocationsInspectTemplatesService{s: s}
return rs
}
type ProjectsLocationsInspectTemplatesService struct {
s *Service
}
func NewProjectsLocationsJobTriggersService(s *Service) *ProjectsLocationsJobTriggersService {
rs := &ProjectsLocationsJobTriggersService{s: s}
return rs
}
type ProjectsLocationsJobTriggersService struct {
s *Service
}
func NewProjectsLocationsStoredInfoTypesService(s *Service) *ProjectsLocationsStoredInfoTypesService {
rs := &ProjectsLocationsStoredInfoTypesService{s: s}
return rs
}
type ProjectsLocationsStoredInfoTypesService 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 {
// JobNotificationEmails: Enable email notification for project owners
// and editors on job's completion/failure.
JobNotificationEmails *GooglePrivacyDlpV2JobNotificationEmails `json:"jobNotificationEmails,omitempty"`
// PubSub: Publish a notification to a pubsub topic.
PubSub *GooglePrivacyDlpV2PublishToPubSub `json:"pubSub,omitempty"`
// PublishFindingsToCloudDataCatalog: Publish findings to Cloud Datahub.
PublishFindingsToCloudDataCatalog *GooglePrivacyDlpV2PublishFindingsToCloudDataCatalog `json:"publishFindingsToCloudDataCatalog,omitempty"`
// PublishSummaryToCscc: Publish summary to Cloud Security Command
// Center (Alpha).
PublishSummaryToCscc *GooglePrivacyDlpV2PublishSummaryToCscc `json:"publishSummaryToCscc,omitempty"`
// PublishToStackdriver: Enable Stackdriver metric
// dlp.googleapis.com/finding_count.
PublishToStackdriver *GooglePrivacyDlpV2PublishToStackdriver `json:"publishToStackdriver,omitempty"`
// SaveFindings: Save resulting findings in a provided location.
SaveFindings *GooglePrivacyDlpV2SaveFindings `json:"saveFindings,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "JobNotificationEmails") 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. "JobNotificationEmails") 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)
}
// GooglePrivacyDlpV2ActivateJobTriggerRequest: Request message for
// ActivateJobTrigger.
type GooglePrivacyDlpV2ActivateJobTriggerRequest struct {
}
// GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails: Result of a risk
// analysis operation request.
type GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails struct {
// CategoricalStatsResult: Categorical stats result
CategoricalStatsResult *GooglePrivacyDlpV2CategoricalStatsResult `json:"categoricalStatsResult,omitempty"`
// DeltaPresenceEstimationResult: Delta-presence result
DeltaPresenceEstimationResult *GooglePrivacyDlpV2DeltaPresenceEstimationResult `json:"deltaPresenceEstimationResult,omitempty"`
// KAnonymityResult: K-anonymity result
KAnonymityResult *GooglePrivacyDlpV2KAnonymityResult `json:"kAnonymityResult,omitempty"`
// KMapEstimationResult: K-map result
KMapEstimationResult *GooglePrivacyDlpV2KMapEstimationResult `json:"kMapEstimationResult,omitempty"`
// LDiversityResult: L-divesity result
LDiversityResult *GooglePrivacyDlpV2LDiversityResult `json:"lDiversityResult,omitempty"`
// NumericalStatsResult: Numerical stats result
NumericalStatsResult *GooglePrivacyDlpV2NumericalStatsResult `json:"numericalStatsResult,omitempty"`
// RequestedOptions: The configuration used for this job.
RequestedOptions *GooglePrivacyDlpV2RequestedRiskAnalysisOptions `json:"requestedOptions,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: Required. Quasi-identifier columns.
QuasiIds []*GooglePrivacyDlpV2QuasiIdField `json:"quasiIds,omitempty"`
// RelativeFrequency: Required. The relative frequency column must
// contain a floating-point number between 0 and 1 (inclusive). Null
// values are assumed to be zero.
RelativeFrequency *GooglePrivacyDlpV2FieldId `json:"relativeFrequency,omitempty"`
// Table: Required. Auxiliary table location.
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: Row number inferred at the time the table was scanned.
// This value is nondeterministic, cannot be queried, and may be null
// for inspection jobs. To locate findings within a table, specify
// `inspect_job.storage_config.big_query_options.identifying_fields` in
// `CreateDlpJobRequest`.
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: Table fields that may uniquely identify a row
// within the table. When `actions.saveFindings.outputConfig.table` is
// specified, the values of columns specified here are available in the
// output table under
// `location.content_locations.record_location.record_key.id_values`.
// Nested fields such as `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 groups of rows in the order BigQuery provides
// (default). Multiple groups of rows may be scanned in parallel, so
// results may not appear in the same order the rows are read.
// "RANDOM_START" - Randomly pick groups of rows to scan.
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: `:.` or `..`.
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: Required. Replacement value for this bucket.
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" - Unused
// "IMAGE" - Any image type.
// "IMAGE_JPEG" - jpeg
// "IMAGE_BMP" - bmp
// "IMAGE_PNG" - png
// "IMAGE_SVG" - svg
// "TEXT_UTF8" - plain text
// "WORD_DOCUMENT" - docx, docm, dotx, dotm
// "PDF" - pdf
// "AVRO" - avro
// "CSV" - csv
// "TSV" - tsv
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)
}
// GooglePrivacyDlpV2CategoricalStatsHistogramBucket: Histogram of value
// frequencies in the column.
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 characters. For example, if the input string
// is `555-555-5555` and you instruct Cloud DLP to skip `-` and mask 5
// characters with `*`, Cloud DLP returns `***-**5-5555`.
CharactersToIgnore []*GooglePrivacyDlpV2CharsToIgnore `json:"charactersToIgnore,omitempty"`
// MaskingCharacter: Character to use to mask the sensitive values—for
// example, `*` for an alphabetic string such as a name, or `0` for a
// numeric string such as ZIP code or credit card number. This string
// must have a length of 1. If not supplied, this value defaults to `*`
// for strings, and `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 the input string
// `1234-5678-9012-3456` is masked as `00000000000000-3456`. If
// `masking_character` is `*`, `number_to_mask` is `3`, and
// `reverse_order` is `true`, then the string `12345` is masked as
// `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: Characters to not transform when masking.
CharactersToSkip string `json:"charactersToSkip,omitempty"`
// CommonCharactersToIgnore: Common characters to not transform when
// masking. Useful to avoid removing punctuation.
//
// Possible values:
// "COMMON_CHARS_TO_IGNORE_UNSPECIFIED" - Unused.
// "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:///`. 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. Images are scanned only as binary if the
// specified region does not support image inspection and no file_types
// were specified. Image inspection is restricted to 'global', 'us',
// 'asia', and 'europe'.
//
// Possible values:
// "FILE_TYPE_UNSPECIFIED" - Includes all files.
// "BINARY_FILE" - Includes all file extensions not covered by another
// entry. Binary scanning attempts to convert the content of the file to
// utf_8 to scan the file. If you wish to avoid this fall back, specify
// one or more of the other FileType's in your storage scan.
// "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.
// "IMAGE" - Included file extensions: bmp, gif, jpg, jpeg, jpe, png.
// bytes_limit_per_file has no effect on image files. Image inspection
// is restricted to 'global', 'us', 'asia', and 'europe'.
// "WORD" - Word files >30 MB will be scanned as binary files.
// Included file extensions: docx, dotx, docm, dotm
// "PDF" - PDF files >30 MB will be scanned as binary files. Included
// file extensions: pdf
// "AVRO" - Included file extensions: avro
// "CSV" - Included file extensions: csv
// "TSV" - Included file extensions: tsv
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. EQUAL_TO and NOT_EQUAL_TO attempt to compare even with
// incompatible types, but all other comparisons are invalid with
// incompatible types. 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: Required. Field within the record this condition is evaluated
// against.
Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"`
// Operator: Required. Operator used to compare the field or infoType to
// the value.
//
// Possible values:
// "RELATIONAL_OPERATOR_UNSPECIFIED" - Unused
// "EQUAL_TO" - Equal. Attempts to match even with incompatible types.
// "NOT_EQUAL_TO" - Not equal to. Attempts to match even with
// incompatible types.
// "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. [Mandatory, 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: A collection of conditions.
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)
}
// GooglePrivacyDlpV2Container: Represents a container that may contain
// DLP findings. Examples of a container include a file, table, or
// database record.
type GooglePrivacyDlpV2Container struct {
// FullPath: A string representation of the full container name.
// Examples: - BigQuery: 'Project:DataSetId.TableId' - Google Cloud
// Storage: 'gs://Bucket/folders/filename.txt'
FullPath string `json:"fullPath,omitempty"`
// ProjectId: Project where the finding was found. Can be different from
// the project that owns the finding.
ProjectId string `json:"projectId,omitempty"`
// RelativePath: The rest of the path after the root. Examples: - For
// BigQuery table `project_id:dataset_id.table_id`, the relative path is
// `table_id` - Google Cloud Storage file
// `gs://bucket/folder/filename.txt`, the relative path is
// `folder/filename.txt`
RelativePath string `json:"relativePath,omitempty"`
// RootPath: The root of the container. Examples: - For BigQuery table
// `project_id:dataset_id.table_id`, the root is `dataset_id` - For
// Google Cloud Storage file `gs://bucket/folder/filename.txt`, the root
// is `gs://bucket`
RootPath string `json:"rootPath,omitempty"`
// Type: Container type, for example BigQuery or Google Cloud Storage.
Type string `json:"type,omitempty"`
// UpdateTime: 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.
UpdateTime string `json:"updateTime,omitempty"`
// Version: Findings container version, if available ("generation" for
// Google Cloud Storage).
Version string `json:"version,omitempty"`
// ForceSendFields is a list of field names (e.g. "FullPath") 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. "FullPath") 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 *GooglePrivacyDlpV2Container) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2Container
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_table
// 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: Precise location of the finding
// within a document, record, image, or metadata container.
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"`
// MetadataLocation: Location within the metadata for inspected content.
MetadataLocation *GooglePrivacyDlpV2MetadataLocation `json:"metadataLocation,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: Required. The DeidentifyTemplate to create.
DeidentifyTemplate *GooglePrivacyDlpV2DeidentifyTemplate `json:"deidentifyTemplate,omitempty"`
// LocationId: Deprecated. This field has no effect.
LocationId string `json:"locationId,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: Set to control what and how to inspect.
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"`
// LocationId: Deprecated. This field has no effect.
LocationId string `json:"locationId,omitempty"`
// RiskJob: Set to choose what metric to calculate.
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: Required. The InspectTemplate to create.
InspectTemplate *GooglePrivacyDlpV2InspectTemplate `json:"inspectTemplate,omitempty"`
// LocationId: Deprecated. This field has no effect.
LocationId string `json:"locationId,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: Required. The JobTrigger to create.
JobTrigger *GooglePrivacyDlpV2JobTrigger `json:"jobTrigger,omitempty"`
// LocationId: Deprecated. This field has no effect.
LocationId string `json:"locationId,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: Required. Configuration of the storedInfoType to create.
Config *GooglePrivacyDlpV2StoredInfoTypeConfig `json:"config,omitempty"`
// LocationId: Deprecated. This field has no effect.
LocationId string `json:"locationId,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)
}
// GooglePrivacyDlpV2CryptoDeterministicConfig: Pseudonymization method
// that generates deterministic encryption for the given input. Outputs
// a base64 encoded representation of the encrypted output. Uses AES-SIV
// based on the RFC https://tools.ietf.org/html/rfc5297.
type GooglePrivacyDlpV2CryptoDeterministicConfig struct {
// Context: A context may be used for higher security and maintaining
// referential integrity such that the same identifier in two different
// contexts will be given a distinct surrogate. The context is appended
// to plaintext value being encrypted. On decryption the provided
// context is validated against the value used during encryption. If a
// context was provided during encryption, same context must be provided
// during decryption as well. If the context is not set, plaintext would
// be used as is for encryption. If the context is set but: 1. there is
// no record present when transforming a given value or 2. the field is
// not present when transforming a given value, plaintext would be used
// as is for encryption. Note that case (1) is expected when an
// `InfoTypeTransformation` is applied to both structured and
// non-structured `ContentItem`s.
Context *GooglePrivacyDlpV2FieldId `json:"context,omitempty"`
// CryptoKey: The key used by the encryption function.
CryptoKey *GooglePrivacyDlpV2CryptoKey `json:"cryptoKey,omitempty"`
// SurrogateInfoType: The custom info type to annotate the surrogate
// with. This annotation will be applied to the surrogate by prefixing
// it with the name of the custom info type 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 info type 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 info type 'Surrogate'. This
// facilitates reversal of the surrogate when it occurs in free text.
// Note: For record transformations where the entire cell in a table is
// being transformed, surrogates are not mandatory. Surrogates are used
// to denote the location of the token and are necessary for
// re-identification in free form text. In order for inspection to work
// properly, the name of this info type must not occur naturally
// anywhere in your data; otherwise, inspection may either - reverse a
// surrogate that does not correspond to an actual identifier - be
// unable to parse the surrogate and result in an error Therefore,
// choose your custom info type 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. "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 *GooglePrivacyDlpV2CryptoDeterministicConfig) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2CryptoDeterministicConfig
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 base64 encoded
// representation of the hashed output (for example,
// L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=). Currently, only string
// and integer values can be hashed. See
// https://cloud.google.com/dlp/docs/pseudonymization to learn more.
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: Kms wrapped key
KmsWrapped *GooglePrivacyDlpV2KmsWrappedCryptoKey `json:"kmsWrapped,omitempty"`
// Transient: Transient crypto key
Transient *GooglePrivacyDlpV2TransientCryptoKey `json:"transient,omitempty"`
// Unwrapped: Unwrapped crypto key
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 Format Preserving Encryption (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.
// Note: We recommend using CryptoDeterministicConfig for all use cases
// which do not require preserving the input alphabet space and size,
// plus warrant referential integrity.
type GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig struct {
// CommonAlphabet: Common alphabets.
//
// Possible values:
// "FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED" - Unused.
// "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: Required. The key used by the encryption algorithm.
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,
// 95]. This must be encoded as ASCII. The order of characters does not
// matter. The full list of allowed characters is:
// 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
// ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/
CustomAlphabet string `json:"customAlphabet,omitempty"`
// Radix: The native way to select the alphabet. Must be in the range
// [2, 95].
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`](https://cloud.google.com/dlp/docs/reference/rest/v2/
// InspectConfig#surrogatetype). 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 cryptoKey. 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. If set, must also set context. Can only be applied to
// table items.
CryptoKey *GooglePrivacyDlpV2CryptoKey `json:"cryptoKey,omitempty"`
// LowerBoundDays: Required. For example, -5 means shift date to at most
// 5 days back in the past.
LowerBoundDays int64 `json:"lowerBoundDays,omitempty"`
// UpperBoundDays: Required. 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.
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. Must be a valid date
// or time value.
Date *GoogleTypeDate `json:"date,omitempty"`
// DayOfWeek: Day of week
//
// Possible values:
// "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified.
// "MONDAY" - Monday
// "TUESDAY" - Tuesday
// "WEDNESDAY" - Wednesday
// "THURSDAY" - Thursday
// "FRIDAY" - Friday
// "SATURDAY" - Saturday
// "SUNDAY" - Sunday
DayOfWeek string `json:"dayOfWeek,omitempty"`
// Time: Time of day
Time *GoogleTypeTimeOfDay `json:"time,omitempty"`
// TimeZone: Time zone
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"`
// TransformationErrorHandling: Mode for handling transformation errors.
// If left unspecified, the default mode is
// `TransformationErrorHandling.ThrowError`.
TransformationErrorHandling *GooglePrivacyDlpV2TransformationErrorHandling `json:"transformationErrorHandling,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: 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: 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"`
// LocationId: Deprecated. This field has no effect.
LocationId string `json:"locationId,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: DeidentifyTemplates contains
// instructions on how to de-identify content. See
// https://cloud.google.com/dlp/docs/concepts-templates to learn more.
type GooglePrivacyDlpV2DeidentifyTemplate struct {
// CreateTime: Output only. The creation timestamp of an
// inspectTemplate.
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: Output only. The template name. 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: Output only. The last update timestamp of an
// inspectTemplate.
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: Required. Fields considered to be quasi-identifiers. No two
// fields can have the same tag.
QuasiIds []*GooglePrivacyDlpV2QuasiId `json:"quasiIds,omitempty"`
// RegionCode: ISO 3166-1 alpha-2 region code to use in the statistical
// modeling. Set 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: Deprecated; use `InspectionRuleSet`
// instead. 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 infoType.
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_Multili
// ngual_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" - Unused.
// "PENDING" - The job has not yet started.
// "RUNNING" - The job is currently running. Once a job has finished
// it will transition to FAILED or DONE.
// "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.
// "ACTIVE" - The job is currently accepting findings via
// hybridInspect. A hybrid job in ACTIVE state may continue to have
// findings added to it through calling of hybridInspect. After the job
// has finished no more calls to hybridInspect may be made. ACTIVE jobs
// can transition to DONE.
State string `json:"state,omitempty"`
// Type: The type of job.
//
// Possible values:
// "DLP_JOB_TYPE_UNSPECIFIED" - Unused
// "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.
type GooglePrivacyDlpV2Error struct {
// Details: Detailed error codes and messages.
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: Conditions to apply to the expression.
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" - Unused
// "AND" - Conditional 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.
// 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: Required. Input field(s) to apply the transformation to.
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:///`. Trailing wildcard in the path is allowed. If the url ends
// in a trailing slash, the bucket or directory represented by the url
// will be scanned non-recursively (content in sub-directories will not
// be scanned). This means that `gs://mybucket/` is equivalent to
// `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to
// `gs://mybucket/directory/*`. 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"`
// JobCreateTime: Time the job started that produced this finding.
JobCreateTime string `json:"jobCreateTime,omitempty"`
// JobName: The job that stored the finding.
JobName string `json:"jobName,omitempty"`
// Labels: The labels associated with this `Finding`. Label keys must be
// between 1 and 63 characters long and must conform to the following
// regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. Label values must
// be between 0 and 63 characters long and must conform to the regular
// expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. No more than 10 labels
// can be associated with a given finding. Examples: * "environment" :
// "production" * "pipeline" : "etl"
Labels map[string]string `json:"labels,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"`
// Name: Resource name in format
// projects/{project}/locations/{location}/findings/{finding} Populated
// only when viewing persisted findings.
Name string `json:"name,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"`
// ResourceName: The job that stored the finding.
ResourceName string `json:"resourceName,omitempty"`
// TriggerName: Job trigger name, if applicable, for this finding.
TriggerName string `json:"triggerName,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)
}
// GooglePrivacyDlpV2FindingLimits: Configuration to control the number
// of findings returned.
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 `InspectJobConfig`, the maximum
// returned is 2000 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 2000 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)
}
// GooglePrivacyDlpV2FinishDlpJobRequest: The request message for
// finishing a DLP hybrid job.
type GooglePrivacyDlpV2FinishDlpJobRequest struct {
}
// 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: Required. 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.
BucketSize float64 `json:"bucketSize,omitempty"`
// LowerBound: Required. 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".
LowerBound *GooglePrivacyDlpV2Value `json:"lowerBound,omitempty"`
// UpperBound: Required. 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+".
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)
}
// GooglePrivacyDlpV2HybridContentItem: An individual hybrid item to
// inspect. Will be stored temporarily during processing.
type GooglePrivacyDlpV2HybridContentItem struct {
// FindingDetails: Supplementary information that will be added to each
// finding.
FindingDetails *GooglePrivacyDlpV2HybridFindingDetails `json:"findingDetails,omitempty"`
// Item: The item to inspect.
Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"`
// ForceSendFields is a list of field names (e.g. "FindingDetails") 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. "FindingDetails") 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 *GooglePrivacyDlpV2HybridContentItem) MarshalJSON() ([]byte, error) {
type NoMethod GooglePrivacyDlpV2HybridContentItem
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GooglePrivacyDlpV2HybridFindingDetails: Populate to associate
// additional data with each finding.
type GooglePrivacyDlpV2HybridFindingDetails struct {
// ContainerDetails: Details about the container where the content being
// inspected is from.
ContainerDetails *GooglePrivacyDlpV2Container `json:"containerDetails,omitempty"`
//