From 1263cc6538de877a364949e69061cc70bcb8761c Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 15 Jun 2022 07:15:48 -0700 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#1586) --- apigee/v1/apigee-api.json | 10 +- apigee/v1/apigee-gen.go | 11 + assuredworkloads/v1/assuredworkloads-api.json | 57 +++- assuredworkloads/v1/assuredworkloads-gen.go | 204 ++++++++++++++ dlp/v2/dlp-api.json | 148 +++++++++- dlp/v2/dlp-gen.go | 134 ++++++++- documentai/v1/documentai-api.json | 167 ++++++++++- documentai/v1/documentai-gen.go | 265 +++++++++++++++++- documentai/v1beta2/documentai-api.json | 42 ++- documentai/v1beta2/documentai-gen.go | 32 ++- documentai/v1beta3/documentai-api.json | 167 ++++++++++- documentai/v1beta3/documentai-gen.go | 244 +++++++++++++++- .../v1/paymentsresellersubscription-api.json | 4 +- .../v1/paymentsresellersubscription-gen.go | 4 +- securitycenter/v1/securitycenter-api.json | 73 ++++- securitycenter/v1/securitycenter-gen.go | 149 ++++++++++ .../v1beta1/securitycenter-api.json | 73 ++++- securitycenter/v1beta1/securitycenter-gen.go | 149 ++++++++++ .../v1beta2/securitycenter-api.json | 73 ++++- securitycenter/v1beta2/securitycenter-gen.go | 149 ++++++++++ 20 files changed, 2106 insertions(+), 49 deletions(-) diff --git a/apigee/v1/apigee-api.json b/apigee/v1/apigee-api.json index ef2302509a7..9a117567e52 100644 --- a/apigee/v1/apigee-api.json +++ b/apigee/v1/apigee-api.json @@ -7986,7 +7986,7 @@ } } }, - "revision": "20220602", + "revision": "20220609", "rootUrl": "https://apigee.googleapis.com/", "schemas": { "EdgeConfigstoreBundleBadBundle": { @@ -10156,6 +10156,10 @@ "description": "Optional. Display name for this environment.", "type": "string" }, + "forwardProxyUri": { + "description": "Optional. Url of the forward proxy to be applied to the runtime instances in this environment. Must be in the format of {scheme}://{hostname}:{port}. Note that scheme must be one of \"http\" or \"https\", and port must be supplied.", + "type": "string" + }, "lastModifiedAt": { "description": "Output only. Last modification time of this environment as milliseconds since epoch.", "format": "int64", @@ -10236,6 +10240,10 @@ }, "type": "array" }, + "forwardProxyUri": { + "description": "The forward proxy's url to be used by the runtime. When set, runtime will send requests to the target via the given forward proxy. This is only used by programmable gateways.", + "type": "string" + }, "gatewayConfigLocation": { "description": "The location for the gateway config blob as a URI, e.g. a Cloud Storage URI. This is only used by Envoy-based gateways.", "type": "string" diff --git a/apigee/v1/apigee-gen.go b/apigee/v1/apigee-gen.go index 95a92520868..01a29c9b341 100644 --- a/apigee/v1/apigee-gen.go +++ b/apigee/v1/apigee-gen.go @@ -4166,6 +4166,12 @@ type GoogleCloudApigeeV1Environment struct { // DisplayName: Optional. Display name for this environment. DisplayName string `json:"displayName,omitempty"` + // ForwardProxyUri: Optional. Url of the forward proxy to be applied to + // the runtime instances in this environment. Must be in the format of + // {scheme}://{hostname}:{port}. Note that scheme must be one of "http" + // or "https", and port must be supplied. + ForwardProxyUri string `json:"forwardProxyUri,omitempty"` + // LastModifiedAt: Output only. Last modification time of this // environment as milliseconds since epoch. LastModifiedAt int64 `json:"lastModifiedAt,omitempty,string"` @@ -4243,6 +4249,11 @@ type GoogleCloudApigeeV1EnvironmentConfig struct { // Flowhooks: List of flow hooks in the environment. Flowhooks []*GoogleCloudApigeeV1FlowHookConfig `json:"flowhooks,omitempty"` + // ForwardProxyUri: The forward proxy's url to be used by the runtime. + // When set, runtime will send requests to the target via the given + // forward proxy. This is only used by programmable gateways. + ForwardProxyUri string `json:"forwardProxyUri,omitempty"` + // GatewayConfigLocation: The location for the gateway config blob as a // URI, e.g. a Cloud Storage URI. This is only used by Envoy-based // gateways. diff --git a/assuredworkloads/v1/assuredworkloads-api.json b/assuredworkloads/v1/assuredworkloads-api.json index 570b8443f67..302404d64ac 100644 --- a/assuredworkloads/v1/assuredworkloads-api.json +++ b/assuredworkloads/v1/assuredworkloads-api.json @@ -343,6 +343,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "restrictAllowedResources": { + "description": "Restrict the list of resources allowed in the Workload environment. The current list of allowed products can be found at https://cloud.google.com/assured-workloads/docs/supported-products In addition to assuredworkloads.workload.update permission, the user should also have orgpolicy.policy.set permission on the folder resource to use this functionality.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}:restrictAllowedResources", + "httpMethod": "POST", + "id": "assuredworkloads.organizations.locations.workloads.restrictAllowedResources", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Workload. This is the workloads's relative path in the API, formatted as \"organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}\". For example, \"organizations/123/locations/us-east1/workloads/assured-workload-1\".", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:restrictAllowedResources", + "request": { + "$ref": "GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest" + }, + "response": { + "$ref": "GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } } @@ -351,7 +379,7 @@ } } }, - "revision": "20220603", + "revision": "20220609", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata": { @@ -422,6 +450,33 @@ }, "type": "object" }, + "GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest": { + "description": "Request for restricting list of available resources in Workload environment.", + "id": "GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest", + "properties": { + "restrictionType": { + "description": "Required. The type of restriction for using gcp products in the Workload environment.", + "enum": [ + "RESTRICTION_TYPE_UNSPECIFIED", + "ALLOW_ALL_GCP_RESOURCES", + "ALLOW_COMPLIANT_RESOURCES" + ], + "enumDescriptions": [ + "Unknown restriction type.", + "Allow the use all of all gcp products, irrespective of the compliance posture. This effectively removes gcp.restrictServiceUsage OrgPolicy on the AssuredWorkloads Folder.", + "Based on Workload's compliance regime, allowed list changes. See - https://cloud.google.com/assured-workloads/docs/supported-products for the list of supported resources." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse": { + "description": "Response for restricting the list of allowed resources.", + "id": "GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse", + "properties": {}, + "type": "object" + }, "GoogleCloudAssuredworkloadsV1Workload": { "description": "An Workload object for managing highly regulated workloads of cloud customers.", "id": "GoogleCloudAssuredworkloadsV1Workload", diff --git a/assuredworkloads/v1/assuredworkloads-gen.go b/assuredworkloads/v1/assuredworkloads-gen.go index a49b4556ec6..92b13421e75 100644 --- a/assuredworkloads/v1/assuredworkloads-gen.go +++ b/assuredworkloads/v1/assuredworkloads-gen.go @@ -277,6 +277,55 @@ func (s *GoogleCloudAssuredworkloadsV1ListWorkloadsResponse) MarshalJSON() ([]by return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest: Request +// for restricting list of available resources in Workload environment. +type GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest struct { + // RestrictionType: Required. The type of restriction for using gcp + // products in the Workload environment. + // + // Possible values: + // "RESTRICTION_TYPE_UNSPECIFIED" - Unknown restriction type. + // "ALLOW_ALL_GCP_RESOURCES" - Allow the use all of all gcp products, + // irrespective of the compliance posture. This effectively removes + // gcp.restrictServiceUsage OrgPolicy on the AssuredWorkloads Folder. + // "ALLOW_COMPLIANT_RESOURCES" - Based on Workload's compliance + // regime, allowed list changes. See - + // https://cloud.google.com/assured-workloads/docs/supported-products + // for the list of supported resources. + RestrictionType string `json:"restrictionType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RestrictionType") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "RestrictionType") 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 *GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse: +// Response for restricting the list of allowed resources. +type GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + // GoogleCloudAssuredworkloadsV1Workload: An Workload object for // managing highly regulated workloads of cloud customers. type GoogleCloudAssuredworkloadsV1Workload struct { @@ -2948,3 +2997,158 @@ func (c *OrganizationsLocationsWorkloadsPatchCall) Do(opts ...googleapi.CallOpti // } } + +// method id "assuredworkloads.organizations.locations.workloads.restrictAllowedResources": + +type OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall struct { + s *Service + name string + googlecloudassuredworkloadsv1restrictallowedresourcesrequest *GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RestrictAllowedResources: Restrict the list of resources allowed in +// the Workload environment. The current list of allowed products can be +// found at +// https://cloud.google.com/assured-workloads/docs/supported-products In +// addition to assuredworkloads.workload.update permission, the user +// should also have orgpolicy.policy.set permission on the folder +// resource to use this functionality. +// +// - name: The resource name of the Workload. This is the workloads's +// relative path in the API, formatted as +// "organizations/{organization_id}/locations/{location_id}/workloads/{ +// workload_id}". For example, +// "organizations/123/locations/us-east1/workloads/assured-workload-1". +func (r *OrganizationsLocationsWorkloadsService) RestrictAllowedResources(name string, googlecloudassuredworkloadsv1restrictallowedresourcesrequest *GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest) *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall { + c := &OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudassuredworkloadsv1restrictallowedresourcesrequest = googlecloudassuredworkloadsv1restrictallowedresourcesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudassuredworkloadsv1restrictallowedresourcesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:restrictAllowedResources") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "assuredworkloads.organizations.locations.workloads.restrictAllowedResources" call. +// Exactly one of +// *GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse.ServerR +// esponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsWorkloadsRestrictAllowedResourcesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Restrict the list of resources allowed in the Workload environment. The current list of allowed products can be found at https://cloud.google.com/assured-workloads/docs/supported-products In addition to assuredworkloads.workload.update permission, the user should also have orgpolicy.policy.set permission on the folder resource to use this functionality.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}:restrictAllowedResources", + // "httpMethod": "POST", + // "id": "assuredworkloads.organizations.locations.workloads.restrictAllowedResources", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the Workload. This is the workloads's relative path in the API, formatted as \"organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}\". For example, \"organizations/123/locations/us-east1/workloads/assured-workload-1\".", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:restrictAllowedResources", + // "request": { + // "$ref": "GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest" + // }, + // "response": { + // "$ref": "GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} diff --git a/dlp/v2/dlp-api.json b/dlp/v2/dlp-api.json index d668e333df0..0006cd785ea 100644 --- a/dlp/v2/dlp-api.json +++ b/dlp/v2/dlp-api.json @@ -3412,7 +3412,7 @@ } } }, - "revision": "20220506", + "revision": "20220612", "rootUrl": "https://dlp.googleapis.com/", "schemas": { "GooglePrivacyDlpV2Action": { @@ -3811,7 +3811,7 @@ "type": "string" }, "numberToMask": { - "description": "Number of characters to mask. If not set, all matching chars will be masked. Skipped characters do not count towards this tally.", + "description": "Number of characters to mask. If not set, all matching chars will be masked. Skipped characters do not count towards this tally. If `number_to_mask` is negative, this denotes inverse masking. Cloud DLP masks all but a number of characters. For example, suppose you have the following values: - `masking_character` is `*` - `number_to_mask` is `-4` - `reverse_order` is `false` - `CharsToIgnore` includes `-` - Input string is `1234-5678-9012-3456` The resulting de-identified string is `****-****-****-3456`. Cloud DLP masks all but the last four characters. If `reverse_order` is `true`, all but the first four characters are masked as `1234-****-****-****`.", "format": "int32", "type": "integer" }, @@ -5431,10 +5431,154 @@ }, "type": "object" }, + "GooglePrivacyDlpV2InfoTypeCategory": { + "description": "Classification of infoTypes to organize them according to geographic location, industry, and data type.", + "id": "GooglePrivacyDlpV2InfoTypeCategory", + "properties": { + "industryCategory": { + "description": "The group of relevant businesses where this infoType is commonly used", + "enum": [ + "INDUSTRY_UNSPECIFIED", + "FINANCE", + "HEALTH", + "TELECOMMUNICATIONS" + ], + "enumDescriptions": [ + "Unused industry", + "The infoType is typically used in the finance industry.", + "The infoType is typically used in the health industry.", + "The infoType is typically used in the telecommunications industry." + ], + "type": "string" + }, + "locationCategory": { + "description": "The region or country that issued the ID or document represented by the infoType.", + "enum": [ + "LOCATION_UNSPECIFIED", + "GLOBAL", + "ARGENTINA", + "AUSTRALIA", + "BELGIUM", + "BRAZIL", + "CANADA", + "CHILE", + "CHINA", + "COLOMBIA", + "DENMARK", + "FRANCE", + "FINLAND", + "GERMANY", + "HONG_KONG", + "INDIA", + "INDONESIA", + "IRELAND", + "ISRAEL", + "ITALY", + "JAPAN", + "KOREA", + "MEXICO", + "THE_NETHERLANDS", + "NORWAY", + "PARAGUAY", + "PERU", + "POLAND", + "PORTUGAL", + "SINGAPORE", + "SOUTH_AFRICA", + "SPAIN", + "SWEDEN", + "TAIWAN", + "THAILAND", + "TURKEY", + "UNITED_KINGDOM", + "UNITED_STATES", + "URUGUAY", + "VENEZUELA", + "INTERNAL" + ], + "enumDescriptions": [ + "Unused location", + "The infoType is not issued by or tied to a specific region, but is used almost everywhere.", + "The infoType is typically used in Argentina.", + "The infoType is typically used in Australia.", + "The infoType is typically used in Belgium.", + "The infoType is typically used in Brazil.", + "The infoType is typically used in Canada.", + "The infoType is typically used in Chile.", + "The infoType is typically used in China.", + "The infoType is typically used in Colombia.", + "The infoType is typically used in Denmark.", + "The infoType is typically used in France.", + "The infoType is typically used in Finland.", + "The infoType is typically used in Germany.", + "The infoType is typically used in Hong Kong.", + "The infoType is typically used in India.", + "The infoType is typically used in Indonesia.", + "The infoType is typically used in Ireland.", + "The infoType is typically used in Israel.", + "The infoType is typically used in Italy.", + "The infoType is typically used in Japan.", + "The infoType is typically used in Korea.", + "The infoType is typically used in Mexico.", + "The infoType is typically used in the Netherlands.", + "The infoType is typically used in Norway.", + "The infoType is typically used in Paraguay.", + "The infoType is typically used in Peru.", + "The infoType is typically used in Poland.", + "The infoType is typically used in Portugal.", + "The infoType is typically used in Singapore.", + "The infoType is typically used in South Africa.", + "The infoType is typically used in Spain.", + "The infoType is typically used in Sweden.", + "The infoType is typically used in Taiwan.", + "The infoType is typically used in Thailand.", + "The infoType is typically used in Turkey.", + "The infoType is typically used in the United Kingdom.", + "The infoType is typically used in the United States.", + "The infoType is typically used in Uruguay.", + "The infoType is typically used in Venezuela.", + "The infoType is typically used in Google internally." + ], + "type": "string" + }, + "typeCategory": { + "description": "The class of identifiers where this infoType belongs", + "enum": [ + "TYPE_UNSPECIFIED", + "PII", + "SPII", + "DEMOGRAPHIC", + "CREDENTIAL", + "GOVERNMENT_ID", + "DOCUMENT", + "CONTEXTUAL_INFORMATION" + ], + "enumDescriptions": [ + "Unused type", + "Personally identifiable information, for example, a name or phone number", + "Personally identifiable information that is especially sensitive, for example, a passport number.", + "Attributes that can partially identify someone, especially in combination with other attributes, like age, height, and gender.", + "Confidential or secret information, for example, a password.", + "An identification document issued by a government.", + "A document, for example, a resume or source code.", + "Information that is not sensitive on its own, but provides details about the circumstances surrounding an entity or an event." + ], + "type": "string" + } + }, + "type": "object" + }, "GooglePrivacyDlpV2InfoTypeDescription": { "description": "InfoType description.", "id": "GooglePrivacyDlpV2InfoTypeDescription", "properties": { + "categories": { + "description": "The category of the infoType.", + "items": { + "$ref": "GooglePrivacyDlpV2InfoTypeCategory" + }, + "type": "array" + }, "description": { "description": "Description of the infotype. Translated when language is provided in the request.", "type": "string" diff --git a/dlp/v2/dlp-gen.go b/dlp/v2/dlp-gen.go index 47e2600368c..f7a1bbc44de 100644 --- a/dlp/v2/dlp-gen.go +++ b/dlp/v2/dlp-gen.go @@ -1107,7 +1107,15 @@ type GooglePrivacyDlpV2CharacterMaskConfig struct { // NumberToMask: Number of characters to mask. If not set, all matching // chars will be masked. Skipped characters do not count towards this - // tally. + // tally. If `number_to_mask` is negative, this denotes inverse masking. + // Cloud DLP masks all but a number of characters. For example, suppose + // you have the following values: - `masking_character` is `*` - + // `number_to_mask` is `-4` - `reverse_order` is `false` - + // `CharsToIgnore` includes `-` - Input string is `1234-5678-9012-3456` + // The resulting de-identified string is `****-****-****-3456`. Cloud + // DLP masks all but the last four characters. If `reverse_order` is + // `true`, all but the first four characters are masked as + // `1234-****-****-****`. NumberToMask int64 `json:"numberToMask,omitempty"` // ReverseOrder: Mask characters in reverse order. For example, if @@ -4220,8 +4228,122 @@ func (s *GooglePrivacyDlpV2InfoType) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GooglePrivacyDlpV2InfoTypeCategory: Classification of infoTypes to +// organize them according to geographic location, industry, and data +// type. +type GooglePrivacyDlpV2InfoTypeCategory struct { + // IndustryCategory: The group of relevant businesses where this + // infoType is commonly used + // + // Possible values: + // "INDUSTRY_UNSPECIFIED" - Unused industry + // "FINANCE" - The infoType is typically used in the finance industry. + // "HEALTH" - The infoType is typically used in the health industry. + // "TELECOMMUNICATIONS" - The infoType is typically used in the + // telecommunications industry. + IndustryCategory string `json:"industryCategory,omitempty"` + + // LocationCategory: The region or country that issued the ID or + // document represented by the infoType. + // + // Possible values: + // "LOCATION_UNSPECIFIED" - Unused location + // "GLOBAL" - The infoType is not issued by or tied to a specific + // region, but is used almost everywhere. + // "ARGENTINA" - The infoType is typically used in Argentina. + // "AUSTRALIA" - The infoType is typically used in Australia. + // "BELGIUM" - The infoType is typically used in Belgium. + // "BRAZIL" - The infoType is typically used in Brazil. + // "CANADA" - The infoType is typically used in Canada. + // "CHILE" - The infoType is typically used in Chile. + // "CHINA" - The infoType is typically used in China. + // "COLOMBIA" - The infoType is typically used in Colombia. + // "DENMARK" - The infoType is typically used in Denmark. + // "FRANCE" - The infoType is typically used in France. + // "FINLAND" - The infoType is typically used in Finland. + // "GERMANY" - The infoType is typically used in Germany. + // "HONG_KONG" - The infoType is typically used in Hong Kong. + // "INDIA" - The infoType is typically used in India. + // "INDONESIA" - The infoType is typically used in Indonesia. + // "IRELAND" - The infoType is typically used in Ireland. + // "ISRAEL" - The infoType is typically used in Israel. + // "ITALY" - The infoType is typically used in Italy. + // "JAPAN" - The infoType is typically used in Japan. + // "KOREA" - The infoType is typically used in Korea. + // "MEXICO" - The infoType is typically used in Mexico. + // "THE_NETHERLANDS" - The infoType is typically used in the + // Netherlands. + // "NORWAY" - The infoType is typically used in Norway. + // "PARAGUAY" - The infoType is typically used in Paraguay. + // "PERU" - The infoType is typically used in Peru. + // "POLAND" - The infoType is typically used in Poland. + // "PORTUGAL" - The infoType is typically used in Portugal. + // "SINGAPORE" - The infoType is typically used in Singapore. + // "SOUTH_AFRICA" - The infoType is typically used in South Africa. + // "SPAIN" - The infoType is typically used in Spain. + // "SWEDEN" - The infoType is typically used in Sweden. + // "TAIWAN" - The infoType is typically used in Taiwan. + // "THAILAND" - The infoType is typically used in Thailand. + // "TURKEY" - The infoType is typically used in Turkey. + // "UNITED_KINGDOM" - The infoType is typically used in the United + // Kingdom. + // "UNITED_STATES" - The infoType is typically used in the United + // States. + // "URUGUAY" - The infoType is typically used in Uruguay. + // "VENEZUELA" - The infoType is typically used in Venezuela. + // "INTERNAL" - The infoType is typically used in Google internally. + LocationCategory string `json:"locationCategory,omitempty"` + + // TypeCategory: The class of identifiers where this infoType belongs + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unused type + // "PII" - Personally identifiable information, for example, a name or + // phone number + // "SPII" - Personally identifiable information that is especially + // sensitive, for example, a passport number. + // "DEMOGRAPHIC" - Attributes that can partially identify someone, + // especially in combination with other attributes, like age, height, + // and gender. + // "CREDENTIAL" - Confidential or secret information, for example, a + // password. + // "GOVERNMENT_ID" - An identification document issued by a + // government. + // "DOCUMENT" - A document, for example, a resume or source code. + // "CONTEXTUAL_INFORMATION" - Information that is not sensitive on its + // own, but provides details about the circumstances surrounding an + // entity or an event. + TypeCategory string `json:"typeCategory,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IndustryCategory") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "IndustryCategory") 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 *GooglePrivacyDlpV2InfoTypeCategory) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2InfoTypeCategory + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GooglePrivacyDlpV2InfoTypeDescription: InfoType description. type GooglePrivacyDlpV2InfoTypeDescription struct { + // Categories: The category of the infoType. + Categories []*GooglePrivacyDlpV2InfoTypeCategory `json:"categories,omitempty"` + // Description: Description of the infotype. Translated when language is // provided in the request. Description string `json:"description,omitempty"` @@ -4240,7 +4362,7 @@ type GooglePrivacyDlpV2InfoTypeDescription struct { // "RISK_ANALYSIS" - Supported by the risk analysis operations. SupportedBy []string `json:"supportedBy,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to + // ForceSendFields is a list of field names (e.g. "Categories") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4248,10 +4370,10 @@ type GooglePrivacyDlpV2InfoTypeDescription struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") 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 + // NullFields is a list of field names (e.g. "Categories") 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:"-"` diff --git a/documentai/v1/documentai-api.json b/documentai/v1/documentai-api.json index bc46b87c523..ef6d1b0bf93 100644 --- a/documentai/v1/documentai-api.json +++ b/documentai/v1/documentai-api.json @@ -1029,7 +1029,7 @@ } } }, - "revision": "20220602", + "revision": "20220610", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -2757,6 +2757,127 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1DocumentSchema": { + "description": "The schema defines the output of the processed document by a processor.", + "id": "GoogleCloudDocumentaiV1DocumentSchema", + "properties": { + "description": { + "description": "Description of the schema.", + "type": "string" + }, + "displayName": { + "description": "Display name to show to users.", + "type": "string" + }, + "entityTypes": { + "description": "Entity types of the schema.", + "items": { + "$ref": "GoogleCloudDocumentaiV1DocumentSchemaEntityType" + }, + "type": "array" + }, + "metadata": { + "$ref": "GoogleCloudDocumentaiV1DocumentSchemaMetadata", + "description": "Metadata of the schema." + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1DocumentSchemaEntityType": { + "description": "EntityType is the wrapper of a label of the corresponding model with detailed attributes and limitations for entity-based processors. Multiple types can also compose a dependency tree to represent nested types.", + "id": "GoogleCloudDocumentaiV1DocumentSchemaEntityType", + "properties": { + "baseTypes": { + "description": "The entity type that this type is derived from. For now, one and only one should be set.", + "items": { + "type": "string" + }, + "type": "array" + }, + "displayName": { + "description": "User defined name for the type.", + "type": "string" + }, + "enumValues": { + "$ref": "GoogleCloudDocumentaiV1DocumentSchemaEntityTypeEnumValues", + "description": "If specified, lists all the possible values for this entity. This should not be more than a handful of values. If the number of values is \u003e10 or could change frequently use the `EntityType.value_ontology` field and specify a list of all possible values in a value ontology file." + }, + "name": { + "description": "Name of the type. It must be unique within the schema file and cannot be a 'Common Type'. Besides that we use the following naming conventions: - *use snake_casing* - name matching is case-insensitive - Maximum 64 characters. - Must start with a letter. - Allowed characters: ASCII letters [a-z0-9_-]. (For backward compatibility internal infrastructure and tooling can handle any ascii character) - The '/' is sometimes used to denote a property of a type. For example line_item/amount. This convention is deprecated, but will still be honored for backward compatibility.", + "type": "string" + }, + "properties": { + "description": "Describing the nested structure, or composition of an entity.", + "items": { + "$ref": "GoogleCloudDocumentaiV1DocumentSchemaEntityTypeProperty" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1DocumentSchemaEntityTypeEnumValues": { + "description": "Defines the a list of enum values.", + "id": "GoogleCloudDocumentaiV1DocumentSchemaEntityTypeEnumValues", + "properties": { + "values": { + "description": "The individual values that this enum values type can include.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1DocumentSchemaEntityTypeProperty": { + "description": "Defines properties that can be part of the entity type.", + "id": "GoogleCloudDocumentaiV1DocumentSchemaEntityTypeProperty", + "properties": { + "name": { + "description": "The name of the property. Follows the same guidelines as the EntityType name.", + "type": "string" + }, + "occurrenceType": { + "description": "Occurrence type limits the number of instances an entity type appears in the document.", + "enum": [ + "OCCURRENCE_TYPE_UNSPECIFIED", + "OPTIONAL_ONCE", + "OPTIONAL_MULTIPLE", + "REQUIRED_ONCE", + "REQUIRED_MULTIPLE" + ], + "enumDescriptions": [ + "Unspecified occurrence type.", + "There will be zero or one instance of this entity type.", + "The entity type will appear zero or multiple times.", + "The entity type will only appear exactly once.", + "The entity type will appear once or more times." + ], + "type": "string" + }, + "valueType": { + "description": "A reference to the value type of the property. This type is subject to the same conventions as the `Entity.base_types` field.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1DocumentSchemaMetadata": { + "description": "Metadata for global schema behavior.", + "id": "GoogleCloudDocumentaiV1DocumentSchemaMetadata", + "properties": { + "documentAllowMultipleLabels": { + "description": "If true, on a given page, there can be multiple `document` annotations covering it.", + "type": "boolean" + }, + "documentSplitter": { + "description": "If true, a `document` entity type can be applied to subdocument ( splitting). Otherwise, it can only be applied to the entire document (classification).", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1DocumentShardInfo": { "description": "For a large document, sharding may be performed to produce several document shards. Each document shard contains this field to detail which shard it is.", "id": "GoogleCloudDocumentaiV1DocumentShardInfo", @@ -3328,6 +3449,10 @@ "description": "Request message for review document method.", "id": "GoogleCloudDocumentaiV1ReviewDocumentRequest", "properties": { + "documentSchema": { + "$ref": "GoogleCloudDocumentaiV1DocumentSchema", + "description": "The document schema of the human review task." + }, "enableSchemaValidation": { "description": "Whether the validation should be performed on the ad-hoc review request.", "type": "boolean" @@ -3356,7 +3481,25 @@ "id": "GoogleCloudDocumentaiV1ReviewDocumentResponse", "properties": { "gcsDestination": { - "description": "The Cloud Storage uri for the human reviewed document.", + "description": "The Cloud Storage uri for the human reviewed document if the review is succeeded.", + "type": "string" + }, + "rejectionReason": { + "description": "The reason why the review is rejected by reviewer.", + "type": "string" + }, + "state": { + "description": "The state of the review operation.", + "enum": [ + "STATE_UNSPECIFIED", + "REJECTED", + "SUCCEEDED" + ], + "enumDescriptions": [ + "The default value. This value is used if the state is omitted.", + "The review operation is rejected by the reviewer.", + "The review operation is succeeded." + ], "type": "string" } }, @@ -6186,7 +6329,25 @@ "id": "GoogleCloudDocumentaiV1beta3ReviewDocumentResponse", "properties": { "gcsDestination": { - "description": "The Cloud Storage uri for the human reviewed document.", + "description": "The Cloud Storage uri for the human reviewed document if the review is succeeded.", + "type": "string" + }, + "rejectionReason": { + "description": "The reason why the review is rejected by reviewer.", + "type": "string" + }, + "state": { + "description": "The state of the review operation.", + "enum": [ + "STATE_UNSPECIFIED", + "REJECTED", + "SUCCEEDED" + ], + "enumDescriptions": [ + "The default value. This value is used if the state is omitted.", + "The review operation is rejected by the reviewer.", + "The review operation is succeeded." + ], "type": "string" } }, diff --git a/documentai/v1/documentai-gen.go b/documentai/v1/documentai-gen.go index fe9dba0cb57..5083c7599b4 100644 --- a/documentai/v1/documentai-gen.go +++ b/documentai/v1/documentai-gen.go @@ -3175,6 +3175,215 @@ func (s *GoogleCloudDocumentaiV1DocumentRevisionHumanReview) MarshalJSON() ([]by return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1DocumentSchema: The schema defines the output +// of the processed document by a processor. +type GoogleCloudDocumentaiV1DocumentSchema struct { + // Description: Description of the schema. + Description string `json:"description,omitempty"` + + // DisplayName: Display name to show to users. + DisplayName string `json:"displayName,omitempty"` + + // EntityTypes: Entity types of the schema. + EntityTypes []*GoogleCloudDocumentaiV1DocumentSchemaEntityType `json:"entityTypes,omitempty"` + + // Metadata: Metadata of the schema. + Metadata *GoogleCloudDocumentaiV1DocumentSchemaMetadata `json:"metadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Description") 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 *GoogleCloudDocumentaiV1DocumentSchema) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1DocumentSchema + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1DocumentSchemaEntityType: EntityType is the +// wrapper of a label of the corresponding model with detailed +// attributes and limitations for entity-based processors. Multiple +// types can also compose a dependency tree to represent nested types. +type GoogleCloudDocumentaiV1DocumentSchemaEntityType struct { + // BaseTypes: The entity type that this type is derived from. For now, + // one and only one should be set. + BaseTypes []string `json:"baseTypes,omitempty"` + + // DisplayName: User defined name for the type. + DisplayName string `json:"displayName,omitempty"` + + // EnumValues: If specified, lists all the possible values for this + // entity. This should not be more than a handful of values. If the + // number of values is >10 or could change frequently use the + // `EntityType.value_ontology` field and specify a list of all possible + // values in a value ontology file. + EnumValues *GoogleCloudDocumentaiV1DocumentSchemaEntityTypeEnumValues `json:"enumValues,omitempty"` + + // Name: Name of the type. It must be unique within the schema file and + // cannot be a 'Common Type'. Besides that we use the following naming + // conventions: - *use snake_casing* - name matching is case-insensitive + // - Maximum 64 characters. - Must start with a letter. - Allowed + // characters: ASCII letters [a-z0-9_-]. (For backward compatibility + // internal infrastructure and tooling can handle any ascii character) - + // The '/' is sometimes used to denote a property of a type. For example + // line_item/amount. This convention is deprecated, but will still be + // honored for backward compatibility. + Name string `json:"name,omitempty"` + + // Properties: Describing the nested structure, or composition of an + // entity. + Properties []*GoogleCloudDocumentaiV1DocumentSchemaEntityTypeProperty `json:"properties,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BaseTypes") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "BaseTypes") 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 *GoogleCloudDocumentaiV1DocumentSchemaEntityType) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1DocumentSchemaEntityType + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1DocumentSchemaEntityTypeEnumValues: Defines +// the a list of enum values. +type GoogleCloudDocumentaiV1DocumentSchemaEntityTypeEnumValues struct { + // Values: The individual values that this enum values type can include. + Values []string `json:"values,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Values") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Values") 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 *GoogleCloudDocumentaiV1DocumentSchemaEntityTypeEnumValues) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1DocumentSchemaEntityTypeEnumValues + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1DocumentSchemaEntityTypeProperty: Defines +// properties that can be part of the entity type. +type GoogleCloudDocumentaiV1DocumentSchemaEntityTypeProperty struct { + // Name: The name of the property. Follows the same guidelines as the + // EntityType name. + Name string `json:"name,omitempty"` + + // OccurrenceType: Occurrence type limits the number of instances an + // entity type appears in the document. + // + // Possible values: + // "OCCURRENCE_TYPE_UNSPECIFIED" - Unspecified occurrence type. + // "OPTIONAL_ONCE" - There will be zero or one instance of this entity + // type. + // "OPTIONAL_MULTIPLE" - The entity type will appear zero or multiple + // times. + // "REQUIRED_ONCE" - The entity type will only appear exactly once. + // "REQUIRED_MULTIPLE" - The entity type will appear once or more + // times. + OccurrenceType string `json:"occurrenceType,omitempty"` + + // ValueType: A reference to the value type of the property. This type + // is subject to the same conventions as the `Entity.base_types` field. + ValueType string `json:"valueType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default 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 *GoogleCloudDocumentaiV1DocumentSchemaEntityTypeProperty) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1DocumentSchemaEntityTypeProperty + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1DocumentSchemaMetadata: Metadata for global +// schema behavior. +type GoogleCloudDocumentaiV1DocumentSchemaMetadata struct { + // DocumentAllowMultipleLabels: If true, on a given page, there can be + // multiple `document` annotations covering it. + DocumentAllowMultipleLabels bool `json:"documentAllowMultipleLabels,omitempty"` + + // DocumentSplitter: If true, a `document` entity type can be applied to + // subdocument ( splitting). Otherwise, it can only be applied to the + // entire document (classification). + DocumentSplitter bool `json:"documentSplitter,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DocumentAllowMultipleLabels") to unconditionally include in API + // requests. By default, fields with empty or default 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. + // "DocumentAllowMultipleLabels") 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 *GoogleCloudDocumentaiV1DocumentSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1DocumentSchemaMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1DocumentShardInfo: For a large document, // sharding may be performed to produce several document shards. Each // document shard contains this field to detail which shard it is. @@ -4212,6 +4421,9 @@ func (s *GoogleCloudDocumentaiV1ReviewDocumentOperationMetadata) MarshalJSON() ( // GoogleCloudDocumentaiV1ReviewDocumentRequest: Request message for // review document method. type GoogleCloudDocumentaiV1ReviewDocumentRequest struct { + // DocumentSchema: The document schema of the human review task. + DocumentSchema *GoogleCloudDocumentaiV1DocumentSchema `json:"documentSchema,omitempty"` + // EnableSchemaValidation: Whether the validation should be performed on // the ad-hoc review request. EnableSchemaValidation bool `json:"enableSchemaValidation,omitempty"` @@ -4228,19 +4440,18 @@ type GoogleCloudDocumentaiV1ReviewDocumentRequest struct { // priority level. Priority string `json:"priority,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "EnableSchemaValidation") to unconditionally include in API requests. - // By default, fields with empty or default 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 is a list of field names (e.g. "DocumentSchema") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "EnableSchemaValidation") - // 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 + // NullFields is a list of field names (e.g. "DocumentSchema") 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. @@ -4256,10 +4467,22 @@ func (s *GoogleCloudDocumentaiV1ReviewDocumentRequest) MarshalJSON() ([]byte, er // GoogleCloudDocumentaiV1ReviewDocumentResponse: Response message for // review document method. type GoogleCloudDocumentaiV1ReviewDocumentResponse struct { - // GcsDestination: The Cloud Storage uri for the human reviewed - // document. + // GcsDestination: The Cloud Storage uri for the human reviewed document + // if the review is succeeded. GcsDestination string `json:"gcsDestination,omitempty"` + // RejectionReason: The reason why the review is rejected by reviewer. + RejectionReason string `json:"rejectionReason,omitempty"` + + // State: The state of the review operation. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value. This value is used if the + // state is omitted. + // "REJECTED" - The review operation is rejected by the reviewer. + // "SUCCEEDED" - The review operation is succeeded. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "GcsDestination") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -8854,10 +9077,22 @@ func (s *GoogleCloudDocumentaiV1beta3ReviewDocumentOperationMetadata) MarshalJSO // GoogleCloudDocumentaiV1beta3ReviewDocumentResponse: Response message // for review document method. type GoogleCloudDocumentaiV1beta3ReviewDocumentResponse struct { - // GcsDestination: The Cloud Storage uri for the human reviewed - // document. + // GcsDestination: The Cloud Storage uri for the human reviewed document + // if the review is succeeded. GcsDestination string `json:"gcsDestination,omitempty"` + // RejectionReason: The reason why the review is rejected by reviewer. + RejectionReason string `json:"rejectionReason,omitempty"` + + // State: The state of the review operation. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value. This value is used if the + // state is omitted. + // "REJECTED" - The review operation is rejected by the reviewer. + // "SUCCEEDED" - The review operation is succeeded. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "GcsDestination") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any diff --git a/documentai/v1beta2/documentai-api.json b/documentai/v1beta2/documentai-api.json index 67c82ed755b..f32b5471b8a 100644 --- a/documentai/v1beta2/documentai-api.json +++ b/documentai/v1beta2/documentai-api.json @@ -292,7 +292,7 @@ } } }, - "revision": "20220602", + "revision": "20220610", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -1119,7 +1119,25 @@ "id": "GoogleCloudDocumentaiV1ReviewDocumentResponse", "properties": { "gcsDestination": { - "description": "The Cloud Storage uri for the human reviewed document.", + "description": "The Cloud Storage uri for the human reviewed document if the review is succeeded.", + "type": "string" + }, + "rejectionReason": { + "description": "The reason why the review is rejected by reviewer.", + "type": "string" + }, + "state": { + "description": "The state of the review operation.", + "enum": [ + "STATE_UNSPECIFIED", + "REJECTED", + "SUCCEEDED" + ], + "enumDescriptions": [ + "The default value. This value is used if the state is omitted.", + "The review operation is rejected by the reviewer.", + "The review operation is succeeded." + ], "type": "string" } }, @@ -4097,7 +4115,25 @@ "id": "GoogleCloudDocumentaiV1beta3ReviewDocumentResponse", "properties": { "gcsDestination": { - "description": "The Cloud Storage uri for the human reviewed document.", + "description": "The Cloud Storage uri for the human reviewed document if the review is succeeded.", + "type": "string" + }, + "rejectionReason": { + "description": "The reason why the review is rejected by reviewer.", + "type": "string" + }, + "state": { + "description": "The state of the review operation.", + "enum": [ + "STATE_UNSPECIFIED", + "REJECTED", + "SUCCEEDED" + ], + "enumDescriptions": [ + "The default value. This value is used if the state is omitted.", + "The review operation is rejected by the reviewer.", + "The review operation is succeeded." + ], "type": "string" } }, diff --git a/documentai/v1beta2/documentai-gen.go b/documentai/v1beta2/documentai-gen.go index cc683f619b3..9aa51ec6d7d 100644 --- a/documentai/v1beta2/documentai-gen.go +++ b/documentai/v1beta2/documentai-gen.go @@ -1746,10 +1746,22 @@ func (s *GoogleCloudDocumentaiV1ReviewDocumentOperationMetadata) MarshalJSON() ( // GoogleCloudDocumentaiV1ReviewDocumentResponse: Response message for // review document method. type GoogleCloudDocumentaiV1ReviewDocumentResponse struct { - // GcsDestination: The Cloud Storage uri for the human reviewed - // document. + // GcsDestination: The Cloud Storage uri for the human reviewed document + // if the review is succeeded. GcsDestination string `json:"gcsDestination,omitempty"` + // RejectionReason: The reason why the review is rejected by reviewer. + RejectionReason string `json:"rejectionReason,omitempty"` + + // State: The state of the review operation. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value. This value is used if the + // state is omitted. + // "REJECTED" - The review operation is rejected by the reviewer. + // "SUCCEEDED" - The review operation is succeeded. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "GcsDestination") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -6623,10 +6635,22 @@ func (s *GoogleCloudDocumentaiV1beta3ReviewDocumentOperationMetadata) MarshalJSO // GoogleCloudDocumentaiV1beta3ReviewDocumentResponse: Response message // for review document method. type GoogleCloudDocumentaiV1beta3ReviewDocumentResponse struct { - // GcsDestination: The Cloud Storage uri for the human reviewed - // document. + // GcsDestination: The Cloud Storage uri for the human reviewed document + // if the review is succeeded. GcsDestination string `json:"gcsDestination,omitempty"` + // RejectionReason: The reason why the review is rejected by reviewer. + RejectionReason string `json:"rejectionReason,omitempty"` + + // State: The state of the review operation. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value. This value is used if the + // state is omitted. + // "REJECTED" - The review operation is rejected by the reviewer. + // "SUCCEEDED" - The review operation is succeeded. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "GcsDestination") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any diff --git a/documentai/v1beta3/documentai-api.json b/documentai/v1beta3/documentai-api.json index d68b61eb27b..b009136a8db 100644 --- a/documentai/v1beta3/documentai-api.json +++ b/documentai/v1beta3/documentai-api.json @@ -796,7 +796,7 @@ } } }, - "revision": "20220602", + "revision": "20220610", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -1623,7 +1623,25 @@ "id": "GoogleCloudDocumentaiV1ReviewDocumentResponse", "properties": { "gcsDestination": { - "description": "The Cloud Storage uri for the human reviewed document.", + "description": "The Cloud Storage uri for the human reviewed document if the review is succeeded.", + "type": "string" + }, + "rejectionReason": { + "description": "The reason why the review is rejected by reviewer.", + "type": "string" + }, + "state": { + "description": "The state of the review operation.", + "enum": [ + "STATE_UNSPECIFIED", + "REJECTED", + "SUCCEEDED" + ], + "enumDescriptions": [ + "The default value. This value is used if the state is omitted.", + "The review operation is rejected by the reviewer.", + "The review operation is succeeded." + ], "type": "string" } }, @@ -5323,6 +5341,127 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta3DocumentSchema": { + "description": "The schema defines the output of the processed document by a processor.", + "id": "GoogleCloudDocumentaiV1beta3DocumentSchema", + "properties": { + "description": { + "description": "Description of the schema.", + "type": "string" + }, + "displayName": { + "description": "Display name to show to users.", + "type": "string" + }, + "entityTypes": { + "description": "Entity types of the schema.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta3DocumentSchemaEntityType" + }, + "type": "array" + }, + "metadata": { + "$ref": "GoogleCloudDocumentaiV1beta3DocumentSchemaMetadata", + "description": "Metadata of the schema." + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta3DocumentSchemaEntityType": { + "description": "EntityType is the wrapper of a label of the corresponding model with detailed attributes and limitations for entity-based processors. Multiple types can also compose a dependency tree to represent nested types.", + "id": "GoogleCloudDocumentaiV1beta3DocumentSchemaEntityType", + "properties": { + "baseTypes": { + "description": "The entity type that this type is derived from. For now, one and only one should be set.", + "items": { + "type": "string" + }, + "type": "array" + }, + "displayName": { + "description": "User defined name for the type.", + "type": "string" + }, + "enumValues": { + "$ref": "GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeEnumValues", + "description": "If specified, lists all the possible values for this entity. This should not be more than a handful of values. If the number of values is \u003e10 or could change frequently use the `EntityType.value_ontology` field and specify a list of all possible values in a value ontology file." + }, + "name": { + "description": "Name of the type. It must be unique within the schema file and cannot be a 'Common Type'. Besides that we use the following naming conventions: - *use snake_casing* - name matching is case-insensitive - Maximum 64 characters. - Must start with a letter. - Allowed characters: ASCII letters [a-z0-9_-]. (For backward compatibility internal infrastructure and tooling can handle any ascii character) - The '/' is sometimes used to denote a property of a type. For example line_item/amount. This convention is deprecated, but will still be honored for backward compatibility.", + "type": "string" + }, + "properties": { + "description": "Describing the nested structure, or composition of an entity.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeProperty" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeEnumValues": { + "description": "Defines the a list of enum values.", + "id": "GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeEnumValues", + "properties": { + "values": { + "description": "The individual values that this enum values type can include.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeProperty": { + "description": "Defines properties that can be part of the entity type.", + "id": "GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeProperty", + "properties": { + "name": { + "description": "The name of the property. Follows the same guidelines as the EntityType name.", + "type": "string" + }, + "occurrenceType": { + "description": "Occurrence type limits the number of instances an entity type appears in the document.", + "enum": [ + "OCCURRENCE_TYPE_UNSPECIFIED", + "OPTIONAL_ONCE", + "OPTIONAL_MULTIPLE", + "REQUIRED_ONCE", + "REQUIRED_MULTIPLE" + ], + "enumDescriptions": [ + "Unspecified occurrence type.", + "There will be zero or one instance of this entity type.", + "The entity type will appear zero or multiple times.", + "The entity type will only appear exactly once.", + "The entity type will appear once or more times." + ], + "type": "string" + }, + "valueType": { + "description": "A reference to the value type of the property. This type is subject to the same conventions as the `Entity.base_types` field.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta3DocumentSchemaMetadata": { + "description": "Metadata for global schema behavior.", + "id": "GoogleCloudDocumentaiV1beta3DocumentSchemaMetadata", + "properties": { + "documentAllowMultipleLabels": { + "description": "If true, on a given page, there can be multiple `document` annotations covering it.", + "type": "boolean" + }, + "documentSplitter": { + "description": "If true, a `document` entity type can be applied to subdocument ( splitting). Otherwise, it can only be applied to the entire document (classification).", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3DocumentShardInfo": { "description": "For a large document, sharding may be performed to produce several document shards. Each document shard contains this field to detail which shard it is.", "id": "GoogleCloudDocumentaiV1beta3DocumentShardInfo", @@ -5940,6 +6079,10 @@ "$ref": "GoogleCloudDocumentaiV1beta3Document", "description": "The document that needs human review." }, + "documentSchema": { + "$ref": "GoogleCloudDocumentaiV1beta3DocumentSchema", + "description": "The document schema of the human review task." + }, "enableSchemaValidation": { "description": "Whether the validation should be performed on the ad-hoc review request.", "type": "boolean" @@ -5968,7 +6111,25 @@ "id": "GoogleCloudDocumentaiV1beta3ReviewDocumentResponse", "properties": { "gcsDestination": { - "description": "The Cloud Storage uri for the human reviewed document.", + "description": "The Cloud Storage uri for the human reviewed document if the review is succeeded.", + "type": "string" + }, + "rejectionReason": { + "description": "The reason why the review is rejected by reviewer.", + "type": "string" + }, + "state": { + "description": "The state of the review operation.", + "enum": [ + "STATE_UNSPECIFIED", + "REJECTED", + "SUCCEEDED" + ], + "enumDescriptions": [ + "The default value. This value is used if the state is omitted.", + "The review operation is rejected by the reviewer.", + "The review operation is succeeded." + ], "type": "string" } }, diff --git a/documentai/v1beta3/documentai-gen.go b/documentai/v1beta3/documentai-gen.go index 309a477a27d..120547f1b4f 100644 --- a/documentai/v1beta3/documentai-gen.go +++ b/documentai/v1beta3/documentai-gen.go @@ -1746,10 +1746,22 @@ func (s *GoogleCloudDocumentaiV1ReviewDocumentOperationMetadata) MarshalJSON() ( // GoogleCloudDocumentaiV1ReviewDocumentResponse: Response message for // review document method. type GoogleCloudDocumentaiV1ReviewDocumentResponse struct { - // GcsDestination: The Cloud Storage uri for the human reviewed - // document. + // GcsDestination: The Cloud Storage uri for the human reviewed document + // if the review is succeeded. GcsDestination string `json:"gcsDestination,omitempty"` + // RejectionReason: The reason why the review is rejected by reviewer. + RejectionReason string `json:"rejectionReason,omitempty"` + + // State: The state of the review operation. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value. This value is used if the + // state is omitted. + // "REJECTED" - The review operation is rejected by the reviewer. + // "SUCCEEDED" - The review operation is succeeded. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "GcsDestination") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -7683,6 +7695,215 @@ func (s *GoogleCloudDocumentaiV1beta3DocumentRevisionHumanReview) MarshalJSON() return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta3DocumentSchema: The schema defines the +// output of the processed document by a processor. +type GoogleCloudDocumentaiV1beta3DocumentSchema struct { + // Description: Description of the schema. + Description string `json:"description,omitempty"` + + // DisplayName: Display name to show to users. + DisplayName string `json:"displayName,omitempty"` + + // EntityTypes: Entity types of the schema. + EntityTypes []*GoogleCloudDocumentaiV1beta3DocumentSchemaEntityType `json:"entityTypes,omitempty"` + + // Metadata: Metadata of the schema. + Metadata *GoogleCloudDocumentaiV1beta3DocumentSchemaMetadata `json:"metadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Description") 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 *GoogleCloudDocumentaiV1beta3DocumentSchema) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3DocumentSchema + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta3DocumentSchemaEntityType: EntityType is +// the wrapper of a label of the corresponding model with detailed +// attributes and limitations for entity-based processors. Multiple +// types can also compose a dependency tree to represent nested types. +type GoogleCloudDocumentaiV1beta3DocumentSchemaEntityType struct { + // BaseTypes: The entity type that this type is derived from. For now, + // one and only one should be set. + BaseTypes []string `json:"baseTypes,omitempty"` + + // DisplayName: User defined name for the type. + DisplayName string `json:"displayName,omitempty"` + + // EnumValues: If specified, lists all the possible values for this + // entity. This should not be more than a handful of values. If the + // number of values is >10 or could change frequently use the + // `EntityType.value_ontology` field and specify a list of all possible + // values in a value ontology file. + EnumValues *GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeEnumValues `json:"enumValues,omitempty"` + + // Name: Name of the type. It must be unique within the schema file and + // cannot be a 'Common Type'. Besides that we use the following naming + // conventions: - *use snake_casing* - name matching is case-insensitive + // - Maximum 64 characters. - Must start with a letter. - Allowed + // characters: ASCII letters [a-z0-9_-]. (For backward compatibility + // internal infrastructure and tooling can handle any ascii character) - + // The '/' is sometimes used to denote a property of a type. For example + // line_item/amount. This convention is deprecated, but will still be + // honored for backward compatibility. + Name string `json:"name,omitempty"` + + // Properties: Describing the nested structure, or composition of an + // entity. + Properties []*GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeProperty `json:"properties,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BaseTypes") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "BaseTypes") 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 *GoogleCloudDocumentaiV1beta3DocumentSchemaEntityType) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3DocumentSchemaEntityType + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeEnumValues: +// Defines the a list of enum values. +type GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeEnumValues struct { + // Values: The individual values that this enum values type can include. + Values []string `json:"values,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Values") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Values") 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 *GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeEnumValues) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeEnumValues + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeProperty: Defines +// properties that can be part of the entity type. +type GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeProperty struct { + // Name: The name of the property. Follows the same guidelines as the + // EntityType name. + Name string `json:"name,omitempty"` + + // OccurrenceType: Occurrence type limits the number of instances an + // entity type appears in the document. + // + // Possible values: + // "OCCURRENCE_TYPE_UNSPECIFIED" - Unspecified occurrence type. + // "OPTIONAL_ONCE" - There will be zero or one instance of this entity + // type. + // "OPTIONAL_MULTIPLE" - The entity type will appear zero or multiple + // times. + // "REQUIRED_ONCE" - The entity type will only appear exactly once. + // "REQUIRED_MULTIPLE" - The entity type will appear once or more + // times. + OccurrenceType string `json:"occurrenceType,omitempty"` + + // ValueType: A reference to the value type of the property. This type + // is subject to the same conventions as the `Entity.base_types` field. + ValueType string `json:"valueType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default 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 *GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeProperty) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeProperty + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta3DocumentSchemaMetadata: Metadata for +// global schema behavior. +type GoogleCloudDocumentaiV1beta3DocumentSchemaMetadata struct { + // DocumentAllowMultipleLabels: If true, on a given page, there can be + // multiple `document` annotations covering it. + DocumentAllowMultipleLabels bool `json:"documentAllowMultipleLabels,omitempty"` + + // DocumentSplitter: If true, a `document` entity type can be applied to + // subdocument ( splitting). Otherwise, it can only be applied to the + // entire document (classification). + DocumentSplitter bool `json:"documentSplitter,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DocumentAllowMultipleLabels") to unconditionally include in API + // requests. By default, fields with empty or default 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. + // "DocumentAllowMultipleLabels") 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 *GoogleCloudDocumentaiV1beta3DocumentSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3DocumentSchemaMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta3DocumentShardInfo: For a large document, // sharding may be performed to produce several document shards. Each // document shard contains this field to detail which shard it is. @@ -8756,6 +8977,9 @@ type GoogleCloudDocumentaiV1beta3ReviewDocumentRequest struct { // Document: The document that needs human review. Document *GoogleCloudDocumentaiV1beta3Document `json:"document,omitempty"` + // DocumentSchema: The document schema of the human review task. + DocumentSchema *GoogleCloudDocumentaiV1beta3DocumentSchema `json:"documentSchema,omitempty"` + // EnableSchemaValidation: Whether the validation should be performed on // the ad-hoc review request. EnableSchemaValidation bool `json:"enableSchemaValidation,omitempty"` @@ -8798,10 +9022,22 @@ func (s *GoogleCloudDocumentaiV1beta3ReviewDocumentRequest) MarshalJSON() ([]byt // GoogleCloudDocumentaiV1beta3ReviewDocumentResponse: Response message // for review document method. type GoogleCloudDocumentaiV1beta3ReviewDocumentResponse struct { - // GcsDestination: The Cloud Storage uri for the human reviewed - // document. + // GcsDestination: The Cloud Storage uri for the human reviewed document + // if the review is succeeded. GcsDestination string `json:"gcsDestination,omitempty"` + // RejectionReason: The reason why the review is rejected by reviewer. + RejectionReason string `json:"rejectionReason,omitempty"` + + // State: The state of the review operation. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value. This value is used if the + // state is omitted. + // "REJECTED" - The review operation is rejected by the reviewer. + // "SUCCEEDED" - The review operation is succeeded. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "GcsDestination") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any diff --git a/paymentsresellersubscription/v1/paymentsresellersubscription-api.json b/paymentsresellersubscription/v1/paymentsresellersubscription-api.json index 9078bd9b751..4678a6a42da 100644 --- a/paymentsresellersubscription/v1/paymentsresellersubscription-api.json +++ b/paymentsresellersubscription/v1/paymentsresellersubscription-api.json @@ -396,7 +396,7 @@ } } }, - "revision": "20220606", + "revision": "20220614", "rootUrl": "https://paymentsresellersubscription.googleapis.com/", "schemas": { "GoogleCloudPaymentsResellerSubscriptionV1CancelSubscriptionRequest": { @@ -755,7 +755,7 @@ "type": "object" }, "GoogleCloudPaymentsResellerSubscriptionV1Subscription": { - "description": "LINT.IfChange A Subscription resource managed by 3P Partners.", + "description": "A Subscription resource managed by 3P Partners.", "id": "GoogleCloudPaymentsResellerSubscriptionV1Subscription", "properties": { "cancellationDetails": { diff --git a/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go b/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go index 7170a28de7f..d6101dcd0e1 100644 --- a/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go +++ b/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go @@ -812,8 +812,8 @@ func (s *GoogleCloudPaymentsResellerSubscriptionV1PromotionIntroductoryPricingDe return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPaymentsResellerSubscriptionV1Subscription: LINT.IfChange -// A Subscription resource managed by 3P Partners. +// GoogleCloudPaymentsResellerSubscriptionV1Subscription: A Subscription +// resource managed by 3P Partners. type GoogleCloudPaymentsResellerSubscriptionV1Subscription struct { // CancellationDetails: Output only. Describes the details of a // cancelled subscription. Only applicable to subscription of state diff --git a/securitycenter/v1/securitycenter-api.json b/securitycenter/v1/securitycenter-api.json index f1fbd6c3071..af6090f0697 100644 --- a/securitycenter/v1/securitycenter-api.json +++ b/securitycenter/v1/securitycenter-api.json @@ -3058,7 +3058,7 @@ } } }, - "revision": "20220602", + "revision": "20220609", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -3510,6 +3510,22 @@ }, "type": "object" }, + "Detection": { + "description": "Memory hash detection contributing to the binary family match.", + "id": "Detection", + "properties": { + "binary": { + "description": "The name of the binary associated with the memory hash signature detection.", + "type": "string" + }, + "percentPagesMatched": { + "description": "The percentage of memory page hashes in the signature that were matched.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", @@ -4522,6 +4538,13 @@ "type": "string" }, "type": "array" + }, + "signatures": { + "description": "The list of matched signatures indicating that the given process is present in the environment.", + "items": { + "$ref": "ProcessSignature" + }, + "type": "array" } }, "type": "object" @@ -4733,6 +4756,24 @@ }, "type": "object" }, + "MemoryHashSignature": { + "description": "A signature corresponding to memory page hashes.", + "id": "MemoryHashSignature", + "properties": { + "binaryFamily": { + "description": "The binary family.", + "type": "string" + }, + "detections": { + "description": "The list of memory hash detections contributing to the binary family match.", + "items": { + "$ref": "Detection" + }, + "type": "array" + } + }, + "type": "object" + }, "MitreAttack": { "description": "MITRE ATT\u0026CK tactics and techniques related to this finding. See: https://attack.mitre.org", "id": "MitreAttack", @@ -5123,6 +5164,10 @@ }, "type": "array" }, + "name": { + "description": "The process name visible in utilities like top and ps; it can be accessed via /proc/[pid]/comm and changed with prctl(PR_SET_NAME).", + "type": "string" + }, "parentPid": { "description": "The parent process id.", "format": "int64", @@ -5140,6 +5185,21 @@ }, "type": "object" }, + "ProcessSignature": { + "description": "Indicates what signature matched this process.", + "id": "ProcessSignature", + "properties": { + "memoryHashSignature": { + "$ref": "MemoryHashSignature", + "description": "Signature indicating that a binary family was matched." + }, + "yaraRuleSignature": { + "$ref": "YaraRuleSignature", + "description": "Signature indicating that a YARA rule was matched." + } + }, + "type": "object" + }, "Reference": { "description": "Additional Links", "id": "Reference", @@ -5438,6 +5498,17 @@ } }, "type": "object" + }, + "YaraRuleSignature": { + "description": "A signature corresponding to a YARA rule.", + "id": "YaraRuleSignature", + "properties": { + "yaraRule": { + "description": "The name of the YARA rule.", + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/securitycenter/v1/securitycenter-gen.go b/securitycenter/v1/securitycenter-gen.go index 0ad1caa3e60..3d989e3f7cf 100644 --- a/securitycenter/v1/securitycenter-gen.go +++ b/securitycenter/v1/securitycenter-gen.go @@ -1164,6 +1164,54 @@ func (s *Cvssv3) UnmarshalJSON(data []byte) error { return nil } +// Detection: Memory hash detection contributing to the binary family +// match. +type Detection struct { + // Binary: The name of the binary associated with the memory hash + // signature detection. + Binary string `json:"binary,omitempty"` + + // PercentPagesMatched: The percentage of memory page hashes in the + // signature that were matched. + PercentPagesMatched float64 `json:"percentPagesMatched,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Binary") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Binary") 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 *Detection) MarshalJSON() ([]byte, error) { + type NoMethod Detection + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *Detection) UnmarshalJSON(data []byte) error { + type NoMethod Detection + var s1 struct { + PercentPagesMatched gensupport.JSONFloat64 `json:"percentPagesMatched"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.PercentPagesMatched = float64(s1.PercentPagesMatched) + return nil +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For @@ -2917,6 +2965,10 @@ type Indicator struct { // IpAddresses: List of ip addresses associated to the Finding. IpAddresses []string `json:"ipAddresses,omitempty"` + // Signatures: The list of matched signatures indicating that the given + // process is present in the environment. + Signatures []*ProcessSignature `json:"signatures,omitempty"` + // ForceSendFields is a list of field names (e.g. "Domains") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -3297,6 +3349,38 @@ func (s *ListSourcesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MemoryHashSignature: A signature corresponding to memory page hashes. +type MemoryHashSignature struct { + // BinaryFamily: The binary family. + BinaryFamily string `json:"binaryFamily,omitempty"` + + // Detections: The list of memory hash detections contributing to the + // binary family match. + Detections []*Detection `json:"detections,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BinaryFamily") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "BinaryFamily") 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 *MemoryHashSignature) MarshalJSON() ([]byte, error) { + type NoMethod MemoryHashSignature + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MitreAttack: MITRE ATT&CK tactics and techniques related to this // finding. See: https://attack.mitre.org type MitreAttack struct { @@ -3746,6 +3830,10 @@ type Process struct { // Libraries: File information for libraries loaded by the process. Libraries []*File `json:"libraries,omitempty"` + // Name: The process name visible in utilities like top and ps; it can + // be accessed via /proc/[pid]/comm and changed with prctl(PR_SET_NAME). + Name string `json:"name,omitempty"` + // ParentPid: The parent process id. ParentPid int64 `json:"parentPid,omitempty,string"` @@ -3781,6 +3869,39 @@ func (s *Process) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ProcessSignature: Indicates what signature matched this process. +type ProcessSignature struct { + // MemoryHashSignature: Signature indicating that a binary family was + // matched. + MemoryHashSignature *MemoryHashSignature `json:"memoryHashSignature,omitempty"` + + // YaraRuleSignature: Signature indicating that a YARA rule was matched. + YaraRuleSignature *YaraRuleSignature `json:"yaraRuleSignature,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MemoryHashSignature") + // to unconditionally include in API requests. By default, fields with + // empty or default 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. "MemoryHashSignature") 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 *ProcessSignature) MarshalJSON() ([]byte, error) { + type NoMethod ProcessSignature + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Reference: Additional Links type Reference struct { // Source: Source of the reference e.g. NVD @@ -4350,6 +4471,34 @@ func (s *Vulnerability) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// YaraRuleSignature: A signature corresponding to a YARA rule. +type YaraRuleSignature struct { + // YaraRule: The name of the YARA rule. + YaraRule string `json:"yaraRule,omitempty"` + + // ForceSendFields is a list of field names (e.g. "YaraRule") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "YaraRule") 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 *YaraRuleSignature) MarshalJSON() ([]byte, error) { + type NoMethod YaraRuleSignature + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // method id "securitycenter.folders.assets.group": type FoldersAssetsGroupCall struct { diff --git a/securitycenter/v1beta1/securitycenter-api.json b/securitycenter/v1beta1/securitycenter-api.json index e9c088c0e2a..7e9d128afe1 100644 --- a/securitycenter/v1beta1/securitycenter-api.json +++ b/securitycenter/v1beta1/securitycenter-api.json @@ -896,7 +896,7 @@ } } }, - "revision": "20220602", + "revision": "20220609", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -1324,6 +1324,22 @@ }, "type": "object" }, + "Detection": { + "description": "Memory hash detection contributing to the binary family match.", + "id": "Detection", + "properties": { + "binary": { + "description": "The name of the binary associated with the memory hash signature detection.", + "type": "string" + }, + "percentPagesMatched": { + "description": "The percentage of memory page hashes in the signature that were matched.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", @@ -2391,6 +2407,13 @@ "type": "string" }, "type": "array" + }, + "signatures": { + "description": "The list of matched signatures indicating that the given process is present in the environment.", + "items": { + "$ref": "ProcessSignature" + }, + "type": "array" } }, "type": "object" @@ -2516,6 +2539,24 @@ }, "type": "object" }, + "MemoryHashSignature": { + "description": "A signature corresponding to memory page hashes.", + "id": "MemoryHashSignature", + "properties": { + "binaryFamily": { + "description": "The binary family.", + "type": "string" + }, + "detections": { + "description": "The list of memory hash detections contributing to the binary family match.", + "items": { + "$ref": "Detection" + }, + "type": "array" + } + }, + "type": "object" + }, "MitreAttack": { "description": "MITRE ATT\u0026CK tactics and techniques related to this finding. See: https://attack.mitre.org", "id": "MitreAttack", @@ -2878,6 +2919,10 @@ }, "type": "array" }, + "name": { + "description": "The process name visible in utilities like top and ps; it can be accessed via /proc/[pid]/comm and changed with prctl(PR_SET_NAME).", + "type": "string" + }, "parentPid": { "description": "The parent process id.", "format": "int64", @@ -2895,6 +2940,21 @@ }, "type": "object" }, + "ProcessSignature": { + "description": "Indicates what signature matched this process.", + "id": "ProcessSignature", + "properties": { + "memoryHashSignature": { + "$ref": "MemoryHashSignature", + "description": "Signature indicating that a binary family was matched." + }, + "yaraRuleSignature": { + "$ref": "YaraRuleSignature", + "description": "Signature indicating that a YARA rule was matched." + } + }, + "type": "object" + }, "Reference": { "description": "Additional Links", "id": "Reference", @@ -3094,6 +3154,17 @@ } }, "type": "object" + }, + "YaraRuleSignature": { + "description": "A signature corresponding to a YARA rule.", + "id": "YaraRuleSignature", + "properties": { + "yaraRule": { + "description": "The name of the YARA rule.", + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/securitycenter/v1beta1/securitycenter-gen.go b/securitycenter/v1beta1/securitycenter-gen.go index 7111ad41595..42a3baf5a65 100644 --- a/securitycenter/v1beta1/securitycenter-gen.go +++ b/securitycenter/v1beta1/securitycenter-gen.go @@ -855,6 +855,54 @@ func (s *Cvssv3) UnmarshalJSON(data []byte) error { return nil } +// Detection: Memory hash detection contributing to the binary family +// match. +type Detection struct { + // Binary: The name of the binary associated with the memory hash + // signature detection. + Binary string `json:"binary,omitempty"` + + // PercentPagesMatched: The percentage of memory page hashes in the + // signature that were matched. + PercentPagesMatched float64 `json:"percentPagesMatched,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Binary") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Binary") 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 *Detection) MarshalJSON() ([]byte, error) { + type NoMethod Detection + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *Detection) UnmarshalJSON(data []byte) error { + type NoMethod Detection + var s1 struct { + PercentPagesMatched gensupport.JSONFloat64 `json:"percentPagesMatched"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.PercentPagesMatched = float64(s1.PercentPagesMatched) + return nil +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For @@ -2632,6 +2680,10 @@ type Indicator struct { // IpAddresses: List of ip addresses associated to the Finding. IpAddresses []string `json:"ipAddresses,omitempty"` + // Signatures: The list of matched signatures indicating that the given + // process is present in the environment. + Signatures []*ProcessSignature `json:"signatures,omitempty"` + // ForceSendFields is a list of field names (e.g. "Domains") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -2851,6 +2903,38 @@ func (s *ListSourcesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MemoryHashSignature: A signature corresponding to memory page hashes. +type MemoryHashSignature struct { + // BinaryFamily: The binary family. + BinaryFamily string `json:"binaryFamily,omitempty"` + + // Detections: The list of memory hash detections contributing to the + // binary family match. + Detections []*Detection `json:"detections,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BinaryFamily") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "BinaryFamily") 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 *MemoryHashSignature) MarshalJSON() ([]byte, error) { + type NoMethod MemoryHashSignature + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MitreAttack: MITRE ATT&CK tactics and techniques related to this // finding. See: https://attack.mitre.org type MitreAttack struct { @@ -3245,6 +3329,10 @@ type Process struct { // Libraries: File information for libraries loaded by the process. Libraries []*File `json:"libraries,omitempty"` + // Name: The process name visible in utilities like top and ps; it can + // be accessed via /proc/[pid]/comm and changed with prctl(PR_SET_NAME). + Name string `json:"name,omitempty"` + // ParentPid: The parent process id. ParentPid int64 `json:"parentPid,omitempty,string"` @@ -3280,6 +3368,39 @@ func (s *Process) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ProcessSignature: Indicates what signature matched this process. +type ProcessSignature struct { + // MemoryHashSignature: Signature indicating that a binary family was + // matched. + MemoryHashSignature *MemoryHashSignature `json:"memoryHashSignature,omitempty"` + + // YaraRuleSignature: Signature indicating that a YARA rule was matched. + YaraRuleSignature *YaraRuleSignature `json:"yaraRuleSignature,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MemoryHashSignature") + // to unconditionally include in API requests. By default, fields with + // empty or default 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. "MemoryHashSignature") 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 *ProcessSignature) MarshalJSON() ([]byte, error) { + type NoMethod ProcessSignature + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Reference: Additional Links type Reference struct { // Source: Source of the reference e.g. NVD @@ -3694,6 +3815,34 @@ func (s *Vulnerability) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// YaraRuleSignature: A signature corresponding to a YARA rule. +type YaraRuleSignature struct { + // YaraRule: The name of the YARA rule. + YaraRule string `json:"yaraRule,omitempty"` + + // ForceSendFields is a list of field names (e.g. "YaraRule") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "YaraRule") 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 *YaraRuleSignature) MarshalJSON() ([]byte, error) { + type NoMethod YaraRuleSignature + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // method id "securitycenter.organizations.getOrganizationSettings": type OrganizationsGetOrganizationSettingsCall struct { diff --git a/securitycenter/v1beta2/securitycenter-api.json b/securitycenter/v1beta2/securitycenter-api.json index 44026016b02..b3d3f838785 100644 --- a/securitycenter/v1beta2/securitycenter-api.json +++ b/securitycenter/v1beta2/securitycenter-api.json @@ -1717,7 +1717,7 @@ } } }, - "revision": "20220602", + "revision": "20220609", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -2116,6 +2116,22 @@ }, "type": "object" }, + "Detection": { + "description": "Memory hash detection contributing to the binary family match.", + "id": "Detection", + "properties": { + "binary": { + "description": "The name of the binary associated with the memory hash signature detection.", + "type": "string" + }, + "percentPagesMatched": { + "description": "The percentage of memory page hashes in the signature that were matched.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, "EnvironmentVariable": { "description": "EnvironmentVariable is a name-value pair to store environment variables for Process.", "id": "EnvironmentVariable", @@ -2962,6 +2978,31 @@ "type": "string" }, "type": "array" + }, + "signatures": { + "description": "The list of matched signatures indicating that the given process is present in the environment.", + "items": { + "$ref": "ProcessSignature" + }, + "type": "array" + } + }, + "type": "object" + }, + "MemoryHashSignature": { + "description": "A signature corresponding to memory page hashes.", + "id": "MemoryHashSignature", + "properties": { + "binaryFamily": { + "description": "The binary family.", + "type": "string" + }, + "detections": { + "description": "The list of memory hash detections contributing to the binary family match.", + "items": { + "$ref": "Detection" + }, + "type": "array" } }, "type": "object" @@ -3268,6 +3309,10 @@ }, "type": "array" }, + "name": { + "description": "The process name visible in utilities like top and ps; it can be accessed via /proc/[pid]/comm and changed with prctl(PR_SET_NAME).", + "type": "string" + }, "parentPid": { "description": "The parent process id.", "format": "int64", @@ -3285,6 +3330,21 @@ }, "type": "object" }, + "ProcessSignature": { + "description": "Indicates what signature matched this process.", + "id": "ProcessSignature", + "properties": { + "memoryHashSignature": { + "$ref": "MemoryHashSignature", + "description": "Signature indicating that a binary family was matched." + }, + "yaraRuleSignature": { + "$ref": "YaraRuleSignature", + "description": "Signature indicating that a YARA rule was matched." + } + }, + "type": "object" + }, "Reference": { "description": "Additional Links", "id": "Reference", @@ -3515,6 +3575,17 @@ } }, "type": "object" + }, + "YaraRuleSignature": { + "description": "A signature corresponding to a YARA rule.", + "id": "YaraRuleSignature", + "properties": { + "yaraRule": { + "description": "The name of the YARA rule.", + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/securitycenter/v1beta2/securitycenter-gen.go b/securitycenter/v1beta2/securitycenter-gen.go index 5d2290c87b9..08a1e5f18f1 100644 --- a/securitycenter/v1beta2/securitycenter-gen.go +++ b/securitycenter/v1beta2/securitycenter-gen.go @@ -922,6 +922,54 @@ func (s *Details) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Detection: Memory hash detection contributing to the binary family +// match. +type Detection struct { + // Binary: The name of the binary associated with the memory hash + // signature detection. + Binary string `json:"binary,omitempty"` + + // PercentPagesMatched: The percentage of memory page hashes in the + // signature that were matched. + PercentPagesMatched float64 `json:"percentPagesMatched,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Binary") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Binary") 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 *Detection) MarshalJSON() ([]byte, error) { + type NoMethod Detection + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *Detection) UnmarshalJSON(data []byte) error { + type NoMethod Detection + var s1 struct { + PercentPagesMatched gensupport.JSONFloat64 `json:"percentPagesMatched"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.PercentPagesMatched = float64(s1.PercentPagesMatched) + return nil +} + // EnvironmentVariable: EnvironmentVariable is a name-value pair to // store environment variables for Process. type EnvironmentVariable struct { @@ -2198,6 +2246,10 @@ type Indicator struct { // IpAddresses: List of ip addresses associated to the Finding. IpAddresses []string `json:"ipAddresses,omitempty"` + // Signatures: The list of matched signatures indicating that the given + // process is present in the environment. + Signatures []*ProcessSignature `json:"signatures,omitempty"` + // ForceSendFields is a list of field names (e.g. "Domains") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -2221,6 +2273,38 @@ func (s *Indicator) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MemoryHashSignature: A signature corresponding to memory page hashes. +type MemoryHashSignature struct { + // BinaryFamily: The binary family. + BinaryFamily string `json:"binaryFamily,omitempty"` + + // Detections: The list of memory hash detections contributing to the + // binary family match. + Detections []*Detection `json:"detections,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BinaryFamily") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "BinaryFamily") 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 *MemoryHashSignature) MarshalJSON() ([]byte, error) { + type NoMethod MemoryHashSignature + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MitreAttack: MITRE ATT&CK tactics and techniques related to this // finding. See: https://attack.mitre.org type MitreAttack struct { @@ -2445,6 +2529,10 @@ type Process struct { // Libraries: File information for libraries loaded by the process. Libraries []*File `json:"libraries,omitempty"` + // Name: The process name visible in utilities like top and ps; it can + // be accessed via /proc/[pid]/comm and changed with prctl(PR_SET_NAME). + Name string `json:"name,omitempty"` + // ParentPid: The parent process id. ParentPid int64 `json:"parentPid,omitempty,string"` @@ -2480,6 +2568,39 @@ func (s *Process) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ProcessSignature: Indicates what signature matched this process. +type ProcessSignature struct { + // MemoryHashSignature: Signature indicating that a binary family was + // matched. + MemoryHashSignature *MemoryHashSignature `json:"memoryHashSignature,omitempty"` + + // YaraRuleSignature: Signature indicating that a YARA rule was matched. + YaraRuleSignature *YaraRuleSignature `json:"yaraRuleSignature,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MemoryHashSignature") + // to unconditionally include in API requests. By default, fields with + // empty or default 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. "MemoryHashSignature") 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 *ProcessSignature) MarshalJSON() ([]byte, error) { + type NoMethod ProcessSignature + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Reference: Additional Links type Reference struct { // Source: Source of the reference e.g. NVD @@ -2877,6 +2998,34 @@ func (s *WebSecurityScannerSettings) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// YaraRuleSignature: A signature corresponding to a YARA rule. +type YaraRuleSignature struct { + // YaraRule: The name of the YARA rule. + YaraRule string `json:"yaraRule,omitempty"` + + // ForceSendFields is a list of field names (e.g. "YaraRule") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "YaraRule") 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 *YaraRuleSignature) MarshalJSON() ([]byte, error) { + type NoMethod YaraRuleSignature + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // method id "securitycenter.folders.getContainerThreatDetectionSettings": type FoldersGetContainerThreatDetectionSettingsCall struct {