From 007774894a48d24634ace7b9e09def4d61433f7f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 4 Jun 2024 00:24:18 -0700 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#2622) --- .../v1/androidmanagement-api.json | 54 +- androidmanagement/v1/androidmanagement-gen.go | 58 + artifactregistry/v1/artifactregistry-api.json | 4 +- artifactregistry/v1/artifactregistry-gen.go | 8 +- .../v1beta1/artifactregistry-api.json | 4 +- .../v1beta1/artifactregistry-gen.go | 8 +- .../v1beta2/artifactregistry-api.json | 4 +- .../v1beta2/artifactregistry-gen.go | 8 +- chromemanagement/v1/chromemanagement-api.json | 97 +- chromemanagement/v1/chromemanagement-gen.go | 96 +- cloudsearch/v1/cloudsearch-api.json | 42 +- cloudsearch/v1/cloudsearch-gen.go | 128 + documentai/v1/documentai-api.json | 1031 +++++- documentai/v1/documentai-gen.go | 1213 ++++++- documentai/v1beta2/documentai-api.json | 580 +++- documentai/v1beta2/documentai-gen.go | 768 ++++- documentai/v1beta3/documentai-api.json | 602 +++- documentai/v1beta3/documentai-gen.go | 2927 +++++++++++------ fcmdata/v1beta1/fcmdata-api.json | 12 +- fcmdata/v1beta1/fcmdata-gen.go | 17 +- policyanalyzer/v1/policyanalyzer-api.json | 117 +- policyanalyzer/v1/policyanalyzer-gen.go | 430 +++ .../v1beta1/policyanalyzer-api.json | 117 +- policyanalyzer/v1beta1/policyanalyzer-gen.go | 420 +++ redis/v1/redis-api.json | 55 +- redis/v1/redis-gen.go | 58 +- redis/v1beta1/redis-api.json | 55 +- redis/v1beta1/redis-gen.go | 58 +- resourcesettings/v1/resourcesettings-api.json | 14 +- .../v1/serviceconsumermanagement-api.json | 4 +- .../v1/serviceconsumermanagement-gen.go | 124 +- .../serviceconsumermanagement-api.json | 4 +- .../v1beta1/serviceconsumermanagement-gen.go | 124 +- serviceusage/v1/serviceusage-api.json | 4 +- serviceusage/v1/serviceusage-gen.go | 124 +- serviceusage/v1beta1/serviceusage-api.json | 4 +- serviceusage/v1beta1/serviceusage-gen.go | 124 +- sqladmin/v1/sqladmin-api.json | 12 +- sqladmin/v1/sqladmin-gen.go | 7 + sqladmin/v1beta4/sqladmin-api.json | 12 +- sqladmin/v1beta4/sqladmin-gen.go | 7 + 41 files changed, 8049 insertions(+), 1486 deletions(-) diff --git a/androidmanagement/v1/androidmanagement-api.json b/androidmanagement/v1/androidmanagement-api.json index 2c11457c0a6..299e3cec519 100644 --- a/androidmanagement/v1/androidmanagement-api.json +++ b/androidmanagement/v1/androidmanagement-api.json @@ -1168,7 +1168,7 @@ } } }, - "revision": "20240516", + "revision": "20240531", "rootUrl": "https://androidmanagement.googleapis.com/", "schemas": { "AdbShellCommandEvent": { @@ -1811,6 +1811,20 @@ }, "type": "array" }, + "userControlSettings": { + "description": "Optional. Specifies whether user control is permitted for the app. User control includes user actions like force-stopping and clearing app data. Supported on Android 11 and above.", + "enum": [ + "USER_CONTROL_SETTINGS_UNSPECIFIED", + "USER_CONTROL_ALLOWED", + "USER_CONTROL_DISALLOWED" + ], + "enumDescriptions": [ + "Uses the default behaviour of the app to determine if user control is allowed or disallowed. For most apps, user control is allowed by default, but for some critical apps such as companion apps (extensionConfig set to true), kiosk apps and other critical system apps, user control is disallowed.", + "User control is allowed for the app. Kiosk apps can use this to allow user control.", + "User control is disallowed for the app. API_LEVEL is reported if the Android version is less than 11." + ], + "type": "string" + }, "workProfileWidgets": { "description": "Specifies whether the app installed in the work profile is allowed to add widgets to the home screen.", "enum": [ @@ -3012,12 +3026,14 @@ "enum": [ "ALLOW_PERSONAL_USAGE_UNSPECIFIED", "PERSONAL_USAGE_ALLOWED", - "PERSONAL_USAGE_DISALLOWED" + "PERSONAL_USAGE_DISALLOWED", + "PERSONAL_USAGE_DISALLOWED_USERLESS" ], "enumDescriptions": [ "Personal usage restriction is not specified", "Personal usage is allowed", - "Personal usage is disallowed" + "Personal usage is disallowed", + "Device is not associated with a single user, and thus both personal usage and corporate identity authentication are not expected." ], "type": "string" }, @@ -3107,6 +3123,10 @@ "description": "The name of the enterprise displayed to users. This field has a maximum length of 100 characters.", "type": "string" }, + "googleAuthenticationSettings": { + "$ref": "GoogleAuthenticationSettings", + "description": "Settings for Google-provided user authentication." + }, "logo": { "$ref": "ExternalData", "description": "An image displayed as a logo during device provisioning. Supported types are: image/bmp, image/gif, image/x-ico, image/jpeg, image/png, image/webp, image/vnd.wap.wbmp, image/x-adobe-dng." @@ -3211,6 +3231,28 @@ }, "type": "object" }, + "GoogleAuthenticationSettings": { + "description": "Contains settings for Google-provided user authentication.", + "id": "GoogleAuthenticationSettings", + "properties": { + "googleAuthenticationRequired": { + "description": "Output only. Whether users need to be authenticated by Google during the enrollment process. IT admin can specify if Google authentication is enabled for the enterprise for knowledge worker devices. This value can be set only via the Google Admin Console. Google authentication can be used with signin_url In the case where Google authentication is required and a signin_url is specified, Google authentication will be launched before signin_url.", + "enum": [ + "GOOGLE_AUTHENTICATION_REQUIRED_UNSPECIFIED", + "NOT_REQUIRED", + "REQUIRED" + ], + "enumDescriptions": [ + "This value is not used.", + "Google authentication is not required.", + "User is required to be successfully authenticated by Google." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "HardwareInfo": { "description": "Information about device hardware. The fields related to temperature thresholds are only available if hardwareStatusEnabled is true in the device's policy.", "id": "HardwareInfo", @@ -5621,12 +5663,14 @@ "enum": [ "ALLOW_PERSONAL_USAGE_UNSPECIFIED", "PERSONAL_USAGE_ALLOWED", - "PERSONAL_USAGE_DISALLOWED" + "PERSONAL_USAGE_DISALLOWED", + "PERSONAL_USAGE_DISALLOWED_USERLESS" ], "enumDescriptions": [ "Personal usage restriction is not specified", "Personal usage is allowed", - "Personal usage is disallowed" + "Personal usage is disallowed", + "Device is not associated with a single user, and thus both personal usage and corporate identity authentication are not expected." ], "type": "string" }, diff --git a/androidmanagement/v1/androidmanagement-gen.go b/androidmanagement/v1/androidmanagement-gen.go index 04b17cc8f8c..14d1a3540e8 100644 --- a/androidmanagement/v1/androidmanagement-gen.go +++ b/androidmanagement/v1/androidmanagement-gen.go @@ -981,6 +981,21 @@ type ApplicationPolicy struct { // values override the default_permission_policy and permission_grants which // apply to all apps. PermissionGrants []*PermissionGrant `json:"permissionGrants,omitempty"` + // UserControlSettings: Optional. Specifies whether user control is permitted + // for the app. User control includes user actions like force-stopping and + // clearing app data. Supported on Android 11 and above. + // + // Possible values: + // "USER_CONTROL_SETTINGS_UNSPECIFIED" - Uses the default behaviour of the + // app to determine if user control is allowed or disallowed. For most apps, + // user control is allowed by default, but for some critical apps such as + // companion apps (extensionConfig set to true), kiosk apps and other critical + // system apps, user control is disallowed. + // "USER_CONTROL_ALLOWED" - User control is allowed for the app. Kiosk apps + // can use this to allow user control. + // "USER_CONTROL_DISALLOWED" - User control is disallowed for the app. + // API_LEVEL is reported if the Android version is less than 11. + UserControlSettings string `json:"userControlSettings,omitempty"` // WorkProfileWidgets: Specifies whether the app installed in the work profile // is allowed to add widgets to the home screen. // @@ -2404,6 +2419,9 @@ type EnrollmentToken struct { // specified // "PERSONAL_USAGE_ALLOWED" - Personal usage is allowed // "PERSONAL_USAGE_DISALLOWED" - Personal usage is disallowed + // "PERSONAL_USAGE_DISALLOWED_USERLESS" - Device is not associated with a + // single user, and thus both personal usage and corporate identity + // authentication are not expected. AllowPersonalUsage string `json:"allowPersonalUsage,omitempty"` // Duration: The length of time the enrollment token is valid, ranging from 1 // minute to Durations.MAX_VALUE @@ -2484,6 +2502,9 @@ type Enterprise struct { // EnterpriseDisplayName: The name of the enterprise displayed to users. This // field has a maximum length of 100 characters. EnterpriseDisplayName string `json:"enterpriseDisplayName,omitempty"` + // GoogleAuthenticationSettings: Settings for Google-provided user + // authentication. + GoogleAuthenticationSettings *GoogleAuthenticationSettings `json:"googleAuthenticationSettings,omitempty"` // Logo: An image displayed as a logo during device provisioning. Supported // types are: image/bmp, image/gif, image/x-ico, image/jpeg, image/png, // image/webp, image/vnd.wap.wbmp, image/x-adobe-dng. @@ -2684,6 +2705,40 @@ func (s *FreezePeriod) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleAuthenticationSettings: Contains settings for Google-provided user +// authentication. +type GoogleAuthenticationSettings struct { + // GoogleAuthenticationRequired: Output only. Whether users need to be + // authenticated by Google during the enrollment process. IT admin can specify + // if Google authentication is enabled for the enterprise for knowledge worker + // devices. This value can be set only via the Google Admin Console. Google + // authentication can be used with signin_url In the case where Google + // authentication is required and a signin_url is specified, Google + // authentication will be launched before signin_url. + // + // Possible values: + // "GOOGLE_AUTHENTICATION_REQUIRED_UNSPECIFIED" - This value is not used. + // "NOT_REQUIRED" - Google authentication is not required. + // "REQUIRED" - User is required to be successfully authenticated by Google. + GoogleAuthenticationRequired string `json:"googleAuthenticationRequired,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "GoogleAuthenticationRequired") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields + // for more details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GoogleAuthenticationRequired") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleAuthenticationSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAuthenticationSettings + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // HardwareInfo: Information about device hardware. The fields related to // temperature thresholds are only available if hardwareStatusEnabled is true // in the device's policy. @@ -5473,6 +5528,9 @@ type SigninDetail struct { // specified // "PERSONAL_USAGE_ALLOWED" - Personal usage is allowed // "PERSONAL_USAGE_DISALLOWED" - Personal usage is disallowed + // "PERSONAL_USAGE_DISALLOWED_USERLESS" - Device is not associated with a + // single user, and thus both personal usage and corporate identity + // authentication are not expected. AllowPersonalUsage string `json:"allowPersonalUsage,omitempty"` // QrCode: A JSON string whose UTF-8 representation can be used to generate a // QR code to enroll a device with this enrollment token. To enroll a device diff --git a/artifactregistry/v1/artifactregistry-api.json b/artifactregistry/v1/artifactregistry-api.json index 51362f85a4f..5c0f1651a71 100644 --- a/artifactregistry/v1/artifactregistry-api.json +++ b/artifactregistry/v1/artifactregistry-api.json @@ -1637,7 +1637,7 @@ ], "parameters": { "filter": { - "description": "An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: * `version` An example of using a filter: * `version=\"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0\"` --\u003e Tags that are applied to the version `1.0` in package `pkg1`.", + "description": "An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: * `version` An example of using a filter: * `version=\"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0\"` --\u003e Tags that are applied to the version `1.0` in package `pkg1`. * `name=\"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/a%2Fb%2F*\"` --\u003e tags with an ID starting with \"a/b/\". * `name=\"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/*%2Fb%2Fc\"` --\u003e tags with an ID ending with \"/b/c\". * `name=\"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/*%2Fb%2F*\"` --\u003e tags with an ID containing \"/b/\".", "location": "query", "type": "string" }, @@ -2013,7 +2013,7 @@ } } }, - "revision": "20240520", + "revision": "20240528", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "AptArtifact": { diff --git a/artifactregistry/v1/artifactregistry-gen.go b/artifactregistry/v1/artifactregistry-gen.go index 685a5ebe033..729dc7774d8 100644 --- a/artifactregistry/v1/artifactregistry-gen.go +++ b/artifactregistry/v1/artifactregistry-gen.go @@ -8045,7 +8045,13 @@ func (r *ProjectsLocationsRepositoriesPackagesTagsService) List(parent string) * // eligible for filtering are: * `version` An example of using a filter: * // `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/ // versions/1.0" --> Tags that are applied to the version `1.0` in package -// `pkg1`. +// `pkg1`. * +// `name="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tag +// s/a%2Fb%2F*" --> tags with an ID starting with "a/b/". * +// `name="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tag +// s/*%2Fb%2Fc" --> tags with an ID ending with "/b/c". * +// `name="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tag +// s/*%2Fb%2F*" --> tags with an ID containing "/b/". func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) Filter(filter string) *ProjectsLocationsRepositoriesPackagesTagsListCall { c.urlParams_.Set("filter", filter) return c diff --git a/artifactregistry/v1beta1/artifactregistry-api.json b/artifactregistry/v1beta1/artifactregistry-api.json index 2d7938e9164..fcfd64e8ad1 100644 --- a/artifactregistry/v1beta1/artifactregistry-api.json +++ b/artifactregistry/v1beta1/artifactregistry-api.json @@ -937,7 +937,7 @@ ], "parameters": { "filter": { - "description": "An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: * `version` An example of using a filter: * `version=\"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0\"` --\u003e Tags that are applied to the version `1.0` in package `pkg1`.", + "description": "An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: * `version` An example of using a filter: * `version=\"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0\"` --\u003e Tags that are applied to the version `1.0` in package `pkg1`. * `name=\"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/a%2Fb%2F*\"` --\u003e tags with an ID starting with \"a/b/\". * `name=\"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/*%2Fb%2Fc\"` --\u003e tags with an ID ending with \"/b/c\". * `name=\"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/*%2Fb%2F*\"` --\u003e tags with an ID containing \"/b/\".", "location": "query", "type": "string" }, @@ -1146,7 +1146,7 @@ } } }, - "revision": "20240513", + "revision": "20240528", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "Binding": { diff --git a/artifactregistry/v1beta1/artifactregistry-gen.go b/artifactregistry/v1beta1/artifactregistry-gen.go index 6c42759bf46..0a2c9912e5e 100644 --- a/artifactregistry/v1beta1/artifactregistry-gen.go +++ b/artifactregistry/v1beta1/artifactregistry-gen.go @@ -3324,7 +3324,13 @@ func (r *ProjectsLocationsRepositoriesPackagesTagsService) List(parent string) * // eligible for filtering are: * `version` An example of using a filter: * // `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/ // versions/1.0" --> Tags that are applied to the version `1.0` in package -// `pkg1`. +// `pkg1`. * +// `name="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tag +// s/a%2Fb%2F*" --> tags with an ID starting with "a/b/". * +// `name="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tag +// s/*%2Fb%2Fc" --> tags with an ID ending with "/b/c". * +// `name="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tag +// s/*%2Fb%2F*" --> tags with an ID containing "/b/". func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) Filter(filter string) *ProjectsLocationsRepositoriesPackagesTagsListCall { c.urlParams_.Set("filter", filter) return c diff --git a/artifactregistry/v1beta2/artifactregistry-api.json b/artifactregistry/v1beta2/artifactregistry-api.json index e941986cb7f..4ebfd959208 100644 --- a/artifactregistry/v1beta2/artifactregistry-api.json +++ b/artifactregistry/v1beta2/artifactregistry-api.json @@ -1133,7 +1133,7 @@ ], "parameters": { "filter": { - "description": "An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: * `version` An example of using a filter: * `version=\"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0\"` --\u003e Tags that are applied to the version `1.0` in package `pkg1`.", + "description": "An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: * `version` An example of using a filter: * `version=\"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0\"` --\u003e Tags that are applied to the version `1.0` in package `pkg1`. * `name=\"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/a%2Fb%2F*\"` --\u003e tags with an ID starting with \"a/b/\". * `name=\"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/*%2Fb%2Fc\"` --\u003e tags with an ID ending with \"/b/c\". * `name=\"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/*%2Fb%2F*\"` --\u003e tags with an ID containing \"/b/\".", "location": "query", "type": "string" }, @@ -1414,7 +1414,7 @@ } } }, - "revision": "20240513", + "revision": "20240528", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "AptArtifact": { diff --git a/artifactregistry/v1beta2/artifactregistry-gen.go b/artifactregistry/v1beta2/artifactregistry-gen.go index a5673d50e13..518e9dccf1c 100644 --- a/artifactregistry/v1beta2/artifactregistry-gen.go +++ b/artifactregistry/v1beta2/artifactregistry-gen.go @@ -4566,7 +4566,13 @@ func (r *ProjectsLocationsRepositoriesPackagesTagsService) List(parent string) * // eligible for filtering are: * `version` An example of using a filter: * // `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/ // versions/1.0" --> Tags that are applied to the version `1.0` in package -// `pkg1`. +// `pkg1`. * +// `name="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tag +// s/a%2Fb%2F*" --> tags with an ID starting with "a/b/". * +// `name="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tag +// s/*%2Fb%2Fc" --> tags with an ID ending with "/b/c". * +// `name="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tag +// s/*%2Fb%2F*" --> tags with an ID containing "/b/". func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) Filter(filter string) *ProjectsLocationsRepositoriesPackagesTagsListCall { c.urlParams_.Set("filter", filter) return c diff --git a/chromemanagement/v1/chromemanagement-api.json b/chromemanagement/v1/chromemanagement-api.json index 3fe1bb1afbc..6856b6cd2b6 100644 --- a/chromemanagement/v1/chromemanagement-api.json +++ b/chromemanagement/v1/chromemanagement-api.json @@ -1172,7 +1172,7 @@ } } }, - "revision": "20240516", + "revision": "20240602", "rootUrl": "https://chromemanagement.googleapis.com/", "schemas": { "GoogleChromeManagementV1AndroidAppInfo": { @@ -1320,6 +1320,85 @@ }, "type": "object" }, + "GoogleChromeManagementV1AppReport": { + "description": "App report.", + "id": "GoogleChromeManagementV1AppReport", + "properties": { + "reportTime": { + "description": "Timestamp when the report was collected.", + "format": "google-datetime", + "type": "string" + }, + "usageData": { + "description": "App usage data.", + "items": { + "$ref": "GoogleChromeManagementV1AppUsageData" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleChromeManagementV1AppUsageData": { + "description": "App usage data.", + "id": "GoogleChromeManagementV1AppUsageData", + "properties": { + "appId": { + "description": "App id.", + "type": "string" + }, + "appInstanceId": { + "description": "Application instance id. This will be unique per window/instance.", + "type": "string" + }, + "appType": { + "description": "Type of app.", + "enum": [ + "TELEMETRY_APPLICATION_TYPE_UNSPECIFIED", + "APPLICATION_TYPE_ARC", + "APPLICATION_TYPE_BUILT_IN", + "APPLICATION_TYPE_CROSTINI", + "APPLICATION_TYPE_CHROME_APP", + "APPLICATION_TYPE_WEB", + "APPLICATION_TYPE_MAC_OS", + "APPLICATION_TYPE_PLUGIN_VM", + "APPLICATION_TYPE_STANDALONE_BROWSER", + "APPLICATION_TYPE_REMOTE", + "APPLICATION_TYPE_BOREALIS", + "APPLICATION_TYPE_SYSTEM_WEB", + "APPLICATION_TYPE_STANDALONE_BROWSER_CHROME_APP", + "APPLICATION_TYPE_EXTENSION", + "APPLICATION_TYPE_STANDALONE_BROWSER_EXTENSION", + "APPLICATION_TYPE_BRUSCHETTA" + ], + "enumDescriptions": [ + "Application type unknown.", + "Application type arc (Android app).", + "Application type built-in.", + "Application type Linux (via Crostini).", + "Application type Chrome app.", + "Application type web.", + "Application type Mac OS.", + "Application type Plugin VM.", + "Application type standalone browser (Lacros browser app).", + "Application type remote.", + "Application type borealis.", + "Application type system web.", + "Application type standalone browser chrome app (hosted in Lacros).", + "Application type extension.", + "Application type standalone browser extension.", + "Application type bruschetta." + ], + "type": "string" + }, + "runningDuration": { + "description": "App foreground running time.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, "GoogleChromeManagementV1AudioStatusReport": { "description": "Status data for storage. * This field is telemetry information and this will change over time as the device is utilized. * Data for this field is controlled via policy: [ReportDeviceAudioStatus](https://chromeenterprise.google/policies/#ReportDeviceAudioStatus) * Data Collection Frequency: 10 minutes * Default Data Reporting Frequency: 3 hours - Policy Controlled: Yes * Cache: If the device is offline, the collected data is stored locally, and will be reported when the device is next online: No * Reported for affiliated users only: N/A * Granular permission needed: TELEMETRY_API_AUDIO_REPORT", "id": "GoogleChromeManagementV1AudioStatusReport", @@ -3771,6 +3850,14 @@ "description": "Telemetry data collected from a managed device. * Granular permission needed: TELEMETRY_API_DEVICE", "id": "GoogleChromeManagementV1TelemetryDevice", "properties": { + "appReport": { + "description": "Output only. App reports collected periodically sorted in a decreasing order of report_time.", + "items": { + "$ref": "GoogleChromeManagementV1AppReport" + }, + "readOnly": true, + "type": "array" + }, "audioStatusReport": { "description": "Output only. Audio reports collected periodically sorted in a decreasing order of report_time.", "items": { @@ -4302,6 +4389,14 @@ "description": "Telemetry data collected for a managed user and device. * Granular permission needed: TELEMETRY_API_DEVICE", "id": "GoogleChromeManagementV1TelemetryUserDevice", "properties": { + "appReport": { + "description": "Output only. App reports collected periodically sorted in a decreasing order of report_time.", + "items": { + "$ref": "GoogleChromeManagementV1AppReport" + }, + "readOnly": true, + "type": "array" + }, "audioStatusReport": { "description": "Output only. Audio reports collected periodically sorted in a decreasing order of report_time.", "items": { diff --git a/chromemanagement/v1/chromemanagement-gen.go b/chromemanagement/v1/chromemanagement-gen.go index bb77a587dd5..73e7017e107 100644 --- a/chromemanagement/v1/chromemanagement-gen.go +++ b/chromemanagement/v1/chromemanagement-gen.go @@ -435,6 +435,80 @@ func (s *GoogleChromeManagementV1AppDetails) UnmarshalJSON(data []byte) error { return nil } +// GoogleChromeManagementV1AppReport: App report. +type GoogleChromeManagementV1AppReport struct { + // ReportTime: Timestamp when the report was collected. + ReportTime string `json:"reportTime,omitempty"` + // UsageData: App usage data. + UsageData []*GoogleChromeManagementV1AppUsageData `json:"usageData,omitempty"` + // ForceSendFields is a list of field names (e.g. "ReportTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ReportTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleChromeManagementV1AppReport) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChromeManagementV1AppReport + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleChromeManagementV1AppUsageData: App usage data. +type GoogleChromeManagementV1AppUsageData struct { + // AppId: App id. + AppId string `json:"appId,omitempty"` + // AppInstanceId: Application instance id. This will be unique per + // window/instance. + AppInstanceId string `json:"appInstanceId,omitempty"` + // AppType: Type of app. + // + // Possible values: + // "TELEMETRY_APPLICATION_TYPE_UNSPECIFIED" - Application type unknown. + // "APPLICATION_TYPE_ARC" - Application type arc (Android app). + // "APPLICATION_TYPE_BUILT_IN" - Application type built-in. + // "APPLICATION_TYPE_CROSTINI" - Application type Linux (via Crostini). + // "APPLICATION_TYPE_CHROME_APP" - Application type Chrome app. + // "APPLICATION_TYPE_WEB" - Application type web. + // "APPLICATION_TYPE_MAC_OS" - Application type Mac OS. + // "APPLICATION_TYPE_PLUGIN_VM" - Application type Plugin VM. + // "APPLICATION_TYPE_STANDALONE_BROWSER" - Application type standalone + // browser (Lacros browser app). + // "APPLICATION_TYPE_REMOTE" - Application type remote. + // "APPLICATION_TYPE_BOREALIS" - Application type borealis. + // "APPLICATION_TYPE_SYSTEM_WEB" - Application type system web. + // "APPLICATION_TYPE_STANDALONE_BROWSER_CHROME_APP" - Application type + // standalone browser chrome app (hosted in Lacros). + // "APPLICATION_TYPE_EXTENSION" - Application type extension. + // "APPLICATION_TYPE_STANDALONE_BROWSER_EXTENSION" - Application type + // standalone browser extension. + // "APPLICATION_TYPE_BRUSCHETTA" - Application type bruschetta. + AppType string `json:"appType,omitempty"` + // RunningDuration: App foreground running time. + RunningDuration string `json:"runningDuration,omitempty"` + // ForceSendFields is a list of field names (e.g. "AppId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AppId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleChromeManagementV1AppUsageData) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChromeManagementV1AppUsageData + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleChromeManagementV1AudioStatusReport: Status data for storage. * This // field is telemetry information and this will change over time as the device // is utilized. * Data for this field is controlled via policy: @@ -3020,6 +3094,9 @@ type GoogleChromeManagementV1TelemetryAudioSevereUnderrunEvent struct { // GoogleChromeManagementV1TelemetryDevice: Telemetry data collected from a // managed device. * Granular permission needed: TELEMETRY_API_DEVICE type GoogleChromeManagementV1TelemetryDevice struct { + // AppReport: Output only. App reports collected periodically sorted in a + // decreasing order of report_time. + AppReport []*GoogleChromeManagementV1AppReport `json:"appReport,omitempty"` // AudioStatusReport: Output only. Audio reports collected periodically sorted // in a decreasing order of report_time. AudioStatusReport []*GoogleChromeManagementV1AudioStatusReport `json:"audioStatusReport,omitempty"` @@ -3093,15 +3170,15 @@ type GoogleChromeManagementV1TelemetryDevice struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AudioStatusReport") to + // ForceSendFields is a list of field names (e.g. "AppReport") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AudioStatusReport") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "AppReport") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -3494,6 +3571,9 @@ func (s *GoogleChromeManagementV1TelemetryUser) MarshalJSON() ([]byte, error) { // GoogleChromeManagementV1TelemetryUserDevice: Telemetry data collected for a // managed user and device. * Granular permission needed: TELEMETRY_API_DEVICE type GoogleChromeManagementV1TelemetryUserDevice struct { + // AppReport: Output only. App reports collected periodically sorted in a + // decreasing order of report_time. + AppReport []*GoogleChromeManagementV1AppReport `json:"appReport,omitempty"` // AudioStatusReport: Output only. Audio reports collected periodically sorted // in a decreasing order of report_time. AudioStatusReport []*GoogleChromeManagementV1AudioStatusReport `json:"audioStatusReport,omitempty"` @@ -3509,15 +3589,15 @@ type GoogleChromeManagementV1TelemetryUserDevice struct { // PeripheralsReport: Output only. Peripherals reports collected periodically // sorted in a decreasing order of report_time. PeripheralsReport []*GoogleChromeManagementV1PeripheralsReport `json:"peripheralsReport,omitempty"` - // ForceSendFields is a list of field names (e.g. "AudioStatusReport") to + // ForceSendFields is a list of field names (e.g. "AppReport") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AudioStatusReport") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "AppReport") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } diff --git a/cloudsearch/v1/cloudsearch-api.json b/cloudsearch/v1/cloudsearch-api.json index 3d0e2eb5497..48291b2e25f 100644 --- a/cloudsearch/v1/cloudsearch-api.json +++ b/cloudsearch/v1/cloudsearch-api.json @@ -937,6 +937,25 @@ }, "query": { "methods": { + "debugSearch": { + "description": "Returns Debug information for Cloud Search Query API provides the search method. **Note:** This API requires a standard end user account to execute. A service account can't perform Query API requests directly; to use a service account to perform queries, set up [Google Workspace domain-wide delegation of authority](https://developers.google.com/cloud-search/docs/guides/delegation/).", + "flatPath": "v1/query:debugSearch", + "httpMethod": "POST", + "id": "cloudsearch.query.debugSearch", + "parameterOrder": [], + "parameters": {}, + "path": "v1/query:debugSearch", + "request": { + "$ref": "SearchRequest" + }, + "response": { + "$ref": "DebugResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud_search", + "https://www.googleapis.com/auth/cloud_search.query" + ] + }, "removeActivity": { "description": "Provides functionality to remove logged activity for a user. Currently to be used only for Chat 1p clients **Note:** This API requires a standard end user account to execute. A service account can't perform Remove Activity requests directly; to use a service account to perform queries, set up [Google Workspace domain-wide delegation of authority](https://developers.google.com/cloud-search/docs/guides/delegation/).", "flatPath": "v1/query:removeActivity", @@ -2096,7 +2115,7 @@ } } }, - "revision": "20240501", + "revision": "20240529", "rootUrl": "https://cloudsearch.googleapis.com/", "schemas": { "Action": { @@ -2653,6 +2672,27 @@ }, "type": "object" }, + "DebugResponse": { + "description": "Debug Search Response.", + "id": "DebugResponse", + "properties": { + "gsrRequest": { + "description": "Serialized string of GenericSearchRequest.", + "format": "byte", + "type": "string" + }, + "gsrResponse": { + "description": "Serialized string of GenericSearchResponse.", + "format": "byte", + "type": "string" + }, + "searchResponse": { + "$ref": "SearchResponse", + "description": "Search response." + } + }, + "type": "object" + }, "DeleteQueueItemsRequest": { "id": "DeleteQueueItemsRequest", "properties": { diff --git a/cloudsearch/v1/cloudsearch-gen.go b/cloudsearch/v1/cloudsearch-gen.go index ddff811f98d..7f4cd481555 100644 --- a/cloudsearch/v1/cloudsearch-gen.go +++ b/cloudsearch/v1/cloudsearch-gen.go @@ -1278,6 +1278,35 @@ func (s *DebugOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// DebugResponse: Debug Search Response. +type DebugResponse struct { + // GsrRequest: Serialized string of GenericSearchRequest. + GsrRequest string `json:"gsrRequest,omitempty"` + // GsrResponse: Serialized string of GenericSearchResponse. + GsrResponse string `json:"gsrResponse,omitempty"` + // SearchResponse: Search response. + SearchResponse *SearchResponse `json:"searchResponse,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "GsrRequest") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GsrRequest") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *DebugResponse) MarshalJSON() ([]byte, error) { + type NoMethod DebugResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + type DeleteQueueItemsRequest struct { // ConnectorName: The name of connector making this call. Format: // datasources/{source_id}/connectors/{ID} @@ -10546,6 +10575,105 @@ func (c *OperationsLroListCall) Pages(ctx context.Context, f func(*ListOperation } } +type QueryDebugSearchCall struct { + s *Service + searchrequest *SearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// DebugSearch: Returns Debug information for Cloud Search Query API provides +// the search method. **Note:** This API requires a standard end user account +// to execute. A service account can't perform Query API requests directly; to +// use a service account to perform queries, set up Google Workspace +// domain-wide delegation of authority +// (https://developers.google.com/cloud-search/docs/guides/delegation/). +func (r *QueryService) DebugSearch(searchrequest *SearchRequest) *QueryDebugSearchCall { + c := &QueryDebugSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.searchrequest = searchrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *QueryDebugSearchCall) Fields(s ...googleapi.Field) *QueryDebugSearchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *QueryDebugSearchCall) Context(ctx context.Context) *QueryDebugSearchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *QueryDebugSearchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *QueryDebugSearchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/query:debugSearch") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudsearch.query.debugSearch" call. +// Any non-2xx status code is an error. Response headers are in either +// *DebugResponse.ServerResponse.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 *QueryDebugSearchCall) Do(opts ...googleapi.CallOption) (*DebugResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &DebugResponse{ + 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 +} + type QueryRemoveActivityCall struct { s *Service removeactivityrequest *RemoveActivityRequest diff --git a/documentai/v1/documentai-api.json b/documentai/v1/documentai-api.json index 9d20b28ef30..d1b76b78143 100644 --- a/documentai/v1/documentai-api.json +++ b/documentai/v1/documentai-api.json @@ -1042,7 +1042,7 @@ } } }, - "revision": "20240417", + "revision": "20240531", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata": { @@ -2217,11 +2217,19 @@ "description": "Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality.", "id": "GoogleCloudDocumentaiV1Document", "properties": { + "chunkedDocument": { + "$ref": "GoogleCloudDocumentaiV1DocumentChunkedDocument", + "description": "Document chunked based on chunking config." + }, "content": { "description": "Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.", "format": "byte", "type": "string" }, + "documentLayout": { + "$ref": "GoogleCloudDocumentaiV1DocumentDocumentLayout", + "description": "Parsed layout of the document." + }, "entities": { "description": "A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.", "items": { @@ -2288,6 +2296,282 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1DocumentChunkedDocument": { + "description": "Represents the chunks that the document is divided into.", + "id": "GoogleCloudDocumentaiV1DocumentChunkedDocument", + "properties": { + "chunks": { + "description": "List of chunks.", + "items": { + "$ref": "GoogleCloudDocumentaiV1DocumentChunkedDocumentChunk" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1DocumentChunkedDocumentChunk": { + "description": "Represents a chunk.", + "id": "GoogleCloudDocumentaiV1DocumentChunkedDocumentChunk", + "properties": { + "chunkId": { + "description": "ID of the chunk.", + "type": "string" + }, + "content": { + "description": "Text content of the chunk.", + "type": "string" + }, + "pageFooters": { + "description": "Page footers associated with the chunk.", + "items": { + "$ref": "GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageFooter" + }, + "type": "array" + }, + "pageHeaders": { + "description": "Page headers associated with the chunk.", + "items": { + "$ref": "GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageHeader" + }, + "type": "array" + }, + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageSpan", + "description": "Page span of the chunk." + }, + "sourceBlockIds": { + "description": "Unused.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageFooter": { + "description": "Represents the page footer associated with the chunk.", + "id": "GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageFooter", + "properties": { + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageSpan", + "description": "Page span of the footer." + }, + "text": { + "description": "Footer in text format.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageHeader": { + "description": "Represents the page header associated with the chunk.", + "id": "GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageHeader", + "properties": { + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageSpan", + "description": "Page span of the header." + }, + "text": { + "description": "Header in text format.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageSpan": { + "description": "Represents where the chunk starts and ends in the document.", + "id": "GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageSpan", + "properties": { + "pageEnd": { + "description": "Page where chunk ends in the document.", + "format": "int32", + "type": "integer" + }, + "pageStart": { + "description": "Page where chunk starts in the document.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1DocumentDocumentLayout": { + "description": "Represents the parsed layout of a document as a collection of blocks that the document is divided into.", + "id": "GoogleCloudDocumentaiV1DocumentDocumentLayout", + "properties": { + "blocks": { + "description": "List of blocks in the document.", + "items": { + "$ref": "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock": { + "description": "Represents a block. A block could be one of the various types (text, table, list) supported.", + "id": "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock", + "properties": { + "blockId": { + "description": "ID of the block.", + "type": "string" + }, + "listBlock": { + "$ref": "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock", + "description": "Block consisting of list content/structure." + }, + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan", + "description": "Page span of the block." + }, + "tableBlock": { + "$ref": "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock", + "description": "Block consisting of table content/structure." + }, + "textBlock": { + "$ref": "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock", + "description": "Block consisting of text content." + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock": { + "description": "Represents a list type block.", + "id": "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock", + "properties": { + "listEntries": { + "description": "List entries that constitute a list block.", + "items": { + "$ref": "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry" + }, + "type": "array" + }, + "type": { + "description": "Type of the list_entries (if exist). Available options are `ordered` and `unordered`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry": { + "description": "Represents an entry in the list.", + "id": "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry", + "properties": { + "blocks": { + "description": "A list entry is a list of blocks. Repeated blocks support further hierarchies and nested blocks.", + "items": { + "$ref": "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan": { + "description": "Represents where the block starts and ends in the document.", + "id": "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan", + "properties": { + "pageEnd": { + "description": "Page where block ends in the document.", + "format": "int32", + "type": "integer" + }, + "pageStart": { + "description": "Page where block starts in the document.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock": { + "description": "Represents a table type block.", + "id": "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock", + "properties": { + "bodyRows": { + "description": "Body rows containing main table content.", + "items": { + "$ref": "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow" + }, + "type": "array" + }, + "caption": { + "description": "Table caption/title.", + "type": "string" + }, + "headerRows": { + "description": "Header rows at the top of the table.", + "items": { + "$ref": "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell": { + "description": "Represents a cell in a table row.", + "id": "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell", + "properties": { + "blocks": { + "description": "A table cell is a list of blocks. Repeated blocks support further hierarchies and nested blocks.", + "items": { + "$ref": "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock" + }, + "type": "array" + }, + "colSpan": { + "description": "How many columns this cell spans.", + "format": "int32", + "type": "integer" + }, + "rowSpan": { + "description": "How many rows this cell spans.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow": { + "description": "Represents a row in a table.", + "id": "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow", + "properties": { + "cells": { + "description": "A table row is a list of table cells.", + "items": { + "$ref": "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock": { + "description": "Represents a text type block.", + "id": "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock", + "properties": { + "blocks": { + "description": "A text block could further have child blocks. Repeated blocks support further hierarchies and nested blocks.", + "items": { + "$ref": "GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock" + }, + "type": "array" + }, + "text": { + "description": "Text content stored in the block.", + "type": "string" + }, + "type": { + "description": "Type of the text in the block. Available options are: `paragraph`, `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, `header`, `footer`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1DocumentEntity": { "description": "An entity that could be a phrase in the text or a property that belongs to the document. It is a known entity type, such as a person, an organization, or location.", "id": "GoogleCloudDocumentaiV1DocumentEntity", @@ -4117,6 +4401,10 @@ "$ref": "GoogleCloudDocumentaiV1ProcessOptionsIndividualPageSelector", "description": "Which pages to process (1-indexed)." }, + "layoutConfig": { + "$ref": "GoogleCloudDocumentaiV1ProcessOptionsLayoutConfig", + "description": "Optional. Only applicable to `LAYOUT_PARSER_PROCESSOR`. Returns error if set on other processor types." + }, "ocrConfig": { "$ref": "GoogleCloudDocumentaiV1OcrConfig", "description": "Only applicable to `OCR_PROCESSOR` and `FORM_PARSER_PROCESSOR`. Returns error if set on other processor types." @@ -4143,6 +4431,33 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1ProcessOptionsLayoutConfig": { + "description": "Serving config for layout parser processor.", + "id": "GoogleCloudDocumentaiV1ProcessOptionsLayoutConfig", + "properties": { + "chunkingConfig": { + "$ref": "GoogleCloudDocumentaiV1ProcessOptionsLayoutConfigChunkingConfig", + "description": "Optional. Config for chunking in layout parser processor." + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1ProcessOptionsLayoutConfigChunkingConfig": { + "description": "Serving config for chunking.", + "id": "GoogleCloudDocumentaiV1ProcessOptionsLayoutConfigChunkingConfig", + "properties": { + "chunkSize": { + "description": "Optional. The chunk sizes to use when splitting documents, in order of level.", + "format": "int32", + "type": "integer" + }, + "includeAncestorHeadings": { + "description": "Optional. Whether or not to include ancestor headings when splitting.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1ProcessRequest": { "description": "Request message for the ProcessDocument method.", "id": "GoogleCloudDocumentaiV1ProcessRequest", @@ -4236,6 +4551,16 @@ "readOnly": true, "type": "array" }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "state": { "description": "Output only. The state of the processor.", "enum": [ @@ -4397,6 +4722,16 @@ "description": "Identifier. The resource name of the processor version. Format: `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`", "type": "string" }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "state": { "description": "Output only. The state of the processor version.", "enum": [ @@ -4806,90 +5141,374 @@ "normalizedVertices": { "description": "The bounding polygon normalized vertices.", "items": { - "$ref": "GoogleCloudDocumentaiV1beta1NormalizedVertex" + "$ref": "GoogleCloudDocumentaiV1beta1NormalizedVertex" + }, + "type": "array" + }, + "vertices": { + "description": "The bounding polygon vertices.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1Vertex" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1Document": { + "description": "Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality.", + "id": "GoogleCloudDocumentaiV1beta1Document", + "properties": { + "chunkedDocument": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocument", + "description": "Document chunked based on chunking config." + }, + "content": { + "description": "Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.", + "format": "byte", + "type": "string" + }, + "documentLayout": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayout", + "description": "Parsed layout of the document." + }, + "entities": { + "description": "A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentEntity" + }, + "type": "array" + }, + "entityRelations": { + "description": "Placeholder. Relationship among Document.entities.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentEntityRelation" + }, + "type": "array" + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "Any error that occurred while processing this document." + }, + "mimeType": { + "description": "An IANA published [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml).", + "type": "string" + }, + "pages": { + "description": "Visual page layout for the Document.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentPage" + }, + "type": "array" + }, + "revisions": { + "description": "Placeholder. Revision history of this document.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentRevision" + }, + "type": "array" + }, + "shardInfo": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentShardInfo", + "description": "Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified." + }, + "text": { + "description": "Optional. UTF-8 encoded text in reading order from the document.", + "type": "string" + }, + "textChanges": { + "description": "Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentTextChange" + }, + "type": "array" + }, + "textStyles": { + "deprecated": true, + "description": "Styles for the Document.text.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentStyle" + }, + "type": "array" + }, + "uri": { + "description": "Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. For more information, refer to [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris).", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentChunkedDocument": { + "description": "Represents the chunks that the document is divided into.", + "id": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocument", + "properties": { + "chunks": { + "description": "List of chunks.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk": { + "description": "Represents a chunk.", + "id": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk", + "properties": { + "chunkId": { + "description": "ID of the chunk.", + "type": "string" + }, + "content": { + "description": "Text content of the chunk.", + "type": "string" + }, + "pageFooters": { + "description": "Page footers associated with the chunk.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter" + }, + "type": "array" + }, + "pageHeaders": { + "description": "Page headers associated with the chunk.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader" + }, + "type": "array" + }, + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan", + "description": "Page span of the chunk." + }, + "sourceBlockIds": { + "description": "Unused.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter": { + "description": "Represents the page footer associated with the chunk.", + "id": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter", + "properties": { + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan", + "description": "Page span of the footer." + }, + "text": { + "description": "Footer in text format.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader": { + "description": "Represents the page header associated with the chunk.", + "id": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader", + "properties": { + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan", + "description": "Page span of the header." + }, + "text": { + "description": "Header in text format.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan": { + "description": "Represents where the chunk starts and ends in the document.", + "id": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan", + "properties": { + "pageEnd": { + "description": "Page where chunk ends in the document.", + "format": "int32", + "type": "integer" + }, + "pageStart": { + "description": "Page where chunk starts in the document.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentDocumentLayout": { + "description": "Represents the parsed layout of a document as a collection of blocks that the document is divided into.", + "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayout", + "properties": { + "blocks": { + "description": "List of blocks in the document.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock": { + "description": "Represents a block. A block could be one of the various types (text, table, list) supported.", + "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock", + "properties": { + "blockId": { + "description": "ID of the block.", + "type": "string" + }, + "listBlock": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock", + "description": "Block consisting of list content/structure." + }, + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan", + "description": "Page span of the block." + }, + "tableBlock": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock", + "description": "Block consisting of table content/structure." + }, + "textBlock": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock", + "description": "Block consisting of text content." + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock": { + "description": "Represents a list type block.", + "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock", + "properties": { + "listEntries": { + "description": "List entries that constitute a list block.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry" + }, + "type": "array" + }, + "type": { + "description": "Type of the list_entries (if exist). Available options are `ordered` and `unordered`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry": { + "description": "Represents an entry in the list.", + "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry", + "properties": { + "blocks": { + "description": "A list entry is a list of blocks. Repeated blocks support further hierarchies and nested blocks.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan": { + "description": "Represents where the block starts and ends in the document.", + "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan", + "properties": { + "pageEnd": { + "description": "Page where block ends in the document.", + "format": "int32", + "type": "integer" + }, + "pageStart": { + "description": "Page where block starts in the document.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock": { + "description": "Represents a table type block.", + "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock", + "properties": { + "bodyRows": { + "description": "Body rows containing main table content.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow" }, "type": "array" }, - "vertices": { - "description": "The bounding polygon vertices.", + "caption": { + "description": "Table caption/title.", + "type": "string" + }, + "headerRows": { + "description": "Header rows at the top of the table.", "items": { - "$ref": "GoogleCloudDocumentaiV1beta1Vertex" + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow" }, "type": "array" } }, "type": "object" }, - "GoogleCloudDocumentaiV1beta1Document": { - "description": "Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality.", - "id": "GoogleCloudDocumentaiV1beta1Document", + "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell": { + "description": "Represents a cell in a table row.", + "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell", "properties": { - "content": { - "description": "Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.", - "format": "byte", - "type": "string" - }, - "entities": { - "description": "A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentEntity" - }, - "type": "array" - }, - "entityRelations": { - "description": "Placeholder. Relationship among Document.entities.", + "blocks": { + "description": "A table cell is a list of blocks. Repeated blocks support further hierarchies and nested blocks.", "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentEntityRelation" + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock" }, "type": "array" }, - "error": { - "$ref": "GoogleRpcStatus", - "description": "Any error that occurred while processing this document." - }, - "mimeType": { - "description": "An IANA published [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml).", - "type": "string" + "colSpan": { + "description": "How many columns this cell spans.", + "format": "int32", + "type": "integer" }, - "pages": { - "description": "Visual page layout for the Document.", + "rowSpan": { + "description": "How many rows this cell spans.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow": { + "description": "Represents a row in a table.", + "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow", + "properties": { + "cells": { + "description": "A table row is a list of table cells.", "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPage" + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell" }, "type": "array" - }, - "revisions": { - "description": "Placeholder. Revision history of this document.", + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock": { + "description": "Represents a text type block.", + "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock", + "properties": { + "blocks": { + "description": "A text block could further have child blocks. Repeated blocks support further hierarchies and nested blocks.", "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentRevision" + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock" }, "type": "array" }, - "shardInfo": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentShardInfo", - "description": "Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified." - }, "text": { - "description": "Optional. UTF-8 encoded text in reading order from the document.", + "description": "Text content stored in the block.", "type": "string" }, - "textChanges": { - "description": "Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentTextChange" - }, - "type": "array" - }, - "textStyles": { - "deprecated": true, - "description": "Styles for the Document.text.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentStyle" - }, - "type": "array" - }, - "uri": { - "description": "Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. For more information, refer to [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris).", + "type": { + "description": "Type of the text in the block. Available options are: `paragraph`, `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, `header`, `footer`.", "type": "string" } }, @@ -6198,11 +6817,19 @@ "description": "Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality.", "id": "GoogleCloudDocumentaiV1beta2Document", "properties": { + "chunkedDocument": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocument", + "description": "Document chunked based on chunking config." + }, "content": { "description": "Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.", "format": "byte", "type": "string" }, + "documentLayout": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayout", + "description": "Parsed layout of the document." + }, "entities": { "description": "A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.", "items": { @@ -6276,6 +6903,282 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta2DocumentChunkedDocument": { + "description": "Represents the chunks that the document is divided into.", + "id": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocument", + "properties": { + "chunks": { + "description": "List of chunks.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk": { + "description": "Represents a chunk.", + "id": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk", + "properties": { + "chunkId": { + "description": "ID of the chunk.", + "type": "string" + }, + "content": { + "description": "Text content of the chunk.", + "type": "string" + }, + "pageFooters": { + "description": "Page footers associated with the chunk.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter" + }, + "type": "array" + }, + "pageHeaders": { + "description": "Page headers associated with the chunk.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader" + }, + "type": "array" + }, + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan", + "description": "Page span of the chunk." + }, + "sourceBlockIds": { + "description": "Unused.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter": { + "description": "Represents the page footer associated with the chunk.", + "id": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter", + "properties": { + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan", + "description": "Page span of the footer." + }, + "text": { + "description": "Footer in text format.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader": { + "description": "Represents the page header associated with the chunk.", + "id": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader", + "properties": { + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan", + "description": "Page span of the header." + }, + "text": { + "description": "Header in text format.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan": { + "description": "Represents where the chunk starts and ends in the document.", + "id": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan", + "properties": { + "pageEnd": { + "description": "Page where chunk ends in the document.", + "format": "int32", + "type": "integer" + }, + "pageStart": { + "description": "Page where chunk starts in the document.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentDocumentLayout": { + "description": "Represents the parsed layout of a document as a collection of blocks that the document is divided into.", + "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayout", + "properties": { + "blocks": { + "description": "List of blocks in the document.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock": { + "description": "Represents a block. A block could be one of the various types (text, table, list) supported.", + "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock", + "properties": { + "blockId": { + "description": "ID of the block.", + "type": "string" + }, + "listBlock": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock", + "description": "Block consisting of list content/structure." + }, + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan", + "description": "Page span of the block." + }, + "tableBlock": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock", + "description": "Block consisting of table content/structure." + }, + "textBlock": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock", + "description": "Block consisting of text content." + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock": { + "description": "Represents a list type block.", + "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock", + "properties": { + "listEntries": { + "description": "List entries that constitute a list block.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry" + }, + "type": "array" + }, + "type": { + "description": "Type of the list_entries (if exist). Available options are `ordered` and `unordered`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry": { + "description": "Represents an entry in the list.", + "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry", + "properties": { + "blocks": { + "description": "A list entry is a list of blocks. Repeated blocks support further hierarchies and nested blocks.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan": { + "description": "Represents where the block starts and ends in the document.", + "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan", + "properties": { + "pageEnd": { + "description": "Page where block ends in the document.", + "format": "int32", + "type": "integer" + }, + "pageStart": { + "description": "Page where block starts in the document.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock": { + "description": "Represents a table type block.", + "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock", + "properties": { + "bodyRows": { + "description": "Body rows containing main table content.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow" + }, + "type": "array" + }, + "caption": { + "description": "Table caption/title.", + "type": "string" + }, + "headerRows": { + "description": "Header rows at the top of the table.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell": { + "description": "Represents a cell in a table row.", + "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell", + "properties": { + "blocks": { + "description": "A table cell is a list of blocks. Repeated blocks support further hierarchies and nested blocks.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock" + }, + "type": "array" + }, + "colSpan": { + "description": "How many columns this cell spans.", + "format": "int32", + "type": "integer" + }, + "rowSpan": { + "description": "How many rows this cell spans.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow": { + "description": "Represents a row in a table.", + "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow", + "properties": { + "cells": { + "description": "A table row is a list of table cells.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock": { + "description": "Represents a text type block.", + "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock", + "properties": { + "blocks": { + "description": "A text block could further have child blocks. Repeated blocks support further hierarchies and nested blocks.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock" + }, + "type": "array" + }, + "text": { + "description": "Text content stored in the block.", + "type": "string" + }, + "type": { + "description": "Type of the text in the block. Available options are: `paragraph`, `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, `header`, `footer`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta2DocumentEntity": { "description": "An entity that could be a phrase in the text or a property that belongs to the document. It is a known entity type, such as a person, an organization, or location.", "id": "GoogleCloudDocumentaiV1beta2DocumentEntity", @@ -7740,6 +8643,16 @@ "description": "Dataset resource name. Format: `projects/{project}/locations/{location}/processors/{processor}/dataset`", "type": "string" }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "spannerIndexingConfig": { "$ref": "GoogleCloudDocumentaiV1beta3DatasetSpannerIndexingConfig", "description": "Optional. A lightweight indexing source with low latency and high reliability, but lacking advanced features like CMEK and content-based search." diff --git a/documentai/v1/documentai-gen.go b/documentai/v1/documentai-gen.go index f01821b1da9..78181e7165a 100644 --- a/documentai/v1/documentai-gen.go +++ b/documentai/v1/documentai-gen.go @@ -1915,10 +1915,14 @@ type GoogleCloudDocumentaiV1DisableProcessorResponse struct { // into documents and allows for collaboration between users and Document AI to // iterate and optimize for quality. type GoogleCloudDocumentaiV1Document struct { + // ChunkedDocument: Document chunked based on chunking config. + ChunkedDocument *GoogleCloudDocumentaiV1DocumentChunkedDocument `json:"chunkedDocument,omitempty"` // Content: Optional. Inline document content, represented as a stream of // bytes. Note: As with all `bytes` fields, protobuffers use a pure binary // representation, whereas JSON representations use base64. Content string `json:"content,omitempty"` + // DocumentLayout: Parsed layout of the document. + DocumentLayout *GoogleCloudDocumentaiV1DocumentDocumentLayout `json:"documentLayout,omitempty"` // Entities: A list of entities detected on Document.text. For document shards, // entities in this list may cross shard boundaries. Entities []*GoogleCloudDocumentaiV1DocumentEntity `json:"entities,omitempty"` @@ -1950,21 +1954,389 @@ type GoogleCloudDocumentaiV1Document struct { // information, refer to Google Cloud Storage Request URIs // (https://cloud.google.com/storage/docs/reference-uris). Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Content") to unconditionally + // ForceSendFields is a list of field names (e.g. "ChunkedDocument") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChunkedDocument") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1Document) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1Document + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1DocumentChunkedDocument: Represents the chunks that +// the document is divided into. +type GoogleCloudDocumentaiV1DocumentChunkedDocument struct { + // Chunks: List of chunks. + Chunks []*GoogleCloudDocumentaiV1DocumentChunkedDocumentChunk `json:"chunks,omitempty"` + // ForceSendFields is a list of field names (e.g. "Chunks") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in API + // NullFields is a list of field names (e.g. "Chunks") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1Document) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1Document +func (s *GoogleCloudDocumentaiV1DocumentChunkedDocument) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1DocumentChunkedDocument + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1DocumentChunkedDocumentChunk: Represents a chunk. +type GoogleCloudDocumentaiV1DocumentChunkedDocumentChunk struct { + // ChunkId: ID of the chunk. + ChunkId string `json:"chunkId,omitempty"` + // Content: Text content of the chunk. + Content string `json:"content,omitempty"` + // PageFooters: Page footers associated with the chunk. + PageFooters []*GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageFooter `json:"pageFooters,omitempty"` + // PageHeaders: Page headers associated with the chunk. + PageHeaders []*GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageHeader `json:"pageHeaders,omitempty"` + // PageSpan: Page span of the chunk. + PageSpan *GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` + // SourceBlockIds: Unused. + SourceBlockIds []string `json:"sourceBlockIds,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChunkId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1DocumentChunkedDocumentChunk) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1DocumentChunkedDocumentChunk + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageFooter: +// Represents the page footer associated with the chunk. +type GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageFooter struct { + // PageSpan: Page span of the footer. + PageSpan *GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` + // Text: Footer in text format. + Text string `json:"text,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageSpan") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PageSpan") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageFooter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageFooter + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageHeader: +// Represents the page header associated with the chunk. +type GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageHeader struct { + // PageSpan: Page span of the header. + PageSpan *GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` + // Text: Header in text format. + Text string `json:"text,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageSpan") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PageSpan") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageHeader) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageHeader + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageSpan: Represents +// where the chunk starts and ends in the document. +type GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageSpan struct { + // PageEnd: Page where chunk ends in the document. + PageEnd int64 `json:"pageEnd,omitempty"` + // PageStart: Page where chunk starts in the document. + PageStart int64 `json:"pageStart,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageEnd") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PageEnd") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageSpan) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1DocumentChunkedDocumentChunkChunkPageSpan + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1DocumentDocumentLayout: Represents the parsed layout +// of a document as a collection of blocks that the document is divided into. +type GoogleCloudDocumentaiV1DocumentDocumentLayout struct { + // Blocks: List of blocks in the document. + Blocks []*GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Blocks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1DocumentDocumentLayout) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1DocumentDocumentLayout + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock: Represents +// a block. A block could be one of the various types (text, table, list) +// supported. +type GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock struct { + // BlockId: ID of the block. + BlockId string `json:"blockId,omitempty"` + // ListBlock: Block consisting of list content/structure. + ListBlock *GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock `json:"listBlock,omitempty"` + // PageSpan: Page span of the block. + PageSpan *GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan `json:"pageSpan,omitempty"` + // TableBlock: Block consisting of table content/structure. + TableBlock *GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock `json:"tableBlock,omitempty"` + // TextBlock: Block consisting of text content. + TextBlock *GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock `json:"textBlock,omitempty"` + // ForceSendFields is a list of field names (e.g. "BlockId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BlockId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlo +// ck: Represents a list type block. +type GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock struct { + // ListEntries: List entries that constitute a list block. + ListEntries []*GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry `json:"listEntries,omitempty"` + // Type: Type of the list_entries (if exist). Available options are `ordered` + // and `unordered`. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "ListEntries") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ListEntries") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEnt +// ry: Represents an entry in the list. +type GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry struct { + // Blocks: A list entry is a list of blocks. Repeated blocks support further + // hierarchies and nested blocks. + Blocks []*GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Blocks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpa +// n: Represents where the block starts and ends in the document. +type GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan struct { + // PageEnd: Page where block ends in the document. + PageEnd int64 `json:"pageEnd,omitempty"` + // PageStart: Page where block starts in the document. + PageStart int64 `json:"pageStart,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageEnd") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PageEnd") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBl +// ock: Represents a table type block. +type GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock struct { + // BodyRows: Body rows containing main table content. + BodyRows []*GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow `json:"bodyRows,omitempty"` + // Caption: Table caption/title. + Caption string `json:"caption,omitempty"` + // HeaderRows: Header rows at the top of the table. + HeaderRows []*GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow `json:"headerRows,omitempty"` + // ForceSendFields is a list of field names (e.g. "BodyRows") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BodyRows") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCe +// ll: Represents a cell in a table row. +type GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell struct { + // Blocks: A table cell is a list of blocks. Repeated blocks support further + // hierarchies and nested blocks. + Blocks []*GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // ColSpan: How many columns this cell spans. + ColSpan int64 `json:"colSpan,omitempty"` + // RowSpan: How many rows this cell spans. + RowSpan int64 `json:"rowSpan,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Blocks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRo +// w: Represents a row in a table. +type GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow struct { + // Cells: A table row is a list of table cells. + Cells []*GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell `json:"cells,omitempty"` + // ForceSendFields is a list of field names (e.g. "Cells") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Cells") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlo +// ck: Represents a text type block. +type GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock struct { + // Blocks: A text block could further have child blocks. Repeated blocks + // support further hierarchies and nested blocks. + Blocks []*GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // Text: Text content stored in the block. + Text string `json:"text,omitempty"` + // Type: Type of the text in the block. Available options are: `paragraph`, + // `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, + // `header`, `footer`. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Blocks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } @@ -4357,6 +4729,9 @@ type GoogleCloudDocumentaiV1ProcessOptions struct { FromStart int64 `json:"fromStart,omitempty"` // IndividualPageSelector: Which pages to process (1-indexed). IndividualPageSelector *GoogleCloudDocumentaiV1ProcessOptionsIndividualPageSelector `json:"individualPageSelector,omitempty"` + // LayoutConfig: Optional. Only applicable to `LAYOUT_PARSER_PROCESSOR`. + // Returns error if set on other processor types. + LayoutConfig *GoogleCloudDocumentaiV1ProcessOptionsLayoutConfig `json:"layoutConfig,omitempty"` // OcrConfig: Only applicable to `OCR_PROCESSOR` and `FORM_PARSER_PROCESSOR`. // Returns error if set on other processor types. OcrConfig *GoogleCloudDocumentaiV1OcrConfig `json:"ocrConfig,omitempty"` @@ -4405,6 +4780,56 @@ func (s *GoogleCloudDocumentaiV1ProcessOptionsIndividualPageSelector) MarshalJSO return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1ProcessOptionsLayoutConfig: Serving config for layout +// parser processor. +type GoogleCloudDocumentaiV1ProcessOptionsLayoutConfig struct { + // ChunkingConfig: Optional. Config for chunking in layout parser processor. + ChunkingConfig *GoogleCloudDocumentaiV1ProcessOptionsLayoutConfigChunkingConfig `json:"chunkingConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkingConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChunkingConfig") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1ProcessOptionsLayoutConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1ProcessOptionsLayoutConfig + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1ProcessOptionsLayoutConfigChunkingConfig: Serving +// config for chunking. +type GoogleCloudDocumentaiV1ProcessOptionsLayoutConfigChunkingConfig struct { + // ChunkSize: Optional. The chunk sizes to use when splitting documents, in + // order of level. + ChunkSize int64 `json:"chunkSize,omitempty"` + // IncludeAncestorHeadings: Optional. Whether or not to include ancestor + // headings when splitting. + IncludeAncestorHeadings bool `json:"includeAncestorHeadings,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkSize") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChunkSize") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1ProcessOptionsLayoutConfigChunkingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1ProcessOptionsLayoutConfigChunkingConfig + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1ProcessRequest: Request message for the // ProcessDocument method. type GoogleCloudDocumentaiV1ProcessRequest struct { @@ -4497,6 +4922,10 @@ type GoogleCloudDocumentaiV1Processor struct { ProcessEndpoint string `json:"processEndpoint,omitempty"` // ProcessorVersionAliases: Output only. The processor version aliases. ProcessorVersionAliases []*GoogleCloudDocumentaiV1ProcessorVersionAlias `json:"processorVersionAliases,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // State: Output only. The state of the processor. // // Possible values: @@ -4680,6 +5109,10 @@ type GoogleCloudDocumentaiV1ProcessorVersion struct { // `projects/{project}/locations/{location}/processors/{processor}/processorVers // ions/{processor_version}` Name string `json:"name,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // State: Output only. The state of the processor version. // // Possible values: @@ -5318,10 +5751,14 @@ func (s *GoogleCloudDocumentaiV1beta1BoundingPoly) MarshalJSON() ([]byte, error) // insights into documents and allows for collaboration between users and // Document AI to iterate and optimize for quality. type GoogleCloudDocumentaiV1beta1Document struct { + // ChunkedDocument: Document chunked based on chunking config. + ChunkedDocument *GoogleCloudDocumentaiV1beta1DocumentChunkedDocument `json:"chunkedDocument,omitempty"` // Content: Optional. Inline document content, represented as a stream of // bytes. Note: As with all `bytes` fields, protobuffers use a pure binary // representation, whereas JSON representations use base64. Content string `json:"content,omitempty"` + // DocumentLayout: Parsed layout of the document. + DocumentLayout *GoogleCloudDocumentaiV1beta1DocumentDocumentLayout `json:"documentLayout,omitempty"` // Entities: A list of entities detected on Document.text. For document shards, // entities in this list may cross shard boundaries. Entities []*GoogleCloudDocumentaiV1beta1DocumentEntity `json:"entities,omitempty"` @@ -5353,15 +5790,15 @@ type GoogleCloudDocumentaiV1beta1Document struct { // information, refer to Google Cloud Storage Request URIs // (https://cloud.google.com/storage/docs/reference-uris). Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Content") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "ChunkedDocument") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "ChunkedDocument") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -5371,6 +5808,376 @@ func (s *GoogleCloudDocumentaiV1beta1Document) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta1DocumentChunkedDocument: Represents the chunks +// that the document is divided into. +type GoogleCloudDocumentaiV1beta1DocumentChunkedDocument struct { + // Chunks: List of chunks. + Chunks []*GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk `json:"chunks,omitempty"` + // ForceSendFields is a list of field names (e.g. "Chunks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Chunks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentChunkedDocument) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentChunkedDocument + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk: Represents a +// chunk. +type GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk struct { + // ChunkId: ID of the chunk. + ChunkId string `json:"chunkId,omitempty"` + // Content: Text content of the chunk. + Content string `json:"content,omitempty"` + // PageFooters: Page footers associated with the chunk. + PageFooters []*GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter `json:"pageFooters,omitempty"` + // PageHeaders: Page headers associated with the chunk. + PageHeaders []*GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader `json:"pageHeaders,omitempty"` + // PageSpan: Page span of the chunk. + PageSpan *GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` + // SourceBlockIds: Unused. + SourceBlockIds []string `json:"sourceBlockIds,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChunkId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter: +// Represents the page footer associated with the chunk. +type GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter struct { + // PageSpan: Page span of the footer. + PageSpan *GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` + // Text: Footer in text format. + Text string `json:"text,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageSpan") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PageSpan") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader: +// Represents the page header associated with the chunk. +type GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader struct { + // PageSpan: Page span of the header. + PageSpan *GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` + // Text: Header in text format. + Text string `json:"text,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageSpan") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PageSpan") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan: +// Represents where the chunk starts and ends in the document. +type GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan struct { + // PageEnd: Page where chunk ends in the document. + PageEnd int64 `json:"pageEnd,omitempty"` + // PageStart: Page where chunk starts in the document. + PageStart int64 `json:"pageStart,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageEnd") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PageEnd") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentDocumentLayout: Represents the parsed +// layout of a document as a collection of blocks that the document is divided +// into. +type GoogleCloudDocumentaiV1beta1DocumentDocumentLayout struct { + // Blocks: List of blocks in the document. + Blocks []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Blocks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentDocumentLayout) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayout + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock: +// Represents a block. A block could be one of the various types (text, table, +// list) supported. +type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock struct { + // BlockId: ID of the block. + BlockId string `json:"blockId,omitempty"` + // ListBlock: Block consisting of list content/structure. + ListBlock *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock `json:"listBlock,omitempty"` + // PageSpan: Page span of the block. + PageSpan *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan `json:"pageSpan,omitempty"` + // TableBlock: Block consisting of table content/structure. + TableBlock *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock `json:"tableBlock,omitempty"` + // TextBlock: Block consisting of text content. + TextBlock *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock `json:"textBlock,omitempty"` + // ForceSendFields is a list of field names (e.g. "BlockId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BlockId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutLi +// stBlock: Represents a list type block. +type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock struct { + // ListEntries: List entries that constitute a list block. + ListEntries []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry `json:"listEntries,omitempty"` + // Type: Type of the list_entries (if exist). Available options are `ordered` + // and `unordered`. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "ListEntries") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ListEntries") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutLi +// stEntry: Represents an entry in the list. +type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry struct { + // Blocks: A list entry is a list of blocks. Repeated blocks support further + // hierarchies and nested blocks. + Blocks []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Blocks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPa +// geSpan: Represents where the block starts and ends in the document. +type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan struct { + // PageEnd: Page where block ends in the document. + PageEnd int64 `json:"pageEnd,omitempty"` + // PageStart: Page where block starts in the document. + PageStart int64 `json:"pageStart,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageEnd") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PageEnd") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTa +// bleBlock: Represents a table type block. +type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock struct { + // BodyRows: Body rows containing main table content. + BodyRows []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow `json:"bodyRows,omitempty"` + // Caption: Table caption/title. + Caption string `json:"caption,omitempty"` + // HeaderRows: Header rows at the top of the table. + HeaderRows []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow `json:"headerRows,omitempty"` + // ForceSendFields is a list of field names (e.g. "BodyRows") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BodyRows") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTa +// bleCell: Represents a cell in a table row. +type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell struct { + // Blocks: A table cell is a list of blocks. Repeated blocks support further + // hierarchies and nested blocks. + Blocks []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // ColSpan: How many columns this cell spans. + ColSpan int64 `json:"colSpan,omitempty"` + // RowSpan: How many rows this cell spans. + RowSpan int64 `json:"rowSpan,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Blocks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTa +// bleRow: Represents a row in a table. +type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow struct { + // Cells: A table row is a list of table cells. + Cells []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell `json:"cells,omitempty"` + // ForceSendFields is a list of field names (e.g. "Cells") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Cells") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTe +// xtBlock: Represents a text type block. +type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock struct { + // Blocks: A text block could further have child blocks. Repeated blocks + // support further hierarchies and nested blocks. + Blocks []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // Text: Text content stored in the block. + Text string `json:"text,omitempty"` + // Type: Type of the text in the block. Available options are: `paragraph`, + // `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, + // `header`, `footer`. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Blocks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta1DocumentEntity: An entity that could be a phrase // in the text or a property that belongs to the document. It is a known entity // type, such as a person, an organization, or location. @@ -7056,10 +7863,14 @@ func (s *GoogleCloudDocumentaiV1beta2BoundingPoly) MarshalJSON() ([]byte, error) // insights into documents and allows for collaboration between users and // Document AI to iterate and optimize for quality. type GoogleCloudDocumentaiV1beta2Document struct { + // ChunkedDocument: Document chunked based on chunking config. + ChunkedDocument *GoogleCloudDocumentaiV1beta2DocumentChunkedDocument `json:"chunkedDocument,omitempty"` // Content: Optional. Inline document content, represented as a stream of // bytes. Note: As with all `bytes` fields, protobuffers use a pure binary // representation, whereas JSON representations use base64. Content string `json:"content,omitempty"` + // DocumentLayout: Parsed layout of the document. + DocumentLayout *GoogleCloudDocumentaiV1beta2DocumentDocumentLayout `json:"documentLayout,omitempty"` // Entities: A list of entities detected on Document.text. For document shards, // entities in this list may cross shard boundaries. Entities []*GoogleCloudDocumentaiV1beta2DocumentEntity `json:"entities,omitempty"` @@ -7093,21 +7904,391 @@ type GoogleCloudDocumentaiV1beta2Document struct { // information, refer to Google Cloud Storage Request URIs // (https://cloud.google.com/storage/docs/reference-uris). Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Content") to unconditionally + // ForceSendFields is a list of field names (e.g. "ChunkedDocument") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChunkedDocument") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2Document) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2Document + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentChunkedDocument: Represents the chunks +// that the document is divided into. +type GoogleCloudDocumentaiV1beta2DocumentChunkedDocument struct { + // Chunks: List of chunks. + Chunks []*GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk `json:"chunks,omitempty"` + // ForceSendFields is a list of field names (e.g. "Chunks") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in API + // NullFields is a list of field names (e.g. "Chunks") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta2Document) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2Document +func (s *GoogleCloudDocumentaiV1beta2DocumentChunkedDocument) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentChunkedDocument + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk: Represents a +// chunk. +type GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk struct { + // ChunkId: ID of the chunk. + ChunkId string `json:"chunkId,omitempty"` + // Content: Text content of the chunk. + Content string `json:"content,omitempty"` + // PageFooters: Page footers associated with the chunk. + PageFooters []*GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter `json:"pageFooters,omitempty"` + // PageHeaders: Page headers associated with the chunk. + PageHeaders []*GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader `json:"pageHeaders,omitempty"` + // PageSpan: Page span of the chunk. + PageSpan *GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` + // SourceBlockIds: Unused. + SourceBlockIds []string `json:"sourceBlockIds,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChunkId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter: +// Represents the page footer associated with the chunk. +type GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter struct { + // PageSpan: Page span of the footer. + PageSpan *GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` + // Text: Footer in text format. + Text string `json:"text,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageSpan") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PageSpan") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader: +// Represents the page header associated with the chunk. +type GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader struct { + // PageSpan: Page span of the header. + PageSpan *GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` + // Text: Header in text format. + Text string `json:"text,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageSpan") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PageSpan") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan: +// Represents where the chunk starts and ends in the document. +type GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan struct { + // PageEnd: Page where chunk ends in the document. + PageEnd int64 `json:"pageEnd,omitempty"` + // PageStart: Page where chunk starts in the document. + PageStart int64 `json:"pageStart,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageEnd") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PageEnd") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentDocumentLayout: Represents the parsed +// layout of a document as a collection of blocks that the document is divided +// into. +type GoogleCloudDocumentaiV1beta2DocumentDocumentLayout struct { + // Blocks: List of blocks in the document. + Blocks []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Blocks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentDocumentLayout) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayout + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock: +// Represents a block. A block could be one of the various types (text, table, +// list) supported. +type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock struct { + // BlockId: ID of the block. + BlockId string `json:"blockId,omitempty"` + // ListBlock: Block consisting of list content/structure. + ListBlock *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock `json:"listBlock,omitempty"` + // PageSpan: Page span of the block. + PageSpan *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan `json:"pageSpan,omitempty"` + // TableBlock: Block consisting of table content/structure. + TableBlock *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock `json:"tableBlock,omitempty"` + // TextBlock: Block consisting of text content. + TextBlock *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock `json:"textBlock,omitempty"` + // ForceSendFields is a list of field names (e.g. "BlockId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BlockId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutLi +// stBlock: Represents a list type block. +type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock struct { + // ListEntries: List entries that constitute a list block. + ListEntries []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry `json:"listEntries,omitempty"` + // Type: Type of the list_entries (if exist). Available options are `ordered` + // and `unordered`. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "ListEntries") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ListEntries") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutLi +// stEntry: Represents an entry in the list. +type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry struct { + // Blocks: A list entry is a list of blocks. Repeated blocks support further + // hierarchies and nested blocks. + Blocks []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Blocks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPa +// geSpan: Represents where the block starts and ends in the document. +type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan struct { + // PageEnd: Page where block ends in the document. + PageEnd int64 `json:"pageEnd,omitempty"` + // PageStart: Page where block starts in the document. + PageStart int64 `json:"pageStart,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageEnd") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PageEnd") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTa +// bleBlock: Represents a table type block. +type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock struct { + // BodyRows: Body rows containing main table content. + BodyRows []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow `json:"bodyRows,omitempty"` + // Caption: Table caption/title. + Caption string `json:"caption,omitempty"` + // HeaderRows: Header rows at the top of the table. + HeaderRows []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow `json:"headerRows,omitempty"` + // ForceSendFields is a list of field names (e.g. "BodyRows") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BodyRows") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTa +// bleCell: Represents a cell in a table row. +type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell struct { + // Blocks: A table cell is a list of blocks. Repeated blocks support further + // hierarchies and nested blocks. + Blocks []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // ColSpan: How many columns this cell spans. + ColSpan int64 `json:"colSpan,omitempty"` + // RowSpan: How many rows this cell spans. + RowSpan int64 `json:"rowSpan,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Blocks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTa +// bleRow: Represents a row in a table. +type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow struct { + // Cells: A table row is a list of table cells. + Cells []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell `json:"cells,omitempty"` + // ForceSendFields is a list of field names (e.g. "Cells") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Cells") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTe +// xtBlock: Represents a text type block. +type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock struct { + // Blocks: A text block could further have child blocks. Repeated blocks + // support further hierarchies and nested blocks. + Blocks []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // Text: Text content stored in the block. + Text string `json:"text,omitempty"` + // Type: Type of the text in the block. Available options are: `paragraph`, + // `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, + // `header`, `footer`. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Blocks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } @@ -8951,6 +10132,10 @@ type GoogleCloudDocumentaiV1beta3Dataset struct { // Name: Dataset resource name. Format: // `projects/{project}/locations/{location}/processors/{processor}/dataset` Name string `json:"name,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // SpannerIndexingConfig: Optional. A lightweight indexing source with low // latency and high reliability, but lacking advanced features like CMEK and // content-based search. diff --git a/documentai/v1beta2/documentai-api.json b/documentai/v1beta2/documentai-api.json index 5105a6f54cd..28cce757503 100644 --- a/documentai/v1beta2/documentai-api.json +++ b/documentai/v1beta2/documentai-api.json @@ -292,7 +292,7 @@ } } }, - "revision": "20240417", + "revision": "20240531", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata": { @@ -1635,11 +1635,19 @@ "description": "Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality.", "id": "GoogleCloudDocumentaiV1beta1Document", "properties": { + "chunkedDocument": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocument", + "description": "Document chunked based on chunking config." + }, "content": { "description": "Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.", "format": "byte", "type": "string" }, + "documentLayout": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayout", + "description": "Parsed layout of the document." + }, "entities": { "description": "A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.", "items": { @@ -1706,6 +1714,282 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta1DocumentChunkedDocument": { + "description": "Represents the chunks that the document is divided into.", + "id": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocument", + "properties": { + "chunks": { + "description": "List of chunks.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk": { + "description": "Represents a chunk.", + "id": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk", + "properties": { + "chunkId": { + "description": "ID of the chunk.", + "type": "string" + }, + "content": { + "description": "Text content of the chunk.", + "type": "string" + }, + "pageFooters": { + "description": "Page footers associated with the chunk.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter" + }, + "type": "array" + }, + "pageHeaders": { + "description": "Page headers associated with the chunk.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader" + }, + "type": "array" + }, + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan", + "description": "Page span of the chunk." + }, + "sourceBlockIds": { + "description": "Unused.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter": { + "description": "Represents the page footer associated with the chunk.", + "id": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter", + "properties": { + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan", + "description": "Page span of the footer." + }, + "text": { + "description": "Footer in text format.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader": { + "description": "Represents the page header associated with the chunk.", + "id": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader", + "properties": { + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan", + "description": "Page span of the header." + }, + "text": { + "description": "Header in text format.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan": { + "description": "Represents where the chunk starts and ends in the document.", + "id": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan", + "properties": { + "pageEnd": { + "description": "Page where chunk ends in the document.", + "format": "int32", + "type": "integer" + }, + "pageStart": { + "description": "Page where chunk starts in the document.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentDocumentLayout": { + "description": "Represents the parsed layout of a document as a collection of blocks that the document is divided into.", + "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayout", + "properties": { + "blocks": { + "description": "List of blocks in the document.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock": { + "description": "Represents a block. A block could be one of the various types (text, table, list) supported.", + "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock", + "properties": { + "blockId": { + "description": "ID of the block.", + "type": "string" + }, + "listBlock": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock", + "description": "Block consisting of list content/structure." + }, + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan", + "description": "Page span of the block." + }, + "tableBlock": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock", + "description": "Block consisting of table content/structure." + }, + "textBlock": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock", + "description": "Block consisting of text content." + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock": { + "description": "Represents a list type block.", + "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock", + "properties": { + "listEntries": { + "description": "List entries that constitute a list block.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry" + }, + "type": "array" + }, + "type": { + "description": "Type of the list_entries (if exist). Available options are `ordered` and `unordered`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry": { + "description": "Represents an entry in the list.", + "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry", + "properties": { + "blocks": { + "description": "A list entry is a list of blocks. Repeated blocks support further hierarchies and nested blocks.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan": { + "description": "Represents where the block starts and ends in the document.", + "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan", + "properties": { + "pageEnd": { + "description": "Page where block ends in the document.", + "format": "int32", + "type": "integer" + }, + "pageStart": { + "description": "Page where block starts in the document.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock": { + "description": "Represents a table type block.", + "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock", + "properties": { + "bodyRows": { + "description": "Body rows containing main table content.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow" + }, + "type": "array" + }, + "caption": { + "description": "Table caption/title.", + "type": "string" + }, + "headerRows": { + "description": "Header rows at the top of the table.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell": { + "description": "Represents a cell in a table row.", + "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell", + "properties": { + "blocks": { + "description": "A table cell is a list of blocks. Repeated blocks support further hierarchies and nested blocks.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock" + }, + "type": "array" + }, + "colSpan": { + "description": "How many columns this cell spans.", + "format": "int32", + "type": "integer" + }, + "rowSpan": { + "description": "How many rows this cell spans.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow": { + "description": "Represents a row in a table.", + "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow", + "properties": { + "cells": { + "description": "A table row is a list of table cells.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock": { + "description": "Represents a text type block.", + "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock", + "properties": { + "blocks": { + "description": "A text block could further have child blocks. Repeated blocks support further hierarchies and nested blocks.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock" + }, + "type": "array" + }, + "text": { + "description": "Text content stored in the block.", + "type": "string" + }, + "type": { + "description": "Type of the text in the block. Available options are: `paragraph`, `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, `header`, `footer`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta1DocumentEntity": { "description": "An entity that could be a phrase in the text or a property that belongs to the document. It is a known entity type, such as a person, an organization, or location.", "id": "GoogleCloudDocumentaiV1beta1DocumentEntity", @@ -3034,11 +3318,19 @@ "description": "Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality.", "id": "GoogleCloudDocumentaiV1beta2Document", "properties": { + "chunkedDocument": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocument", + "description": "Document chunked based on chunking config." + }, "content": { "description": "Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.", "format": "byte", "type": "string" }, + "documentLayout": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayout", + "description": "Parsed layout of the document." + }, "entities": { "description": "A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.", "items": { @@ -3112,6 +3404,282 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta2DocumentChunkedDocument": { + "description": "Represents the chunks that the document is divided into.", + "id": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocument", + "properties": { + "chunks": { + "description": "List of chunks.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk": { + "description": "Represents a chunk.", + "id": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk", + "properties": { + "chunkId": { + "description": "ID of the chunk.", + "type": "string" + }, + "content": { + "description": "Text content of the chunk.", + "type": "string" + }, + "pageFooters": { + "description": "Page footers associated with the chunk.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter" + }, + "type": "array" + }, + "pageHeaders": { + "description": "Page headers associated with the chunk.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader" + }, + "type": "array" + }, + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan", + "description": "Page span of the chunk." + }, + "sourceBlockIds": { + "description": "Unused.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter": { + "description": "Represents the page footer associated with the chunk.", + "id": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter", + "properties": { + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan", + "description": "Page span of the footer." + }, + "text": { + "description": "Footer in text format.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader": { + "description": "Represents the page header associated with the chunk.", + "id": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader", + "properties": { + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan", + "description": "Page span of the header." + }, + "text": { + "description": "Header in text format.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan": { + "description": "Represents where the chunk starts and ends in the document.", + "id": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan", + "properties": { + "pageEnd": { + "description": "Page where chunk ends in the document.", + "format": "int32", + "type": "integer" + }, + "pageStart": { + "description": "Page where chunk starts in the document.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentDocumentLayout": { + "description": "Represents the parsed layout of a document as a collection of blocks that the document is divided into.", + "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayout", + "properties": { + "blocks": { + "description": "List of blocks in the document.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock": { + "description": "Represents a block. A block could be one of the various types (text, table, list) supported.", + "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock", + "properties": { + "blockId": { + "description": "ID of the block.", + "type": "string" + }, + "listBlock": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock", + "description": "Block consisting of list content/structure." + }, + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan", + "description": "Page span of the block." + }, + "tableBlock": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock", + "description": "Block consisting of table content/structure." + }, + "textBlock": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock", + "description": "Block consisting of text content." + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock": { + "description": "Represents a list type block.", + "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock", + "properties": { + "listEntries": { + "description": "List entries that constitute a list block.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry" + }, + "type": "array" + }, + "type": { + "description": "Type of the list_entries (if exist). Available options are `ordered` and `unordered`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry": { + "description": "Represents an entry in the list.", + "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry", + "properties": { + "blocks": { + "description": "A list entry is a list of blocks. Repeated blocks support further hierarchies and nested blocks.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan": { + "description": "Represents where the block starts and ends in the document.", + "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan", + "properties": { + "pageEnd": { + "description": "Page where block ends in the document.", + "format": "int32", + "type": "integer" + }, + "pageStart": { + "description": "Page where block starts in the document.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock": { + "description": "Represents a table type block.", + "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock", + "properties": { + "bodyRows": { + "description": "Body rows containing main table content.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow" + }, + "type": "array" + }, + "caption": { + "description": "Table caption/title.", + "type": "string" + }, + "headerRows": { + "description": "Header rows at the top of the table.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell": { + "description": "Represents a cell in a table row.", + "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell", + "properties": { + "blocks": { + "description": "A table cell is a list of blocks. Repeated blocks support further hierarchies and nested blocks.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock" + }, + "type": "array" + }, + "colSpan": { + "description": "How many columns this cell spans.", + "format": "int32", + "type": "integer" + }, + "rowSpan": { + "description": "How many rows this cell spans.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow": { + "description": "Represents a row in a table.", + "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow", + "properties": { + "cells": { + "description": "A table row is a list of table cells.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock": { + "description": "Represents a text type block.", + "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock", + "properties": { + "blocks": { + "description": "A text block could further have child blocks. Repeated blocks support further hierarchies and nested blocks.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock" + }, + "type": "array" + }, + "text": { + "description": "Text content stored in the block.", + "type": "string" + }, + "type": { + "description": "Type of the text in the block. Available options are: `paragraph`, `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, `header`, `footer`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta2DocumentEntity": { "description": "An entity that could be a phrase in the text or a property that belongs to the document. It is a known entity type, such as a person, an organization, or location.", "id": "GoogleCloudDocumentaiV1beta2DocumentEntity", @@ -4733,6 +5301,16 @@ "description": "Dataset resource name. Format: `projects/{project}/locations/{location}/processors/{processor}/dataset`", "type": "string" }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "spannerIndexingConfig": { "$ref": "GoogleCloudDocumentaiV1beta3DatasetSpannerIndexingConfig", "description": "Optional. A lightweight indexing source with low latency and high reliability, but lacking advanced features like CMEK and content-based search." diff --git a/documentai/v1beta2/documentai-gen.go b/documentai/v1beta2/documentai-gen.go index 5d5ae8aa326..558295c5745 100644 --- a/documentai/v1beta2/documentai-gen.go +++ b/documentai/v1beta2/documentai-gen.go @@ -2136,10 +2136,14 @@ func (s *GoogleCloudDocumentaiV1beta1BoundingPoly) MarshalJSON() ([]byte, error) // insights into documents and allows for collaboration between users and // Document AI to iterate and optimize for quality. type GoogleCloudDocumentaiV1beta1Document struct { + // ChunkedDocument: Document chunked based on chunking config. + ChunkedDocument *GoogleCloudDocumentaiV1beta1DocumentChunkedDocument `json:"chunkedDocument,omitempty"` // Content: Optional. Inline document content, represented as a stream of // bytes. Note: As with all `bytes` fields, protobuffers use a pure binary // representation, whereas JSON representations use base64. Content string `json:"content,omitempty"` + // DocumentLayout: Parsed layout of the document. + DocumentLayout *GoogleCloudDocumentaiV1beta1DocumentDocumentLayout `json:"documentLayout,omitempty"` // Entities: A list of entities detected on Document.text. For document shards, // entities in this list may cross shard boundaries. Entities []*GoogleCloudDocumentaiV1beta1DocumentEntity `json:"entities,omitempty"` @@ -2171,21 +2175,391 @@ type GoogleCloudDocumentaiV1beta1Document struct { // information, refer to Google Cloud Storage Request URIs // (https://cloud.google.com/storage/docs/reference-uris). Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Content") to unconditionally + // ForceSendFields is a list of field names (e.g. "ChunkedDocument") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChunkedDocument") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1Document) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1Document + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentChunkedDocument: Represents the chunks +// that the document is divided into. +type GoogleCloudDocumentaiV1beta1DocumentChunkedDocument struct { + // Chunks: List of chunks. + Chunks []*GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk `json:"chunks,omitempty"` + // ForceSendFields is a list of field names (e.g. "Chunks") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in API + // NullFields is a list of field names (e.g. "Chunks") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1Document) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1Document +func (s *GoogleCloudDocumentaiV1beta1DocumentChunkedDocument) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentChunkedDocument + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk: Represents a +// chunk. +type GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk struct { + // ChunkId: ID of the chunk. + ChunkId string `json:"chunkId,omitempty"` + // Content: Text content of the chunk. + Content string `json:"content,omitempty"` + // PageFooters: Page footers associated with the chunk. + PageFooters []*GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter `json:"pageFooters,omitempty"` + // PageHeaders: Page headers associated with the chunk. + PageHeaders []*GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader `json:"pageHeaders,omitempty"` + // PageSpan: Page span of the chunk. + PageSpan *GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` + // SourceBlockIds: Unused. + SourceBlockIds []string `json:"sourceBlockIds,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChunkId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter: +// Represents the page footer associated with the chunk. +type GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter struct { + // PageSpan: Page span of the footer. + PageSpan *GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` + // Text: Footer in text format. + Text string `json:"text,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageSpan") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PageSpan") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader: +// Represents the page header associated with the chunk. +type GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader struct { + // PageSpan: Page span of the header. + PageSpan *GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` + // Text: Header in text format. + Text string `json:"text,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageSpan") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PageSpan") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan: +// Represents where the chunk starts and ends in the document. +type GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan struct { + // PageEnd: Page where chunk ends in the document. + PageEnd int64 `json:"pageEnd,omitempty"` + // PageStart: Page where chunk starts in the document. + PageStart int64 `json:"pageStart,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageEnd") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PageEnd") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentDocumentLayout: Represents the parsed +// layout of a document as a collection of blocks that the document is divided +// into. +type GoogleCloudDocumentaiV1beta1DocumentDocumentLayout struct { + // Blocks: List of blocks in the document. + Blocks []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Blocks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentDocumentLayout) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayout + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock: +// Represents a block. A block could be one of the various types (text, table, +// list) supported. +type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock struct { + // BlockId: ID of the block. + BlockId string `json:"blockId,omitempty"` + // ListBlock: Block consisting of list content/structure. + ListBlock *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock `json:"listBlock,omitempty"` + // PageSpan: Page span of the block. + PageSpan *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan `json:"pageSpan,omitempty"` + // TableBlock: Block consisting of table content/structure. + TableBlock *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock `json:"tableBlock,omitempty"` + // TextBlock: Block consisting of text content. + TextBlock *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock `json:"textBlock,omitempty"` + // ForceSendFields is a list of field names (e.g. "BlockId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BlockId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutLi +// stBlock: Represents a list type block. +type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock struct { + // ListEntries: List entries that constitute a list block. + ListEntries []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry `json:"listEntries,omitempty"` + // Type: Type of the list_entries (if exist). Available options are `ordered` + // and `unordered`. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "ListEntries") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ListEntries") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutLi +// stEntry: Represents an entry in the list. +type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry struct { + // Blocks: A list entry is a list of blocks. Repeated blocks support further + // hierarchies and nested blocks. + Blocks []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Blocks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPa +// geSpan: Represents where the block starts and ends in the document. +type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan struct { + // PageEnd: Page where block ends in the document. + PageEnd int64 `json:"pageEnd,omitempty"` + // PageStart: Page where block starts in the document. + PageStart int64 `json:"pageStart,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageEnd") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PageEnd") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTa +// bleBlock: Represents a table type block. +type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock struct { + // BodyRows: Body rows containing main table content. + BodyRows []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow `json:"bodyRows,omitempty"` + // Caption: Table caption/title. + Caption string `json:"caption,omitempty"` + // HeaderRows: Header rows at the top of the table. + HeaderRows []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow `json:"headerRows,omitempty"` + // ForceSendFields is a list of field names (e.g. "BodyRows") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BodyRows") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTa +// bleCell: Represents a cell in a table row. +type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell struct { + // Blocks: A table cell is a list of blocks. Repeated blocks support further + // hierarchies and nested blocks. + Blocks []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // ColSpan: How many columns this cell spans. + ColSpan int64 `json:"colSpan,omitempty"` + // RowSpan: How many rows this cell spans. + RowSpan int64 `json:"rowSpan,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Blocks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTa +// bleRow: Represents a row in a table. +type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow struct { + // Cells: A table row is a list of table cells. + Cells []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell `json:"cells,omitempty"` + // ForceSendFields is a list of field names (e.g. "Cells") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Cells") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTe +// xtBlock: Represents a text type block. +type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock struct { + // Blocks: A text block could further have child blocks. Repeated blocks + // support further hierarchies and nested blocks. + Blocks []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // Text: Text content stored in the block. + Text string `json:"text,omitempty"` + // Type: Type of the text in the block. Available options are: `paragraph`, + // `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, + // `header`, `footer`. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Blocks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } @@ -3922,10 +4296,14 @@ func (s *GoogleCloudDocumentaiV1beta2BoundingPoly) MarshalJSON() ([]byte, error) // insights into documents and allows for collaboration between users and // Document AI to iterate and optimize for quality. type GoogleCloudDocumentaiV1beta2Document struct { + // ChunkedDocument: Document chunked based on chunking config. + ChunkedDocument *GoogleCloudDocumentaiV1beta2DocumentChunkedDocument `json:"chunkedDocument,omitempty"` // Content: Optional. Inline document content, represented as a stream of // bytes. Note: As with all `bytes` fields, protobuffers use a pure binary // representation, whereas JSON representations use base64. Content string `json:"content,omitempty"` + // DocumentLayout: Parsed layout of the document. + DocumentLayout *GoogleCloudDocumentaiV1beta2DocumentDocumentLayout `json:"documentLayout,omitempty"` // Entities: A list of entities detected on Document.text. For document shards, // entities in this list may cross shard boundaries. Entities []*GoogleCloudDocumentaiV1beta2DocumentEntity `json:"entities,omitempty"` @@ -3962,21 +4340,391 @@ type GoogleCloudDocumentaiV1beta2Document struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Content") to unconditionally + // ForceSendFields is a list of field names (e.g. "ChunkedDocument") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChunkedDocument") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2Document) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2Document + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentChunkedDocument: Represents the chunks +// that the document is divided into. +type GoogleCloudDocumentaiV1beta2DocumentChunkedDocument struct { + // Chunks: List of chunks. + Chunks []*GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk `json:"chunks,omitempty"` + // ForceSendFields is a list of field names (e.g. "Chunks") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in API + // NullFields is a list of field names (e.g. "Chunks") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta2Document) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2Document +func (s *GoogleCloudDocumentaiV1beta2DocumentChunkedDocument) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentChunkedDocument + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk: Represents a +// chunk. +type GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk struct { + // ChunkId: ID of the chunk. + ChunkId string `json:"chunkId,omitempty"` + // Content: Text content of the chunk. + Content string `json:"content,omitempty"` + // PageFooters: Page footers associated with the chunk. + PageFooters []*GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter `json:"pageFooters,omitempty"` + // PageHeaders: Page headers associated with the chunk. + PageHeaders []*GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader `json:"pageHeaders,omitempty"` + // PageSpan: Page span of the chunk. + PageSpan *GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` + // SourceBlockIds: Unused. + SourceBlockIds []string `json:"sourceBlockIds,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChunkId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter: +// Represents the page footer associated with the chunk. +type GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter struct { + // PageSpan: Page span of the footer. + PageSpan *GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` + // Text: Footer in text format. + Text string `json:"text,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageSpan") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PageSpan") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader: +// Represents the page header associated with the chunk. +type GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader struct { + // PageSpan: Page span of the header. + PageSpan *GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` + // Text: Header in text format. + Text string `json:"text,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageSpan") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PageSpan") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan: +// Represents where the chunk starts and ends in the document. +type GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan struct { + // PageEnd: Page where chunk ends in the document. + PageEnd int64 `json:"pageEnd,omitempty"` + // PageStart: Page where chunk starts in the document. + PageStart int64 `json:"pageStart,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageEnd") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PageEnd") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentDocumentLayout: Represents the parsed +// layout of a document as a collection of blocks that the document is divided +// into. +type GoogleCloudDocumentaiV1beta2DocumentDocumentLayout struct { + // Blocks: List of blocks in the document. + Blocks []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Blocks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentDocumentLayout) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayout + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock: +// Represents a block. A block could be one of the various types (text, table, +// list) supported. +type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock struct { + // BlockId: ID of the block. + BlockId string `json:"blockId,omitempty"` + // ListBlock: Block consisting of list content/structure. + ListBlock *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock `json:"listBlock,omitempty"` + // PageSpan: Page span of the block. + PageSpan *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan `json:"pageSpan,omitempty"` + // TableBlock: Block consisting of table content/structure. + TableBlock *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock `json:"tableBlock,omitempty"` + // TextBlock: Block consisting of text content. + TextBlock *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock `json:"textBlock,omitempty"` + // ForceSendFields is a list of field names (e.g. "BlockId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BlockId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutLi +// stBlock: Represents a list type block. +type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock struct { + // ListEntries: List entries that constitute a list block. + ListEntries []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry `json:"listEntries,omitempty"` + // Type: Type of the list_entries (if exist). Available options are `ordered` + // and `unordered`. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "ListEntries") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ListEntries") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutLi +// stEntry: Represents an entry in the list. +type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry struct { + // Blocks: A list entry is a list of blocks. Repeated blocks support further + // hierarchies and nested blocks. + Blocks []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Blocks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPa +// geSpan: Represents where the block starts and ends in the document. +type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan struct { + // PageEnd: Page where block ends in the document. + PageEnd int64 `json:"pageEnd,omitempty"` + // PageStart: Page where block starts in the document. + PageStart int64 `json:"pageStart,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageEnd") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PageEnd") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTa +// bleBlock: Represents a table type block. +type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock struct { + // BodyRows: Body rows containing main table content. + BodyRows []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow `json:"bodyRows,omitempty"` + // Caption: Table caption/title. + Caption string `json:"caption,omitempty"` + // HeaderRows: Header rows at the top of the table. + HeaderRows []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow `json:"headerRows,omitempty"` + // ForceSendFields is a list of field names (e.g. "BodyRows") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BodyRows") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTa +// bleCell: Represents a cell in a table row. +type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell struct { + // Blocks: A table cell is a list of blocks. Repeated blocks support further + // hierarchies and nested blocks. + Blocks []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // ColSpan: How many columns this cell spans. + ColSpan int64 `json:"colSpan,omitempty"` + // RowSpan: How many rows this cell spans. + RowSpan int64 `json:"rowSpan,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Blocks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTa +// bleRow: Represents a row in a table. +type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow struct { + // Cells: A table row is a list of table cells. + Cells []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell `json:"cells,omitempty"` + // ForceSendFields is a list of field names (e.g. "Cells") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Cells") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTe +// xtBlock: Represents a text type block. +type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock struct { + // Blocks: A text block could further have child blocks. Repeated blocks + // support further hierarchies and nested blocks. + Blocks []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // Text: Text content stored in the block. + Text string `json:"text,omitempty"` + // Type: Type of the text in the block. Available options are: `paragraph`, + // `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, + // `header`, `footer`. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Blocks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } @@ -6044,6 +6792,10 @@ type GoogleCloudDocumentaiV1beta3Dataset struct { // Name: Dataset resource name. Format: // `projects/{project}/locations/{location}/processors/{processor}/dataset` Name string `json:"name,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // SpannerIndexingConfig: Optional. A lightweight indexing source with low // latency and high reliability, but lacking advanced features like CMEK and // content-based search. diff --git a/documentai/v1beta3/documentai-api.json b/documentai/v1beta3/documentai-api.json index b48e4c6712f..1b80e01ded3 100644 --- a/documentai/v1beta3/documentai-api.json +++ b/documentai/v1beta3/documentai-api.json @@ -1284,7 +1284,7 @@ } } }, - "revision": "20240502", + "revision": "20240531", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata": { @@ -2627,11 +2627,19 @@ "description": "Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality.", "id": "GoogleCloudDocumentaiV1beta1Document", "properties": { + "chunkedDocument": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocument", + "description": "Document chunked based on chunking config." + }, "content": { "description": "Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.", "format": "byte", "type": "string" }, + "documentLayout": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayout", + "description": "Parsed layout of the document." + }, "entities": { "description": "A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.", "items": { @@ -2698,6 +2706,282 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta1DocumentChunkedDocument": { + "description": "Represents the chunks that the document is divided into.", + "id": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocument", + "properties": { + "chunks": { + "description": "List of chunks.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk": { + "description": "Represents a chunk.", + "id": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk", + "properties": { + "chunkId": { + "description": "ID of the chunk.", + "type": "string" + }, + "content": { + "description": "Text content of the chunk.", + "type": "string" + }, + "pageFooters": { + "description": "Page footers associated with the chunk.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter" + }, + "type": "array" + }, + "pageHeaders": { + "description": "Page headers associated with the chunk.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader" + }, + "type": "array" + }, + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan", + "description": "Page span of the chunk." + }, + "sourceBlockIds": { + "description": "Unused.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter": { + "description": "Represents the page footer associated with the chunk.", + "id": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter", + "properties": { + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan", + "description": "Page span of the footer." + }, + "text": { + "description": "Footer in text format.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader": { + "description": "Represents the page header associated with the chunk.", + "id": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader", + "properties": { + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan", + "description": "Page span of the header." + }, + "text": { + "description": "Header in text format.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan": { + "description": "Represents where the chunk starts and ends in the document.", + "id": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan", + "properties": { + "pageEnd": { + "description": "Page where chunk ends in the document.", + "format": "int32", + "type": "integer" + }, + "pageStart": { + "description": "Page where chunk starts in the document.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentDocumentLayout": { + "description": "Represents the parsed layout of a document as a collection of blocks that the document is divided into.", + "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayout", + "properties": { + "blocks": { + "description": "List of blocks in the document.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock": { + "description": "Represents a block. A block could be one of the various types (text, table, list) supported.", + "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock", + "properties": { + "blockId": { + "description": "ID of the block.", + "type": "string" + }, + "listBlock": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock", + "description": "Block consisting of list content/structure." + }, + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan", + "description": "Page span of the block." + }, + "tableBlock": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock", + "description": "Block consisting of table content/structure." + }, + "textBlock": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock", + "description": "Block consisting of text content." + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock": { + "description": "Represents a list type block.", + "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock", + "properties": { + "listEntries": { + "description": "List entries that constitute a list block.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry" + }, + "type": "array" + }, + "type": { + "description": "Type of the list_entries (if exist). Available options are `ordered` and `unordered`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry": { + "description": "Represents an entry in the list.", + "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry", + "properties": { + "blocks": { + "description": "A list entry is a list of blocks. Repeated blocks support further hierarchies and nested blocks.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan": { + "description": "Represents where the block starts and ends in the document.", + "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan", + "properties": { + "pageEnd": { + "description": "Page where block ends in the document.", + "format": "int32", + "type": "integer" + }, + "pageStart": { + "description": "Page where block starts in the document.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock": { + "description": "Represents a table type block.", + "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock", + "properties": { + "bodyRows": { + "description": "Body rows containing main table content.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow" + }, + "type": "array" + }, + "caption": { + "description": "Table caption/title.", + "type": "string" + }, + "headerRows": { + "description": "Header rows at the top of the table.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell": { + "description": "Represents a cell in a table row.", + "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell", + "properties": { + "blocks": { + "description": "A table cell is a list of blocks. Repeated blocks support further hierarchies and nested blocks.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock" + }, + "type": "array" + }, + "colSpan": { + "description": "How many columns this cell spans.", + "format": "int32", + "type": "integer" + }, + "rowSpan": { + "description": "How many rows this cell spans.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow": { + "description": "Represents a row in a table.", + "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow", + "properties": { + "cells": { + "description": "A table row is a list of table cells.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock": { + "description": "Represents a text type block.", + "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock", + "properties": { + "blocks": { + "description": "A text block could further have child blocks. Repeated blocks support further hierarchies and nested blocks.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock" + }, + "type": "array" + }, + "text": { + "description": "Text content stored in the block.", + "type": "string" + }, + "type": { + "description": "Type of the text in the block. Available options are: `paragraph`, `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, `header`, `footer`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta1DocumentEntity": { "description": "An entity that could be a phrase in the text or a property that belongs to the document. It is a known entity type, such as a person, an organization, or location.", "id": "GoogleCloudDocumentaiV1beta1DocumentEntity", @@ -4001,11 +4285,19 @@ "description": "Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality.", "id": "GoogleCloudDocumentaiV1beta2Document", "properties": { + "chunkedDocument": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocument", + "description": "Document chunked based on chunking config." + }, "content": { "description": "Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.", "format": "byte", "type": "string" }, + "documentLayout": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayout", + "description": "Parsed layout of the document." + }, "entities": { "description": "A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.", "items": { @@ -4079,6 +4371,282 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta2DocumentChunkedDocument": { + "description": "Represents the chunks that the document is divided into.", + "id": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocument", + "properties": { + "chunks": { + "description": "List of chunks.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk": { + "description": "Represents a chunk.", + "id": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk", + "properties": { + "chunkId": { + "description": "ID of the chunk.", + "type": "string" + }, + "content": { + "description": "Text content of the chunk.", + "type": "string" + }, + "pageFooters": { + "description": "Page footers associated with the chunk.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter" + }, + "type": "array" + }, + "pageHeaders": { + "description": "Page headers associated with the chunk.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader" + }, + "type": "array" + }, + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan", + "description": "Page span of the chunk." + }, + "sourceBlockIds": { + "description": "Unused.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter": { + "description": "Represents the page footer associated with the chunk.", + "id": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter", + "properties": { + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan", + "description": "Page span of the footer." + }, + "text": { + "description": "Footer in text format.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader": { + "description": "Represents the page header associated with the chunk.", + "id": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader", + "properties": { + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan", + "description": "Page span of the header." + }, + "text": { + "description": "Header in text format.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan": { + "description": "Represents where the chunk starts and ends in the document.", + "id": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan", + "properties": { + "pageEnd": { + "description": "Page where chunk ends in the document.", + "format": "int32", + "type": "integer" + }, + "pageStart": { + "description": "Page where chunk starts in the document.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentDocumentLayout": { + "description": "Represents the parsed layout of a document as a collection of blocks that the document is divided into.", + "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayout", + "properties": { + "blocks": { + "description": "List of blocks in the document.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock": { + "description": "Represents a block. A block could be one of the various types (text, table, list) supported.", + "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock", + "properties": { + "blockId": { + "description": "ID of the block.", + "type": "string" + }, + "listBlock": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock", + "description": "Block consisting of list content/structure." + }, + "pageSpan": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan", + "description": "Page span of the block." + }, + "tableBlock": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock", + "description": "Block consisting of table content/structure." + }, + "textBlock": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock", + "description": "Block consisting of text content." + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock": { + "description": "Represents a list type block.", + "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock", + "properties": { + "listEntries": { + "description": "List entries that constitute a list block.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry" + }, + "type": "array" + }, + "type": { + "description": "Type of the list_entries (if exist). Available options are `ordered` and `unordered`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry": { + "description": "Represents an entry in the list.", + "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry", + "properties": { + "blocks": { + "description": "A list entry is a list of blocks. Repeated blocks support further hierarchies and nested blocks.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan": { + "description": "Represents where the block starts and ends in the document.", + "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan", + "properties": { + "pageEnd": { + "description": "Page where block ends in the document.", + "format": "int32", + "type": "integer" + }, + "pageStart": { + "description": "Page where block starts in the document.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock": { + "description": "Represents a table type block.", + "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock", + "properties": { + "bodyRows": { + "description": "Body rows containing main table content.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow" + }, + "type": "array" + }, + "caption": { + "description": "Table caption/title.", + "type": "string" + }, + "headerRows": { + "description": "Header rows at the top of the table.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell": { + "description": "Represents a cell in a table row.", + "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell", + "properties": { + "blocks": { + "description": "A table cell is a list of blocks. Repeated blocks support further hierarchies and nested blocks.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock" + }, + "type": "array" + }, + "colSpan": { + "description": "How many columns this cell spans.", + "format": "int32", + "type": "integer" + }, + "rowSpan": { + "description": "How many rows this cell spans.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow": { + "description": "Represents a row in a table.", + "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow", + "properties": { + "cells": { + "description": "A table row is a list of table cells.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock": { + "description": "Represents a text type block.", + "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock", + "properties": { + "blocks": { + "description": "A text block could further have child blocks. Repeated blocks support further hierarchies and nested blocks.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock" + }, + "type": "array" + }, + "text": { + "description": "Text content stored in the block.", + "type": "string" + }, + "type": { + "description": "Type of the text in the block. Available options are: `paragraph`, `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, `header`, `footer`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta2DocumentEntity": { "description": "An entity that could be a phrase in the text or a property that belongs to the document. It is a known entity type, such as a person, an organization, or location.", "id": "GoogleCloudDocumentaiV1beta2DocumentEntity", @@ -5708,6 +6276,16 @@ "description": "Dataset resource name. Format: `projects/{project}/locations/{location}/processors/{processor}/dataset`", "type": "string" }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "spannerIndexingConfig": { "$ref": "GoogleCloudDocumentaiV1beta3DatasetSpannerIndexingConfig", "description": "Optional. A lightweight indexing source with low latency and high reliability, but lacking advanced features like CMEK and content-based search." @@ -5986,7 +6564,7 @@ "description": "Page span of the chunk." }, "sourceBlockIds": { - "description": "DO NOT USE. List of all parsed documents layout source blocks used to generate the chunk.", + "description": "Unused.", "items": { "type": "string" }, @@ -8580,6 +9158,16 @@ "readOnly": true, "type": "array" }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "state": { "description": "Output only. The state of the processor.", "enum": [ @@ -8741,6 +9329,16 @@ "description": "Identifier. The resource name of the processor version. Format: `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`", "type": "string" }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "state": { "description": "Output only. The state of the processor version.", "enum": [ diff --git a/documentai/v1beta3/documentai-gen.go b/documentai/v1beta3/documentai-gen.go index 03a3ebb51aa..a11d8677198 100644 --- a/documentai/v1beta3/documentai-gen.go +++ b/documentai/v1beta3/documentai-gen.go @@ -2172,10 +2172,14 @@ func (s *GoogleCloudDocumentaiV1beta1BoundingPoly) MarshalJSON() ([]byte, error) // insights into documents and allows for collaboration between users and // Document AI to iterate and optimize for quality. type GoogleCloudDocumentaiV1beta1Document struct { + // ChunkedDocument: Document chunked based on chunking config. + ChunkedDocument *GoogleCloudDocumentaiV1beta1DocumentChunkedDocument `json:"chunkedDocument,omitempty"` // Content: Optional. Inline document content, represented as a stream of // bytes. Note: As with all `bytes` fields, protobuffers use a pure binary // representation, whereas JSON representations use base64. Content string `json:"content,omitempty"` + // DocumentLayout: Parsed layout of the document. + DocumentLayout *GoogleCloudDocumentaiV1beta1DocumentDocumentLayout `json:"documentLayout,omitempty"` // Entities: A list of entities detected on Document.text. For document shards, // entities in this list may cross shard boundaries. Entities []*GoogleCloudDocumentaiV1beta1DocumentEntity `json:"entities,omitempty"` @@ -2207,15 +2211,15 @@ type GoogleCloudDocumentaiV1beta1Document struct { // information, refer to Google Cloud Storage Request URIs // (https://cloud.google.com/storage/docs/reference-uris). Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Content") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "ChunkedDocument") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "ChunkedDocument") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -2225,757 +2229,692 @@ func (s *GoogleCloudDocumentaiV1beta1Document) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1DocumentEntity: An entity that could be a phrase -// in the text or a property that belongs to the document. It is a known entity -// type, such as a person, an organization, or location. -type GoogleCloudDocumentaiV1beta1DocumentEntity struct { - // Confidence: Optional. Confidence of detected Schema entity. Range `[0, 1]`. - Confidence float64 `json:"confidence,omitempty"` - // Id: Optional. Canonical id. This will be a unique value in the entity list - // for this document. - Id string `json:"id,omitempty"` - // MentionId: Optional. Deprecated. Use `id` field instead. - MentionId string `json:"mentionId,omitempty"` - // MentionText: Optional. Text value of the entity e.g. `1600 Amphitheatre - // Pkwy`. - MentionText string `json:"mentionText,omitempty"` - // NormalizedValue: Optional. Normalized entity value. Absent if the extracted - // value could not be converted or the type (e.g. address) is not supported for - // certain parsers. This field is also only populated for certain supported - // document types. - NormalizedValue *GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue `json:"normalizedValue,omitempty"` - // PageAnchor: Optional. Represents the provenance of this entity wrt. the - // location on the page where it was found. - PageAnchor *GoogleCloudDocumentaiV1beta1DocumentPageAnchor `json:"pageAnchor,omitempty"` - // Properties: Optional. Entities can be nested to form a hierarchical data - // structure representing the content in the document. - Properties []*GoogleCloudDocumentaiV1beta1DocumentEntity `json:"properties,omitempty"` - // Provenance: Optional. The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` - // Redacted: Optional. Whether the entity will be redacted for - // de-identification purposes. - Redacted bool `json:"redacted,omitempty"` - // TextAnchor: Optional. Provenance of the entity. Text anchor indexing into - // the Document.text. - TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"` - // Type: Required. Entity type from a schema e.g. `Address`. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Confidence") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDocumentaiV1beta1DocumentChunkedDocument: Represents the chunks +// that the document is divided into. +type GoogleCloudDocumentaiV1beta1DocumentChunkedDocument struct { + // Chunks: List of chunks. + Chunks []*GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk `json:"chunks,omitempty"` + // ForceSendFields is a list of field names (e.g. "Chunks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Confidence") to include in API + // NullFields is a list of field names (e.g. "Chunks") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentEntity) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntity +func (s *GoogleCloudDocumentaiV1beta1DocumentChunkedDocument) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentChunkedDocument return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDocumentaiV1beta1DocumentEntity) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntity - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil +// GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk: Represents a +// chunk. +type GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk struct { + // ChunkId: ID of the chunk. + ChunkId string `json:"chunkId,omitempty"` + // Content: Text content of the chunk. + Content string `json:"content,omitempty"` + // PageFooters: Page footers associated with the chunk. + PageFooters []*GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter `json:"pageFooters,omitempty"` + // PageHeaders: Page headers associated with the chunk. + PageHeaders []*GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader `json:"pageHeaders,omitempty"` + // PageSpan: Page span of the chunk. + PageSpan *GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` + // SourceBlockIds: Unused. + SourceBlockIds []string `json:"sourceBlockIds,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChunkId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue: Parsed and -// normalized entity value. -type GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue struct { - // AddressValue: Postal address. See also: - // https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto - AddressValue *GoogleTypePostalAddress `json:"addressValue,omitempty"` - // BooleanValue: Boolean value. Can be used for entities with binary values, or - // for checkboxes. - BooleanValue bool `json:"booleanValue,omitempty"` - // DateValue: Date value. Includes year, month, day. See also: - // https://github.com/googleapis/googleapis/blob/master/google/type/date.proto - DateValue *GoogleTypeDate `json:"dateValue,omitempty"` - // DatetimeValue: DateTime value. Includes date, time, and timezone. See also: - // https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto - DatetimeValue *GoogleTypeDateTime `json:"datetimeValue,omitempty"` - // FloatValue: Float value. - FloatValue float64 `json:"floatValue,omitempty"` - // IntegerValue: Integer value. - IntegerValue int64 `json:"integerValue,omitempty"` - // MoneyValue: Money value. See also: - // https://github.com/googleapis/googleapis/blob/master/google/type/money.proto - MoneyValue *GoogleTypeMoney `json:"moneyValue,omitempty"` - // Text: Optional. An optional field to store a normalized string. For some - // entity types, one of respective `structured_value` fields may also be - // populated. Also not all the types of `structured_value` will be normalized. - // For example, some processors may not generate `float` or `integer` - // normalized text by default. Below are sample formats mapped to structured - // values. - Money/Currency type (`money_value`) is in the ISO 4217 text - // format. - Date type (`date_value`) is in the ISO 8601 text format. - - // Datetime type (`datetime_value`) is in the ISO 8601 text format. +func (s *GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter: +// Represents the page footer associated with the chunk. +type GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter struct { + // PageSpan: Page span of the footer. + PageSpan *GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` + // Text: Footer in text format. Text string `json:"text,omitempty"` - // ForceSendFields is a list of field names (e.g. "AddressValue") to + // ForceSendFields is a list of field names (e.g. "PageSpan") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AddressValue") to include in API + // NullFields is a list of field names (e.g. "PageSpan") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue +func (s *GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue - var s1 struct { - FloatValue gensupport.JSONFloat64 `json:"floatValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FloatValue = float64(s1.FloatValue) - return nil -} - -// GoogleCloudDocumentaiV1beta1DocumentEntityRelation: Relationship between -// Entities. -type GoogleCloudDocumentaiV1beta1DocumentEntityRelation struct { - // ObjectId: Object entity id. - ObjectId string `json:"objectId,omitempty"` - // Relation: Relationship description. - Relation string `json:"relation,omitempty"` - // SubjectId: Subject entity id. - SubjectId string `json:"subjectId,omitempty"` - // ForceSendFields is a list of field names (e.g. "ObjectId") to +// GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader: +// Represents the page header associated with the chunk. +type GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader struct { + // PageSpan: Page span of the header. + PageSpan *GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` + // Text: Header in text format. + Text string `json:"text,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageSpan") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ObjectId") to include in API + // NullFields is a list of field names (e.g. "PageSpan") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentEntityRelation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntityRelation +func (s *GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1DocumentPage: A page in a Document. -type GoogleCloudDocumentaiV1beta1DocumentPage struct { - // Blocks: A list of visually detected text blocks on the page. A block has a - // set of lines (collected into paragraphs) that have a common line-spacing and - // orientation. - Blocks []*GoogleCloudDocumentaiV1beta1DocumentPageBlock `json:"blocks,omitempty"` - // DetectedBarcodes: A list of detected barcodes. - DetectedBarcodes []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode `json:"detectedBarcodes,omitempty"` - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Dimension: Physical dimension of the page. - Dimension *GoogleCloudDocumentaiV1beta1DocumentPageDimension `json:"dimension,omitempty"` - // FormFields: A list of visually detected form fields on the page. - FormFields []*GoogleCloudDocumentaiV1beta1DocumentPageFormField `json:"formFields,omitempty"` - // Image: Rendered image for this page. This image is preprocessed to remove - // any skew, rotation, and distortions such that the annotation bounding boxes - // can be upright and axis-aligned. - Image *GoogleCloudDocumentaiV1beta1DocumentPageImage `json:"image,omitempty"` - // ImageQualityScores: Image quality scores. - ImageQualityScores *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores `json:"imageQualityScores,omitempty"` - // Layout: Layout for the page. - Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // Lines: A list of visually detected text lines on the page. A collection of - // tokens that a human would perceive as a line. - Lines []*GoogleCloudDocumentaiV1beta1DocumentPageLine `json:"lines,omitempty"` - // PageNumber: 1-based index for current Page in a parent Document. Useful when - // a page is taken out of a Document for individual processing. - PageNumber int64 `json:"pageNumber,omitempty"` - // Paragraphs: A list of visually detected text paragraphs on the page. A - // collection of lines that a human would perceive as a paragraph. - Paragraphs []*GoogleCloudDocumentaiV1beta1DocumentPageParagraph `json:"paragraphs,omitempty"` - // Provenance: The history of this page. - Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` - // Symbols: A list of visually detected symbols on the page. - Symbols []*GoogleCloudDocumentaiV1beta1DocumentPageSymbol `json:"symbols,omitempty"` - // Tables: A list of visually detected tables on the page. - Tables []*GoogleCloudDocumentaiV1beta1DocumentPageTable `json:"tables,omitempty"` - // Tokens: A list of visually detected tokens on the page. - Tokens []*GoogleCloudDocumentaiV1beta1DocumentPageToken `json:"tokens,omitempty"` - // Transforms: Transformation matrices that were applied to the original - // document image to produce Page.image. - Transforms []*GoogleCloudDocumentaiV1beta1DocumentPageMatrix `json:"transforms,omitempty"` - // VisualElements: A list of detected non-text visual elements e.g. checkbox, - // signature etc. on the page. - VisualElements []*GoogleCloudDocumentaiV1beta1DocumentPageVisualElement `json:"visualElements,omitempty"` - // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally +// GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan: +// Represents where the chunk starts and ends in the document. +type GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan struct { + // PageEnd: Page where chunk ends in the document. + PageEnd int64 `json:"pageEnd,omitempty"` + // PageStart: Page where chunk starts in the document. + PageStart int64 `json:"pageStart,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageEnd") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Blocks") to include in API + // NullFields is a list of field names (e.g. "PageEnd") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentPage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPage +func (s *GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1DocumentPageAnchor: Referencing the visual -// context of the entity in the Document.pages. Page anchors can be cross-page, -// consist of multiple bounding polygons and optionally reference specific -// layout element types. -type GoogleCloudDocumentaiV1beta1DocumentPageAnchor struct { - // PageRefs: One or more references to visual page elements - PageRefs []*GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef `json:"pageRefs,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageRefs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDocumentaiV1beta1DocumentDocumentLayout: Represents the parsed +// layout of a document as a collection of blocks that the document is divided +// into. +type GoogleCloudDocumentaiV1beta1DocumentDocumentLayout struct { + // Blocks: List of blocks in the document. + Blocks []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageRefs") to include in API + // NullFields is a list of field names (e.g. "Blocks") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageAnchor) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageAnchor +func (s *GoogleCloudDocumentaiV1beta1DocumentDocumentLayout) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayout return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef: Represents a weak -// reference to a page element within a document. -type GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef struct { - // BoundingPoly: Optional. Identifies the bounding polygon of a layout element - // on the page. If `layout_type` is set, the bounding polygon must be exactly - // the same to the layout element it's referring to. - BoundingPoly *GoogleCloudDocumentaiV1beta1BoundingPoly `json:"boundingPoly,omitempty"` - // Confidence: Optional. Confidence of detected page element, if applicable. - // Range `[0, 1]`. - Confidence float64 `json:"confidence,omitempty"` - // LayoutId: Optional. Deprecated. Use PageRef.bounding_poly instead. - LayoutId string `json:"layoutId,omitempty"` - // LayoutType: Optional. The type of the layout element that is being - // referenced if any. - // - // Possible values: - // "LAYOUT_TYPE_UNSPECIFIED" - Layout Unspecified. - // "BLOCK" - References a Page.blocks element. - // "PARAGRAPH" - References a Page.paragraphs element. - // "LINE" - References a Page.lines element. - // "TOKEN" - References a Page.tokens element. - // "VISUAL_ELEMENT" - References a Page.visual_elements element. - // "TABLE" - Refrrences a Page.tables element. - // "FORM_FIELD" - References a Page.form_fields element. - LayoutType string `json:"layoutType,omitempty"` - // Page: Required. Index into the Document.pages element, for example using - // `Document.pages` to locate the related page element. This field is skipped - // when its value is the default `0`. See - // https://developers.google.com/protocol-buffers/docs/proto3#json. - Page int64 `json:"page,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "BoundingPoly") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock: +// Represents a block. A block could be one of the various types (text, table, +// list) supported. +type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock struct { + // BlockId: ID of the block. + BlockId string `json:"blockId,omitempty"` + // ListBlock: Block consisting of list content/structure. + ListBlock *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock `json:"listBlock,omitempty"` + // PageSpan: Page span of the block. + PageSpan *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan `json:"pageSpan,omitempty"` + // TableBlock: Block consisting of table content/structure. + TableBlock *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock `json:"tableBlock,omitempty"` + // TextBlock: Block consisting of text content. + TextBlock *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock `json:"textBlock,omitempty"` + // ForceSendFields is a list of field names (e.g. "BlockId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BoundingPoly") to include in API + // NullFields is a list of field names (e.g. "BlockId") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef +func (s *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudDocumentaiV1beta1DocumentPageBlock: A block has a set of lines -// (collected into paragraphs) that have a common line-spacing and orientation. -type GoogleCloudDocumentaiV1beta1DocumentPageBlock struct { - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for Block. - Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // Provenance: The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to +// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutLi +// stBlock: Represents a list type block. +type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock struct { + // ListEntries: List entries that constitute a list block. + ListEntries []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry `json:"listEntries,omitempty"` + // Type: Type of the list_entries (if exist). Available options are `ordered` + // and `unordered`. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "ListEntries") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedLanguages") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "ListEntries") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageBlock) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageBlock +func (s *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode: A detected barcode. -type GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode struct { - // Barcode: Detailed barcode information of the DetectedBarcode. - Barcode *GoogleCloudDocumentaiV1beta1Barcode `json:"barcode,omitempty"` - // Layout: Layout for DetectedBarcode. - Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // ForceSendFields is a list of field names (e.g. "Barcode") to unconditionally +// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutLi +// stEntry: Represents an entry in the list. +type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry struct { + // Blocks: A list entry is a list of blocks. Repeated blocks support further + // hierarchies and nested blocks. + Blocks []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Barcode") to include in API + // NullFields is a list of field names (e.g. "Blocks") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode +func (s *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage: Detected language -// for a structural component. -type GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage struct { - // Confidence: Confidence of detected language. Range `[0, 1]`. - Confidence float64 `json:"confidence,omitempty"` - // LanguageCode: The BCP-47 language code - // (https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as - // `en-US` or `sr-Latn`. - LanguageCode string `json:"languageCode,omitempty"` - // ForceSendFields is a list of field names (e.g. "Confidence") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPa +// geSpan: Represents where the block starts and ends in the document. +type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan struct { + // PageEnd: Page where block ends in the document. + PageEnd int64 `json:"pageEnd,omitempty"` + // PageStart: Page where block starts in the document. + PageStart int64 `json:"pageStart,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageEnd") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Confidence") to include in API + // NullFields is a list of field names (e.g. "PageEnd") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage +func (s *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil +// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTa +// bleBlock: Represents a table type block. +type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock struct { + // BodyRows: Body rows containing main table content. + BodyRows []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow `json:"bodyRows,omitempty"` + // Caption: Table caption/title. + Caption string `json:"caption,omitempty"` + // HeaderRows: Header rows at the top of the table. + HeaderRows []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow `json:"headerRows,omitempty"` + // ForceSendFields is a list of field names (e.g. "BodyRows") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BodyRows") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// GoogleCloudDocumentaiV1beta1DocumentPageDimension: Dimension for the page. -type GoogleCloudDocumentaiV1beta1DocumentPageDimension struct { - // Height: Page height. - Height float64 `json:"height,omitempty"` - // Unit: Dimension unit. - Unit string `json:"unit,omitempty"` - // Width: Page width. - Width float64 `json:"width,omitempty"` - // ForceSendFields is a list of field names (e.g. "Height") to unconditionally +func (s *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTa +// bleCell: Represents a cell in a table row. +type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell struct { + // Blocks: A table cell is a list of blocks. Repeated blocks support further + // hierarchies and nested blocks. + Blocks []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // ColSpan: How many columns this cell spans. + ColSpan int64 `json:"colSpan,omitempty"` + // RowSpan: How many rows this cell spans. + RowSpan int64 `json:"rowSpan,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Height") to include in API + // NullFields is a list of field names (e.g. "Blocks") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageDimension) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDimension +func (s *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageDimension) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDimension - var s1 struct { - Height gensupport.JSONFloat64 `json:"height"` - Width gensupport.JSONFloat64 `json:"width"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Height = float64(s1.Height) - s.Width = float64(s1.Width) - return nil -} - -// GoogleCloudDocumentaiV1beta1DocumentPageFormField: A form field detected on -// the page. -type GoogleCloudDocumentaiV1beta1DocumentPageFormField struct { - // CorrectedKeyText: Created for Labeling UI to export key text. If corrections - // were made to the text identified by the `field_name.text_anchor`, this field - // will contain the correction. - CorrectedKeyText string `json:"correctedKeyText,omitempty"` - // CorrectedValueText: Created for Labeling UI to export value text. If - // corrections were made to the text identified by the - // `field_value.text_anchor`, this field will contain the correction. - CorrectedValueText string `json:"correctedValueText,omitempty"` - // FieldName: Layout for the FormField name. e.g. `Address`, `Email`, `Grand - // total`, `Phone number`, etc. - FieldName *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"fieldName,omitempty"` - // FieldValue: Layout for the FormField value. - FieldValue *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"fieldValue,omitempty"` - // NameDetectedLanguages: A list of detected languages for name together with - // confidence. - NameDetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"nameDetectedLanguages,omitempty"` - // Provenance: The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` - // ValueDetectedLanguages: A list of detected languages for value together with - // confidence. - ValueDetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"valueDetectedLanguages,omitempty"` - // ValueType: If the value is non-textual, this field represents the type. - // Current valid values are: - blank (this indicates the `field_value` is - // normal text) - `unfilled_checkbox` - `filled_checkbox` - ValueType string `json:"valueType,omitempty"` - // ForceSendFields is a list of field names (e.g. "CorrectedKeyText") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTa +// bleRow: Represents a row in a table. +type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow struct { + // Cells: A table row is a list of table cells. + Cells []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell `json:"cells,omitempty"` + // ForceSendFields is a list of field names (e.g. "Cells") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CorrectedKeyText") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "Cells") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageFormField) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageFormField +func (s *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1DocumentPageImage: Rendered image contents for -// this page. -type GoogleCloudDocumentaiV1beta1DocumentPageImage struct { - // Content: Raw byte content of the image. - Content string `json:"content,omitempty"` - // Height: Height of the image in pixels. - Height int64 `json:"height,omitempty"` - // MimeType: Encoding media type (MIME type) - // (https://www.iana.org/assignments/media-types/media-types.xhtml) for the - // image. - MimeType string `json:"mimeType,omitempty"` - // Width: Width of the image in pixels. - Width int64 `json:"width,omitempty"` - // ForceSendFields is a list of field names (e.g. "Content") to unconditionally +// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTe +// xtBlock: Represents a text type block. +type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock struct { + // Blocks: A text block could further have child blocks. Repeated blocks + // support further hierarchies and nested blocks. + Blocks []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // Text: Text content stored in the block. + Text string `json:"text,omitempty"` + // Type: Type of the text in the block. Available options are: `paragraph`, + // `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, + // `header`, `footer`. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in API + // NullFields is a list of field names (e.g. "Blocks") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageImage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImage +func (s *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores: Image quality -// scores for the page image. -type GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores struct { - // DetectedDefects: A list of detected defects. - DetectedDefects []*GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect `json:"detectedDefects,omitempty"` - // QualityScore: The overall quality score. Range `[0, 1]` where `1` is perfect - // quality. - QualityScore float64 `json:"qualityScore,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedDefects") to +// GoogleCloudDocumentaiV1beta1DocumentEntity: An entity that could be a phrase +// in the text or a property that belongs to the document. It is a known entity +// type, such as a person, an organization, or location. +type GoogleCloudDocumentaiV1beta1DocumentEntity struct { + // Confidence: Optional. Confidence of detected Schema entity. Range `[0, 1]`. + Confidence float64 `json:"confidence,omitempty"` + // Id: Optional. Canonical id. This will be a unique value in the entity list + // for this document. + Id string `json:"id,omitempty"` + // MentionId: Optional. Deprecated. Use `id` field instead. + MentionId string `json:"mentionId,omitempty"` + // MentionText: Optional. Text value of the entity e.g. `1600 Amphitheatre + // Pkwy`. + MentionText string `json:"mentionText,omitempty"` + // NormalizedValue: Optional. Normalized entity value. Absent if the extracted + // value could not be converted or the type (e.g. address) is not supported for + // certain parsers. This field is also only populated for certain supported + // document types. + NormalizedValue *GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue `json:"normalizedValue,omitempty"` + // PageAnchor: Optional. Represents the provenance of this entity wrt. the + // location on the page where it was found. + PageAnchor *GoogleCloudDocumentaiV1beta1DocumentPageAnchor `json:"pageAnchor,omitempty"` + // Properties: Optional. Entities can be nested to form a hierarchical data + // structure representing the content in the document. + Properties []*GoogleCloudDocumentaiV1beta1DocumentEntity `json:"properties,omitempty"` + // Provenance: Optional. The history of this annotation. + Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` + // Redacted: Optional. Whether the entity will be redacted for + // de-identification purposes. + Redacted bool `json:"redacted,omitempty"` + // TextAnchor: Optional. Provenance of the entity. Text anchor indexing into + // the Document.text. + TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"` + // Type: Required. Entity type from a schema e.g. `Address`. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Confidence") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedDefects") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "Confidence") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores +func (s *GoogleCloudDocumentaiV1beta1DocumentEntity) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntity return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores +func (s *GoogleCloudDocumentaiV1beta1DocumentEntity) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntity var s1 struct { - QualityScore gensupport.JSONFloat64 `json:"qualityScore"` + Confidence gensupport.JSONFloat64 `json:"confidence"` *NoMethod } s1.NoMethod = (*NoMethod)(s) if err := json.Unmarshal(data, &s1); err != nil { return err } - s.QualityScore = float64(s1.QualityScore) + s.Confidence = float64(s1.Confidence) return nil } -// GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect: -// Image Quality Defects -type GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect struct { - // Confidence: Confidence of detected defect. Range `[0, 1]` where `1` - // indicates strong confidence that the defect exists. - Confidence float64 `json:"confidence,omitempty"` - // Type: Name of the defect type. Supported values are: - - // `quality/defect_blurry` - `quality/defect_noisy` - `quality/defect_dark` - - // `quality/defect_faint` - `quality/defect_text_too_small` - - // `quality/defect_document_cutoff` - `quality/defect_text_cutoff` - - // `quality/defect_glare` - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Confidence") to +// GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue: Parsed and +// normalized entity value. +type GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue struct { + // AddressValue: Postal address. See also: + // https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto + AddressValue *GoogleTypePostalAddress `json:"addressValue,omitempty"` + // BooleanValue: Boolean value. Can be used for entities with binary values, or + // for checkboxes. + BooleanValue bool `json:"booleanValue,omitempty"` + // DateValue: Date value. Includes year, month, day. See also: + // https://github.com/googleapis/googleapis/blob/master/google/type/date.proto + DateValue *GoogleTypeDate `json:"dateValue,omitempty"` + // DatetimeValue: DateTime value. Includes date, time, and timezone. See also: + // https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto + DatetimeValue *GoogleTypeDateTime `json:"datetimeValue,omitempty"` + // FloatValue: Float value. + FloatValue float64 `json:"floatValue,omitempty"` + // IntegerValue: Integer value. + IntegerValue int64 `json:"integerValue,omitempty"` + // MoneyValue: Money value. See also: + // https://github.com/googleapis/googleapis/blob/master/google/type/money.proto + MoneyValue *GoogleTypeMoney `json:"moneyValue,omitempty"` + // Text: Optional. An optional field to store a normalized string. For some + // entity types, one of respective `structured_value` fields may also be + // populated. Also not all the types of `structured_value` will be normalized. + // For example, some processors may not generate `float` or `integer` + // normalized text by default. Below are sample formats mapped to structured + // values. - Money/Currency type (`money_value`) is in the ISO 4217 text + // format. - Date type (`date_value`) is in the ISO 8601 text format. - + // Datetime type (`datetime_value`) is in the ISO 8601 text format. + Text string `json:"text,omitempty"` + // ForceSendFields is a list of field names (e.g. "AddressValue") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Confidence") to include in API + // NullFields is a list of field names (e.g. "AddressValue") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect +func (s *GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect +func (s *GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` + FloatValue gensupport.JSONFloat64 `json:"floatValue"` *NoMethod } s1.NoMethod = (*NoMethod)(s) if err := json.Unmarshal(data, &s1); err != nil { return err } - s.Confidence = float64(s1.Confidence) + s.FloatValue = float64(s1.FloatValue) return nil } -// GoogleCloudDocumentaiV1beta1DocumentPageLayout: Visual element describing a -// layout unit on a page. -type GoogleCloudDocumentaiV1beta1DocumentPageLayout struct { - // BoundingPoly: The bounding polygon for the Layout. - BoundingPoly *GoogleCloudDocumentaiV1beta1BoundingPoly `json:"boundingPoly,omitempty"` - // Confidence: Confidence of the current Layout within context of the object - // this layout is for. e.g. confidence can be for a single token, a table, a - // visual element, etc. depending on context. Range `[0, 1]`. - Confidence float64 `json:"confidence,omitempty"` - // Orientation: Detected orientation for the Layout. - // - // Possible values: - // "ORIENTATION_UNSPECIFIED" - Unspecified orientation. - // "PAGE_UP" - Orientation is aligned with page up. - // "PAGE_RIGHT" - Orientation is aligned with page right. Turn the head 90 - // degrees clockwise from upright to read. - // "PAGE_DOWN" - Orientation is aligned with page down. Turn the head 180 - // degrees from upright to read. - // "PAGE_LEFT" - Orientation is aligned with page left. Turn the head 90 - // degrees counterclockwise from upright to read. - Orientation string `json:"orientation,omitempty"` - // TextAnchor: Text anchor indexing into the Document.text. - TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"` - // ForceSendFields is a list of field names (e.g. "BoundingPoly") to +// GoogleCloudDocumentaiV1beta1DocumentEntityRelation: Relationship between +// Entities. +type GoogleCloudDocumentaiV1beta1DocumentEntityRelation struct { + // ObjectId: Object entity id. + ObjectId string `json:"objectId,omitempty"` + // Relation: Relationship description. + Relation string `json:"relation,omitempty"` + // SubjectId: Subject entity id. + SubjectId string `json:"subjectId,omitempty"` + // ForceSendFields is a list of field names (e.g. "ObjectId") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BoundingPoly") to include in API + // NullFields is a list of field names (e.g. "ObjectId") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageLayout) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageLayout +func (s *GoogleCloudDocumentaiV1beta1DocumentEntityRelation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntityRelation return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageLayout) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageLayout - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudDocumentaiV1beta1DocumentPageLine: A collection of tokens that a -// human would perceive as a line. Does not cross column boundaries, can be -// horizontal, vertical, etc. -type GoogleCloudDocumentaiV1beta1DocumentPageLine struct { +// GoogleCloudDocumentaiV1beta1DocumentPage: A page in a Document. +type GoogleCloudDocumentaiV1beta1DocumentPage struct { + // Blocks: A list of visually detected text blocks on the page. A block has a + // set of lines (collected into paragraphs) that have a common line-spacing and + // orientation. + Blocks []*GoogleCloudDocumentaiV1beta1DocumentPageBlock `json:"blocks,omitempty"` + // DetectedBarcodes: A list of detected barcodes. + DetectedBarcodes []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode `json:"detectedBarcodes,omitempty"` // DetectedLanguages: A list of detected languages together with confidence. DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for Line. + // Dimension: Physical dimension of the page. + Dimension *GoogleCloudDocumentaiV1beta1DocumentPageDimension `json:"dimension,omitempty"` + // FormFields: A list of visually detected form fields on the page. + FormFields []*GoogleCloudDocumentaiV1beta1DocumentPageFormField `json:"formFields,omitempty"` + // Image: Rendered image for this page. This image is preprocessed to remove + // any skew, rotation, and distortions such that the annotation bounding boxes + // can be upright and axis-aligned. + Image *GoogleCloudDocumentaiV1beta1DocumentPageImage `json:"image,omitempty"` + // ImageQualityScores: Image quality scores. + ImageQualityScores *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores `json:"imageQualityScores,omitempty"` + // Layout: Layout for the page. Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // Provenance: The history of this annotation. + // Lines: A list of visually detected text lines on the page. A collection of + // tokens that a human would perceive as a line. + Lines []*GoogleCloudDocumentaiV1beta1DocumentPageLine `json:"lines,omitempty"` + // PageNumber: 1-based index for current Page in a parent Document. Useful when + // a page is taken out of a Document for individual processing. + PageNumber int64 `json:"pageNumber,omitempty"` + // Paragraphs: A list of visually detected text paragraphs on the page. A + // collection of lines that a human would perceive as a paragraph. + Paragraphs []*GoogleCloudDocumentaiV1beta1DocumentPageParagraph `json:"paragraphs,omitempty"` + // Provenance: The history of this page. Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See + // Symbols: A list of visually detected symbols on the page. + Symbols []*GoogleCloudDocumentaiV1beta1DocumentPageSymbol `json:"symbols,omitempty"` + // Tables: A list of visually detected tables on the page. + Tables []*GoogleCloudDocumentaiV1beta1DocumentPageTable `json:"tables,omitempty"` + // Tokens: A list of visually detected tokens on the page. + Tokens []*GoogleCloudDocumentaiV1beta1DocumentPageToken `json:"tokens,omitempty"` + // Transforms: Transformation matrices that were applied to the original + // document image to produce Page.image. + Transforms []*GoogleCloudDocumentaiV1beta1DocumentPageMatrix `json:"transforms,omitempty"` + // VisualElements: A list of detected non-text visual elements e.g. checkbox, + // signature etc. on the page. + VisualElements []*GoogleCloudDocumentaiV1beta1DocumentPageVisualElement `json:"visualElements,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedLanguages") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "Blocks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageLine) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageLine +func (s *GoogleCloudDocumentaiV1beta1DocumentPage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPage return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1DocumentPageMatrix: Representation for -// transformation matrix, intended to be compatible and used with OpenCV format -// for image manipulation. -type GoogleCloudDocumentaiV1beta1DocumentPageMatrix struct { - // Cols: Number of columns in the matrix. - Cols int64 `json:"cols,omitempty"` - // Data: The matrix data. - Data string `json:"data,omitempty"` - // Rows: Number of rows in the matrix. - Rows int64 `json:"rows,omitempty"` - // Type: This encodes information about what data type the matrix uses. For - // example, 0 (CV_8U) is an unsigned 8-bit image. For the full list of OpenCV - // primitive data types, please refer to - // https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html - Type int64 `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cols") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. +// GoogleCloudDocumentaiV1beta1DocumentPageAnchor: Referencing the visual +// context of the entity in the Document.pages. Page anchors can be cross-page, +// consist of multiple bounding polygons and optionally reference specific +// layout element types. +type GoogleCloudDocumentaiV1beta1DocumentPageAnchor struct { + // PageRefs: One or more references to visual page elements + PageRefs []*GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef `json:"pageRefs,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageRefs") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cols") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "PageRefs") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageMatrix) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageMatrix +func (s *GoogleCloudDocumentaiV1beta1DocumentPageAnchor) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageAnchor return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1DocumentPageParagraph: A collection of lines -// that a human would perceive as a paragraph. -type GoogleCloudDocumentaiV1beta1DocumentPageParagraph struct { - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for Paragraph. - Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // Provenance: The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to +// GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef: Represents a weak +// reference to a page element within a document. +type GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef struct { + // BoundingPoly: Optional. Identifies the bounding polygon of a layout element + // on the page. If `layout_type` is set, the bounding polygon must be exactly + // the same to the layout element it's referring to. + BoundingPoly *GoogleCloudDocumentaiV1beta1BoundingPoly `json:"boundingPoly,omitempty"` + // Confidence: Optional. Confidence of detected page element, if applicable. + // Range `[0, 1]`. + Confidence float64 `json:"confidence,omitempty"` + // LayoutId: Optional. Deprecated. Use PageRef.bounding_poly instead. + LayoutId string `json:"layoutId,omitempty"` + // LayoutType: Optional. The type of the layout element that is being + // referenced if any. + // + // Possible values: + // "LAYOUT_TYPE_UNSPECIFIED" - Layout Unspecified. + // "BLOCK" - References a Page.blocks element. + // "PARAGRAPH" - References a Page.paragraphs element. + // "LINE" - References a Page.lines element. + // "TOKEN" - References a Page.tokens element. + // "VISUAL_ELEMENT" - References a Page.visual_elements element. + // "TABLE" - Refrrences a Page.tables element. + // "FORM_FIELD" - References a Page.form_fields element. + LayoutType string `json:"layoutType,omitempty"` + // Page: Required. Index into the Document.pages element, for example using + // `Document.pages` to locate the related page element. This field is skipped + // when its value is the default `0`. See + // https://developers.google.com/protocol-buffers/docs/proto3#json. + Page int64 `json:"page,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "BoundingPoly") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedLanguages") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "BoundingPoly") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageParagraph) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageParagraph +func (s *GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1DocumentPageSymbol: A detected symbol. -type GoogleCloudDocumentaiV1beta1DocumentPageSymbol struct { +func (s *GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + return nil +} + +// GoogleCloudDocumentaiV1beta1DocumentPageBlock: A block has a set of lines +// (collected into paragraphs) that have a common line-spacing and orientation. +type GoogleCloudDocumentaiV1beta1DocumentPageBlock struct { // DetectedLanguages: A list of detected languages together with confidence. DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for Symbol. + // Layout: Layout for Block. Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` + // Provenance: The history of this annotation. + Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -2989,302 +2928,737 @@ type GoogleCloudDocumentaiV1beta1DocumentPageSymbol struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageSymbol) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageSymbol +func (s *GoogleCloudDocumentaiV1beta1DocumentPageBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageBlock return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1DocumentPageTable: A table representation -// similar to HTML table structure. -type GoogleCloudDocumentaiV1beta1DocumentPageTable struct { - // BodyRows: Body rows of the table. - BodyRows []*GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow `json:"bodyRows,omitempty"` - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // HeaderRows: Header rows of the table. - HeaderRows []*GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow `json:"headerRows,omitempty"` - // Layout: Layout for Table. +// GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode: A detected barcode. +type GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode struct { + // Barcode: Detailed barcode information of the DetectedBarcode. + Barcode *GoogleCloudDocumentaiV1beta1Barcode `json:"barcode,omitempty"` + // Layout: Layout for DetectedBarcode. Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // Provenance: The history of this table. - Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` - // ForceSendFields is a list of field names (e.g. "BodyRows") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "Barcode") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BodyRows") to include in API + // NullFields is a list of field names (e.g. "Barcode") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageTable) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTable +func (s *GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell: A cell -// representation inside the table. -type GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell struct { - // ColSpan: How many columns this cell spans. - ColSpan int64 `json:"colSpan,omitempty"` - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for TableCell. - Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // RowSpan: How many rows this cell spans. - RowSpan int64 `json:"rowSpan,omitempty"` - // ForceSendFields is a list of field names (e.g. "ColSpan") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage: Detected language +// for a structural component. +type GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage struct { + // Confidence: Confidence of detected language. Range `[0, 1]`. + Confidence float64 `json:"confidence,omitempty"` + // LanguageCode: The BCP-47 language code + // (https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as + // `en-US` or `sr-Latn`. + LanguageCode string `json:"languageCode,omitempty"` + // ForceSendFields is a list of field names (e.g. "Confidence") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ColSpan") to include in API + // NullFields is a list of field names (e.g. "Confidence") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell +func (s *GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow: A row of table cells. -type GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow struct { - // Cells: Cells that make up this row. - Cells []*GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell `json:"cells,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cells") to unconditionally +func (s *GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + return nil +} + +// GoogleCloudDocumentaiV1beta1DocumentPageDimension: Dimension for the page. +type GoogleCloudDocumentaiV1beta1DocumentPageDimension struct { + // Height: Page height. + Height float64 `json:"height,omitempty"` + // Unit: Dimension unit. + Unit string `json:"unit,omitempty"` + // Width: Page width. + Width float64 `json:"width,omitempty"` + // ForceSendFields is a list of field names (e.g. "Height") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cells") to include in API + // NullFields is a list of field names (e.g. "Height") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow +func (s *GoogleCloudDocumentaiV1beta1DocumentPageDimension) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDimension return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1DocumentPageToken: A detected token. -type GoogleCloudDocumentaiV1beta1DocumentPageToken struct { - // DetectedBreak: Detected break at the end of a Token. - DetectedBreak *GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak `json:"detectedBreak,omitempty"` - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for Token. - Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` +func (s *GoogleCloudDocumentaiV1beta1DocumentPageDimension) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDimension + var s1 struct { + Height gensupport.JSONFloat64 `json:"height"` + Width gensupport.JSONFloat64 `json:"width"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Height = float64(s1.Height) + s.Width = float64(s1.Width) + return nil +} + +// GoogleCloudDocumentaiV1beta1DocumentPageFormField: A form field detected on +// the page. +type GoogleCloudDocumentaiV1beta1DocumentPageFormField struct { + // CorrectedKeyText: Created for Labeling UI to export key text. If corrections + // were made to the text identified by the `field_name.text_anchor`, this field + // will contain the correction. + CorrectedKeyText string `json:"correctedKeyText,omitempty"` + // CorrectedValueText: Created for Labeling UI to export value text. If + // corrections were made to the text identified by the + // `field_value.text_anchor`, this field will contain the correction. + CorrectedValueText string `json:"correctedValueText,omitempty"` + // FieldName: Layout for the FormField name. e.g. `Address`, `Email`, `Grand + // total`, `Phone number`, etc. + FieldName *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"fieldName,omitempty"` + // FieldValue: Layout for the FormField value. + FieldValue *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"fieldValue,omitempty"` + // NameDetectedLanguages: A list of detected languages for name together with + // confidence. + NameDetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"nameDetectedLanguages,omitempty"` // Provenance: The history of this annotation. Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` - // StyleInfo: Text style attributes. - StyleInfo *GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo `json:"styleInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedBreak") to + // ValueDetectedLanguages: A list of detected languages for value together with + // confidence. + ValueDetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"valueDetectedLanguages,omitempty"` + // ValueType: If the value is non-textual, this field represents the type. + // Current valid values are: - blank (this indicates the `field_value` is + // normal text) - `unfilled_checkbox` - `filled_checkbox` + ValueType string `json:"valueType,omitempty"` + // ForceSendFields is a list of field names (e.g. "CorrectedKeyText") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedBreak") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "CorrectedKeyText") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageToken) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageToken +func (s *GoogleCloudDocumentaiV1beta1DocumentPageFormField) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageFormField return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak: Detected break -// at the end of a Token. -type GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak struct { - // Type: Detected break type. - // - // Possible values: - // "TYPE_UNSPECIFIED" - Unspecified break type. - // "SPACE" - A single whitespace. - // "WIDE_SPACE" - A wider whitespace. - // "HYPHEN" - A hyphen that indicates that a token has been split across - // lines. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Type") to unconditionally +// GoogleCloudDocumentaiV1beta1DocumentPageImage: Rendered image contents for +// this page. +type GoogleCloudDocumentaiV1beta1DocumentPageImage struct { + // Content: Raw byte content of the image. + Content string `json:"content,omitempty"` + // Height: Height of the image in pixels. + Height int64 `json:"height,omitempty"` + // MimeType: Encoding media type (MIME type) + // (https://www.iana.org/assignments/media-types/media-types.xhtml) for the + // image. + MimeType string `json:"mimeType,omitempty"` + // Width: Width of the image in pixels. + Width int64 `json:"width,omitempty"` + // ForceSendFields is a list of field names (e.g. "Content") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Type") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "Content") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak +func (s *GoogleCloudDocumentaiV1beta1DocumentPageImage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImage return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo: Font and other text -// style attributes. -type GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo struct { - // BackgroundColor: Color of the background. - BackgroundColor *GoogleTypeColor `json:"backgroundColor,omitempty"` - // Bold: Whether the text is bold (equivalent to font_weight is at least - // `700`). - Bold bool `json:"bold,omitempty"` - // FontSize: Font size in points (`1` point is `¹⁄₇₂` inches). - FontSize int64 `json:"fontSize,omitempty"` - // FontType: Name or style of the font. - FontType string `json:"fontType,omitempty"` - // FontWeight: TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). - // Normal is `400`, bold is `700`. - FontWeight int64 `json:"fontWeight,omitempty"` - // Handwritten: Whether the text is handwritten. - Handwritten bool `json:"handwritten,omitempty"` - // Italic: Whether the text is italic. - Italic bool `json:"italic,omitempty"` - // LetterSpacing: Letter spacing in points. - LetterSpacing float64 `json:"letterSpacing,omitempty"` - // PixelFontSize: Font size in pixels, equal to _unrounded font_size_ * - // _resolution_ ÷ `72.0`. - PixelFontSize float64 `json:"pixelFontSize,omitempty"` - // Smallcaps: Whether the text is in small caps. This feature is not supported - // yet. - Smallcaps bool `json:"smallcaps,omitempty"` - // Strikeout: Whether the text is strikethrough. This feature is not supported - // yet. - Strikeout bool `json:"strikeout,omitempty"` - // Subscript: Whether the text is a subscript. This feature is not supported - // yet. - Subscript bool `json:"subscript,omitempty"` - // Superscript: Whether the text is a superscript. This feature is not - // supported yet. - Superscript bool `json:"superscript,omitempty"` - // TextColor: Color of the text. - TextColor *GoogleTypeColor `json:"textColor,omitempty"` - // Underlined: Whether the text is underlined. - Underlined bool `json:"underlined,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackgroundColor") to +// GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores: Image quality +// scores for the page image. +type GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores struct { + // DetectedDefects: A list of detected defects. + DetectedDefects []*GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect `json:"detectedDefects,omitempty"` + // QualityScore: The overall quality score. Range `[0, 1]` where `1` is perfect + // quality. + QualityScore float64 `json:"qualityScore,omitempty"` + // ForceSendFields is a list of field names (e.g. "DetectedDefects") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackgroundColor") to include in + // NullFields is a list of field names (e.g. "DetectedDefects") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo +func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo +func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores var s1 struct { - LetterSpacing gensupport.JSONFloat64 `json:"letterSpacing"` - PixelFontSize gensupport.JSONFloat64 `json:"pixelFontSize"` + QualityScore gensupport.JSONFloat64 `json:"qualityScore"` *NoMethod } s1.NoMethod = (*NoMethod)(s) if err := json.Unmarshal(data, &s1); err != nil { return err } - s.LetterSpacing = float64(s1.LetterSpacing) - s.PixelFontSize = float64(s1.PixelFontSize) + s.QualityScore = float64(s1.QualityScore) return nil } -// GoogleCloudDocumentaiV1beta1DocumentPageVisualElement: Detected non-text -// visual elements e.g. checkbox, signature etc. on the page. -type GoogleCloudDocumentaiV1beta1DocumentPageVisualElement struct { - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for VisualElement. - Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // Type: Type of the VisualElement. +// GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect: +// Image Quality Defects +type GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect struct { + // Confidence: Confidence of detected defect. Range `[0, 1]` where `1` + // indicates strong confidence that the defect exists. + Confidence float64 `json:"confidence,omitempty"` + // Type: Name of the defect type. Supported values are: - + // `quality/defect_blurry` - `quality/defect_noisy` - `quality/defect_dark` - + // `quality/defect_faint` - `quality/defect_text_too_small` - + // `quality/defect_document_cutoff` - `quality/defect_text_cutoff` - + // `quality/defect_glare` Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to + // ForceSendFields is a list of field names (e.g. "Confidence") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedLanguages") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "Confidence") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentPageVisualElement) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageVisualElement +func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1DocumentProvenance: Structure to identify -// provenance relationships between annotations in different revisions. -type GoogleCloudDocumentaiV1beta1DocumentProvenance struct { - // Id: The Id of this operation. Needs to be unique within the scope of the - // revision. - Id int64 `json:"id,omitempty"` - // Parents: References to the original elements that are replaced. - Parents []*GoogleCloudDocumentaiV1beta1DocumentProvenanceParent `json:"parents,omitempty"` - // Revision: The index of the revision that produced this element. - Revision int64 `json:"revision,omitempty"` - // Type: The type of provenance operation. +func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + return nil +} + +// GoogleCloudDocumentaiV1beta1DocumentPageLayout: Visual element describing a +// layout unit on a page. +type GoogleCloudDocumentaiV1beta1DocumentPageLayout struct { + // BoundingPoly: The bounding polygon for the Layout. + BoundingPoly *GoogleCloudDocumentaiV1beta1BoundingPoly `json:"boundingPoly,omitempty"` + // Confidence: Confidence of the current Layout within context of the object + // this layout is for. e.g. confidence can be for a single token, a table, a + // visual element, etc. depending on context. Range `[0, 1]`. + Confidence float64 `json:"confidence,omitempty"` + // Orientation: Detected orientation for the Layout. // // Possible values: - // "OPERATION_TYPE_UNSPECIFIED" - Operation type unspecified. If no operation - // is specified a provenance entry is simply used to match against a `parent`. - // "ADD" - Add an element. - // "REMOVE" - Remove an element identified by `parent`. - // "UPDATE" - Updates any fields within the given provenance scope of the - // message. It overwrites the fields rather than replacing them. Use this when - // you want to update a field value of an entity without also updating all the - // child properties. - // "REPLACE" - Currently unused. Replace an element identified by `parent`. - // "EVAL_REQUESTED" - Deprecated. Request human review for the element - // identified by `parent`. - // "EVAL_APPROVED" - Deprecated. Element is reviewed and approved at human - // review, confidence will be set to 1.0. - // "EVAL_SKIPPED" - Deprecated. Element is skipped in the validation process. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are + // "ORIENTATION_UNSPECIFIED" - Unspecified orientation. + // "PAGE_UP" - Orientation is aligned with page up. + // "PAGE_RIGHT" - Orientation is aligned with page right. Turn the head 90 + // degrees clockwise from upright to read. + // "PAGE_DOWN" - Orientation is aligned with page down. Turn the head 180 + // degrees from upright to read. + // "PAGE_LEFT" - Orientation is aligned with page left. Turn the head 90 + // degrees counterclockwise from upright to read. + Orientation string `json:"orientation,omitempty"` + // TextAnchor: Text anchor indexing into the Document.text. + TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"` + // ForceSendFields is a list of field names (e.g. "BoundingPoly") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BoundingPoly") to include in API + // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageLayout) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageLayout + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageLayout) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageLayout + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + return nil +} + +// GoogleCloudDocumentaiV1beta1DocumentPageLine: A collection of tokens that a +// human would perceive as a line. Does not cross column boundaries, can be +// horizontal, vertical, etc. +type GoogleCloudDocumentaiV1beta1DocumentPageLine struct { + // DetectedLanguages: A list of detected languages together with confidence. + DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` + // Layout: Layout for Line. + Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` + // Provenance: The history of this annotation. + Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` + // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "DetectedLanguages") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentProvenance) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentProvenance +func (s *GoogleCloudDocumentaiV1beta1DocumentPageLine) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageLine return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1DocumentProvenanceParent: The parent element the -// current element is based on. Used for referencing/aligning, removal and +// GoogleCloudDocumentaiV1beta1DocumentPageMatrix: Representation for +// transformation matrix, intended to be compatible and used with OpenCV format +// for image manipulation. +type GoogleCloudDocumentaiV1beta1DocumentPageMatrix struct { + // Cols: Number of columns in the matrix. + Cols int64 `json:"cols,omitempty"` + // Data: The matrix data. + Data string `json:"data,omitempty"` + // Rows: Number of rows in the matrix. + Rows int64 `json:"rows,omitempty"` + // Type: This encodes information about what data type the matrix uses. For + // example, 0 (CV_8U) is an unsigned 8-bit image. For the full list of OpenCV + // primitive data types, please refer to + // https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html + Type int64 `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Cols") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Cols") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageMatrix) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageMatrix + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentPageParagraph: A collection of lines +// that a human would perceive as a paragraph. +type GoogleCloudDocumentaiV1beta1DocumentPageParagraph struct { + // DetectedLanguages: A list of detected languages together with confidence. + DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` + // Layout: Layout for Paragraph. + Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` + // Provenance: The history of this annotation. + Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` + // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DetectedLanguages") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageParagraph) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageParagraph + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentPageSymbol: A detected symbol. +type GoogleCloudDocumentaiV1beta1DocumentPageSymbol struct { + // DetectedLanguages: A list of detected languages together with confidence. + DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` + // Layout: Layout for Symbol. + Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` + // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DetectedLanguages") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageSymbol) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageSymbol + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentPageTable: A table representation +// similar to HTML table structure. +type GoogleCloudDocumentaiV1beta1DocumentPageTable struct { + // BodyRows: Body rows of the table. + BodyRows []*GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow `json:"bodyRows,omitempty"` + // DetectedLanguages: A list of detected languages together with confidence. + DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` + // HeaderRows: Header rows of the table. + HeaderRows []*GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow `json:"headerRows,omitempty"` + // Layout: Layout for Table. + Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` + // Provenance: The history of this table. + Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` + // ForceSendFields is a list of field names (e.g. "BodyRows") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BodyRows") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageTable) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTable + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell: A cell +// representation inside the table. +type GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell struct { + // ColSpan: How many columns this cell spans. + ColSpan int64 `json:"colSpan,omitempty"` + // DetectedLanguages: A list of detected languages together with confidence. + DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` + // Layout: Layout for TableCell. + Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` + // RowSpan: How many rows this cell spans. + RowSpan int64 `json:"rowSpan,omitempty"` + // ForceSendFields is a list of field names (e.g. "ColSpan") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ColSpan") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow: A row of table cells. +type GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow struct { + // Cells: Cells that make up this row. + Cells []*GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell `json:"cells,omitempty"` + // ForceSendFields is a list of field names (e.g. "Cells") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Cells") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentPageToken: A detected token. +type GoogleCloudDocumentaiV1beta1DocumentPageToken struct { + // DetectedBreak: Detected break at the end of a Token. + DetectedBreak *GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak `json:"detectedBreak,omitempty"` + // DetectedLanguages: A list of detected languages together with confidence. + DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` + // Layout: Layout for Token. + Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` + // Provenance: The history of this annotation. + Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` + // StyleInfo: Text style attributes. + StyleInfo *GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo `json:"styleInfo,omitempty"` + // ForceSendFields is a list of field names (e.g. "DetectedBreak") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DetectedBreak") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageToken) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageToken + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak: Detected break +// at the end of a Token. +type GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak struct { + // Type: Detected break type. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified break type. + // "SPACE" - A single whitespace. + // "WIDE_SPACE" - A wider whitespace. + // "HYPHEN" - A hyphen that indicates that a token has been split across + // lines. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Type") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Type") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo: Font and other text +// style attributes. +type GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo struct { + // BackgroundColor: Color of the background. + BackgroundColor *GoogleTypeColor `json:"backgroundColor,omitempty"` + // Bold: Whether the text is bold (equivalent to font_weight is at least + // `700`). + Bold bool `json:"bold,omitempty"` + // FontSize: Font size in points (`1` point is `¹⁄₇₂` inches). + FontSize int64 `json:"fontSize,omitempty"` + // FontType: Name or style of the font. + FontType string `json:"fontType,omitempty"` + // FontWeight: TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). + // Normal is `400`, bold is `700`. + FontWeight int64 `json:"fontWeight,omitempty"` + // Handwritten: Whether the text is handwritten. + Handwritten bool `json:"handwritten,omitempty"` + // Italic: Whether the text is italic. + Italic bool `json:"italic,omitempty"` + // LetterSpacing: Letter spacing in points. + LetterSpacing float64 `json:"letterSpacing,omitempty"` + // PixelFontSize: Font size in pixels, equal to _unrounded font_size_ * + // _resolution_ ÷ `72.0`. + PixelFontSize float64 `json:"pixelFontSize,omitempty"` + // Smallcaps: Whether the text is in small caps. This feature is not supported + // yet. + Smallcaps bool `json:"smallcaps,omitempty"` + // Strikeout: Whether the text is strikethrough. This feature is not supported + // yet. + Strikeout bool `json:"strikeout,omitempty"` + // Subscript: Whether the text is a subscript. This feature is not supported + // yet. + Subscript bool `json:"subscript,omitempty"` + // Superscript: Whether the text is a superscript. This feature is not + // supported yet. + Superscript bool `json:"superscript,omitempty"` + // TextColor: Color of the text. + TextColor *GoogleTypeColor `json:"textColor,omitempty"` + // Underlined: Whether the text is underlined. + Underlined bool `json:"underlined,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackgroundColor") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackgroundColor") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo + var s1 struct { + LetterSpacing gensupport.JSONFloat64 `json:"letterSpacing"` + PixelFontSize gensupport.JSONFloat64 `json:"pixelFontSize"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.LetterSpacing = float64(s1.LetterSpacing) + s.PixelFontSize = float64(s1.PixelFontSize) + return nil +} + +// GoogleCloudDocumentaiV1beta1DocumentPageVisualElement: Detected non-text +// visual elements e.g. checkbox, signature etc. on the page. +type GoogleCloudDocumentaiV1beta1DocumentPageVisualElement struct { + // DetectedLanguages: A list of detected languages together with confidence. + DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` + // Layout: Layout for VisualElement. + Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` + // Type: Type of the VisualElement. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DetectedLanguages") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageVisualElement) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageVisualElement + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentProvenance: Structure to identify +// provenance relationships between annotations in different revisions. +type GoogleCloudDocumentaiV1beta1DocumentProvenance struct { + // Id: The Id of this operation. Needs to be unique within the scope of the + // revision. + Id int64 `json:"id,omitempty"` + // Parents: References to the original elements that are replaced. + Parents []*GoogleCloudDocumentaiV1beta1DocumentProvenanceParent `json:"parents,omitempty"` + // Revision: The index of the revision that produced this element. + Revision int64 `json:"revision,omitempty"` + // Type: The type of provenance operation. + // + // Possible values: + // "OPERATION_TYPE_UNSPECIFIED" - Operation type unspecified. If no operation + // is specified a provenance entry is simply used to match against a `parent`. + // "ADD" - Add an element. + // "REMOVE" - Remove an element identified by `parent`. + // "UPDATE" - Updates any fields within the given provenance scope of the + // message. It overwrites the fields rather than replacing them. Use this when + // you want to update a field value of an entity without also updating all the + // child properties. + // "REPLACE" - Currently unused. Replace an element identified by `parent`. + // "EVAL_REQUESTED" - Deprecated. Request human review for the element + // identified by `parent`. + // "EVAL_APPROVED" - Deprecated. Element is reviewed and approved at human + // review, confidence will be set to 1.0. + // "EVAL_SKIPPED" - Deprecated. Element is skipped in the validation process. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Id") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Id") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentProvenance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentProvenance + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentProvenanceParent: The parent element the +// current element is based on. Used for referencing/aligning, removal and // replacement operations. type GoogleCloudDocumentaiV1beta1DocumentProvenanceParent struct { // Id: The id of the parent provenance. @@ -3300,668 +3674,1042 @@ type GoogleCloudDocumentaiV1beta1DocumentProvenanceParent struct { // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "Id") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentProvenanceParent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentProvenanceParent + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentRevision: Contains past or forward +// revisions of this document. +type GoogleCloudDocumentaiV1beta1DocumentRevision struct { + // Agent: If the change was made by a person specify the name or id of that + // person. + Agent string `json:"agent,omitempty"` + // CreateTime: The time that the revision was created, internally generated by + // doc proto storage at the time of create. + CreateTime string `json:"createTime,omitempty"` + // HumanReview: Human Review information of this revision. + HumanReview *GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview `json:"humanReview,omitempty"` + // Id: Id of the revision, internally generated by doc proto storage. Unique + // within the context of the document. + Id string `json:"id,omitempty"` + // Parent: The revisions that this revision is based on. This can include one + // or more parent (when documents are merged.) This field represents the index + // into the `revisions` field. + Parent []int64 `json:"parent,omitempty"` + // ParentIds: The revisions that this revision is based on. Must include all + // the ids that have anything to do with this revision - eg. there are + // `provenance.parent.revision` fields that index into this field. + ParentIds []string `json:"parentIds,omitempty"` + // Processor: If the annotation was made by processor identify the processor by + // its resource name. + Processor string `json:"processor,omitempty"` + // ForceSendFields is a list of field names (e.g. "Agent") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Agent") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentRevision) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentRevision + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview: Human Review +// information of the document. +type GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview struct { + // State: Human review state. e.g. `requested`, `succeeded`, `rejected`. + State string `json:"state,omitempty"` + // StateMessage: A message providing more details about the current state of + // processing. For example, the rejection reason when the state is `rejected`. + StateMessage string `json:"stateMessage,omitempty"` + // ForceSendFields is a list of field names (e.g. "State") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "State") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentShardInfo: 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. +type GoogleCloudDocumentaiV1beta1DocumentShardInfo struct { + // ShardCount: Total number of shards. + ShardCount int64 `json:"shardCount,omitempty,string"` + // ShardIndex: The 0-based index of this shard. + ShardIndex int64 `json:"shardIndex,omitempty,string"` + // TextOffset: The index of the first character in Document.text in the overall + // document global text. + TextOffset int64 `json:"textOffset,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "ShardCount") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ShardCount") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentShardInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentShardInfo + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentStyle: Annotation for common text style +// attributes. This adheres to CSS conventions as much as possible. +type GoogleCloudDocumentaiV1beta1DocumentStyle struct { + // BackgroundColor: Text background color. + BackgroundColor *GoogleTypeColor `json:"backgroundColor,omitempty"` + // Color: Text color. + Color *GoogleTypeColor `json:"color,omitempty"` + // FontFamily: Font family such as `Arial`, `Times New Roman`. + // https://www.w3schools.com/cssref/pr_font_font-family.asp + FontFamily string `json:"fontFamily,omitempty"` + // FontSize: Font size. + FontSize *GoogleCloudDocumentaiV1beta1DocumentStyleFontSize `json:"fontSize,omitempty"` + // FontWeight: Font weight + // (https://www.w3schools.com/cssref/pr_font_weight.asp). Possible values are + // `normal`, `bold`, `bolder`, and `lighter`. + FontWeight string `json:"fontWeight,omitempty"` + // TextAnchor: Text anchor indexing into the Document.text. + TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"` + // TextDecoration: Text decoration + // (https://www.w3schools.com/cssref/pr_text_text-decoration.asp). Follows CSS + // standard. + TextDecoration string `json:"textDecoration,omitempty"` + // TextStyle: Text style + // (https://www.w3schools.com/cssref/pr_font_font-style.asp). Possible values + // are `normal`, `italic`, and `oblique`. + TextStyle string `json:"textStyle,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackgroundColor") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackgroundColor") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentStyle) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentStyle + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentStyleFontSize: Font size with unit. +type GoogleCloudDocumentaiV1beta1DocumentStyleFontSize struct { + // Size: Font size for the text. + Size float64 `json:"size,omitempty"` + // Unit: Unit for the font size. Follows CSS naming (such as `in`, `px`, and + // `pt`). + Unit string `json:"unit,omitempty"` + // ForceSendFields is a list of field names (e.g. "Size") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Size") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentStyleFontSize) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentStyleFontSize + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentStyleFontSize) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentStyleFontSize + var s1 struct { + Size gensupport.JSONFloat64 `json:"size"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Size = float64(s1.Size) + return nil +} + +// GoogleCloudDocumentaiV1beta1DocumentTextAnchor: Text reference indexing into +// the Document.text. +type GoogleCloudDocumentaiV1beta1DocumentTextAnchor struct { + // Content: Contains the content of the text span so that users do not have to + // look it up in the text_segments. It is always populated for formFields. + Content string `json:"content,omitempty"` + // TextSegments: The text segments from the Document.text. + TextSegments []*GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment `json:"textSegments,omitempty"` + // ForceSendFields is a list of field names (e.g. "Content") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Content") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentTextAnchor) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentTextAnchor + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment: A text segment in +// the Document.text. The indices may be out of bounds which indicate that the +// text extends into another document shard for large sharded documents. See +// ShardInfo.text_offset +type GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment struct { + // EndIndex: TextSegment half open end UTF-8 char index in the Document.text. + EndIndex int64 `json:"endIndex,omitempty,string"` + // StartIndex: TextSegment start UTF-8 char index in the Document.text. + StartIndex int64 `json:"startIndex,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "EndIndex") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndIndex") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1DocumentTextChange: This message is used for +// text changes aka. OCR corrections. +type GoogleCloudDocumentaiV1beta1DocumentTextChange struct { + // ChangedText: The text that replaces the text identified in the + // `text_anchor`. + ChangedText string `json:"changedText,omitempty"` + // Provenance: The history of this annotation. + Provenance []*GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` + // TextAnchor: Provenance of the correction. Text anchor indexing into the + // Document.text. There can only be a single `TextAnchor.text_segments` + // element. If the start and end index of the text segment are the same, the + // text change is inserted before that index. + TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChangedText") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChangedText") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentTextChange) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentTextChange + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1GcsDestination: The Google Cloud Storage +// location where the output file will be written to. +type GoogleCloudDocumentaiV1beta1GcsDestination struct { + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Uri") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1GcsDestination) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1GcsDestination + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1GcsSource: The Google Cloud Storage location +// where the input file will be read from. +type GoogleCloudDocumentaiV1beta1GcsSource struct { + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Uri") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1GcsSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1GcsSource + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta1InputConfig: The desired input location and +// metadata. +type GoogleCloudDocumentaiV1beta1InputConfig struct { + // GcsSource: The Google Cloud Storage location to read the input from. This + // must be a single file. + GcsSource *GoogleCloudDocumentaiV1beta1GcsSource `json:"gcsSource,omitempty"` + // MimeType: Required. Mimetype of the input. Current supported mimetypes are + // application/pdf, image/tiff, and image/gif. In addition, application/json + // type is supported for requests with ProcessDocumentRequest.automl_params + // field set. The JSON file needs to be in Document format. + MimeType string `json:"mimeType,omitempty"` + // ForceSendFields is a list of field names (e.g. "GcsSource") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GcsSource") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentProvenanceParent) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentProvenanceParent +func (s *GoogleCloudDocumentaiV1beta1InputConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1InputConfig return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1DocumentRevision: Contains past or forward -// revisions of this document. -type GoogleCloudDocumentaiV1beta1DocumentRevision struct { - // Agent: If the change was made by a person specify the name or id of that - // person. - Agent string `json:"agent,omitempty"` - // CreateTime: The time that the revision was created, internally generated by - // doc proto storage at the time of create. - CreateTime string `json:"createTime,omitempty"` - // HumanReview: Human Review information of this revision. - HumanReview *GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview `json:"humanReview,omitempty"` - // Id: Id of the revision, internally generated by doc proto storage. Unique - // within the context of the document. - Id string `json:"id,omitempty"` - // Parent: The revisions that this revision is based on. This can include one - // or more parent (when documents are merged.) This field represents the index - // into the `revisions` field. - Parent []int64 `json:"parent,omitempty"` - // ParentIds: The revisions that this revision is based on. Must include all - // the ids that have anything to do with this revision - eg. there are - // `provenance.parent.revision` fields that index into this field. - ParentIds []string `json:"parentIds,omitempty"` - // Processor: If the annotation was made by processor identify the processor by - // its resource name. - Processor string `json:"processor,omitempty"` - // ForceSendFields is a list of field names (e.g. "Agent") to unconditionally +// GoogleCloudDocumentaiV1beta1NormalizedVertex: A vertex represents a 2D point +// in the image. NOTE: the normalized vertex coordinates are relative to the +// original image and range from 0 to 1. +type GoogleCloudDocumentaiV1beta1NormalizedVertex struct { + // X: X coordinate. + X float64 `json:"x,omitempty"` + // Y: Y coordinate (starts from the top of the image). + Y float64 `json:"y,omitempty"` + // ForceSendFields is a list of field names (e.g. "X") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Agent") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "X") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentRevision) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentRevision +func (s *GoogleCloudDocumentaiV1beta1NormalizedVertex) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1NormalizedVertex return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview: Human Review -// information of the document. -type GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview struct { - // State: Human review state. e.g. `requested`, `succeeded`, `rejected`. +func (s *GoogleCloudDocumentaiV1beta1NormalizedVertex) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1beta1NormalizedVertex + var s1 struct { + X gensupport.JSONFloat64 `json:"x"` + Y gensupport.JSONFloat64 `json:"y"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.X = float64(s1.X) + s.Y = float64(s1.Y) + return nil +} + +// GoogleCloudDocumentaiV1beta1OperationMetadata: Contains metadata for the +// BatchProcessDocuments operation. +type GoogleCloudDocumentaiV1beta1OperationMetadata struct { + // CreateTime: The creation time of the operation. + CreateTime string `json:"createTime,omitempty"` + // State: The state of the current batch processing. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value. This value is used if the state + // is omitted. + // "ACCEPTED" - Request is received. + // "WAITING" - Request operation is waiting for scheduling. + // "RUNNING" - Request is being processed. + // "SUCCEEDED" - The batch processing completed successfully. + // "CANCELLED" - The batch processing was cancelled. + // "FAILED" - The batch processing has failed. State string `json:"state,omitempty"` // StateMessage: A message providing more details about the current state of - // processing. For example, the rejection reason when the state is `rejected`. + // processing. StateMessage string `json:"stateMessage,omitempty"` - // ForceSendFields is a list of field names (e.g. "State") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // UpdateTime: The last update time of the operation. + UpdateTime string `json:"updateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "State") to include in API + // NullFields is a list of field names (e.g. "CreateTime") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview +func (s *GoogleCloudDocumentaiV1beta1OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1OperationMetadata return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1DocumentShardInfo: 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. -type GoogleCloudDocumentaiV1beta1DocumentShardInfo struct { - // ShardCount: Total number of shards. - ShardCount int64 `json:"shardCount,omitempty,string"` - // ShardIndex: The 0-based index of this shard. - ShardIndex int64 `json:"shardIndex,omitempty,string"` - // TextOffset: The index of the first character in Document.text in the overall - // document global text. - TextOffset int64 `json:"textOffset,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "ShardCount") to +// GoogleCloudDocumentaiV1beta1OutputConfig: The desired output location and +// metadata. +type GoogleCloudDocumentaiV1beta1OutputConfig struct { + // GcsDestination: The Google Cloud Storage location to write the output to. + GcsDestination *GoogleCloudDocumentaiV1beta1GcsDestination `json:"gcsDestination,omitempty"` + // PagesPerShard: The max number of pages to include into each output Document + // shard JSON on Google Cloud Storage. The valid range is [1, 100]. If not + // specified, the default value is 20. For example, for one pdf file with 100 + // pages, 100 parsed pages will be produced. If `pages_per_shard` = 20, then 5 + // Document shard JSON files each containing 20 parsed pages will be written + // under the prefix OutputConfig.gcs_destination.uri and suffix + // pages-x-to-y.json where x and y are 1-indexed page numbers. Example GCS + // outputs with 157 pages and pages_per_shard = 50: pages-001-to-050.json + // pages-051-to-100.json pages-101-to-150.json pages-151-to-157.json + PagesPerShard int64 `json:"pagesPerShard,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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ShardCount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "GcsDestination") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentShardInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentShardInfo +func (s *GoogleCloudDocumentaiV1beta1OutputConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1OutputConfig return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1DocumentStyle: Annotation for common text style -// attributes. This adheres to CSS conventions as much as possible. -type GoogleCloudDocumentaiV1beta1DocumentStyle struct { - // BackgroundColor: Text background color. - BackgroundColor *GoogleTypeColor `json:"backgroundColor,omitempty"` - // Color: Text color. - Color *GoogleTypeColor `json:"color,omitempty"` - // FontFamily: Font family such as `Arial`, `Times New Roman`. - // https://www.w3schools.com/cssref/pr_font_font-family.asp - FontFamily string `json:"fontFamily,omitempty"` - // FontSize: Font size. - FontSize *GoogleCloudDocumentaiV1beta1DocumentStyleFontSize `json:"fontSize,omitempty"` - // FontWeight: Font weight - // (https://www.w3schools.com/cssref/pr_font_weight.asp). Possible values are - // `normal`, `bold`, `bolder`, and `lighter`. - FontWeight string `json:"fontWeight,omitempty"` - // TextAnchor: Text anchor indexing into the Document.text. - TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"` - // TextDecoration: Text decoration - // (https://www.w3schools.com/cssref/pr_text_text-decoration.asp). Follows CSS - // standard. - TextDecoration string `json:"textDecoration,omitempty"` - // TextStyle: Text style - // (https://www.w3schools.com/cssref/pr_font_font-style.asp). Possible values - // are `normal`, `italic`, and `oblique`. - TextStyle string `json:"textStyle,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackgroundColor") to +// GoogleCloudDocumentaiV1beta1ProcessDocumentResponse: Response to a single +// document processing request. +type GoogleCloudDocumentaiV1beta1ProcessDocumentResponse struct { + // InputConfig: Information about the input file. This is the same as the + // corresponding input config in the request. + InputConfig *GoogleCloudDocumentaiV1beta1InputConfig `json:"inputConfig,omitempty"` + // OutputConfig: The output location of the parsed responses. The responses are + // written to this location as JSON-serialized `Document` objects. + OutputConfig *GoogleCloudDocumentaiV1beta1OutputConfig `json:"outputConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "InputConfig") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackgroundColor") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "InputConfig") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentStyle) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentStyle +func (s *GoogleCloudDocumentaiV1beta1ProcessDocumentResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1ProcessDocumentResponse return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1DocumentStyleFontSize: Font size with unit. -type GoogleCloudDocumentaiV1beta1DocumentStyleFontSize struct { - // Size: Font size for the text. - Size float64 `json:"size,omitempty"` - // Unit: Unit for the font size. Follows CSS naming (such as `in`, `px`, and - // `pt`). - Unit string `json:"unit,omitempty"` - // ForceSendFields is a list of field names (e.g. "Size") to unconditionally +// GoogleCloudDocumentaiV1beta1Vertex: A vertex represents a 2D point in the +// image. NOTE: the vertex coordinates are in the same scale as the original +// image. +type GoogleCloudDocumentaiV1beta1Vertex struct { + // X: X coordinate. + X int64 `json:"x,omitempty"` + // Y: Y coordinate (starts from the top of the image). + Y int64 `json:"y,omitempty"` + // ForceSendFields is a list of field names (e.g. "X") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Size") to include in API requests + // NullFields is a list of field names (e.g. "X") to include in API requests // with the JSON null value. By default, fields with empty values are omitted // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentStyleFontSize) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentStyleFontSize +func (s *GoogleCloudDocumentaiV1beta1Vertex) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1Vertex return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDocumentaiV1beta1DocumentStyleFontSize) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentStyleFontSize - var s1 struct { - Size gensupport.JSONFloat64 `json:"size"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Size = float64(s1.Size) - return nil -} - -// GoogleCloudDocumentaiV1beta1DocumentTextAnchor: Text reference indexing into -// the Document.text. -type GoogleCloudDocumentaiV1beta1DocumentTextAnchor struct { - // Content: Contains the content of the text span so that users do not have to - // look it up in the text_segments. It is always populated for formFields. - Content string `json:"content,omitempty"` - // TextSegments: The text segments from the Document.text. - TextSegments []*GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment `json:"textSegments,omitempty"` - // ForceSendFields is a list of field names (e.g. "Content") to unconditionally +// GoogleCloudDocumentaiV1beta2Barcode: Encodes the detailed information of a +// barcode. +type GoogleCloudDocumentaiV1beta2Barcode struct { + // Format: Format of a barcode. The supported formats are: - `CODE_128`: Code + // 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: + // Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - `ITF`: ITF type. - + // `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. + // - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417 type. - + // `AZTEC`: 2D Aztec code type. - `DATABAR`: GS1 DataBar code type. + Format string `json:"format,omitempty"` + // RawValue: Raw value encoded in the barcode. For example: + // `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. + RawValue string `json:"rawValue,omitempty"` + // ValueFormat: Value format describes the format of the value that a barcode + // encodes. The supported formats are: - `CONTACT_INFO`: Contact information. - + // `EMAIL`: Email address. - `ISBN`: ISBN identifier. - `PHONE`: Phone number. + // - `PRODUCT`: Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: + // URL address. - `WIFI`: Wifi information. - `GEO`: Geo-localization. - + // `CALENDAR_EVENT`: Calendar event. - `DRIVER_LICENSE`: Driver's license. + ValueFormat string `json:"valueFormat,omitempty"` + // ForceSendFields is a list of field names (e.g. "Format") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in API + // NullFields is a list of field names (e.g. "Format") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentTextAnchor) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentTextAnchor +func (s *GoogleCloudDocumentaiV1beta2Barcode) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2Barcode return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment: A text segment in -// the Document.text. The indices may be out of bounds which indicate that the -// text extends into another document shard for large sharded documents. See -// ShardInfo.text_offset -type GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment struct { - // EndIndex: TextSegment half open end UTF-8 char index in the Document.text. - EndIndex int64 `json:"endIndex,omitempty,string"` - // StartIndex: TextSegment start UTF-8 char index in the Document.text. - StartIndex int64 `json:"startIndex,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "EndIndex") to +// GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse: Response to an +// batch document processing request. This is returned in the LRO Operation +// after the operation is complete. +type GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse struct { + // Responses: Responses for each individual document. + Responses []*GoogleCloudDocumentaiV1beta2ProcessDocumentResponse `json:"responses,omitempty"` + // ForceSendFields is a list of field names (e.g. "Responses") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndIndex") to include in API + // NullFields is a list of field names (e.g. "Responses") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment +func (s *GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1DocumentTextChange: This message is used for -// text changes aka. OCR corrections. -type GoogleCloudDocumentaiV1beta1DocumentTextChange struct { - // ChangedText: The text that replaces the text identified in the - // `text_anchor`. - ChangedText string `json:"changedText,omitempty"` - // Provenance: The history of this annotation. - Provenance []*GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` - // TextAnchor: Provenance of the correction. Text anchor indexing into the - // Document.text. There can only be a single `TextAnchor.text_segments` - // element. If the start and end index of the text segment are the same, the - // text change is inserted before that index. - TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChangedText") to +// GoogleCloudDocumentaiV1beta2BoundingPoly: A bounding polygon for the +// detected image annotation. +type GoogleCloudDocumentaiV1beta2BoundingPoly struct { + // NormalizedVertices: The bounding polygon normalized vertices. + NormalizedVertices []*GoogleCloudDocumentaiV1beta2NormalizedVertex `json:"normalizedVertices,omitempty"` + // Vertices: The bounding polygon vertices. + Vertices []*GoogleCloudDocumentaiV1beta2Vertex `json:"vertices,omitempty"` + // ForceSendFields is a list of field names (e.g. "NormalizedVertices") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChangedText") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "NormalizedVertices") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1DocumentTextChange) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentTextChange +func (s *GoogleCloudDocumentaiV1beta2BoundingPoly) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2BoundingPoly return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1GcsDestination: The Google Cloud Storage -// location where the output file will be written to. -type GoogleCloudDocumentaiV1beta1GcsDestination struct { +// GoogleCloudDocumentaiV1beta2Document: Document represents the canonical +// document resource in Document AI. It is an interchange format that provides +// insights into documents and allows for collaboration between users and +// Document AI to iterate and optimize for quality. +type GoogleCloudDocumentaiV1beta2Document struct { + // ChunkedDocument: Document chunked based on chunking config. + ChunkedDocument *GoogleCloudDocumentaiV1beta2DocumentChunkedDocument `json:"chunkedDocument,omitempty"` + // Content: Optional. Inline document content, represented as a stream of + // bytes. Note: As with all `bytes` fields, protobuffers use a pure binary + // representation, whereas JSON representations use base64. + Content string `json:"content,omitempty"` + // DocumentLayout: Parsed layout of the document. + DocumentLayout *GoogleCloudDocumentaiV1beta2DocumentDocumentLayout `json:"documentLayout,omitempty"` + // Entities: A list of entities detected on Document.text. For document shards, + // entities in this list may cross shard boundaries. + Entities []*GoogleCloudDocumentaiV1beta2DocumentEntity `json:"entities,omitempty"` + // EntityRelations: Placeholder. Relationship among Document.entities. + EntityRelations []*GoogleCloudDocumentaiV1beta2DocumentEntityRelation `json:"entityRelations,omitempty"` + // Error: Any error that occurred while processing this document. + Error *GoogleRpcStatus `json:"error,omitempty"` + // Labels: Labels for this document. + Labels []*GoogleCloudDocumentaiV1beta2DocumentLabel `json:"labels,omitempty"` + // MimeType: An IANA published media type (MIME type) + // (https://www.iana.org/assignments/media-types/media-types.xhtml). + MimeType string `json:"mimeType,omitempty"` + // Pages: Visual page layout for the Document. + Pages []*GoogleCloudDocumentaiV1beta2DocumentPage `json:"pages,omitempty"` + // Revisions: Placeholder. Revision history of this document. + Revisions []*GoogleCloudDocumentaiV1beta2DocumentRevision `json:"revisions,omitempty"` + // ShardInfo: Information about the sharding if this document is sharded part + // of a larger document. If the document is not sharded, this message is not + // specified. + ShardInfo *GoogleCloudDocumentaiV1beta2DocumentShardInfo `json:"shardInfo,omitempty"` + // Text: Optional. UTF-8 encoded text in reading order from the document. + Text string `json:"text,omitempty"` + // TextChanges: Placeholder. A list of text corrections made to Document.text. + // This is usually used for annotating corrections to OCR mistakes. Text + // changes for a given revision may not overlap with each other. + TextChanges []*GoogleCloudDocumentaiV1beta2DocumentTextChange `json:"textChanges,omitempty"` + // TextStyles: Styles for the Document.text. + TextStyles []*GoogleCloudDocumentaiV1beta2DocumentStyle `json:"textStyles,omitempty"` + // Uri: Optional. Currently supports Google Cloud Storage URI of the form + // `gs://bucket_name/object_name`. Object versioning is not supported. For more + // information, refer to Google Cloud Storage Request URIs + // (https://cloud.google.com/storage/docs/reference-uris). Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally + // ForceSendFields is a list of field names (e.g. "ChunkedDocument") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChunkedDocument") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2Document) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2Document + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentChunkedDocument: Represents the chunks +// that the document is divided into. +type GoogleCloudDocumentaiV1beta2DocumentChunkedDocument struct { + // Chunks: List of chunks. + Chunks []*GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk `json:"chunks,omitempty"` + // ForceSendFields is a list of field names (e.g. "Chunks") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Uri") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "Chunks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1GcsDestination) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1GcsDestination +func (s *GoogleCloudDocumentaiV1beta2DocumentChunkedDocument) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentChunkedDocument return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1GcsSource: The Google Cloud Storage location -// where the input file will be read from. -type GoogleCloudDocumentaiV1beta1GcsSource struct { - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally +// GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk: Represents a +// chunk. +type GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk struct { + // ChunkId: ID of the chunk. + ChunkId string `json:"chunkId,omitempty"` + // Content: Text content of the chunk. + Content string `json:"content,omitempty"` + // PageFooters: Page footers associated with the chunk. + PageFooters []*GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter `json:"pageFooters,omitempty"` + // PageHeaders: Page headers associated with the chunk. + PageHeaders []*GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader `json:"pageHeaders,omitempty"` + // PageSpan: Page span of the chunk. + PageSpan *GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` + // SourceBlockIds: Unused. + SourceBlockIds []string `json:"sourceBlockIds,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkId") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Uri") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "ChunkId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1GcsSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1GcsSource +func (s *GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1InputConfig: The desired input location and -// metadata. -type GoogleCloudDocumentaiV1beta1InputConfig struct { - // GcsSource: The Google Cloud Storage location to read the input from. This - // must be a single file. - GcsSource *GoogleCloudDocumentaiV1beta1GcsSource `json:"gcsSource,omitempty"` - // MimeType: Required. Mimetype of the input. Current supported mimetypes are - // application/pdf, image/tiff, and image/gif. In addition, application/json - // type is supported for requests with ProcessDocumentRequest.automl_params - // field set. The JSON file needs to be in Document format. - MimeType string `json:"mimeType,omitempty"` - // ForceSendFields is a list of field names (e.g. "GcsSource") to +// GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter: +// Represents the page footer associated with the chunk. +type GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter struct { + // PageSpan: Page span of the footer. + PageSpan *GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` + // Text: Footer in text format. + Text string `json:"text,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageSpan") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GcsSource") to include in API + // NullFields is a list of field names (e.g. "PageSpan") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1InputConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1InputConfig +func (s *GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1NormalizedVertex: A vertex represents a 2D point -// in the image. NOTE: the normalized vertex coordinates are relative to the -// original image and range from 0 to 1. -type GoogleCloudDocumentaiV1beta1NormalizedVertex struct { - // X: X coordinate. - X float64 `json:"x,omitempty"` - // Y: Y coordinate (starts from the top of the image). - Y float64 `json:"y,omitempty"` - // ForceSendFields is a list of field names (e.g. "X") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader: +// Represents the page header associated with the chunk. +type GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader struct { + // PageSpan: Page span of the header. + PageSpan *GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` + // Text: Header in text format. + Text string `json:"text,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageSpan") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "X") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "PageSpan") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1NormalizedVertex) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1NormalizedVertex +func (s *GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDocumentaiV1beta1NormalizedVertex) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1NormalizedVertex - var s1 struct { - X gensupport.JSONFloat64 `json:"x"` - Y gensupport.JSONFloat64 `json:"y"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.X = float64(s1.X) - s.Y = float64(s1.Y) - return nil -} - -// GoogleCloudDocumentaiV1beta1OperationMetadata: Contains metadata for the -// BatchProcessDocuments operation. -type GoogleCloudDocumentaiV1beta1OperationMetadata struct { - // CreateTime: The creation time of the operation. - CreateTime string `json:"createTime,omitempty"` - // State: The state of the current batch processing. - // - // Possible values: - // "STATE_UNSPECIFIED" - The default value. This value is used if the state - // is omitted. - // "ACCEPTED" - Request is received. - // "WAITING" - Request operation is waiting for scheduling. - // "RUNNING" - Request is being processed. - // "SUCCEEDED" - The batch processing completed successfully. - // "CANCELLED" - The batch processing was cancelled. - // "FAILED" - The batch processing has failed. - State string `json:"state,omitempty"` - // StateMessage: A message providing more details about the current state of - // processing. - StateMessage string `json:"stateMessage,omitempty"` - // UpdateTime: The last update time of the operation. - UpdateTime string `json:"updateTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan: +// Represents where the chunk starts and ends in the document. +type GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan struct { + // PageEnd: Page where chunk ends in the document. + PageEnd int64 `json:"pageEnd,omitempty"` + // PageStart: Page where chunk starts in the document. + PageStart int64 `json:"pageStart,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageEnd") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API + // NullFields is a list of field names (e.g. "PageEnd") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1OperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1OperationMetadata +func (s *GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1OutputConfig: The desired output location and -// metadata. -type GoogleCloudDocumentaiV1beta1OutputConfig struct { - // GcsDestination: The Google Cloud Storage location to write the output to. - GcsDestination *GoogleCloudDocumentaiV1beta1GcsDestination `json:"gcsDestination,omitempty"` - // PagesPerShard: The max number of pages to include into each output Document - // shard JSON on Google Cloud Storage. The valid range is [1, 100]. If not - // specified, the default value is 20. For example, for one pdf file with 100 - // pages, 100 parsed pages will be produced. If `pages_per_shard` = 20, then 5 - // Document shard JSON files each containing 20 parsed pages will be written - // under the prefix OutputConfig.gcs_destination.uri and suffix - // pages-x-to-y.json where x and y are 1-indexed page numbers. Example GCS - // outputs with 157 pages and pages_per_shard = 50: pages-001-to-050.json - // pages-051-to-100.json pages-101-to-150.json pages-151-to-157.json - PagesPerShard int64 `json:"pagesPerShard,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. See +// GoogleCloudDocumentaiV1beta2DocumentDocumentLayout: Represents the parsed +// layout of a document as a collection of blocks that the document is divided +// into. +type GoogleCloudDocumentaiV1beta2DocumentDocumentLayout struct { + // Blocks: List of blocks in the document. + Blocks []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GcsDestination") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "Blocks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1OutputConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1OutputConfig +func (s *GoogleCloudDocumentaiV1beta2DocumentDocumentLayout) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayout return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1ProcessDocumentResponse: Response to a single -// document processing request. -type GoogleCloudDocumentaiV1beta1ProcessDocumentResponse struct { - // InputConfig: Information about the input file. This is the same as the - // corresponding input config in the request. - InputConfig *GoogleCloudDocumentaiV1beta1InputConfig `json:"inputConfig,omitempty"` - // OutputConfig: The output location of the parsed responses. The responses are - // written to this location as JSON-serialized `Document` objects. - OutputConfig *GoogleCloudDocumentaiV1beta1OutputConfig `json:"outputConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "InputConfig") to +// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock: +// Represents a block. A block could be one of the various types (text, table, +// list) supported. +type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock struct { + // BlockId: ID of the block. + BlockId string `json:"blockId,omitempty"` + // ListBlock: Block consisting of list content/structure. + ListBlock *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock `json:"listBlock,omitempty"` + // PageSpan: Page span of the block. + PageSpan *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan `json:"pageSpan,omitempty"` + // TableBlock: Block consisting of table content/structure. + TableBlock *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock `json:"tableBlock,omitempty"` + // TextBlock: Block consisting of text content. + TextBlock *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock `json:"textBlock,omitempty"` + // ForceSendFields is a list of field names (e.g. "BlockId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BlockId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutLi +// stBlock: Represents a list type block. +type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock struct { + // ListEntries: List entries that constitute a list block. + ListEntries []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry `json:"listEntries,omitempty"` + // Type: Type of the list_entries (if exist). Available options are `ordered` + // and `unordered`. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "ListEntries") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InputConfig") to include in API + // NullFields is a list of field names (e.g. "ListEntries") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1ProcessDocumentResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1ProcessDocumentResponse +func (s *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta1Vertex: A vertex represents a 2D point in the -// image. NOTE: the vertex coordinates are in the same scale as the original -// image. -type GoogleCloudDocumentaiV1beta1Vertex struct { - // X: X coordinate. - X int64 `json:"x,omitempty"` - // Y: Y coordinate (starts from the top of the image). - Y int64 `json:"y,omitempty"` - // ForceSendFields is a list of field names (e.g. "X") to unconditionally +// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutLi +// stEntry: Represents an entry in the list. +type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry struct { + // Blocks: A list entry is a list of blocks. Repeated blocks support further + // hierarchies and nested blocks. + Blocks []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "X") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "Blocks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta1Vertex) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1Vertex +func (s *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta2Barcode: Encodes the detailed information of a -// barcode. -type GoogleCloudDocumentaiV1beta2Barcode struct { - // Format: Format of a barcode. The supported formats are: - `CODE_128`: Code - // 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: - // Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - `ITF`: ITF type. - - // `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. - // - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417 type. - - // `AZTEC`: 2D Aztec code type. - `DATABAR`: GS1 DataBar code type. - Format string `json:"format,omitempty"` - // RawValue: Raw value encoded in the barcode. For example: - // `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. - RawValue string `json:"rawValue,omitempty"` - // ValueFormat: Value format describes the format of the value that a barcode - // encodes. The supported formats are: - `CONTACT_INFO`: Contact information. - - // `EMAIL`: Email address. - `ISBN`: ISBN identifier. - `PHONE`: Phone number. - // - `PRODUCT`: Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: - // URL address. - `WIFI`: Wifi information. - `GEO`: Geo-localization. - - // `CALENDAR_EVENT`: Calendar event. - `DRIVER_LICENSE`: Driver's license. - ValueFormat string `json:"valueFormat,omitempty"` - // ForceSendFields is a list of field names (e.g. "Format") to unconditionally +// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPa +// geSpan: Represents where the block starts and ends in the document. +type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan struct { + // PageEnd: Page where block ends in the document. + PageEnd int64 `json:"pageEnd,omitempty"` + // PageStart: Page where block starts in the document. + PageStart int64 `json:"pageStart,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageEnd") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Format") to include in API + // NullFields is a list of field names (e.g. "PageEnd") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta2Barcode) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2Barcode +func (s *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse: Response to an -// batch document processing request. This is returned in the LRO Operation -// after the operation is complete. -type GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse struct { - // Responses: Responses for each individual document. - Responses []*GoogleCloudDocumentaiV1beta2ProcessDocumentResponse `json:"responses,omitempty"` - // ForceSendFields is a list of field names (e.g. "Responses") to +// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTa +// bleBlock: Represents a table type block. +type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock struct { + // BodyRows: Body rows containing main table content. + BodyRows []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow `json:"bodyRows,omitempty"` + // Caption: Table caption/title. + Caption string `json:"caption,omitempty"` + // HeaderRows: Header rows at the top of the table. + HeaderRows []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow `json:"headerRows,omitempty"` + // ForceSendFields is a list of field names (e.g. "BodyRows") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Responses") to include in API + // NullFields is a list of field names (e.g. "BodyRows") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse +func (s *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta2BoundingPoly: A bounding polygon for the -// detected image annotation. -type GoogleCloudDocumentaiV1beta2BoundingPoly struct { - // NormalizedVertices: The bounding polygon normalized vertices. - NormalizedVertices []*GoogleCloudDocumentaiV1beta2NormalizedVertex `json:"normalizedVertices,omitempty"` - // Vertices: The bounding polygon vertices. - Vertices []*GoogleCloudDocumentaiV1beta2Vertex `json:"vertices,omitempty"` - // ForceSendFields is a list of field names (e.g. "NormalizedVertices") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTa +// bleCell: Represents a cell in a table row. +type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell struct { + // Blocks: A table cell is a list of blocks. Repeated blocks support further + // hierarchies and nested blocks. + Blocks []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // ColSpan: How many columns this cell spans. + ColSpan int64 `json:"colSpan,omitempty"` + // RowSpan: How many rows this cell spans. + RowSpan int64 `json:"rowSpan,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NormalizedVertices") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See + // NullFields is a list of field names (e.g. "Blocks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta2BoundingPoly) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2BoundingPoly +func (s *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta2Document: Document represents the canonical -// document resource in Document AI. It is an interchange format that provides -// insights into documents and allows for collaboration between users and -// Document AI to iterate and optimize for quality. -type GoogleCloudDocumentaiV1beta2Document struct { - // Content: Optional. Inline document content, represented as a stream of - // bytes. Note: As with all `bytes` fields, protobuffers use a pure binary - // representation, whereas JSON representations use base64. - Content string `json:"content,omitempty"` - // Entities: A list of entities detected on Document.text. For document shards, - // entities in this list may cross shard boundaries. - Entities []*GoogleCloudDocumentaiV1beta2DocumentEntity `json:"entities,omitempty"` - // EntityRelations: Placeholder. Relationship among Document.entities. - EntityRelations []*GoogleCloudDocumentaiV1beta2DocumentEntityRelation `json:"entityRelations,omitempty"` - // Error: Any error that occurred while processing this document. - Error *GoogleRpcStatus `json:"error,omitempty"` - // Labels: Labels for this document. - Labels []*GoogleCloudDocumentaiV1beta2DocumentLabel `json:"labels,omitempty"` - // MimeType: An IANA published media type (MIME type) - // (https://www.iana.org/assignments/media-types/media-types.xhtml). - MimeType string `json:"mimeType,omitempty"` - // Pages: Visual page layout for the Document. - Pages []*GoogleCloudDocumentaiV1beta2DocumentPage `json:"pages,omitempty"` - // Revisions: Placeholder. Revision history of this document. - Revisions []*GoogleCloudDocumentaiV1beta2DocumentRevision `json:"revisions,omitempty"` - // ShardInfo: Information about the sharding if this document is sharded part - // of a larger document. If the document is not sharded, this message is not - // specified. - ShardInfo *GoogleCloudDocumentaiV1beta2DocumentShardInfo `json:"shardInfo,omitempty"` - // Text: Optional. UTF-8 encoded text in reading order from the document. +// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTa +// bleRow: Represents a row in a table. +type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow struct { + // Cells: A table row is a list of table cells. + Cells []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell `json:"cells,omitempty"` + // ForceSendFields is a list of field names (e.g. "Cells") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Cells") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTe +// xtBlock: Represents a text type block. +type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock struct { + // Blocks: A text block could further have child blocks. Repeated blocks + // support further hierarchies and nested blocks. + Blocks []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` + // Text: Text content stored in the block. Text string `json:"text,omitempty"` - // TextChanges: Placeholder. A list of text corrections made to Document.text. - // This is usually used for annotating corrections to OCR mistakes. Text - // changes for a given revision may not overlap with each other. - TextChanges []*GoogleCloudDocumentaiV1beta2DocumentTextChange `json:"textChanges,omitempty"` - // TextStyles: Styles for the Document.text. - TextStyles []*GoogleCloudDocumentaiV1beta2DocumentStyle `json:"textStyles,omitempty"` - // Uri: Optional. Currently supports Google Cloud Storage URI of the form - // `gs://bucket_name/object_name`. Object versioning is not supported. For more - // information, refer to Google Cloud Storage Request URIs - // (https://cloud.google.com/storage/docs/reference-uris). - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Content") to unconditionally + // Type: Type of the text in the block. Available options are: `paragraph`, + // `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, + // `header`, `footer`. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in API + // NullFields is a list of field names (e.g. "Blocks") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta2Document) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2Document +func (s *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } @@ -6063,6 +6811,10 @@ type GoogleCloudDocumentaiV1beta3Dataset struct { // Name: Dataset resource name. Format: // `projects/{project}/locations/{location}/processors/{processor}/dataset` Name string `json:"name,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // SpannerIndexingConfig: Optional. A lightweight indexing source with low // latency and high reliability, but lacking advanced features like CMEK and // content-based search. @@ -6398,8 +7150,7 @@ type GoogleCloudDocumentaiV1beta3DocumentChunkedDocumentChunk struct { PageHeaders []*GoogleCloudDocumentaiV1beta3DocumentChunkedDocumentChunkChunkPageHeader `json:"pageHeaders,omitempty"` // PageSpan: Page span of the chunk. PageSpan *GoogleCloudDocumentaiV1beta3DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` - // SourceBlockIds: DO NOT USE. List of all parsed documents layout source - // blocks used to generate the chunk. + // SourceBlockIds: Unused. SourceBlockIds []string `json:"sourceBlockIds,omitempty"` // ForceSendFields is a list of field names (e.g. "ChunkId") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -9902,6 +10653,10 @@ type GoogleCloudDocumentaiV1beta3Processor struct { ProcessEndpoint string `json:"processEndpoint,omitempty"` // ProcessorVersionAliases: Output only. The processor version aliases. ProcessorVersionAliases []*GoogleCloudDocumentaiV1beta3ProcessorVersionAlias `json:"processorVersionAliases,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // State: Output only. The state of the processor. // // Possible values: @@ -10085,6 +10840,10 @@ type GoogleCloudDocumentaiV1beta3ProcessorVersion struct { // `projects/{project}/locations/{location}/processors/{processor}/processorVers // ions/{processor_version}` Name string `json:"name,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // State: Output only. The state of the processor version. // // Possible values: diff --git a/fcmdata/v1beta1/fcmdata-api.json b/fcmdata/v1beta1/fcmdata-api.json index 5e5d3b18bda..cdeb950e548 100644 --- a/fcmdata/v1beta1/fcmdata-api.json +++ b/fcmdata/v1beta1/fcmdata-api.json @@ -154,7 +154,7 @@ } } }, - "revision": "20240519", + "revision": "20240602", "rootUrl": "https://fcmdata.googleapis.com/", "schemas": { "GoogleFirebaseFcmDataV1beta1AndroidDeliveryData": { @@ -279,6 +279,11 @@ "description": "Percentage breakdown of message delivery outcomes. These categories are mutually exclusive. All percentages are calculated with countMessagesAccepted as the denominator. These categories may not account for all message outcomes.", "id": "GoogleFirebaseFcmDataV1beta1MessageOutcomePercents", "properties": { + "collapsed": { + "description": "The percentage of accepted messages that were [collapsed](https://firebase.google.com/docs/cloud-messaging/concept-options#collapsible_and_non-collapsible_messages) by another message.", + "format": "float", + "type": "number" + }, "delivered": { "description": "The percentage of all accepted messages that were successfully delivered to the device.", "format": "float", @@ -299,6 +304,11 @@ "format": "float", "type": "number" }, + "droppedTtlExpired": { + "description": "The percentage of accepted messages that expired because [Time To Live (TTL)](https://firebase.google.com/docs/cloud-messaging/concept-options#ttl) elapsed before the target device reconnected.", + "format": "float", + "type": "number" + }, "pending": { "description": "The percentage of messages accepted on this day that were not dropped and not delivered, due to the device being disconnected (as of the end of the America/Los_Angeles day when the message was sent to FCM). A portion of these messages will be delivered the next day when the device connects but others may be destined to devices that ultimately never reconnect.", "format": "float", diff --git a/fcmdata/v1beta1/fcmdata-gen.go b/fcmdata/v1beta1/fcmdata-gen.go index 8730dca942b..1d0fad6ce4b 100644 --- a/fcmdata/v1beta1/fcmdata-gen.go +++ b/fcmdata/v1beta1/fcmdata-gen.go @@ -402,6 +402,10 @@ func (s *GoogleFirebaseFcmDataV1beta1MessageInsightPercents) UnmarshalJSON(data // percentages are calculated with countMessagesAccepted as the denominator. // These categories may not account for all message outcomes. type GoogleFirebaseFcmDataV1beta1MessageOutcomePercents struct { + // Collapsed: The percentage of accepted messages that were collapsed + // (https://firebase.google.com/docs/cloud-messaging/concept-options#collapsible_and_non-collapsible_messages) + // by another message. + Collapsed float64 `json:"collapsed,omitempty"` // Delivered: The percentage of all accepted messages that were successfully // delivered to the device. Delivered float64 `json:"delivered,omitempty"` @@ -426,6 +430,11 @@ type GoogleFirebaseFcmDataV1beta1MessageOutcomePercents struct { // (https://firebase.google.com/docs/cloud-messaging/android/receive#override-ondeletedmessages) // in our SDK instead of delivering the messages. DroppedTooManyPendingMessages float64 `json:"droppedTooManyPendingMessages,omitempty"` + // DroppedTtlExpired: The percentage of accepted messages that expired because + // Time To Live (TTL) + // (https://firebase.google.com/docs/cloud-messaging/concept-options#ttl) + // elapsed before the target device reconnected. + DroppedTtlExpired float64 `json:"droppedTtlExpired,omitempty"` // Pending: The percentage of messages accepted on this day that were not // dropped and not delivered, due to the device being disconnected (as of the // end of the America/Los_Angeles day when the message was sent to FCM). A @@ -433,13 +442,13 @@ type GoogleFirebaseFcmDataV1beta1MessageOutcomePercents struct { // connects but others may be destined to devices that ultimately never // reconnect. Pending float64 `json:"pending,omitempty"` - // ForceSendFields is a list of field names (e.g. "Delivered") to + // ForceSendFields is a list of field names (e.g. "Collapsed") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Delivered") to include in API + // NullFields is a list of field names (e.g. "Collapsed") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -454,10 +463,12 @@ func (s *GoogleFirebaseFcmDataV1beta1MessageOutcomePercents) MarshalJSON() ([]by func (s *GoogleFirebaseFcmDataV1beta1MessageOutcomePercents) UnmarshalJSON(data []byte) error { type NoMethod GoogleFirebaseFcmDataV1beta1MessageOutcomePercents var s1 struct { + Collapsed gensupport.JSONFloat64 `json:"collapsed"` Delivered gensupport.JSONFloat64 `json:"delivered"` DroppedAppForceStopped gensupport.JSONFloat64 `json:"droppedAppForceStopped"` DroppedDeviceInactive gensupport.JSONFloat64 `json:"droppedDeviceInactive"` DroppedTooManyPendingMessages gensupport.JSONFloat64 `json:"droppedTooManyPendingMessages"` + DroppedTtlExpired gensupport.JSONFloat64 `json:"droppedTtlExpired"` Pending gensupport.JSONFloat64 `json:"pending"` *NoMethod } @@ -465,10 +476,12 @@ func (s *GoogleFirebaseFcmDataV1beta1MessageOutcomePercents) UnmarshalJSON(data if err := json.Unmarshal(data, &s1); err != nil { return err } + s.Collapsed = float64(s1.Collapsed) s.Delivered = float64(s1.Delivered) s.DroppedAppForceStopped = float64(s1.DroppedAppForceStopped) s.DroppedDeviceInactive = float64(s1.DroppedDeviceInactive) s.DroppedTooManyPendingMessages = float64(s1.DroppedTooManyPendingMessages) + s.DroppedTtlExpired = float64(s1.DroppedTtlExpired) s.Pending = float64(s1.Pending) return nil } diff --git a/policyanalyzer/v1/policyanalyzer-api.json b/policyanalyzer/v1/policyanalyzer-api.json index ce364721f56..e085925751f 100644 --- a/policyanalyzer/v1/policyanalyzer-api.json +++ b/policyanalyzer/v1/policyanalyzer-api.json @@ -105,6 +105,120 @@ }, "protocol": "rest", "resources": { + "folders": { + "resources": { + "locations": { + "resources": { + "activityTypes": { + "resources": { + "activities": { + "methods": { + "query": { + "description": "Queries policy activities on Google Cloud resources.", + "flatPath": "v1/folders/{foldersId}/locations/{locationsId}/activityTypes/{activityTypesId}/activities:query", + "httpMethod": "GET", + "id": "policyanalyzer.folders.locations.activityTypes.activities.query", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filter expression to restrict the activities returned. For serviceAccountLastAuthentication activities, supported filters are: - `activities.full_resource_name {=} [STRING]` - `activities.fullResourceName {=} [STRING]` where `[STRING]` is the full resource name of the service account. For serviceAccountKeyLastAuthentication activities, supported filters are: - `activities.full_resource_name {=} [STRING]` - `activities.fullResourceName {=} [STRING]` where `[STRING]` is the full resource name of the service account key.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of results to return from this request. Max limit is 1000. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The container resource on which to execute the request. Acceptable formats: `projects/[PROJECT_ID|PROJECT_NUMBER]/locations/[LOCATION]/activityTypes/[ACTIVITY_TYPE]` LOCATION here refers to Google Cloud Locations: https://cloud.google.com/about/locations/", + "location": "path", + "pattern": "^folders/[^/]+/locations/[^/]+/activityTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/activities:query", + "response": { + "$ref": "GoogleCloudPolicyanalyzerV1QueryActivityResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + }, + "organizations": { + "resources": { + "locations": { + "resources": { + "activityTypes": { + "resources": { + "activities": { + "methods": { + "query": { + "description": "Queries policy activities on Google Cloud resources.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/activityTypes/{activityTypesId}/activities:query", + "httpMethod": "GET", + "id": "policyanalyzer.organizations.locations.activityTypes.activities.query", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filter expression to restrict the activities returned. For serviceAccountLastAuthentication activities, supported filters are: - `activities.full_resource_name {=} [STRING]` - `activities.fullResourceName {=} [STRING]` where `[STRING]` is the full resource name of the service account. For serviceAccountKeyLastAuthentication activities, supported filters are: - `activities.full_resource_name {=} [STRING]` - `activities.fullResourceName {=} [STRING]` where `[STRING]` is the full resource name of the service account key.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of results to return from this request. Max limit is 1000. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The container resource on which to execute the request. Acceptable formats: `projects/[PROJECT_ID|PROJECT_NUMBER]/locations/[LOCATION]/activityTypes/[ACTIVITY_TYPE]` LOCATION here refers to Google Cloud Locations: https://cloud.google.com/about/locations/", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/activityTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/activities:query", + "response": { + "$ref": "GoogleCloudPolicyanalyzerV1QueryActivityResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + }, "projects": { "resources": { "locations": { @@ -163,10 +277,11 @@ } } }, - "revision": "20210918", + "revision": "20240602", "rootUrl": "https://policyanalyzer.googleapis.com/", "schemas": { "GoogleCloudPolicyanalyzerV1Activity": { + "description": "Represents Activity on a GCP resource over specific observation period.", "id": "GoogleCloudPolicyanalyzerV1Activity", "properties": { "activity": { diff --git a/policyanalyzer/v1/policyanalyzer-gen.go b/policyanalyzer/v1/policyanalyzer-gen.go index 6dbdfe107d1..1cfbf47d861 100644 --- a/policyanalyzer/v1/policyanalyzer-gen.go +++ b/policyanalyzer/v1/policyanalyzer-gen.go @@ -135,6 +135,8 @@ func New(client *http.Client) (*Service, error) { return nil, errors.New("client is nil") } s := &Service{client: client, BasePath: basePath} + s.Folders = NewFoldersService(s) + s.Organizations = NewOrganizationsService(s) s.Projects = NewProjectsService(s) return s, nil } @@ -144,6 +146,10 @@ type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment + Folders *FoldersService + + Organizations *OrganizationsService + Projects *ProjectsService } @@ -154,6 +160,96 @@ func (s *Service) userAgent() string { return googleapi.UserAgent + " " + s.UserAgent } +func NewFoldersService(s *Service) *FoldersService { + rs := &FoldersService{s: s} + rs.Locations = NewFoldersLocationsService(s) + return rs +} + +type FoldersService struct { + s *Service + + Locations *FoldersLocationsService +} + +func NewFoldersLocationsService(s *Service) *FoldersLocationsService { + rs := &FoldersLocationsService{s: s} + rs.ActivityTypes = NewFoldersLocationsActivityTypesService(s) + return rs +} + +type FoldersLocationsService struct { + s *Service + + ActivityTypes *FoldersLocationsActivityTypesService +} + +func NewFoldersLocationsActivityTypesService(s *Service) *FoldersLocationsActivityTypesService { + rs := &FoldersLocationsActivityTypesService{s: s} + rs.Activities = NewFoldersLocationsActivityTypesActivitiesService(s) + return rs +} + +type FoldersLocationsActivityTypesService struct { + s *Service + + Activities *FoldersLocationsActivityTypesActivitiesService +} + +func NewFoldersLocationsActivityTypesActivitiesService(s *Service) *FoldersLocationsActivityTypesActivitiesService { + rs := &FoldersLocationsActivityTypesActivitiesService{s: s} + return rs +} + +type FoldersLocationsActivityTypesActivitiesService struct { + s *Service +} + +func NewOrganizationsService(s *Service) *OrganizationsService { + rs := &OrganizationsService{s: s} + rs.Locations = NewOrganizationsLocationsService(s) + return rs +} + +type OrganizationsService struct { + s *Service + + Locations *OrganizationsLocationsService +} + +func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService { + rs := &OrganizationsLocationsService{s: s} + rs.ActivityTypes = NewOrganizationsLocationsActivityTypesService(s) + return rs +} + +type OrganizationsLocationsService struct { + s *Service + + ActivityTypes *OrganizationsLocationsActivityTypesService +} + +func NewOrganizationsLocationsActivityTypesService(s *Service) *OrganizationsLocationsActivityTypesService { + rs := &OrganizationsLocationsActivityTypesService{s: s} + rs.Activities = NewOrganizationsLocationsActivityTypesActivitiesService(s) + return rs +} + +type OrganizationsLocationsActivityTypesService struct { + s *Service + + Activities *OrganizationsLocationsActivityTypesActivitiesService +} + +func NewOrganizationsLocationsActivityTypesActivitiesService(s *Service) *OrganizationsLocationsActivityTypesActivitiesService { + rs := &OrganizationsLocationsActivityTypesActivitiesService{s: s} + return rs +} + +type OrganizationsLocationsActivityTypesActivitiesService struct { + s *Service +} + func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} rs.Locations = NewProjectsLocationsService(s) @@ -199,6 +295,8 @@ type ProjectsLocationsActivityTypesActivitiesService struct { s *Service } +// GoogleCloudPolicyanalyzerV1Activity: Represents Activity on a GCP resource +// over specific observation period. type GoogleCloudPolicyanalyzerV1Activity struct { // Activity: A struct of custom fields to explain the activity. Activity googleapi.RawMessage `json:"activity,omitempty"` @@ -286,6 +384,338 @@ func (s *GoogleCloudPolicyanalyzerV1QueryActivityResponse) MarshalJSON() ([]byte return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +type FoldersLocationsActivityTypesActivitiesQueryCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Query: Queries policy activities on Google Cloud resources. +// +// - parent: The container resource on which to execute the request. Acceptable +// formats: +// `projects/[PROJECT_ID|PROJECT_NUMBER]/locations/[LOCATION]/activityTypes/[A +// CTIVITY_TYPE]` LOCATION here refers to Google Cloud Locations: +// https://cloud.google.com/about/locations/. +func (r *FoldersLocationsActivityTypesActivitiesService) Query(parent string) *FoldersLocationsActivityTypesActivitiesQueryCall { + c := &FoldersLocationsActivityTypesActivitiesQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter expression to restrict +// the activities returned. For serviceAccountLastAuthentication activities, +// supported filters are: - `activities.full_resource_name {=} [STRING]` - +// `activities.fullResourceName {=} [STRING]` where `[STRING]` is the full +// resource name of the service account. For +// serviceAccountKeyLastAuthentication activities, supported filters are: - +// `activities.full_resource_name {=} [STRING]` - `activities.fullResourceName +// {=} [STRING]` where `[STRING]` is the full resource name of the service +// account key. +func (c *FoldersLocationsActivityTypesActivitiesQueryCall) Filter(filter string) *FoldersLocationsActivityTypesActivitiesQueryCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return from this request. Max limit is 1000. Non-positive values +// are ignored. The presence of `nextPageToken` in the response indicates that +// more results might be available. +func (c *FoldersLocationsActivityTypesActivitiesQueryCall) PageSize(pageSize int64) *FoldersLocationsActivityTypesActivitiesQueryCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If present, then retrieve +// the next batch of results from the preceding call to this method. +// `pageToken` must be the value of `nextPageToken` from the previous response. +// The values of other method parameters should be identical to those in the +// previous call. +func (c *FoldersLocationsActivityTypesActivitiesQueryCall) PageToken(pageToken string) *FoldersLocationsActivityTypesActivitiesQueryCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *FoldersLocationsActivityTypesActivitiesQueryCall) Fields(s ...googleapi.Field) *FoldersLocationsActivityTypesActivitiesQueryCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *FoldersLocationsActivityTypesActivitiesQueryCall) IfNoneMatch(entityTag string) *FoldersLocationsActivityTypesActivitiesQueryCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *FoldersLocationsActivityTypesActivitiesQueryCall) Context(ctx context.Context) *FoldersLocationsActivityTypesActivitiesQueryCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *FoldersLocationsActivityTypesActivitiesQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersLocationsActivityTypesActivitiesQueryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/activities:query") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policyanalyzer.folders.locations.activityTypes.activities.query" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudPolicyanalyzerV1QueryActivityResponse.ServerResponse.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 *FoldersLocationsActivityTypesActivitiesQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicyanalyzerV1QueryActivityResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleCloudPolicyanalyzerV1QueryActivityResponse{ + 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 +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *FoldersLocationsActivityTypesActivitiesQueryCall) Pages(ctx context.Context, f func(*GoogleCloudPolicyanalyzerV1QueryActivityResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type OrganizationsLocationsActivityTypesActivitiesQueryCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Query: Queries policy activities on Google Cloud resources. +// +// - parent: The container resource on which to execute the request. Acceptable +// formats: +// `projects/[PROJECT_ID|PROJECT_NUMBER]/locations/[LOCATION]/activityTypes/[A +// CTIVITY_TYPE]` LOCATION here refers to Google Cloud Locations: +// https://cloud.google.com/about/locations/. +func (r *OrganizationsLocationsActivityTypesActivitiesService) Query(parent string) *OrganizationsLocationsActivityTypesActivitiesQueryCall { + c := &OrganizationsLocationsActivityTypesActivitiesQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter expression to restrict +// the activities returned. For serviceAccountLastAuthentication activities, +// supported filters are: - `activities.full_resource_name {=} [STRING]` - +// `activities.fullResourceName {=} [STRING]` where `[STRING]` is the full +// resource name of the service account. For +// serviceAccountKeyLastAuthentication activities, supported filters are: - +// `activities.full_resource_name {=} [STRING]` - `activities.fullResourceName +// {=} [STRING]` where `[STRING]` is the full resource name of the service +// account key. +func (c *OrganizationsLocationsActivityTypesActivitiesQueryCall) Filter(filter string) *OrganizationsLocationsActivityTypesActivitiesQueryCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return from this request. Max limit is 1000. Non-positive values +// are ignored. The presence of `nextPageToken` in the response indicates that +// more results might be available. +func (c *OrganizationsLocationsActivityTypesActivitiesQueryCall) PageSize(pageSize int64) *OrganizationsLocationsActivityTypesActivitiesQueryCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If present, then retrieve +// the next batch of results from the preceding call to this method. +// `pageToken` must be the value of `nextPageToken` from the previous response. +// The values of other method parameters should be identical to those in the +// previous call. +func (c *OrganizationsLocationsActivityTypesActivitiesQueryCall) PageToken(pageToken string) *OrganizationsLocationsActivityTypesActivitiesQueryCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *OrganizationsLocationsActivityTypesActivitiesQueryCall) Fields(s ...googleapi.Field) *OrganizationsLocationsActivityTypesActivitiesQueryCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *OrganizationsLocationsActivityTypesActivitiesQueryCall) IfNoneMatch(entityTag string) *OrganizationsLocationsActivityTypesActivitiesQueryCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *OrganizationsLocationsActivityTypesActivitiesQueryCall) Context(ctx context.Context) *OrganizationsLocationsActivityTypesActivitiesQueryCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *OrganizationsLocationsActivityTypesActivitiesQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsActivityTypesActivitiesQueryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/activities:query") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policyanalyzer.organizations.locations.activityTypes.activities.query" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudPolicyanalyzerV1QueryActivityResponse.ServerResponse.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 *OrganizationsLocationsActivityTypesActivitiesQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicyanalyzerV1QueryActivityResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleCloudPolicyanalyzerV1QueryActivityResponse{ + 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 +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OrganizationsLocationsActivityTypesActivitiesQueryCall) Pages(ctx context.Context, f func(*GoogleCloudPolicyanalyzerV1QueryActivityResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + type ProjectsLocationsActivityTypesActivitiesQueryCall struct { s *Service parent string diff --git a/policyanalyzer/v1beta1/policyanalyzer-api.json b/policyanalyzer/v1beta1/policyanalyzer-api.json index b0578fbfebd..98d55037ed1 100644 --- a/policyanalyzer/v1beta1/policyanalyzer-api.json +++ b/policyanalyzer/v1beta1/policyanalyzer-api.json @@ -105,6 +105,120 @@ }, "protocol": "rest", "resources": { + "folders": { + "resources": { + "locations": { + "resources": { + "activityTypes": { + "resources": { + "activities": { + "methods": { + "query": { + "description": "Queries policy activities on GCP resources.", + "flatPath": "v1beta1/folders/{foldersId}/locations/{locationsId}/activityTypes/{activityTypesId}/activities:query", + "httpMethod": "GET", + "id": "policyanalyzer.folders.locations.activityTypes.activities.query", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Optional filter expression to restrict the activities returned. Supported filters are: - service_account_last_authn.full_resource_name {=} - service_account_key_last_authn.full_resource_name {=} ", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of results to return from this request. Max limit is 1000. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The container resource on which to execute the request. Acceptable formats: `projects/[PROJECT_ID|PROJECT_NUMBER]/locations/[LOCATION]/activityTypes/[ACTIVITY_TYPE]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/", + "location": "path", + "pattern": "^folders/[^/]+/locations/[^/]+/activityTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/activities:query", + "response": { + "$ref": "GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + }, + "organizations": { + "resources": { + "locations": { + "resources": { + "activityTypes": { + "resources": { + "activities": { + "methods": { + "query": { + "description": "Queries policy activities on GCP resources.", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/activityTypes/{activityTypesId}/activities:query", + "httpMethod": "GET", + "id": "policyanalyzer.organizations.locations.activityTypes.activities.query", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Optional filter expression to restrict the activities returned. Supported filters are: - service_account_last_authn.full_resource_name {=} - service_account_key_last_authn.full_resource_name {=} ", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of results to return from this request. Max limit is 1000. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The container resource on which to execute the request. Acceptable formats: `projects/[PROJECT_ID|PROJECT_NUMBER]/locations/[LOCATION]/activityTypes/[ACTIVITY_TYPE]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/activityTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/activities:query", + "response": { + "$ref": "GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + }, "projects": { "resources": { "locations": { @@ -163,10 +277,11 @@ } } }, - "revision": "20210806", + "revision": "20240602", "rootUrl": "https://policyanalyzer.googleapis.com/", "schemas": { "GoogleCloudPolicyanalyzerV1beta1Activity": { + "description": "Represents Activity on a GCP resource over specific observation period.", "id": "GoogleCloudPolicyanalyzerV1beta1Activity", "properties": { "activity": { diff --git a/policyanalyzer/v1beta1/policyanalyzer-gen.go b/policyanalyzer/v1beta1/policyanalyzer-gen.go index 4c3d84c9501..f4838a22e59 100644 --- a/policyanalyzer/v1beta1/policyanalyzer-gen.go +++ b/policyanalyzer/v1beta1/policyanalyzer-gen.go @@ -135,6 +135,8 @@ func New(client *http.Client) (*Service, error) { return nil, errors.New("client is nil") } s := &Service{client: client, BasePath: basePath} + s.Folders = NewFoldersService(s) + s.Organizations = NewOrganizationsService(s) s.Projects = NewProjectsService(s) return s, nil } @@ -144,6 +146,10 @@ type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment + Folders *FoldersService + + Organizations *OrganizationsService + Projects *ProjectsService } @@ -154,6 +160,96 @@ func (s *Service) userAgent() string { return googleapi.UserAgent + " " + s.UserAgent } +func NewFoldersService(s *Service) *FoldersService { + rs := &FoldersService{s: s} + rs.Locations = NewFoldersLocationsService(s) + return rs +} + +type FoldersService struct { + s *Service + + Locations *FoldersLocationsService +} + +func NewFoldersLocationsService(s *Service) *FoldersLocationsService { + rs := &FoldersLocationsService{s: s} + rs.ActivityTypes = NewFoldersLocationsActivityTypesService(s) + return rs +} + +type FoldersLocationsService struct { + s *Service + + ActivityTypes *FoldersLocationsActivityTypesService +} + +func NewFoldersLocationsActivityTypesService(s *Service) *FoldersLocationsActivityTypesService { + rs := &FoldersLocationsActivityTypesService{s: s} + rs.Activities = NewFoldersLocationsActivityTypesActivitiesService(s) + return rs +} + +type FoldersLocationsActivityTypesService struct { + s *Service + + Activities *FoldersLocationsActivityTypesActivitiesService +} + +func NewFoldersLocationsActivityTypesActivitiesService(s *Service) *FoldersLocationsActivityTypesActivitiesService { + rs := &FoldersLocationsActivityTypesActivitiesService{s: s} + return rs +} + +type FoldersLocationsActivityTypesActivitiesService struct { + s *Service +} + +func NewOrganizationsService(s *Service) *OrganizationsService { + rs := &OrganizationsService{s: s} + rs.Locations = NewOrganizationsLocationsService(s) + return rs +} + +type OrganizationsService struct { + s *Service + + Locations *OrganizationsLocationsService +} + +func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService { + rs := &OrganizationsLocationsService{s: s} + rs.ActivityTypes = NewOrganizationsLocationsActivityTypesService(s) + return rs +} + +type OrganizationsLocationsService struct { + s *Service + + ActivityTypes *OrganizationsLocationsActivityTypesService +} + +func NewOrganizationsLocationsActivityTypesService(s *Service) *OrganizationsLocationsActivityTypesService { + rs := &OrganizationsLocationsActivityTypesService{s: s} + rs.Activities = NewOrganizationsLocationsActivityTypesActivitiesService(s) + return rs +} + +type OrganizationsLocationsActivityTypesService struct { + s *Service + + Activities *OrganizationsLocationsActivityTypesActivitiesService +} + +func NewOrganizationsLocationsActivityTypesActivitiesService(s *Service) *OrganizationsLocationsActivityTypesActivitiesService { + rs := &OrganizationsLocationsActivityTypesActivitiesService{s: s} + return rs +} + +type OrganizationsLocationsActivityTypesActivitiesService struct { + s *Service +} + func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} rs.Locations = NewProjectsLocationsService(s) @@ -199,6 +295,8 @@ type ProjectsLocationsActivityTypesActivitiesService struct { s *Service } +// GoogleCloudPolicyanalyzerV1beta1Activity: Represents Activity on a GCP +// resource over specific observation period. type GoogleCloudPolicyanalyzerV1beta1Activity struct { // Activity: A struct of custom fields to explain the activity. Activity googleapi.RawMessage `json:"activity,omitempty"` @@ -284,6 +382,328 @@ func (s *GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse) MarshalJSON() ([ return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +type FoldersLocationsActivityTypesActivitiesQueryCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Query: Queries policy activities on GCP resources. +// +// - parent: The container resource on which to execute the request. Acceptable +// formats: +// `projects/[PROJECT_ID|PROJECT_NUMBER]/locations/[LOCATION]/activityTypes/[A +// CTIVITY_TYPE]` LOCATION here refers to GCP Locations: +// https://cloud.google.com/about/locations/. +func (r *FoldersLocationsActivityTypesActivitiesService) Query(parent string) *FoldersLocationsActivityTypesActivitiesQueryCall { + c := &FoldersLocationsActivityTypesActivitiesQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Optional filter expression to +// restrict the activities returned. Supported filters are: - +// service_account_last_authn.full_resource_name {=} - +// service_account_key_last_authn.full_resource_name {=} +func (c *FoldersLocationsActivityTypesActivitiesQueryCall) Filter(filter string) *FoldersLocationsActivityTypesActivitiesQueryCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return from this request. Max limit is 1000. Non-positive values +// are ignored. The presence of `nextPageToken` in the response indicates that +// more results might be available. +func (c *FoldersLocationsActivityTypesActivitiesQueryCall) PageSize(pageSize int64) *FoldersLocationsActivityTypesActivitiesQueryCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If present, then retrieve +// the next batch of results from the preceding call to this method. +// `pageToken` must be the value of `nextPageToken` from the previous response. +// The values of other method parameters should be identical to those in the +// previous call. +func (c *FoldersLocationsActivityTypesActivitiesQueryCall) PageToken(pageToken string) *FoldersLocationsActivityTypesActivitiesQueryCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *FoldersLocationsActivityTypesActivitiesQueryCall) Fields(s ...googleapi.Field) *FoldersLocationsActivityTypesActivitiesQueryCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *FoldersLocationsActivityTypesActivitiesQueryCall) IfNoneMatch(entityTag string) *FoldersLocationsActivityTypesActivitiesQueryCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *FoldersLocationsActivityTypesActivitiesQueryCall) Context(ctx context.Context) *FoldersLocationsActivityTypesActivitiesQueryCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *FoldersLocationsActivityTypesActivitiesQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersLocationsActivityTypesActivitiesQueryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/activities:query") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policyanalyzer.folders.locations.activityTypes.activities.query" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse.ServerResponse.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 *FoldersLocationsActivityTypesActivitiesQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse{ + 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 +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *FoldersLocationsActivityTypesActivitiesQueryCall) Pages(ctx context.Context, f func(*GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type OrganizationsLocationsActivityTypesActivitiesQueryCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Query: Queries policy activities on GCP resources. +// +// - parent: The container resource on which to execute the request. Acceptable +// formats: +// `projects/[PROJECT_ID|PROJECT_NUMBER]/locations/[LOCATION]/activityTypes/[A +// CTIVITY_TYPE]` LOCATION here refers to GCP Locations: +// https://cloud.google.com/about/locations/. +func (r *OrganizationsLocationsActivityTypesActivitiesService) Query(parent string) *OrganizationsLocationsActivityTypesActivitiesQueryCall { + c := &OrganizationsLocationsActivityTypesActivitiesQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Optional filter expression to +// restrict the activities returned. Supported filters are: - +// service_account_last_authn.full_resource_name {=} - +// service_account_key_last_authn.full_resource_name {=} +func (c *OrganizationsLocationsActivityTypesActivitiesQueryCall) Filter(filter string) *OrganizationsLocationsActivityTypesActivitiesQueryCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return from this request. Max limit is 1000. Non-positive values +// are ignored. The presence of `nextPageToken` in the response indicates that +// more results might be available. +func (c *OrganizationsLocationsActivityTypesActivitiesQueryCall) PageSize(pageSize int64) *OrganizationsLocationsActivityTypesActivitiesQueryCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If present, then retrieve +// the next batch of results from the preceding call to this method. +// `pageToken` must be the value of `nextPageToken` from the previous response. +// The values of other method parameters should be identical to those in the +// previous call. +func (c *OrganizationsLocationsActivityTypesActivitiesQueryCall) PageToken(pageToken string) *OrganizationsLocationsActivityTypesActivitiesQueryCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *OrganizationsLocationsActivityTypesActivitiesQueryCall) Fields(s ...googleapi.Field) *OrganizationsLocationsActivityTypesActivitiesQueryCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *OrganizationsLocationsActivityTypesActivitiesQueryCall) IfNoneMatch(entityTag string) *OrganizationsLocationsActivityTypesActivitiesQueryCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *OrganizationsLocationsActivityTypesActivitiesQueryCall) Context(ctx context.Context) *OrganizationsLocationsActivityTypesActivitiesQueryCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *OrganizationsLocationsActivityTypesActivitiesQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsActivityTypesActivitiesQueryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/activities:query") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policyanalyzer.organizations.locations.activityTypes.activities.query" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse.ServerResponse.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 *OrganizationsLocationsActivityTypesActivitiesQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse{ + 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 +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OrganizationsLocationsActivityTypesActivitiesQueryCall) Pages(ctx context.Context, f func(*GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + type ProjectsLocationsActivityTypesActivitiesQueryCall struct { s *Service parent string diff --git a/redis/v1/redis-api.json b/redis/v1/redis-api.json index 786c354cfe2..0e530e46616 100644 --- a/redis/v1/redis-api.json +++ b/redis/v1/redis-api.json @@ -821,7 +821,7 @@ } } }, - "revision": "20240524", + "revision": "20240531", "rootUrl": "https://redis.googleapis.com/", "schemas": { "AOFConfig": { @@ -1111,6 +1111,10 @@ "description": "Output only. System assigned, unique identifier for the cluster.", "readOnly": true, "type": "string" + }, + "zoneDistributionConfig": { + "$ref": "ZoneDistributionConfig", + "description": "Optional. This config will be used to determine how the customer wants us to distribute cluster resources within the region." } }, "type": "object" @@ -2801,11 +2805,17 @@ "description": "Required. Type of aggregation performed on the metric.", "enum": [ "AGGREGATION_TYPE_UNSPECIFIED", - "MAXIMUM" + "PEAK", + "P99", + "P95", + "CURRENT" ], "enumDescriptions": [ "Unspecified aggregation type.", - "Maximum aggregation type." + "PEAK aggregation type.", + "P99 aggregation type.", + "P95 aggregation type.", + "current aggregation type." ], "type": "string" }, @@ -2815,13 +2825,17 @@ "METRIC_TYPE_UNSPECIFIED", "CPU_UTILIZATION", "MEMORY_UTILIZATION", - "NETWORK_CONNECTIONS" + "NETWORK_CONNECTIONS", + "STORAGE_UTILIZATION", + "STORAGE_USED_BYTES" ], "enumDescriptions": [ - "", + "Unspecified metric type.", "CPU utilization for a resource. The value is a fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).", "Memory utilization for a resource. The value is a fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).", - "Number of network connections for a resource." + "Number of network connections for a resource.", + "Storage utilization for a resource. The value is a fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).", + "Sotrage used by a resource." ], "type": "string" }, @@ -3384,17 +3398,21 @@ "id": "TypedValue", "properties": { "boolValue": { + "description": "For boolean value", "type": "boolean" }, "doubleValue": { + "description": "For double value", "format": "double", "type": "number" }, "int64Value": { + "description": "For integer value", "format": "int64", "type": "string" }, "stringValue": { + "description": "For string value", "type": "string" } }, @@ -3481,6 +3499,31 @@ } }, "type": "object" + }, + "ZoneDistributionConfig": { + "description": "Zone distribution config for allocation of cluster resources.", + "id": "ZoneDistributionConfig", + "properties": { + "mode": { + "description": "Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not specified.", + "enum": [ + "ZONE_DISTRIBUTION_MODE_UNSPECIFIED", + "MULTI_ZONE", + "SINGLE_ZONE" + ], + "enumDescriptions": [ + "Not Set. Default: MULTI_ZONE", + "Distribute all resources across 3 zones picked at random, within the region.", + "Distribute all resources in a single zone. The zone field must be specified, when this mode is selected." + ], + "type": "string" + }, + "zone": { + "description": "Optional. When SINGLE ZONE distribution is selected, zone field would be used to allocate all resources in that zone. This is not applicable to MULTI_ZONE, and would be ignored for MULTI_ZONE clusters.", + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/redis/v1/redis-gen.go b/redis/v1/redis-gen.go index 3d473847424..0ee72c6518f 100644 --- a/redis/v1/redis-gen.go +++ b/redis/v1/redis-gen.go @@ -476,6 +476,9 @@ type Cluster struct { TransitEncryptionMode string `json:"transitEncryptionMode,omitempty"` // Uid: Output only. System assigned, unique identifier for the cluster. Uid string `json:"uid,omitempty"` + // ZoneDistributionConfig: Optional. This config will be used to determine how + // the customer wants us to distribute cluster resources within the region. + ZoneDistributionConfig *ZoneDistributionConfig `json:"zoneDistributionConfig,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -2186,17 +2189,23 @@ type ObservabilityMetricData struct { // // Possible values: // "AGGREGATION_TYPE_UNSPECIFIED" - Unspecified aggregation type. - // "MAXIMUM" - Maximum aggregation type. + // "PEAK" - PEAK aggregation type. + // "P99" - P99 aggregation type. + // "P95" - P95 aggregation type. + // "CURRENT" - current aggregation type. AggregationType string `json:"aggregationType,omitempty"` // MetricType: Required. Type of metric like CPU, Memory, etc. // // Possible values: - // "METRIC_TYPE_UNSPECIFIED" + // "METRIC_TYPE_UNSPECIFIED" - Unspecified metric type. // "CPU_UTILIZATION" - CPU utilization for a resource. The value is a // fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases). // "MEMORY_UTILIZATION" - Memory utilization for a resource. The value is a // fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases). // "NETWORK_CONNECTIONS" - Number of network connections for a resource. + // "STORAGE_UTILIZATION" - Storage utilization for a resource. The value is a + // fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases). + // "STORAGE_USED_BYTES" - Sotrage used by a resource. MetricType string `json:"metricType,omitempty"` // ObservationTime: Required. The time the metric value was observed. ObservationTime string `json:"observationTime,omitempty"` @@ -2808,10 +2817,14 @@ func (s *TlsCertificate) MarshalJSON() ([]byte, error) { // TypedValue: TypedValue represents the value of a metric type. It can either // be a double, an int64, a string or a bool. type TypedValue struct { - BoolValue bool `json:"boolValue,omitempty"` + // BoolValue: For boolean value + BoolValue bool `json:"boolValue,omitempty"` + // DoubleValue: For double value DoubleValue float64 `json:"doubleValue,omitempty"` - Int64Value int64 `json:"int64Value,omitempty,string"` - StringValue string `json:"stringValue,omitempty"` + // Int64Value: For integer value + Int64Value int64 `json:"int64Value,omitempty,string"` + // StringValue: For string value + StringValue string `json:"stringValue,omitempty"` // ForceSendFields is a list of field names (e.g. "BoolValue") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -2952,6 +2965,41 @@ func (s *WeeklyMaintenanceWindow) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// ZoneDistributionConfig: Zone distribution config for allocation of cluster +// resources. +type ZoneDistributionConfig struct { + // Mode: Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when + // not specified. + // + // Possible values: + // "ZONE_DISTRIBUTION_MODE_UNSPECIFIED" - Not Set. Default: MULTI_ZONE + // "MULTI_ZONE" - Distribute all resources across 3 zones picked at random, + // within the region. + // "SINGLE_ZONE" - Distribute all resources in a single zone. The zone field + // must be specified, when this mode is selected. + Mode string `json:"mode,omitempty"` + // Zone: Optional. When SINGLE ZONE distribution is selected, zone field would + // be used to allocate all resources in that zone. This is not applicable to + // MULTI_ZONE, and would be ignored for MULTI_ZONE clusters. + Zone string `json:"zone,omitempty"` + // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Mode") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *ZoneDistributionConfig) MarshalJSON() ([]byte, error) { + type NoMethod ZoneDistributionConfig + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + type ProjectsLocationsGetCall struct { s *Service name string diff --git a/redis/v1beta1/redis-api.json b/redis/v1beta1/redis-api.json index aafc1f50d51..4436367a54a 100644 --- a/redis/v1beta1/redis-api.json +++ b/redis/v1beta1/redis-api.json @@ -821,7 +821,7 @@ } } }, - "revision": "20240524", + "revision": "20240531", "rootUrl": "https://redis.googleapis.com/", "schemas": { "AOFConfig": { @@ -1111,6 +1111,10 @@ "description": "Output only. System assigned, unique identifier for the cluster.", "readOnly": true, "type": "string" + }, + "zoneDistributionConfig": { + "$ref": "ZoneDistributionConfig", + "description": "Optional. This config will be used to determine how the customer wants us to distribute cluster resources within the region." } }, "type": "object" @@ -2808,11 +2812,17 @@ "description": "Required. Type of aggregation performed on the metric.", "enum": [ "AGGREGATION_TYPE_UNSPECIFIED", - "MAXIMUM" + "PEAK", + "P99", + "P95", + "CURRENT" ], "enumDescriptions": [ "Unspecified aggregation type.", - "Maximum aggregation type." + "PEAK aggregation type.", + "P99 aggregation type.", + "P95 aggregation type.", + "current aggregation type." ], "type": "string" }, @@ -2822,13 +2832,17 @@ "METRIC_TYPE_UNSPECIFIED", "CPU_UTILIZATION", "MEMORY_UTILIZATION", - "NETWORK_CONNECTIONS" + "NETWORK_CONNECTIONS", + "STORAGE_UTILIZATION", + "STORAGE_USED_BYTES" ], "enumDescriptions": [ - "", + "Unspecified metric type.", "CPU utilization for a resource. The value is a fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).", "Memory utilization for a resource. The value is a fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).", - "Number of network connections for a resource." + "Number of network connections for a resource.", + "Storage utilization for a resource. The value is a fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).", + "Sotrage used by a resource." ], "type": "string" }, @@ -3391,17 +3405,21 @@ "id": "TypedValue", "properties": { "boolValue": { + "description": "For boolean value", "type": "boolean" }, "doubleValue": { + "description": "For double value", "format": "double", "type": "number" }, "int64Value": { + "description": "For integer value", "format": "int64", "type": "string" }, "stringValue": { + "description": "For string value", "type": "string" } }, @@ -3488,6 +3506,31 @@ } }, "type": "object" + }, + "ZoneDistributionConfig": { + "description": "Zone distribution config for allocation of cluster resources.", + "id": "ZoneDistributionConfig", + "properties": { + "mode": { + "description": "Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not specified.", + "enum": [ + "ZONE_DISTRIBUTION_MODE_UNSPECIFIED", + "MULTI_ZONE", + "SINGLE_ZONE" + ], + "enumDescriptions": [ + "Not Set. Default: MULTI_ZONE", + "Distribute all resources across 3 zones picked at random, within the region.", + "Distribute all resources in a single zone. The zone field must be specified, when this mode is selected." + ], + "type": "string" + }, + "zone": { + "description": "Optional. When SINGLE ZONE distribution is selected, zone field would be used to allocate all resources in that zone. This is not applicable to MULTI_ZONE, and would be ignored for MULTI_ZONE clusters.", + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/redis/v1beta1/redis-gen.go b/redis/v1beta1/redis-gen.go index a58b2193f9c..086acb11e2d 100644 --- a/redis/v1beta1/redis-gen.go +++ b/redis/v1beta1/redis-gen.go @@ -476,6 +476,9 @@ type Cluster struct { TransitEncryptionMode string `json:"transitEncryptionMode,omitempty"` // Uid: Output only. System assigned, unique identifier for the cluster. Uid string `json:"uid,omitempty"` + // ZoneDistributionConfig: Optional. This config will be used to determine how + // the customer wants us to distribute cluster resources within the region. + ZoneDistributionConfig *ZoneDistributionConfig `json:"zoneDistributionConfig,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -2190,17 +2193,23 @@ type ObservabilityMetricData struct { // // Possible values: // "AGGREGATION_TYPE_UNSPECIFIED" - Unspecified aggregation type. - // "MAXIMUM" - Maximum aggregation type. + // "PEAK" - PEAK aggregation type. + // "P99" - P99 aggregation type. + // "P95" - P95 aggregation type. + // "CURRENT" - current aggregation type. AggregationType string `json:"aggregationType,omitempty"` // MetricType: Required. Type of metric like CPU, Memory, etc. // // Possible values: - // "METRIC_TYPE_UNSPECIFIED" + // "METRIC_TYPE_UNSPECIFIED" - Unspecified metric type. // "CPU_UTILIZATION" - CPU utilization for a resource. The value is a // fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases). // "MEMORY_UTILIZATION" - Memory utilization for a resource. The value is a // fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases). // "NETWORK_CONNECTIONS" - Number of network connections for a resource. + // "STORAGE_UTILIZATION" - Storage utilization for a resource. The value is a + // fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases). + // "STORAGE_USED_BYTES" - Sotrage used by a resource. MetricType string `json:"metricType,omitempty"` // ObservationTime: Required. The time the metric value was observed. ObservationTime string `json:"observationTime,omitempty"` @@ -2812,10 +2821,14 @@ func (s *TlsCertificate) MarshalJSON() ([]byte, error) { // TypedValue: TypedValue represents the value of a metric type. It can either // be a double, an int64, a string or a bool. type TypedValue struct { - BoolValue bool `json:"boolValue,omitempty"` + // BoolValue: For boolean value + BoolValue bool `json:"boolValue,omitempty"` + // DoubleValue: For double value DoubleValue float64 `json:"doubleValue,omitempty"` - Int64Value int64 `json:"int64Value,omitempty,string"` - StringValue string `json:"stringValue,omitempty"` + // Int64Value: For integer value + Int64Value int64 `json:"int64Value,omitempty,string"` + // StringValue: For string value + StringValue string `json:"stringValue,omitempty"` // ForceSendFields is a list of field names (e.g. "BoolValue") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -2956,6 +2969,41 @@ func (s *WeeklyMaintenanceWindow) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// ZoneDistributionConfig: Zone distribution config for allocation of cluster +// resources. +type ZoneDistributionConfig struct { + // Mode: Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when + // not specified. + // + // Possible values: + // "ZONE_DISTRIBUTION_MODE_UNSPECIFIED" - Not Set. Default: MULTI_ZONE + // "MULTI_ZONE" - Distribute all resources across 3 zones picked at random, + // within the region. + // "SINGLE_ZONE" - Distribute all resources in a single zone. The zone field + // must be specified, when this mode is selected. + Mode string `json:"mode,omitempty"` + // Zone: Optional. When SINGLE ZONE distribution is selected, zone field would + // be used to allocate all resources in that zone. This is not applicable to + // MULTI_ZONE, and would be ignored for MULTI_ZONE clusters. + Zone string `json:"zone,omitempty"` + // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Mode") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *ZoneDistributionConfig) MarshalJSON() ([]byte, error) { + type NoMethod ZoneDistributionConfig + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + type ProjectsLocationsGetCall struct { s *Service name string diff --git a/resourcesettings/v1/resourcesettings-api.json b/resourcesettings/v1/resourcesettings-api.json index 03a074d9b6d..99efd6547d6 100644 --- a/resourcesettings/v1/resourcesettings-api.json +++ b/resourcesettings/v1/resourcesettings-api.json @@ -108,8 +108,10 @@ "folders": { "resources": { "settings": { + "deprecated": true, "methods": { "get": { + "deprecated": true, "description": "Returns a specified setting. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the setting does not exist.", "flatPath": "v1/folders/{foldersId}/settings/{settingsId}", "httpMethod": "GET", @@ -152,6 +154,7 @@ ] }, "list": { + "deprecated": true, "description": "Lists all the settings that are available on the Cloud resource `parent`.", "flatPath": "v1/folders/{foldersId}/settings", "httpMethod": "GET", @@ -205,6 +208,7 @@ ] }, "patch": { + "deprecated": true, "description": "Updates a specified setting. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the setting does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.FAILED_PRECONDITION` if the setting is flagged as read only. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the setting value. On success, the response will contain only `name`, `local_value` and `etag`. The `metadata` and `effective_value` cannot be updated through this API. Note: the supplied setting will perform a full overwrite of the `local_value` field.", "flatPath": "v1/folders/{foldersId}/settings/{settingsId}", "httpMethod": "PATCH", @@ -239,8 +243,10 @@ "organizations": { "resources": { "settings": { + "deprecated": true, "methods": { "get": { + "deprecated": true, "description": "Returns a specified setting. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the setting does not exist.", "flatPath": "v1/organizations/{organizationsId}/settings/{settingsId}", "httpMethod": "GET", @@ -283,6 +289,7 @@ ] }, "list": { + "deprecated": true, "description": "Lists all the settings that are available on the Cloud resource `parent`.", "flatPath": "v1/organizations/{organizationsId}/settings", "httpMethod": "GET", @@ -336,6 +343,7 @@ ] }, "patch": { + "deprecated": true, "description": "Updates a specified setting. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the setting does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.FAILED_PRECONDITION` if the setting is flagged as read only. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the setting value. On success, the response will contain only `name`, `local_value` and `etag`. The `metadata` and `effective_value` cannot be updated through this API. Note: the supplied setting will perform a full overwrite of the `local_value` field.", "flatPath": "v1/organizations/{organizationsId}/settings/{settingsId}", "httpMethod": "PATCH", @@ -370,8 +378,10 @@ "projects": { "resources": { "settings": { + "deprecated": true, "methods": { "get": { + "deprecated": true, "description": "Returns a specified setting. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the setting does not exist.", "flatPath": "v1/projects/{projectsId}/settings/{settingsId}", "httpMethod": "GET", @@ -414,6 +424,7 @@ ] }, "list": { + "deprecated": true, "description": "Lists all the settings that are available on the Cloud resource `parent`.", "flatPath": "v1/projects/{projectsId}/settings", "httpMethod": "GET", @@ -467,6 +478,7 @@ ] }, "patch": { + "deprecated": true, "description": "Updates a specified setting. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the setting does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.FAILED_PRECONDITION` if the setting is flagged as read only. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the setting value. On success, the response will contain only `name`, `local_value` and `etag`. The `metadata` and `effective_value` cannot be updated through this API. Note: the supplied setting will perform a full overwrite of the `local_value` field.", "flatPath": "v1/projects/{projectsId}/settings/{settingsId}", "httpMethod": "PATCH", @@ -499,7 +511,7 @@ } } }, - "revision": "20210806", + "revision": "20240602", "rootUrl": "https://resourcesettings.googleapis.com/", "schemas": { "GoogleCloudResourcesettingsV1ListSettingsResponse": { diff --git a/serviceconsumermanagement/v1/serviceconsumermanagement-api.json b/serviceconsumermanagement/v1/serviceconsumermanagement-api.json index 81a8d7bbb27..321e72f6c53 100644 --- a/serviceconsumermanagement/v1/serviceconsumermanagement-api.json +++ b/serviceconsumermanagement/v1/serviceconsumermanagement-api.json @@ -542,7 +542,7 @@ } } }, - "revision": "20240429", + "revision": "20240602", "rootUrl": "https://serviceconsumermanagement.googleapis.com/", "schemas": { "AddTenantProjectRequest": { @@ -1495,7 +1495,7 @@ "type": "object" }, "HttpRule": { - "description": "# gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: HTTP | gRPC -----|----- `GET /v1/messages/123456` | `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: HTTP | gRPC -----|----- `GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` | `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A\u0026param=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A\u0026foo.b=B\u0026foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: HTTP | gRPC -----|----- `GET /v1/messages/123456` | `GetMessage(message_id: \"123456\")` `GET /v1/users/me/messages/123456` | `GetMessage(user_id: \"me\" message_id: \"123456\")` ## Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. ### Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. ## Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. Example: http: rules: # Selects a gRPC method and applies HttpRule to it. - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} ## Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", + "description": "gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: - HTTP: `GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` - gRPC: `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A\u0026param=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A\u0026foo.b=B\u0026foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: \"123456\")` - HTTP: `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: \"me\" message_id: \"123456\")` Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. Example below selects a gRPC method and applies HttpRule to it. http: rules: - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", "id": "HttpRule", "properties": { "additionalBindings": { diff --git a/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go b/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go index e995d335924..e4d4967a460 100644 --- a/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go +++ b/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go @@ -1537,12 +1537,11 @@ func (s *Http) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// HttpRule: # gRPC Transcoding gRPC Transcoding is a feature for mapping -// between a gRPC method and one or more HTTP REST endpoints. It allows -// developers to build a single API service that supports both gRPC APIs and -// REST APIs. Many systems, including Google APIs -// (https://github.com/googleapis/googleapis), Cloud Endpoints -// (https://cloud.google.com/endpoints), gRPC Gateway +// HttpRule: gRPC Transcoding gRPC Transcoding is a feature for mapping between +// a gRPC method and one or more HTTP REST endpoints. It allows developers to +// build a single API service that supports both gRPC APIs and REST APIs. Many +// systems, including Google APIs (https://github.com/googleapis/googleapis), +// Cloud Endpoints (https://cloud.google.com/endpoints), gRPC Gateway // (https://github.com/grpc-ecosystem/grpc-gateway), and Envoy // (https://github.com/envoyproxy/envoy) proxy support this feature and use it // for large scale production services. `HttpRule` defines the schema of the @@ -1559,24 +1558,23 @@ func (s *Http) MarshalJSON() ([]byte, error) { // (Message) { option (google.api.http) = { get: "/v1/{name=messages/*}" }; } } // message GetMessageRequest { string name = 1; // Mapped to URL path. } // message Message { string text = 1; // The resource content. } This enables -// an HTTP REST to gRPC mapping as below: HTTP | gRPC -----|----- `GET -// /v1/messages/123456` | `GetMessage(name: "messages/123456")` Any fields in -// the request message which are not bound by the path template automatically -// become HTTP query parameters if there is no HTTP request body. For example: -// service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { get:"/v1/messages/{message_id}" }; } } message +// an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` - +// gRPC: `GetMessage(name: "messages/123456")` Any fields in the request +// message which are not bound by the path template automatically become HTTP +// query parameters if there is no HTTP request body. For example: service +// Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option +// (google.api.http) = { get:"/v1/messages/{message_id}" }; } } message // GetMessageRequest { message SubMessage { string subfield = 1; } string // message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL // query parameter `revision`. SubMessage sub = 3; // Mapped to URL query // parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as -// below: HTTP | gRPC -----|----- `GET -// /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: -// "123456" revision: 2 sub: SubMessage(subfield: "foo"))` Note that fields -// which are mapped to URL query parameters must have a primitive type or a -// repeated primitive type or a non-repeated message type. In the case of a -// repeated type, the parameter can be repeated in the URL as -// `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as +// below: - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo` - gRPC: +// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: +// "foo"))` Note that fields which are mapped to URL query parameters must have +// a primitive type or a repeated primitive type or a non-repeated message +// type. In the case of a repeated type, the parameter can be repeated in the +// URL as `...?param=A¶m=B`. In the case of a message type, each field of +// the message is mapped to a separate parameter, such as // `...?foo.a=A&foo.b=B&foo.c=C`. For HTTP methods that allow a request body, // the `body` field specifies the mapping. Consider a REST update method on the // message resource collection: service Messaging { rpc @@ -1585,18 +1583,18 @@ func (s *Http) MarshalJSON() ([]byte, error) { // } } message UpdateMessageRequest { string message_id = 1; // mapped to the // URL Message message = 2; // mapped to the body } The following HTTP JSON to // RPC mapping is enabled, where the representation of the JSON in the request -// body is determined by protos JSON encoding: HTTP | gRPC -----|----- `PATCH -// /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" -// message { text: "Hi!" })` The special name `*` can be used in the body -// mapping to define that every field not bound by the path template should be -// mapped to the request body. This enables the following alternative +// body is determined by protos JSON encoding: - HTTP: `PATCH +// /v1/messages/123456 { "text": "Hi!" }` - gRPC: `UpdateMessage(message_id: +// "123456" message { text: "Hi!" })` The special name `*` can be used in the +// body mapping to define that every field not bound by the path template +// should be mapped to the request body. This enables the following alternative // definition of the update method: service Messaging { rpc // UpdateMessage(Message) returns (Message) { option (google.api.http) = { // patch: "/v1/messages/{message_id}" body: "*" }; } } message Message { string // message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is -// enabled: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { "text": "Hi!" -// }` | `UpdateMessage(message_id: "123456" text: "Hi!")` Note that when using -// `*` in the body mapping, it is not possible to have HTTP parameters, as all +// enabled: - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }` - gRPC: +// `UpdateMessage(message_id: "123456" text: "Hi!")` Note that when using `*` +// in the body mapping, it is not possible to have HTTP parameters, as all // fields not bound by the path end in the body. This makes this option more // rarely used in practice when defining REST APIs. The common usage of `*` is // in custom methods which don't use the URL at all for transferring data. It @@ -1606,42 +1604,42 @@ func (s *Http) MarshalJSON() ([]byte, error) { // { get: "/v1/messages/{message_id}" additional_bindings { get: // "/v1/users/{user_id}/messages/{message_id}" } }; } } message // GetMessageRequest { string message_id = 1; string user_id = 2; } This -// enables the following two alternative HTTP JSON to RPC mappings: HTTP | gRPC -// -----|----- `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -// "123456")` ## Rules for HTTP mapping 1. Leaf request fields (recursive -// expansion nested messages in the request message) are classified into three -// categories: - Fields referred by the path template. They are passed via the -// URL path. - Fields referred by the HttpRule.body. They are passed via the -// HTTP request body. - All other fields are passed via the URL query -// parameters, and the parameter name is the field path in the request message. -// A repeated field can be represented as multiple query parameters under the -// same name. 2. If HttpRule.body is "*", there is no URL query parameter, all -// fields are passed via URL path and HTTP request body. 3. If HttpRule.body is -// omitted, there is no HTTP request body, all fields are passed via URL path -// and URL query parameters. ### Path template syntax Template = "/" Segments [ -// Verb ] ; Segments = Segment { "/" Segment } ; Segment = "*" | "**" | LITERAL -// | Variable ; Variable = "{" FieldPath [ "=" Segments ] "}" ; FieldPath = -// IDENT { "." IDENT } ; Verb = ":" LITERAL ; The syntax `*` matches a single -// URL path segment. The syntax `**` matches zero or more URL path segments, -// which must be the last part of the URL path except the `Verb`. The syntax -// `Variable` matches part of the URL path as specified by its template. A -// variable template must not contain other variables. If a variable matches a -// single path segment, its template may be omitted, e.g. `{var}` is equivalent -// to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If -// the `LITERAL` contains any reserved character, such characters should be -// percent-encoded before the matching. If a variable contains exactly one path -// segment, such as "{var}" or "{var=*}", when such a variable is expanded -// into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` -// are percent-encoded. The server side does the reverse decoding. Such -// variables show up in the Discovery Document +// enables the following two alternative HTTP JSON to RPC mappings: - HTTP: +// `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: "123456")` - HTTP: +// `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: "me" +// message_id: "123456")` Rules for HTTP mapping 1. Leaf request fields +// (recursive expansion nested messages in the request message) are classified +// into three categories: - Fields referred by the path template. They are +// passed via the URL path. - Fields referred by the HttpRule.body. They are +// passed via the HTTP request body. - All other fields are passed via the URL +// query parameters, and the parameter name is the field path in the request +// message. A repeated field can be represented as multiple query parameters +// under the same name. 2. If HttpRule.body is "*", there is no URL query +// parameter, all fields are passed via URL path and HTTP request body. 3. If +// HttpRule.body is omitted, there is no HTTP request body, all fields are +// passed via URL path and URL query parameters. Path template syntax Template +// = "/" Segments [ Verb ] ; Segments = Segment { "/" Segment } ; Segment = "*" +// | "**" | LITERAL | Variable ; Variable = "{" FieldPath [ "=" Segments ] "}" +// ; FieldPath = IDENT { "." IDENT } ; Verb = ":" LITERAL ; The syntax `*` +// matches a single URL path segment. The syntax `**` matches zero or more URL +// path segments, which must be the last part of the URL path except the +// `Verb`. The syntax `Variable` matches part of the URL path as specified by +// its template. A variable template must not contain other variables. If a +// variable matches a single path segment, its template may be omitted, e.g. +// `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal +// text in the URL path. If the `LITERAL` contains any reserved character, such +// characters should be percent-encoded before the matching. If a variable +// contains exactly one path segment, such as "{var}" or "{var=*}", when +// such a variable is expanded into a URL path on the client side, all +// characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side +// does the reverse decoding. Such variables show up in the Discovery Document // (https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a // variable contains multiple path segments, such as "{var=foo/*}" or // "{var=**}", when such a variable is expanded into a URL path on the client // side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The // server side does the reverse decoding, except "%2F" and "%2f" are left // unchanged. Such variables show up in the Discovery Document -// (https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. ## +// (https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. // Using gRPC API Service Configuration gRPC API Service Configuration (service // config) is a configuration language for configuring a gRPC service to become // a user-facing product. The service config is simply the YAML representation @@ -1651,12 +1649,12 @@ func (s *Http) MarshalJSON() ([]byte, error) { // to a REST endpoint, achieving the same effect as the proto annotation. This // can be particularly useful if you have a proto that is reused in multiple // services. Note that any transcoding specified in the service config will -// override any matching transcoding configuration in the proto. Example: http: -// rules: # Selects a gRPC method and applies HttpRule to it. - selector: +// override any matching transcoding configuration in the proto. Example below +// selects a gRPC method and applies HttpRule to it. http: rules: - selector: // example.v1.Messaging.GetMessage get: -// /v1/messages/{message_id}/{sub.subfield} ## Special notes When gRPC -// Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON -// conversion must follow the proto3 specification +// /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding +// is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion +// must follow the proto3 specification // (https://developers.google.com/protocol-buffers/docs/proto3#json). While the // single segment variable follows the semantics of RFC 6570 // (https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, diff --git a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json index 145023d92a3..74986d4b07d 100644 --- a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json +++ b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json @@ -515,7 +515,7 @@ } } }, - "revision": "20240512", + "revision": "20240602", "rootUrl": "https://serviceconsumermanagement.googleapis.com/", "schemas": { "Api": { @@ -1380,7 +1380,7 @@ "type": "object" }, "HttpRule": { - "description": "# gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: HTTP | gRPC -----|----- `GET /v1/messages/123456` | `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: HTTP | gRPC -----|----- `GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` | `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A\u0026param=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A\u0026foo.b=B\u0026foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: HTTP | gRPC -----|----- `GET /v1/messages/123456` | `GetMessage(message_id: \"123456\")` `GET /v1/users/me/messages/123456` | `GetMessage(user_id: \"me\" message_id: \"123456\")` ## Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. ### Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. ## Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. Example: http: rules: # Selects a gRPC method and applies HttpRule to it. - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} ## Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", + "description": "gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: - HTTP: `GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` - gRPC: `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A\u0026param=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A\u0026foo.b=B\u0026foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: \"123456\")` - HTTP: `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: \"me\" message_id: \"123456\")` Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. Example below selects a gRPC method and applies HttpRule to it. http: rules: - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", "id": "HttpRule", "properties": { "additionalBindings": { diff --git a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go index f1b702ff2a0..be8a0b806e6 100644 --- a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go +++ b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go @@ -1394,12 +1394,11 @@ func (s *Http) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// HttpRule: # gRPC Transcoding gRPC Transcoding is a feature for mapping -// between a gRPC method and one or more HTTP REST endpoints. It allows -// developers to build a single API service that supports both gRPC APIs and -// REST APIs. Many systems, including Google APIs -// (https://github.com/googleapis/googleapis), Cloud Endpoints -// (https://cloud.google.com/endpoints), gRPC Gateway +// HttpRule: gRPC Transcoding gRPC Transcoding is a feature for mapping between +// a gRPC method and one or more HTTP REST endpoints. It allows developers to +// build a single API service that supports both gRPC APIs and REST APIs. Many +// systems, including Google APIs (https://github.com/googleapis/googleapis), +// Cloud Endpoints (https://cloud.google.com/endpoints), gRPC Gateway // (https://github.com/grpc-ecosystem/grpc-gateway), and Envoy // (https://github.com/envoyproxy/envoy) proxy support this feature and use it // for large scale production services. `HttpRule` defines the schema of the @@ -1416,24 +1415,23 @@ func (s *Http) MarshalJSON() ([]byte, error) { // (Message) { option (google.api.http) = { get: "/v1/{name=messages/*}" }; } } // message GetMessageRequest { string name = 1; // Mapped to URL path. } // message Message { string text = 1; // The resource content. } This enables -// an HTTP REST to gRPC mapping as below: HTTP | gRPC -----|----- `GET -// /v1/messages/123456` | `GetMessage(name: "messages/123456")` Any fields in -// the request message which are not bound by the path template automatically -// become HTTP query parameters if there is no HTTP request body. For example: -// service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { get:"/v1/messages/{message_id}" }; } } message +// an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` - +// gRPC: `GetMessage(name: "messages/123456")` Any fields in the request +// message which are not bound by the path template automatically become HTTP +// query parameters if there is no HTTP request body. For example: service +// Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option +// (google.api.http) = { get:"/v1/messages/{message_id}" }; } } message // GetMessageRequest { message SubMessage { string subfield = 1; } string // message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL // query parameter `revision`. SubMessage sub = 3; // Mapped to URL query // parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as -// below: HTTP | gRPC -----|----- `GET -// /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: -// "123456" revision: 2 sub: SubMessage(subfield: "foo"))` Note that fields -// which are mapped to URL query parameters must have a primitive type or a -// repeated primitive type or a non-repeated message type. In the case of a -// repeated type, the parameter can be repeated in the URL as -// `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as +// below: - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo` - gRPC: +// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: +// "foo"))` Note that fields which are mapped to URL query parameters must have +// a primitive type or a repeated primitive type or a non-repeated message +// type. In the case of a repeated type, the parameter can be repeated in the +// URL as `...?param=A¶m=B`. In the case of a message type, each field of +// the message is mapped to a separate parameter, such as // `...?foo.a=A&foo.b=B&foo.c=C`. For HTTP methods that allow a request body, // the `body` field specifies the mapping. Consider a REST update method on the // message resource collection: service Messaging { rpc @@ -1442,18 +1440,18 @@ func (s *Http) MarshalJSON() ([]byte, error) { // } } message UpdateMessageRequest { string message_id = 1; // mapped to the // URL Message message = 2; // mapped to the body } The following HTTP JSON to // RPC mapping is enabled, where the representation of the JSON in the request -// body is determined by protos JSON encoding: HTTP | gRPC -----|----- `PATCH -// /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" -// message { text: "Hi!" })` The special name `*` can be used in the body -// mapping to define that every field not bound by the path template should be -// mapped to the request body. This enables the following alternative +// body is determined by protos JSON encoding: - HTTP: `PATCH +// /v1/messages/123456 { "text": "Hi!" }` - gRPC: `UpdateMessage(message_id: +// "123456" message { text: "Hi!" })` The special name `*` can be used in the +// body mapping to define that every field not bound by the path template +// should be mapped to the request body. This enables the following alternative // definition of the update method: service Messaging { rpc // UpdateMessage(Message) returns (Message) { option (google.api.http) = { // patch: "/v1/messages/{message_id}" body: "*" }; } } message Message { string // message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is -// enabled: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { "text": "Hi!" -// }` | `UpdateMessage(message_id: "123456" text: "Hi!")` Note that when using -// `*` in the body mapping, it is not possible to have HTTP parameters, as all +// enabled: - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }` - gRPC: +// `UpdateMessage(message_id: "123456" text: "Hi!")` Note that when using `*` +// in the body mapping, it is not possible to have HTTP parameters, as all // fields not bound by the path end in the body. This makes this option more // rarely used in practice when defining REST APIs. The common usage of `*` is // in custom methods which don't use the URL at all for transferring data. It @@ -1463,42 +1461,42 @@ func (s *Http) MarshalJSON() ([]byte, error) { // { get: "/v1/messages/{message_id}" additional_bindings { get: // "/v1/users/{user_id}/messages/{message_id}" } }; } } message // GetMessageRequest { string message_id = 1; string user_id = 2; } This -// enables the following two alternative HTTP JSON to RPC mappings: HTTP | gRPC -// -----|----- `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -// "123456")` ## Rules for HTTP mapping 1. Leaf request fields (recursive -// expansion nested messages in the request message) are classified into three -// categories: - Fields referred by the path template. They are passed via the -// URL path. - Fields referred by the HttpRule.body. They are passed via the -// HTTP request body. - All other fields are passed via the URL query -// parameters, and the parameter name is the field path in the request message. -// A repeated field can be represented as multiple query parameters under the -// same name. 2. If HttpRule.body is "*", there is no URL query parameter, all -// fields are passed via URL path and HTTP request body. 3. If HttpRule.body is -// omitted, there is no HTTP request body, all fields are passed via URL path -// and URL query parameters. ### Path template syntax Template = "/" Segments [ -// Verb ] ; Segments = Segment { "/" Segment } ; Segment = "*" | "**" | LITERAL -// | Variable ; Variable = "{" FieldPath [ "=" Segments ] "}" ; FieldPath = -// IDENT { "." IDENT } ; Verb = ":" LITERAL ; The syntax `*` matches a single -// URL path segment. The syntax `**` matches zero or more URL path segments, -// which must be the last part of the URL path except the `Verb`. The syntax -// `Variable` matches part of the URL path as specified by its template. A -// variable template must not contain other variables. If a variable matches a -// single path segment, its template may be omitted, e.g. `{var}` is equivalent -// to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If -// the `LITERAL` contains any reserved character, such characters should be -// percent-encoded before the matching. If a variable contains exactly one path -// segment, such as "{var}" or "{var=*}", when such a variable is expanded -// into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` -// are percent-encoded. The server side does the reverse decoding. Such -// variables show up in the Discovery Document +// enables the following two alternative HTTP JSON to RPC mappings: - HTTP: +// `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: "123456")` - HTTP: +// `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: "me" +// message_id: "123456")` Rules for HTTP mapping 1. Leaf request fields +// (recursive expansion nested messages in the request message) are classified +// into three categories: - Fields referred by the path template. They are +// passed via the URL path. - Fields referred by the HttpRule.body. They are +// passed via the HTTP request body. - All other fields are passed via the URL +// query parameters, and the parameter name is the field path in the request +// message. A repeated field can be represented as multiple query parameters +// under the same name. 2. If HttpRule.body is "*", there is no URL query +// parameter, all fields are passed via URL path and HTTP request body. 3. If +// HttpRule.body is omitted, there is no HTTP request body, all fields are +// passed via URL path and URL query parameters. Path template syntax Template +// = "/" Segments [ Verb ] ; Segments = Segment { "/" Segment } ; Segment = "*" +// | "**" | LITERAL | Variable ; Variable = "{" FieldPath [ "=" Segments ] "}" +// ; FieldPath = IDENT { "." IDENT } ; Verb = ":" LITERAL ; The syntax `*` +// matches a single URL path segment. The syntax `**` matches zero or more URL +// path segments, which must be the last part of the URL path except the +// `Verb`. The syntax `Variable` matches part of the URL path as specified by +// its template. A variable template must not contain other variables. If a +// variable matches a single path segment, its template may be omitted, e.g. +// `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal +// text in the URL path. If the `LITERAL` contains any reserved character, such +// characters should be percent-encoded before the matching. If a variable +// contains exactly one path segment, such as "{var}" or "{var=*}", when +// such a variable is expanded into a URL path on the client side, all +// characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side +// does the reverse decoding. Such variables show up in the Discovery Document // (https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a // variable contains multiple path segments, such as "{var=foo/*}" or // "{var=**}", when such a variable is expanded into a URL path on the client // side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The // server side does the reverse decoding, except "%2F" and "%2f" are left // unchanged. Such variables show up in the Discovery Document -// (https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. ## +// (https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. // Using gRPC API Service Configuration gRPC API Service Configuration (service // config) is a configuration language for configuring a gRPC service to become // a user-facing product. The service config is simply the YAML representation @@ -1508,12 +1506,12 @@ func (s *Http) MarshalJSON() ([]byte, error) { // to a REST endpoint, achieving the same effect as the proto annotation. This // can be particularly useful if you have a proto that is reused in multiple // services. Note that any transcoding specified in the service config will -// override any matching transcoding configuration in the proto. Example: http: -// rules: # Selects a gRPC method and applies HttpRule to it. - selector: +// override any matching transcoding configuration in the proto. Example below +// selects a gRPC method and applies HttpRule to it. http: rules: - selector: // example.v1.Messaging.GetMessage get: -// /v1/messages/{message_id}/{sub.subfield} ## Special notes When gRPC -// Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON -// conversion must follow the proto3 specification +// /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding +// is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion +// must follow the proto3 specification // (https://developers.google.com/protocol-buffers/docs/proto3#json). While the // single segment variable follows the semantics of RFC 6570 // (https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, diff --git a/serviceusage/v1/serviceusage-api.json b/serviceusage/v1/serviceusage-api.json index 67d80097139..bd43982f322 100644 --- a/serviceusage/v1/serviceusage-api.json +++ b/serviceusage/v1/serviceusage-api.json @@ -426,7 +426,7 @@ } } }, - "revision": "20240429", + "revision": "20240602", "rootUrl": "https://serviceusage.googleapis.com/", "schemas": { "AddEnableRulesMetadata": { @@ -1971,7 +1971,7 @@ "type": "object" }, "HttpRule": { - "description": "# gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: HTTP | gRPC -----|----- `GET /v1/messages/123456` | `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: HTTP | gRPC -----|----- `GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` | `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A\u0026param=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A\u0026foo.b=B\u0026foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: HTTP | gRPC -----|----- `GET /v1/messages/123456` | `GetMessage(message_id: \"123456\")` `GET /v1/users/me/messages/123456` | `GetMessage(user_id: \"me\" message_id: \"123456\")` ## Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. ### Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. ## Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. Example: http: rules: # Selects a gRPC method and applies HttpRule to it. - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} ## Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", + "description": "gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: - HTTP: `GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` - gRPC: `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A\u0026param=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A\u0026foo.b=B\u0026foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: \"123456\")` - HTTP: `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: \"me\" message_id: \"123456\")` Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. Example below selects a gRPC method and applies HttpRule to it. http: rules: - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", "id": "HttpRule", "properties": { "additionalBindings": { diff --git a/serviceusage/v1/serviceusage-gen.go b/serviceusage/v1/serviceusage-gen.go index dacdebf8ab4..6ffc593dcba 100644 --- a/serviceusage/v1/serviceusage-gen.go +++ b/serviceusage/v1/serviceusage-gen.go @@ -2202,12 +2202,11 @@ func (s *Http) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// HttpRule: # gRPC Transcoding gRPC Transcoding is a feature for mapping -// between a gRPC method and one or more HTTP REST endpoints. It allows -// developers to build a single API service that supports both gRPC APIs and -// REST APIs. Many systems, including Google APIs -// (https://github.com/googleapis/googleapis), Cloud Endpoints -// (https://cloud.google.com/endpoints), gRPC Gateway +// HttpRule: gRPC Transcoding gRPC Transcoding is a feature for mapping between +// a gRPC method and one or more HTTP REST endpoints. It allows developers to +// build a single API service that supports both gRPC APIs and REST APIs. Many +// systems, including Google APIs (https://github.com/googleapis/googleapis), +// Cloud Endpoints (https://cloud.google.com/endpoints), gRPC Gateway // (https://github.com/grpc-ecosystem/grpc-gateway), and Envoy // (https://github.com/envoyproxy/envoy) proxy support this feature and use it // for large scale production services. `HttpRule` defines the schema of the @@ -2224,24 +2223,23 @@ func (s *Http) MarshalJSON() ([]byte, error) { // (Message) { option (google.api.http) = { get: "/v1/{name=messages/*}" }; } } // message GetMessageRequest { string name = 1; // Mapped to URL path. } // message Message { string text = 1; // The resource content. } This enables -// an HTTP REST to gRPC mapping as below: HTTP | gRPC -----|----- `GET -// /v1/messages/123456` | `GetMessage(name: "messages/123456")` Any fields in -// the request message which are not bound by the path template automatically -// become HTTP query parameters if there is no HTTP request body. For example: -// service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { get:"/v1/messages/{message_id}" }; } } message +// an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` - +// gRPC: `GetMessage(name: "messages/123456")` Any fields in the request +// message which are not bound by the path template automatically become HTTP +// query parameters if there is no HTTP request body. For example: service +// Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option +// (google.api.http) = { get:"/v1/messages/{message_id}" }; } } message // GetMessageRequest { message SubMessage { string subfield = 1; } string // message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL // query parameter `revision`. SubMessage sub = 3; // Mapped to URL query // parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as -// below: HTTP | gRPC -----|----- `GET -// /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: -// "123456" revision: 2 sub: SubMessage(subfield: "foo"))` Note that fields -// which are mapped to URL query parameters must have a primitive type or a -// repeated primitive type or a non-repeated message type. In the case of a -// repeated type, the parameter can be repeated in the URL as -// `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as +// below: - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo` - gRPC: +// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: +// "foo"))` Note that fields which are mapped to URL query parameters must have +// a primitive type or a repeated primitive type or a non-repeated message +// type. In the case of a repeated type, the parameter can be repeated in the +// URL as `...?param=A¶m=B`. In the case of a message type, each field of +// the message is mapped to a separate parameter, such as // `...?foo.a=A&foo.b=B&foo.c=C`. For HTTP methods that allow a request body, // the `body` field specifies the mapping. Consider a REST update method on the // message resource collection: service Messaging { rpc @@ -2250,18 +2248,18 @@ func (s *Http) MarshalJSON() ([]byte, error) { // } } message UpdateMessageRequest { string message_id = 1; // mapped to the // URL Message message = 2; // mapped to the body } The following HTTP JSON to // RPC mapping is enabled, where the representation of the JSON in the request -// body is determined by protos JSON encoding: HTTP | gRPC -----|----- `PATCH -// /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" -// message { text: "Hi!" })` The special name `*` can be used in the body -// mapping to define that every field not bound by the path template should be -// mapped to the request body. This enables the following alternative +// body is determined by protos JSON encoding: - HTTP: `PATCH +// /v1/messages/123456 { "text": "Hi!" }` - gRPC: `UpdateMessage(message_id: +// "123456" message { text: "Hi!" })` The special name `*` can be used in the +// body mapping to define that every field not bound by the path template +// should be mapped to the request body. This enables the following alternative // definition of the update method: service Messaging { rpc // UpdateMessage(Message) returns (Message) { option (google.api.http) = { // patch: "/v1/messages/{message_id}" body: "*" }; } } message Message { string // message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is -// enabled: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { "text": "Hi!" -// }` | `UpdateMessage(message_id: "123456" text: "Hi!")` Note that when using -// `*` in the body mapping, it is not possible to have HTTP parameters, as all +// enabled: - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }` - gRPC: +// `UpdateMessage(message_id: "123456" text: "Hi!")` Note that when using `*` +// in the body mapping, it is not possible to have HTTP parameters, as all // fields not bound by the path end in the body. This makes this option more // rarely used in practice when defining REST APIs. The common usage of `*` is // in custom methods which don't use the URL at all for transferring data. It @@ -2271,42 +2269,42 @@ func (s *Http) MarshalJSON() ([]byte, error) { // { get: "/v1/messages/{message_id}" additional_bindings { get: // "/v1/users/{user_id}/messages/{message_id}" } }; } } message // GetMessageRequest { string message_id = 1; string user_id = 2; } This -// enables the following two alternative HTTP JSON to RPC mappings: HTTP | gRPC -// -----|----- `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -// "123456")` ## Rules for HTTP mapping 1. Leaf request fields (recursive -// expansion nested messages in the request message) are classified into three -// categories: - Fields referred by the path template. They are passed via the -// URL path. - Fields referred by the HttpRule.body. They are passed via the -// HTTP request body. - All other fields are passed via the URL query -// parameters, and the parameter name is the field path in the request message. -// A repeated field can be represented as multiple query parameters under the -// same name. 2. If HttpRule.body is "*", there is no URL query parameter, all -// fields are passed via URL path and HTTP request body. 3. If HttpRule.body is -// omitted, there is no HTTP request body, all fields are passed via URL path -// and URL query parameters. ### Path template syntax Template = "/" Segments [ -// Verb ] ; Segments = Segment { "/" Segment } ; Segment = "*" | "**" | LITERAL -// | Variable ; Variable = "{" FieldPath [ "=" Segments ] "}" ; FieldPath = -// IDENT { "." IDENT } ; Verb = ":" LITERAL ; The syntax `*` matches a single -// URL path segment. The syntax `**` matches zero or more URL path segments, -// which must be the last part of the URL path except the `Verb`. The syntax -// `Variable` matches part of the URL path as specified by its template. A -// variable template must not contain other variables. If a variable matches a -// single path segment, its template may be omitted, e.g. `{var}` is equivalent -// to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If -// the `LITERAL` contains any reserved character, such characters should be -// percent-encoded before the matching. If a variable contains exactly one path -// segment, such as "{var}" or "{var=*}", when such a variable is expanded -// into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` -// are percent-encoded. The server side does the reverse decoding. Such -// variables show up in the Discovery Document +// enables the following two alternative HTTP JSON to RPC mappings: - HTTP: +// `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: "123456")` - HTTP: +// `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: "me" +// message_id: "123456")` Rules for HTTP mapping 1. Leaf request fields +// (recursive expansion nested messages in the request message) are classified +// into three categories: - Fields referred by the path template. They are +// passed via the URL path. - Fields referred by the HttpRule.body. They are +// passed via the HTTP request body. - All other fields are passed via the URL +// query parameters, and the parameter name is the field path in the request +// message. A repeated field can be represented as multiple query parameters +// under the same name. 2. If HttpRule.body is "*", there is no URL query +// parameter, all fields are passed via URL path and HTTP request body. 3. If +// HttpRule.body is omitted, there is no HTTP request body, all fields are +// passed via URL path and URL query parameters. Path template syntax Template +// = "/" Segments [ Verb ] ; Segments = Segment { "/" Segment } ; Segment = "*" +// | "**" | LITERAL | Variable ; Variable = "{" FieldPath [ "=" Segments ] "}" +// ; FieldPath = IDENT { "." IDENT } ; Verb = ":" LITERAL ; The syntax `*` +// matches a single URL path segment. The syntax `**` matches zero or more URL +// path segments, which must be the last part of the URL path except the +// `Verb`. The syntax `Variable` matches part of the URL path as specified by +// its template. A variable template must not contain other variables. If a +// variable matches a single path segment, its template may be omitted, e.g. +// `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal +// text in the URL path. If the `LITERAL` contains any reserved character, such +// characters should be percent-encoded before the matching. If a variable +// contains exactly one path segment, such as "{var}" or "{var=*}", when +// such a variable is expanded into a URL path on the client side, all +// characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side +// does the reverse decoding. Such variables show up in the Discovery Document // (https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a // variable contains multiple path segments, such as "{var=foo/*}" or // "{var=**}", when such a variable is expanded into a URL path on the client // side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The // server side does the reverse decoding, except "%2F" and "%2f" are left // unchanged. Such variables show up in the Discovery Document -// (https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. ## +// (https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. // Using gRPC API Service Configuration gRPC API Service Configuration (service // config) is a configuration language for configuring a gRPC service to become // a user-facing product. The service config is simply the YAML representation @@ -2316,12 +2314,12 @@ func (s *Http) MarshalJSON() ([]byte, error) { // to a REST endpoint, achieving the same effect as the proto annotation. This // can be particularly useful if you have a proto that is reused in multiple // services. Note that any transcoding specified in the service config will -// override any matching transcoding configuration in the proto. Example: http: -// rules: # Selects a gRPC method and applies HttpRule to it. - selector: +// override any matching transcoding configuration in the proto. Example below +// selects a gRPC method and applies HttpRule to it. http: rules: - selector: // example.v1.Messaging.GetMessage get: -// /v1/messages/{message_id}/{sub.subfield} ## Special notes When gRPC -// Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON -// conversion must follow the proto3 specification +// /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding +// is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion +// must follow the proto3 specification // (https://developers.google.com/protocol-buffers/docs/proto3#json). While the // single segment variable follows the semantics of RFC 6570 // (https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, diff --git a/serviceusage/v1beta1/serviceusage-api.json b/serviceusage/v1beta1/serviceusage-api.json index 8e16c31d81b..daaa4f6528c 100644 --- a/serviceusage/v1beta1/serviceusage-api.json +++ b/serviceusage/v1beta1/serviceusage-api.json @@ -964,7 +964,7 @@ } } }, - "revision": "20240429", + "revision": "20240602", "rootUrl": "https://serviceusage.googleapis.com/", "schemas": { "AddEnableRulesMetadata": { @@ -2548,7 +2548,7 @@ "type": "object" }, "HttpRule": { - "description": "# gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: HTTP | gRPC -----|----- `GET /v1/messages/123456` | `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: HTTP | gRPC -----|----- `GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` | `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A\u0026param=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A\u0026foo.b=B\u0026foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: HTTP | gRPC -----|----- `GET /v1/messages/123456` | `GetMessage(message_id: \"123456\")` `GET /v1/users/me/messages/123456` | `GetMessage(user_id: \"me\" message_id: \"123456\")` ## Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. ### Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. ## Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. Example: http: rules: # Selects a gRPC method and applies HttpRule to it. - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} ## Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", + "description": "gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: - HTTP: `GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` - gRPC: `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A\u0026param=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A\u0026foo.b=B\u0026foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: \"123456\")` - HTTP: `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: \"me\" message_id: \"123456\")` Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. Example below selects a gRPC method and applies HttpRule to it. http: rules: - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", "id": "HttpRule", "properties": { "additionalBindings": { diff --git a/serviceusage/v1beta1/serviceusage-gen.go b/serviceusage/v1beta1/serviceusage-gen.go index b40b5f463cb..77d4326925e 100644 --- a/serviceusage/v1beta1/serviceusage-gen.go +++ b/serviceusage/v1beta1/serviceusage-gen.go @@ -2278,12 +2278,11 @@ func (s *Http) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// HttpRule: # gRPC Transcoding gRPC Transcoding is a feature for mapping -// between a gRPC method and one or more HTTP REST endpoints. It allows -// developers to build a single API service that supports both gRPC APIs and -// REST APIs. Many systems, including Google APIs -// (https://github.com/googleapis/googleapis), Cloud Endpoints -// (https://cloud.google.com/endpoints), gRPC Gateway +// HttpRule: gRPC Transcoding gRPC Transcoding is a feature for mapping between +// a gRPC method and one or more HTTP REST endpoints. It allows developers to +// build a single API service that supports both gRPC APIs and REST APIs. Many +// systems, including Google APIs (https://github.com/googleapis/googleapis), +// Cloud Endpoints (https://cloud.google.com/endpoints), gRPC Gateway // (https://github.com/grpc-ecosystem/grpc-gateway), and Envoy // (https://github.com/envoyproxy/envoy) proxy support this feature and use it // for large scale production services. `HttpRule` defines the schema of the @@ -2300,24 +2299,23 @@ func (s *Http) MarshalJSON() ([]byte, error) { // (Message) { option (google.api.http) = { get: "/v1/{name=messages/*}" }; } } // message GetMessageRequest { string name = 1; // Mapped to URL path. } // message Message { string text = 1; // The resource content. } This enables -// an HTTP REST to gRPC mapping as below: HTTP | gRPC -----|----- `GET -// /v1/messages/123456` | `GetMessage(name: "messages/123456")` Any fields in -// the request message which are not bound by the path template automatically -// become HTTP query parameters if there is no HTTP request body. For example: -// service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { get:"/v1/messages/{message_id}" }; } } message +// an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` - +// gRPC: `GetMessage(name: "messages/123456")` Any fields in the request +// message which are not bound by the path template automatically become HTTP +// query parameters if there is no HTTP request body. For example: service +// Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option +// (google.api.http) = { get:"/v1/messages/{message_id}" }; } } message // GetMessageRequest { message SubMessage { string subfield = 1; } string // message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL // query parameter `revision`. SubMessage sub = 3; // Mapped to URL query // parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as -// below: HTTP | gRPC -----|----- `GET -// /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: -// "123456" revision: 2 sub: SubMessage(subfield: "foo"))` Note that fields -// which are mapped to URL query parameters must have a primitive type or a -// repeated primitive type or a non-repeated message type. In the case of a -// repeated type, the parameter can be repeated in the URL as -// `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as +// below: - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo` - gRPC: +// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: +// "foo"))` Note that fields which are mapped to URL query parameters must have +// a primitive type or a repeated primitive type or a non-repeated message +// type. In the case of a repeated type, the parameter can be repeated in the +// URL as `...?param=A¶m=B`. In the case of a message type, each field of +// the message is mapped to a separate parameter, such as // `...?foo.a=A&foo.b=B&foo.c=C`. For HTTP methods that allow a request body, // the `body` field specifies the mapping. Consider a REST update method on the // message resource collection: service Messaging { rpc @@ -2326,18 +2324,18 @@ func (s *Http) MarshalJSON() ([]byte, error) { // } } message UpdateMessageRequest { string message_id = 1; // mapped to the // URL Message message = 2; // mapped to the body } The following HTTP JSON to // RPC mapping is enabled, where the representation of the JSON in the request -// body is determined by protos JSON encoding: HTTP | gRPC -----|----- `PATCH -// /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" -// message { text: "Hi!" })` The special name `*` can be used in the body -// mapping to define that every field not bound by the path template should be -// mapped to the request body. This enables the following alternative +// body is determined by protos JSON encoding: - HTTP: `PATCH +// /v1/messages/123456 { "text": "Hi!" }` - gRPC: `UpdateMessage(message_id: +// "123456" message { text: "Hi!" })` The special name `*` can be used in the +// body mapping to define that every field not bound by the path template +// should be mapped to the request body. This enables the following alternative // definition of the update method: service Messaging { rpc // UpdateMessage(Message) returns (Message) { option (google.api.http) = { // patch: "/v1/messages/{message_id}" body: "*" }; } } message Message { string // message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is -// enabled: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { "text": "Hi!" -// }` | `UpdateMessage(message_id: "123456" text: "Hi!")` Note that when using -// `*` in the body mapping, it is not possible to have HTTP parameters, as all +// enabled: - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }` - gRPC: +// `UpdateMessage(message_id: "123456" text: "Hi!")` Note that when using `*` +// in the body mapping, it is not possible to have HTTP parameters, as all // fields not bound by the path end in the body. This makes this option more // rarely used in practice when defining REST APIs. The common usage of `*` is // in custom methods which don't use the URL at all for transferring data. It @@ -2347,42 +2345,42 @@ func (s *Http) MarshalJSON() ([]byte, error) { // { get: "/v1/messages/{message_id}" additional_bindings { get: // "/v1/users/{user_id}/messages/{message_id}" } }; } } message // GetMessageRequest { string message_id = 1; string user_id = 2; } This -// enables the following two alternative HTTP JSON to RPC mappings: HTTP | gRPC -// -----|----- `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -// "123456")` ## Rules for HTTP mapping 1. Leaf request fields (recursive -// expansion nested messages in the request message) are classified into three -// categories: - Fields referred by the path template. They are passed via the -// URL path. - Fields referred by the HttpRule.body. They are passed via the -// HTTP request body. - All other fields are passed via the URL query -// parameters, and the parameter name is the field path in the request message. -// A repeated field can be represented as multiple query parameters under the -// same name. 2. If HttpRule.body is "*", there is no URL query parameter, all -// fields are passed via URL path and HTTP request body. 3. If HttpRule.body is -// omitted, there is no HTTP request body, all fields are passed via URL path -// and URL query parameters. ### Path template syntax Template = "/" Segments [ -// Verb ] ; Segments = Segment { "/" Segment } ; Segment = "*" | "**" | LITERAL -// | Variable ; Variable = "{" FieldPath [ "=" Segments ] "}" ; FieldPath = -// IDENT { "." IDENT } ; Verb = ":" LITERAL ; The syntax `*` matches a single -// URL path segment. The syntax `**` matches zero or more URL path segments, -// which must be the last part of the URL path except the `Verb`. The syntax -// `Variable` matches part of the URL path as specified by its template. A -// variable template must not contain other variables. If a variable matches a -// single path segment, its template may be omitted, e.g. `{var}` is equivalent -// to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If -// the `LITERAL` contains any reserved character, such characters should be -// percent-encoded before the matching. If a variable contains exactly one path -// segment, such as "{var}" or "{var=*}", when such a variable is expanded -// into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` -// are percent-encoded. The server side does the reverse decoding. Such -// variables show up in the Discovery Document +// enables the following two alternative HTTP JSON to RPC mappings: - HTTP: +// `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: "123456")` - HTTP: +// `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: "me" +// message_id: "123456")` Rules for HTTP mapping 1. Leaf request fields +// (recursive expansion nested messages in the request message) are classified +// into three categories: - Fields referred by the path template. They are +// passed via the URL path. - Fields referred by the HttpRule.body. They are +// passed via the HTTP request body. - All other fields are passed via the URL +// query parameters, and the parameter name is the field path in the request +// message. A repeated field can be represented as multiple query parameters +// under the same name. 2. If HttpRule.body is "*", there is no URL query +// parameter, all fields are passed via URL path and HTTP request body. 3. If +// HttpRule.body is omitted, there is no HTTP request body, all fields are +// passed via URL path and URL query parameters. Path template syntax Template +// = "/" Segments [ Verb ] ; Segments = Segment { "/" Segment } ; Segment = "*" +// | "**" | LITERAL | Variable ; Variable = "{" FieldPath [ "=" Segments ] "}" +// ; FieldPath = IDENT { "." IDENT } ; Verb = ":" LITERAL ; The syntax `*` +// matches a single URL path segment. The syntax `**` matches zero or more URL +// path segments, which must be the last part of the URL path except the +// `Verb`. The syntax `Variable` matches part of the URL path as specified by +// its template. A variable template must not contain other variables. If a +// variable matches a single path segment, its template may be omitted, e.g. +// `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal +// text in the URL path. If the `LITERAL` contains any reserved character, such +// characters should be percent-encoded before the matching. If a variable +// contains exactly one path segment, such as "{var}" or "{var=*}", when +// such a variable is expanded into a URL path on the client side, all +// characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side +// does the reverse decoding. Such variables show up in the Discovery Document // (https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a // variable contains multiple path segments, such as "{var=foo/*}" or // "{var=**}", when such a variable is expanded into a URL path on the client // side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The // server side does the reverse decoding, except "%2F" and "%2f" are left // unchanged. Such variables show up in the Discovery Document -// (https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. ## +// (https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. // Using gRPC API Service Configuration gRPC API Service Configuration (service // config) is a configuration language for configuring a gRPC service to become // a user-facing product. The service config is simply the YAML representation @@ -2392,12 +2390,12 @@ func (s *Http) MarshalJSON() ([]byte, error) { // to a REST endpoint, achieving the same effect as the proto annotation. This // can be particularly useful if you have a proto that is reused in multiple // services. Note that any transcoding specified in the service config will -// override any matching transcoding configuration in the proto. Example: http: -// rules: # Selects a gRPC method and applies HttpRule to it. - selector: +// override any matching transcoding configuration in the proto. Example below +// selects a gRPC method and applies HttpRule to it. http: rules: - selector: // example.v1.Messaging.GetMessage get: -// /v1/messages/{message_id}/{sub.subfield} ## Special notes When gRPC -// Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON -// conversion must follow the proto3 specification +// /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding +// is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion +// must follow the proto3 specification // (https://developers.google.com/protocol-buffers/docs/proto3#json). While the // single segment variable follows the semantics of RFC 6570 // (https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, diff --git a/sqladmin/v1/sqladmin-api.json b/sqladmin/v1/sqladmin-api.json index b6f6fc5b802..61b3d97f641 100644 --- a/sqladmin/v1/sqladmin-api.json +++ b/sqladmin/v1/sqladmin-api.json @@ -2267,7 +2267,7 @@ } } }, - "revision": "20240521", + "revision": "20240529", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -5543,7 +5543,10 @@ "PG_SUBSCRIPTION_COUNT", "PG_SYNC_PARALLEL_LEVEL", "INSUFFICIENT_DISK_SIZE", - "INSUFFICIENT_MACHINE_TIER" + "INSUFFICIENT_MACHINE_TIER", + "UNSUPPORTED_EXTENSIONS_NOT_MIGRATED", + "EXTENSIONS_NOT_MIGRATED", + "PG_CRON_FLAG_ENABLED_IN_REPLICA" ], "enumDescriptions": [ "", @@ -5590,7 +5593,10 @@ "Count of subscriptions needed to sync source data for PostgreSQL database.", "Final parallel level that is used to do migration.", "The disk size of the replica instance is smaller than the data size of the source instance.", - "The data size of the source instance is greater than 1 TB, the number of cores of the replica instance is less than 8, and the memory of the replica is less than 32 GB." + "The data size of the source instance is greater than 1 TB, the number of cores of the replica instance is less than 8, and the memory of the replica is less than 32 GB.", + "The warning message indicates the unsupported extensions will not be migrated to the destination.", + "The warning message indicates the pg_cron extension and settings will not be migrated to the destination.", + "The error message indicates that pg_cron flags are enabled on the destination which is not supported during the migration." ], "type": "string" } diff --git a/sqladmin/v1/sqladmin-gen.go b/sqladmin/v1/sqladmin-gen.go index 483f284b3b8..d6b3211fc8e 100644 --- a/sqladmin/v1/sqladmin-gen.go +++ b/sqladmin/v1/sqladmin-gen.go @@ -3783,6 +3783,13 @@ type SqlExternalSyncSettingError struct { // "INSUFFICIENT_MACHINE_TIER" - The data size of the source instance is // greater than 1 TB, the number of cores of the replica instance is less than // 8, and the memory of the replica is less than 32 GB. + // "UNSUPPORTED_EXTENSIONS_NOT_MIGRATED" - The warning message indicates the + // unsupported extensions will not be migrated to the destination. + // "EXTENSIONS_NOT_MIGRATED" - The warning message indicates the pg_cron + // extension and settings will not be migrated to the destination. + // "PG_CRON_FLAG_ENABLED_IN_REPLICA" - The error message indicates that + // pg_cron flags are enabled on the destination which is not supported during + // the migration. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Detail") to unconditionally // include in API requests. By default, fields with empty or default values are diff --git a/sqladmin/v1beta4/sqladmin-api.json b/sqladmin/v1beta4/sqladmin-api.json index 5f7e0cbb6ab..72c96abfa96 100644 --- a/sqladmin/v1beta4/sqladmin-api.json +++ b/sqladmin/v1beta4/sqladmin-api.json @@ -2267,7 +2267,7 @@ } } }, - "revision": "20240521", + "revision": "20240529", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -5548,7 +5548,10 @@ "PG_SUBSCRIPTION_COUNT", "PG_SYNC_PARALLEL_LEVEL", "INSUFFICIENT_DISK_SIZE", - "INSUFFICIENT_MACHINE_TIER" + "INSUFFICIENT_MACHINE_TIER", + "UNSUPPORTED_EXTENSIONS_NOT_MIGRATED", + "EXTENSIONS_NOT_MIGRATED", + "PG_CRON_FLAG_ENABLED_IN_REPLICA" ], "enumDescriptions": [ "", @@ -5595,7 +5598,10 @@ "Count of subscriptions needed to sync source data for PostgreSQL database.", "Final parallel level that is used to do migration.", "The disk size of the replica instance is smaller than the data size of the source instance.", - "The data size of the source instance is greater than 1 TB, the number of cores of the replica instance is less than 8, and the memory of the replica is less than 32 GB." + "The data size of the source instance is greater than 1 TB, the number of cores of the replica instance is less than 8, and the memory of the replica is less than 32 GB.", + "The warning message indicates the unsupported extensions will not be migrated to the destination.", + "The warning message indicates the pg_cron extension and settings will not be migrated to the destination.", + "The error message indicates that pg_cron flags are enabled on the destination which is not supported during the migration." ], "type": "string" } diff --git a/sqladmin/v1beta4/sqladmin-gen.go b/sqladmin/v1beta4/sqladmin-gen.go index f418ebba994..901f43fbe11 100644 --- a/sqladmin/v1beta4/sqladmin-gen.go +++ b/sqladmin/v1beta4/sqladmin-gen.go @@ -3793,6 +3793,13 @@ type SqlExternalSyncSettingError struct { // "INSUFFICIENT_MACHINE_TIER" - The data size of the source instance is // greater than 1 TB, the number of cores of the replica instance is less than // 8, and the memory of the replica is less than 32 GB. + // "UNSUPPORTED_EXTENSIONS_NOT_MIGRATED" - The warning message indicates the + // unsupported extensions will not be migrated to the destination. + // "EXTENSIONS_NOT_MIGRATED" - The warning message indicates the pg_cron + // extension and settings will not be migrated to the destination. + // "PG_CRON_FLAG_ENABLED_IN_REPLICA" - The error message indicates that + // pg_cron flags are enabled on the destination which is not supported during + // the migration. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Detail") to unconditionally // include in API requests. By default, fields with empty or default values are