From 177408ea127ce2e5a171fa54008838560203e587 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 21 Jun 2023 00:22:12 -0700 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#2035) --- .../v1alpha/analyticsadmin-api.json | 18 +- analyticsadmin/v1alpha/analyticsadmin-gen.go | 14 + api-list.json | 15 + checks/v1alpha/checks-api.json | 630 +++++++++ checks/v1alpha/checks-gen.go | 1131 +++++++++++++++++ .../v1alpha1/contactcenteraiplatform-api.json | 164 ++- .../v1alpha1/contactcenteraiplatform-gen.go | 462 +++++++ content/v2.1/content-api.json | 60 +- content/v2.1/content-gen.go | 226 ---- .../v1alpha/discoveryengine-api.json | 128 +- .../v1alpha/discoveryengine-gen.go | 435 ++++++- .../v1beta/discoveryengine-api.json | 57 +- discoveryengine/v1beta/discoveryengine-gen.go | 91 +- documentai/v1/documentai-api.json | 27 +- documentai/v1/documentai-gen.go | 40 + documentai/v1beta3/documentai-api.json | 27 +- documentai/v1beta3/documentai-gen.go | 40 + serviceusage/v1/serviceusage-api.json | 4 +- serviceusage/v1/serviceusage-gen.go | 2 +- serviceusage/v1beta1/serviceusage-api.json | 6 +- serviceusage/v1beta1/serviceusage-gen.go | 13 +- 21 files changed, 3251 insertions(+), 339 deletions(-) create mode 100644 checks/v1alpha/checks-api.json create mode 100644 checks/v1alpha/checks-gen.go diff --git a/analyticsadmin/v1alpha/analyticsadmin-api.json b/analyticsadmin/v1alpha/analyticsadmin-api.json index 86b23e73e9a..d6f44358a69 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-api.json +++ b/analyticsadmin/v1alpha/analyticsadmin-api.json @@ -4322,7 +4322,7 @@ } } }, - "revision": "20230615", + "revision": "20230620", "rootUrl": "https://analyticsadmin.googleapis.com/", "schemas": { "GoogleAnalyticsAdminV1alphaAccessBetweenFilter": { @@ -4865,6 +4865,22 @@ ], "type": "string" }, + "adsWebConversionDataExportScope": { + "description": "Required. The Conversion Export Scope for data exported to linked Ads Accounts.", + "enum": [ + "ADS_WEB_CONVERSION_DATA_EXPORT_SCOPE_UNSPECIFIED", + "NOT_SELECTED_YET", + "CROSS_CHANNEL", + "ADS_PREFERRED" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "No data export scope selected yet. Export scope can never be changed back to this value.", + "The Ads Web Conversion Data export scope is Cross Channel.", + "The Ads Web Conversion Data export scope is Ads Preferred." + ], + "type": "string" + }, "name": { "description": "Output only. Resource name of this attribution settings resource. Format: properties/{property_id}/attributionSettings Example: \"properties/1000/attributionSettings\"", "readOnly": true, diff --git a/analyticsadmin/v1alpha/analyticsadmin-gen.go b/analyticsadmin/v1alpha/analyticsadmin-gen.go index 5d3394af61d..3647f83518f 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-gen.go +++ b/analyticsadmin/v1alpha/analyticsadmin-gen.go @@ -1449,6 +1449,20 @@ type GoogleAnalyticsAdminV1alphaAttributionSettings struct { // lookback window. AcquisitionConversionEventLookbackWindow string `json:"acquisitionConversionEventLookbackWindow,omitempty"` + // AdsWebConversionDataExportScope: Required. The Conversion Export + // Scope for data exported to linked Ads Accounts. + // + // Possible values: + // "ADS_WEB_CONVERSION_DATA_EXPORT_SCOPE_UNSPECIFIED" - Default value. + // This value is unused. + // "NOT_SELECTED_YET" - No data export scope selected yet. Export + // scope can never be changed back to this value. + // "CROSS_CHANNEL" - The Ads Web Conversion Data export scope is Cross + // Channel. + // "ADS_PREFERRED" - The Ads Web Conversion Data export scope is Ads + // Preferred. + AdsWebConversionDataExportScope string `json:"adsWebConversionDataExportScope,omitempty"` + // Name: Output only. Resource name of this attribution settings // resource. Format: properties/{property_id}/attributionSettings // Example: "properties/1000/attributionSettings" diff --git a/api-list.json b/api-list.json index f359beebd0e..a5ce1a367ed 100644 --- a/api-list.json +++ b/api-list.json @@ -946,6 +946,21 @@ "documentationLink": "https://developers.google.com/hangouts/chat", "preferred": true }, + { + "kind": "discovery#directoryItem", + "id": "checks:v1alpha", + "name": "checks", + "version": "v1alpha", + "title": "Checks API", + "description": "The Checks API contains powerful and easy-to-use privacy and compliance APIs that interact with the Checks product and its underlying technology.", + "discoveryRestUrl": "https://checks.googleapis.com/$discovery/rest?version=v1alpha", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://developers.google.com/checks", + "preferred": true + }, { "kind": "discovery#directoryItem", "id": "chromemanagement:v1", diff --git a/checks/v1alpha/checks-api.json b/checks/v1alpha/checks-api.json new file mode 100644 index 00000000000..980e988e9ae --- /dev/null +++ b/checks/v1alpha/checks-api.json @@ -0,0 +1,630 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/xapi.zoo": { + "description": "Test scope for access to the Zoo service" + } + } + } + }, + "basePath": "", + "baseUrl": "https://checks.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Checks Service", + "description": "The Checks API contains powerful and easy-to-use privacy and compliance APIs that interact with the Checks product and its underlying technology.", + "discoveryVersion": "v1", + "documentationLink": "https://developers.google.com/checks", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "checks:v1alpha", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://checks.mtls.googleapis.com/", + "name": "checks", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "accounts": { + "resources": { + "apps": { + "resources": { + "operations": { + "methods": { + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1alpha/accounts/{accountsId}/apps/{appsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "checks.accounts.apps.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^accounts/[^/]+/apps/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/xapi.zoo" + ] + } + } + } + } + } + } + }, + "privacypolicy": { + "methods": { + "analyze": { + "description": "Analyzes the privacy policy of the given policy URL or content.", + "flatPath": "v1alpha/privacypolicy:analyze", + "httpMethod": "POST", + "id": "checks.privacypolicy.analyze", + "parameterOrder": [], + "parameters": {}, + "path": "v1alpha/privacypolicy:analyze", + "request": { + "$ref": "AnalyzePrivacyPolicyRequest" + }, + "response": { + "$ref": "AnalyzePrivacyPolicyResponse" + } + } + } + } + }, + "revision": "20230619", + "rootUrl": "https://checks.googleapis.com/", + "schemas": { + "AnalyzePrivacyPolicyRequest": { + "description": "The request proto for AnalyzePrivacyPolicy method.", + "id": "AnalyzePrivacyPolicyRequest", + "properties": { + "privacyPolicyPageContent": { + "description": "Web page raw HTML content for the privacy policy page to be analyzed. Useful when the client wants to analyze a privacy policy already fetched.", + "type": "string" + }, + "privacyPolicyUri": { + "description": "URL for the privacy policy page to be analyzed. https://linter.aip.dev/140/uri (Use `uri` instead of `url` in field name)", + "type": "string" + } + }, + "type": "object" + }, + "AnalyzePrivacyPolicyResponse": { + "description": "The response proto for AnalyzePrivacyPolicy method.", + "id": "AnalyzePrivacyPolicyResponse", + "properties": { + "dataPurposeAnnotations": { + "description": "List of all data types in the privacy policy.", + "items": { + "$ref": "PolicyPurposeOfUseAnnotation" + }, + "type": "array" + }, + "dataTypeAnnotations": { + "description": "List of all data types in the privacy policy.", + "items": { + "$ref": "PolicyDataTypeAnnotation" + }, + "type": "array" + }, + "htmlContent": { + "description": "HTML content for the privacy policy page.", + "type": "string" + }, + "lastUpdatedDateInfo": { + "$ref": "LastUpdatedDate", + "description": "Information about the date when the privacy policy was last updated." + }, + "sectionAnnotations": { + "description": "List of all sections in the privacy policy.", + "items": { + "$ref": "PolicySectionAnnotation" + }, + "type": "array" + } + }, + "type": "object" + }, + "Date": { + "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", + "id": "Date", + "properties": { + "day": { + "description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", + "format": "int32", + "type": "integer" + }, + "month": { + "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", + "format": "int32", + "type": "integer" + }, + "year": { + "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "LastUpdatedDate": { + "description": "Information about the date when the privacy policy was last updated.", + "id": "LastUpdatedDate", + "properties": { + "endOffset": { + "description": "Byte offsets for the end of the date text inside the full text.", + "format": "int64", + "type": "string" + }, + "lastUpdatedDate": { + "$ref": "Date", + "description": "Date when the privacy policy was last updated." + }, + "startOffset": { + "description": "Byte offsets for the start of the date text inside the full text.", + "format": "int64", + "type": "string" + }, + "textContent": { + "description": "The bytes of actual text content in the section. NOTE: - This will correspond to the whole sentence that includes the date. - This field might contain HTML and it is not sanitized.", + "type": "string" + } + }, + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, + "PolicyDataTypeAnnotation": { + "id": "PolicyDataTypeAnnotation", + "properties": { + "dataType": { + "description": "Type of the data mentioned in the policy.", + "enum": [ + "DATA_TYPE_UNSPECIFIED", + "CONTACT_INFO_NAME", + "CONTACT_INFO_EMAIL_ADDRESS", + "CONTACT_INFO_PHONE_NUMBER", + "CONTACT_INFO_MAILING_ADDRESS", + "CONTACT_INFO_OTHER", + "IDENTITY_INFO_OTHER", + "USER_CONTENT_EMAIL_MESSAGES", + "USER_CONTENT_TEXT_MESSAGES", + "USER_CONTENT_OTHER_IN_APP_MESSAGES", + "USER_CONTENT_PHOTOS", + "USER_CONTENT_VIDEOS", + "USER_CONTENT_MUSIC_FILES", + "USER_CONTENT_VOICE_OR_SOUND_RECORDINGS", + "USER_CONTENT_OTHER_AUDIO_FILES", + "USER_CONTENT_FILES_AND_DOCS", + "USER_CONTENT_GAMEPLAY_DATA", + "USER_CONTENT_CUSTOMER_SUPPORT", + "COOKIES_AND_TRACKING_ELEMENTS", + "BROWSING_HISTORY", + "SEARCH_HISTORY", + "PURCHASE_HISTORY", + "PRODUCT_INTERACTION", + "USER_GENERATED_CONTENT_OTHER", + "IN_APP_ACTIONS_OTHER", + "ADVERTISING", + "APP_CRASH_LOGS", + "APP_DIAGNOSTICS", + "APP_PERFORMANCE_OTHER", + "USER_IDENTIFIERS", + "DEVICE_IDENTIFIERS", + "IP_ADDRESS", + "CONTACTS", + "AUTHENTICATION_DATA", + "CALENDAR_EVENTS_OR_NOTES", + "HEALTH", + "FITNESS", + "LOCATION_PRECISE", + "LOCATION_COARSE", + "LOCATION_GENERAL", + "APPS_ON_DEVICE", + "FINANCIAL_PAYMENT_INFO", + "FINANCIAL_CREDIT_INFO", + "FINANCIAL_OTHER", + "PERSONAL_INFO_RACE_AND_ETHNICITY", + "PERSONAL_INFO_POLITICAL_OR_RELIGIOUS_BELIEFS", + "PERSONAL_INFO_SEXUAL_ORIENTATION", + "PERSONAL_INFO_OTHER", + "GENERIC_PERSONAL_INFORMATION", + "UNSPECIFIED_INFORMATION", + "OTHER_DATA" + ], + "enumDescriptions": [ + "Default value.", + "Data type on the privacy policy describing Contact Info name.", + "Data type on the privacy policy describing Contact Info email address.", + "Data type on the privacy policy describing Contact Info phone number.", + "Data type on the privacy policy describing Contact Info mailing address.", + "Data type on the privacy policy describing Contact Info other.", + "Data type on the privacy policy describing Identity Info other.", + "Data type on the privacy policy describing User Content email messages.", + "Data type on the privacy policy describing User Content text messages.", + "Data type on the privacy policy describing User Content other in-app messages.", + "Data type on the privacy policy describing User Content photos.", + "Data type on the privacy policy describing User Content videos.", + "Data type on the privacy policy describing User Content music files.", + "Data type on the privacy policy describing User Content voice or sound recordings.", + "Data type on the privacy policy describing User Content other audio files.", + "Data type on the privacy policy describing User Content files or documents.", + "Data type on the privacy policy describing User Content gameplay data.", + "Data type on the privacy policy describing User Content customer support.", + "Data type on the privacy policy describing Cookies and other tracking elements, e.g. web beacons.", + "Data type on the privacy policy describing Browsing History.", + "Data type on the privacy policy describing Search History.", + "Data type on the privacy policy describing Purchase History.", + "Data type on the privacy policy describing Product Interaction data.", + "Data type on the privacy policy describing other User Generated Content.", + "Data type on the privacy policy describing other User Generated Content.", + "Data type on the privacy policy describing Advertising data.", + "Data type on the privacy policy describing Crash Logs data.", + "Data type on the privacy policy describing App Diagnostics data.", + "Data type on the privacy policy describing other App Performance data.", + "Data type on the privacy policy describing User or account-level IDs.", + "Data type on the privacy policy describing device-level IDs.", + "Data type on the privacy policy describing IP Addresses.", + "Data type on the privacy policy describing Contacts data.", + "Data type on the privacy policy describing Authentication data, e.g. passwords.", + "Data type on the privacy policy describing Calendar events or notes.", + "Data type on the privacy policy describing Health data.", + "Data type on the privacy policy describing Fitness data.", + "Data type on the privacy policy describing Precise Location data.", + "Data type on the privacy policy describing Coarse Location data.", + "Data type on the privacy policy describing general Location data, without specifying precise or coarse.", + "Data type on the privacy policy describing Apps on Device.", + "Data type on the privacy policy describing Financial Payment info.", + "Data type on the privacy policy describing Financial Credit info.", + "Data type on the privacy policy describing Financial other data.", + "Data type on the privacy policy describing a user’s race or ethnicity.", + "Data type on the privacy policy describing a user’s political or religious beliefs.", + "Data type on the privacy policy describing a user’s sexual orientation.", + "Data type on the privacy policy describing Personal Info other.", + "Data type on the privacy policy describing generic personal information, e.g. \"we collection your personal information.\"", + "Data type on the privacy policy describing information in general with no speicific type, e.g. \"we collect information you voluntarily provide.\"", + "Data type on the privacy policy describing specific types of data that are not covered by others labels, or ambiguous cases where no clear type exists, e.g. \"we collect your movement data,\" which could be location, fitness, or even product interaction, depending on the context." + ], + "type": "string" + }, + "endOffset": { + "description": "Byte offsets for the end of the data type sentence inside the full text.", + "format": "int64", + "type": "string" + }, + "score": { + "description": "Score given by the model representing how confident it was regarding this `text_content` being of `data_type`.", + "format": "float", + "type": "number" + }, + "startOffset": { + "description": "Byte offsets for the start of the data type sentence inside the full text.", + "format": "int64", + "type": "string" + }, + "textContent": { + "description": "Actual text content in the section. This makes it much easier to consume the information. NOTE: This field might contain HTML and does not guarantee a SafeHtml security contract go/safehtmltypecontracts#safehtml.", + "type": "string" + } + }, + "type": "object" + }, + "PolicyPurposeOfUseAnnotation": { + "id": "PolicyPurposeOfUseAnnotation", + "properties": { + "endOffset": { + "description": "Byte offsets for the end of the purpose of use sentence inside the full text.", + "format": "int64", + "type": "string" + }, + "purposeOfUse": { + "description": "Purpose of use mentioned in the policy.", + "enum": [ + "PURPOSE_OF_USE_UNSPECIFIED", + "APP_FUNCTIONALITY", + "APP_DIAGNOSTICS_AND_PERFORMANCE", + "FRAUD_PREVENTION_AND_SECURITY", + "PRODUCT_PERSONALIZATION", + "ANALYTICS", + "DEVELOPERS_COMMUNICATION_AND_MARKETING", + "THIRD_PARTY_ADVERTISING", + "GENERAL_ADVERTISING", + "LEGAL_COMPLIANCE", + "MERGERS_AND_ACQUISITIONS", + "OTHER_SPECIFIED_PURPOSE", + "NO_PURPOSE_MENTIONED" + ], + "enumDescriptions": [ + "Default value.", + "Data is used for general app functions, or interface with the user, e.g. customer support.", + "Data is used for minimizing app crashes, enabling scalability and performance, etc.", + "Data is used for fraud prevention, protecting user accounts, or other security purposes.", + "Data is used for personalizing/customizing what the user sees.", + "Data is used for evaluating user behavior, measuring audience size, etc.", + "Data is used for sending marketing communications directly to your users, notifications, reminders, or update notices.", + "Data is used by a third-party to display ads in the app (or elsewhere).", + "Data is used for displaying ads in the app, or sharing data with entities who display ads.", + "Data is used for compliance with legal obligations, e.g., regulations, government data requests, law enforcement requests in general, etc.", + "If a company/organization merges or is acquired it transfers users' information to another company/organization.", + "Any other specific purposes that are not listed above.", + "The purpose of use is not explicitly stated or unclear." + ], + "type": "string" + }, + "score": { + "description": "Score given by the model representing how confident it was regarding this `text_content` being of `purpose_of_use`.", + "format": "float", + "type": "number" + }, + "startOffset": { + "description": "Byte offsets for the start of the purpose of use sentence inside the full text.", + "format": "int64", + "type": "string" + }, + "textContent": { + "description": "The bytes of actual text content in the sentence that mentions the purpose of use. This makes it much easier to consume the information. NOTE: This field might contain HTML and does not guarantee a SafeHtml security contract go/safehtmltypecontracts#safehtml.", + "type": "string" + } + }, + "type": "object" + }, + "PolicySectionAnnotation": { + "id": "PolicySectionAnnotation", + "properties": { + "endOffset": { + "description": "Byte offsets for the end of the section inside the full text.", + "format": "int64", + "type": "string" + }, + "score": { + "description": "Score given by the model representing how confident it was regarding this `text_content` being of `section_type`.", + "format": "float", + "type": "number" + }, + "sectionType": { + "description": "Type of the high-level category in the policy.", + "enum": [ + "SECTION_TYPE_UNSPECIFIED", + "FIRST_PARTY_COLLECTION", + "FIRST_PARTY_USE", + "THIRD_PARTY_SHARING", + "CHILDREN_RELATED", + "DATA_RETENTION", + "PRIVACY_CONTACT", + "RIGHT_TO_DELETE", + "RIGHT_TO_RESTRICT_PROCESSING", + "RIGHT_TO_ACCESS", + "RIGHT_TO_RECTIFICATION", + "RIGHT_TO_KNOW_ABOUT_SELLING", + "RIGHT_TO_KNOW_ABOUT_SHARING", + "RIGHT_TO_OPT_OUT_FROM_SELLING", + "RIGHT_TO_OPT_OUT_FROM_SHARING", + "METHOD_TO_OPT_OUT_FROM_SELLING_OR_SHARING", + "AUTHORIZED_AGENT", + "CCPA_CPRA_REFERENCE", + "DATA_PROTECTION_OFFICER", + "DATA_CONTROLLER", + "DO_NOT_SELL", + "GDPR_REFERENCE", + "LAWFUL_LEGAL_BASIS", + "PRIVACY_SHIELD", + "RIGHT_TO_LODGE_A_COMPLAINT", + "TRANSFER_MECHANISMS", + "NO_CHILDREN_DATA_COLLECTION", + "NO_CHILDREN_DATA_SHARING", + "CHILDREN_INFORMATION_PUBLICITY", + "PARENTS_METHOD_OF_INFORMATION_DELETION", + "PARENTS_METHOD_TO_INFORMATION_REVIEW", + "PARENTS_METHOD_TO_STOP_FURTHER_INFORMATION_COLLECTION_USE", + "PARENTS_RIGHT_TO_INFORMATION_DELETION", + "PARENTS_RIGHT_TO_INFORMATION_REVIEW", + "PARENTS_RIGHT_TO_STOP_FURTHER_INFORMATION_COLLECTION_USE" + ], + "enumDescriptions": [ + "Default value.", + "Section of the privacy policy describes 1st party collection practices.", + "Section of the privacy policy describes 1st party use practices.", + "Section of the privacy policy describes 3rd party sharing practices.", + "Section of the privacy policy describes Children related content.", + "Section of the privacy policy describes data retention practices.", + "Section of the privacy policy references privacy contact information.", + "Section of the privacy policy describes users' right of data deletion.", + "Section of the privacy policy about users' right to restrict processing.", + "Section of the privacy policy about users' right to access their data.", + "Section of the privacy policy about users' right to correct inaccuracies.", + "Section of the privacy policy about users' right to know about information selling.", + "Section of the privacy policy about users' right to know about information sharing.", + "Section of the privacy policy about users' right to opt out from information selling.", + "Section of the privacy policy about users' right to opt out from information sharing.", + "Section of the privacy policy about the method to opt out from selling or sharing.", + "Section of the privacy policy about the authorized agent designated by user.", + "Section of the privacy policy about the mentions of the CCPA or CPRA.", + "Section of the privacy policy about the mentions of data protection officer (DPO).", + "Section of the privacy policy about the mentions of a data controller.", + "Section of the privacy policy stating that the company does not sell data in general (or as defined by the CCPA), without exceptions.", + "Section of the privacy policy about the mentions of the GDPR (General Data Protection Regulation).", + "Section of the privacy policy about lawful/legal basis for data processing.", + "Section of the privacy policy about the Privacy Shielf framework.", + "Section of the privacy policy about the right to lodge a complaint with a supervisory authority.", + "Section of the privacy policy about transfer mechanisms of data from the EU to third countries", + "Section of the privacy policy stating that the company does not collect data from children.", + "Section of the privacy policy stating that the company does not share data from children.", + "Section of the privacy policy stating whether the app allows children to make their personal information publicly available.", + "Section of the privacy policy stating to parents/caregivers/guardians how they can request the deletion of their child's personal information.", + "Section of the privacy policy stating to parents/guardians/caregivers how they can review their child's personal information.", + "Section of the privacy policy stating to parents/caregivers/guardians how they can stop the further collection or use of their child's personal information.", + "Section of the privacy policy stating that a parent/caregiver/guardian has the right to request the deletion of their child's personal. information.", + "Section of the privacy policy stating to parents/guardians/caregivers that they have a right to review their child's personal information.", + "Section of the privacy policy stating to parents/caregivers/guardians that they have the right to stop the further collection or use of their child's personal information." + ], + "type": "string" + }, + "startOffset": { + "description": "Byte offsets for the start of the section inside the full text.", + "format": "int64", + "type": "string" + }, + "textContent": { + "description": "Actual text content in the section. This makes it much easier to consume the information. NOTE: This field might contain HTML and does not guarantee a SafeHtml security contract go/safehtmltypecontracts#safehtml.", + "type": "string" + } + }, + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Checks API", + "version": "v1alpha", + "version_module": true +} \ No newline at end of file diff --git a/checks/v1alpha/checks-gen.go b/checks/v1alpha/checks-gen.go new file mode 100644 index 00000000000..5f6f5a926f5 --- /dev/null +++ b/checks/v1alpha/checks-gen.go @@ -0,0 +1,1131 @@ +// Copyright 2023 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package checks provides access to the Checks API. +// +// For product documentation, see: https://developers.google.com/checks +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/checks/v1alpha" +// ... +// ctx := context.Background() +// checksService, err := checks.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// checksService, err := checks.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// checksService, err := checks.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. +package checks // import "google.golang.org/api/checks/v1alpha" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint +var _ = internal.Version + +const apiId = "checks:v1alpha" +const apiName = "checks" +const apiVersion = "v1alpha" +const basePath = "https://checks.googleapis.com/" +const mtlsBasePath = "https://checks.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // Test scope for access to the Zoo service + XapiZooScope = "https://www.googleapis.com/auth/xapi.zoo" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/xapi.zoo", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Accounts = NewAccountsService(s) + s.Privacypolicy = NewPrivacypolicyService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Accounts *AccountsService + + Privacypolicy *PrivacypolicyService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewAccountsService(s *Service) *AccountsService { + rs := &AccountsService{s: s} + rs.Apps = NewAccountsAppsService(s) + return rs +} + +type AccountsService struct { + s *Service + + Apps *AccountsAppsService +} + +func NewAccountsAppsService(s *Service) *AccountsAppsService { + rs := &AccountsAppsService{s: s} + rs.Operations = NewAccountsAppsOperationsService(s) + return rs +} + +type AccountsAppsService struct { + s *Service + + Operations *AccountsAppsOperationsService +} + +func NewAccountsAppsOperationsService(s *Service) *AccountsAppsOperationsService { + rs := &AccountsAppsOperationsService{s: s} + return rs +} + +type AccountsAppsOperationsService struct { + s *Service +} + +func NewPrivacypolicyService(s *Service) *PrivacypolicyService { + rs := &PrivacypolicyService{s: s} + return rs +} + +type PrivacypolicyService struct { + s *Service +} + +// AnalyzePrivacyPolicyRequest: The request proto for +// AnalyzePrivacyPolicy method. +type AnalyzePrivacyPolicyRequest struct { + // PrivacyPolicyPageContent: Web page raw HTML content for the privacy + // policy page to be analyzed. Useful when the client wants to analyze a + // privacy policy already fetched. + PrivacyPolicyPageContent string `json:"privacyPolicyPageContent,omitempty"` + + // PrivacyPolicyUri: URL for the privacy policy page to be analyzed. + // https://linter.aip.dev/140/uri (Use `uri` instead of `url` in field + // name) + PrivacyPolicyUri string `json:"privacyPolicyUri,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "PrivacyPolicyPageContent") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PrivacyPolicyPageContent") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AnalyzePrivacyPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod AnalyzePrivacyPolicyRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AnalyzePrivacyPolicyResponse: The response proto for +// AnalyzePrivacyPolicy method. +type AnalyzePrivacyPolicyResponse struct { + // DataPurposeAnnotations: List of all data types in the privacy policy. + DataPurposeAnnotations []*PolicyPurposeOfUseAnnotation `json:"dataPurposeAnnotations,omitempty"` + + // DataTypeAnnotations: List of all data types in the privacy policy. + DataTypeAnnotations []*PolicyDataTypeAnnotation `json:"dataTypeAnnotations,omitempty"` + + // HtmlContent: HTML content for the privacy policy page. + HtmlContent string `json:"htmlContent,omitempty"` + + // LastUpdatedDateInfo: Information about the date when the privacy + // policy was last updated. + LastUpdatedDateInfo *LastUpdatedDate `json:"lastUpdatedDateInfo,omitempty"` + + // SectionAnnotations: List of all sections in the privacy policy. + SectionAnnotations []*PolicySectionAnnotation `json:"sectionAnnotations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "DataPurposeAnnotations") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataPurposeAnnotations") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AnalyzePrivacyPolicyResponse) MarshalJSON() ([]byte, error) { + type NoMethod AnalyzePrivacyPolicyResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Date: Represents a whole or partial calendar date, such as a +// birthday. The time of day and time zone are either specified +// elsewhere or are insignificant. The date is relative to the Gregorian +// Calendar. This can represent one of the following: * A full date, +// with non-zero year, month, and day values. * A month and day, with a +// zero year (for example, an anniversary). * A year on its own, with a +// zero month and a zero day. * A year and month, with a zero day (for +// example, a credit card expiration date). Related types: * +// google.type.TimeOfDay * google.type.DateTime * +// google.protobuf.Timestamp +type Date struct { + // Day: Day of a month. Must be from 1 to 31 and valid for the year and + // month, or 0 to specify a year by itself or a year and month where the + // day isn't significant. + Day int64 `json:"day,omitempty"` + + // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year + // without a month and day. + Month int64 `json:"month,omitempty"` + + // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a + // date without a year. + Year int64 `json:"year,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Day") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Day") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Date) MarshalJSON() ([]byte, error) { + type NoMethod Date + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// LastUpdatedDate: Information about the date when the privacy policy +// was last updated. +type LastUpdatedDate struct { + // EndOffset: Byte offsets for the end of the date text inside the full + // text. + EndOffset int64 `json:"endOffset,omitempty,string"` + + // LastUpdatedDate: Date when the privacy policy was last updated. + LastUpdatedDate *Date `json:"lastUpdatedDate,omitempty"` + + // StartOffset: Byte offsets for the start of the date text inside the + // full text. + StartOffset int64 `json:"startOffset,omitempty,string"` + + // TextContent: The bytes of actual text content in the section. NOTE: - + // This will correspond to the whole sentence that includes the date. - + // This field might contain HTML and it is not sanitized. + TextContent string `json:"textContent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndOffset") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndOffset") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LastUpdatedDate) MarshalJSON() ([]byte, error) { + type NoMethod LastUpdatedDate + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Operation: This resource represents a long-running operation that is +// the result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *Status `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal response of the operation in case of success. If + // the original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PolicyDataTypeAnnotation struct { + // DataType: Type of the data mentioned in the policy. + // + // Possible values: + // "DATA_TYPE_UNSPECIFIED" - Default value. + // "CONTACT_INFO_NAME" - Data type on the privacy policy describing + // Contact Info name. + // "CONTACT_INFO_EMAIL_ADDRESS" - Data type on the privacy policy + // describing Contact Info email address. + // "CONTACT_INFO_PHONE_NUMBER" - Data type on the privacy policy + // describing Contact Info phone number. + // "CONTACT_INFO_MAILING_ADDRESS" - Data type on the privacy policy + // describing Contact Info mailing address. + // "CONTACT_INFO_OTHER" - Data type on the privacy policy describing + // Contact Info other. + // "IDENTITY_INFO_OTHER" - Data type on the privacy policy describing + // Identity Info other. + // "USER_CONTENT_EMAIL_MESSAGES" - Data type on the privacy policy + // describing User Content email messages. + // "USER_CONTENT_TEXT_MESSAGES" - Data type on the privacy policy + // describing User Content text messages. + // "USER_CONTENT_OTHER_IN_APP_MESSAGES" - Data type on the privacy + // policy describing User Content other in-app messages. + // "USER_CONTENT_PHOTOS" - Data type on the privacy policy describing + // User Content photos. + // "USER_CONTENT_VIDEOS" - Data type on the privacy policy describing + // User Content videos. + // "USER_CONTENT_MUSIC_FILES" - Data type on the privacy policy + // describing User Content music files. + // "USER_CONTENT_VOICE_OR_SOUND_RECORDINGS" - Data type on the privacy + // policy describing User Content voice or sound recordings. + // "USER_CONTENT_OTHER_AUDIO_FILES" - Data type on the privacy policy + // describing User Content other audio files. + // "USER_CONTENT_FILES_AND_DOCS" - Data type on the privacy policy + // describing User Content files or documents. + // "USER_CONTENT_GAMEPLAY_DATA" - Data type on the privacy policy + // describing User Content gameplay data. + // "USER_CONTENT_CUSTOMER_SUPPORT" - Data type on the privacy policy + // describing User Content customer support. + // "COOKIES_AND_TRACKING_ELEMENTS" - Data type on the privacy policy + // describing Cookies and other tracking elements, e.g. web beacons. + // "BROWSING_HISTORY" - Data type on the privacy policy describing + // Browsing History. + // "SEARCH_HISTORY" - Data type on the privacy policy describing + // Search History. + // "PURCHASE_HISTORY" - Data type on the privacy policy describing + // Purchase History. + // "PRODUCT_INTERACTION" - Data type on the privacy policy describing + // Product Interaction data. + // "USER_GENERATED_CONTENT_OTHER" - Data type on the privacy policy + // describing other User Generated Content. + // "IN_APP_ACTIONS_OTHER" - Data type on the privacy policy describing + // other User Generated Content. + // "ADVERTISING" - Data type on the privacy policy describing + // Advertising data. + // "APP_CRASH_LOGS" - Data type on the privacy policy describing Crash + // Logs data. + // "APP_DIAGNOSTICS" - Data type on the privacy policy describing App + // Diagnostics data. + // "APP_PERFORMANCE_OTHER" - Data type on the privacy policy + // describing other App Performance data. + // "USER_IDENTIFIERS" - Data type on the privacy policy describing + // User or account-level IDs. + // "DEVICE_IDENTIFIERS" - Data type on the privacy policy describing + // device-level IDs. + // "IP_ADDRESS" - Data type on the privacy policy describing IP + // Addresses. + // "CONTACTS" - Data type on the privacy policy describing Contacts + // data. + // "AUTHENTICATION_DATA" - Data type on the privacy policy describing + // Authentication data, e.g. passwords. + // "CALENDAR_EVENTS_OR_NOTES" - Data type on the privacy policy + // describing Calendar events or notes. + // "HEALTH" - Data type on the privacy policy describing Health data. + // "FITNESS" - Data type on the privacy policy describing Fitness + // data. + // "LOCATION_PRECISE" - Data type on the privacy policy describing + // Precise Location data. + // "LOCATION_COARSE" - Data type on the privacy policy describing + // Coarse Location data. + // "LOCATION_GENERAL" - Data type on the privacy policy describing + // general Location data, without specifying precise or coarse. + // "APPS_ON_DEVICE" - Data type on the privacy policy describing Apps + // on Device. + // "FINANCIAL_PAYMENT_INFO" - Data type on the privacy policy + // describing Financial Payment info. + // "FINANCIAL_CREDIT_INFO" - Data type on the privacy policy + // describing Financial Credit info. + // "FINANCIAL_OTHER" - Data type on the privacy policy describing + // Financial other data. + // "PERSONAL_INFO_RACE_AND_ETHNICITY" - Data type on the privacy + // policy describing a user’s race or ethnicity. + // "PERSONAL_INFO_POLITICAL_OR_RELIGIOUS_BELIEFS" - Data type on the + // privacy policy describing a user’s political or religious beliefs. + // "PERSONAL_INFO_SEXUAL_ORIENTATION" - Data type on the privacy + // policy describing a user’s sexual orientation. + // "PERSONAL_INFO_OTHER" - Data type on the privacy policy describing + // Personal Info other. + // "GENERIC_PERSONAL_INFORMATION" - Data type on the privacy policy + // describing generic personal information, e.g. "we collection your + // personal information." + // "UNSPECIFIED_INFORMATION" - Data type on the privacy policy + // describing information in general with no speicific type, e.g. "we + // collect information you voluntarily provide." + // "OTHER_DATA" - Data type on the privacy policy describing specific + // types of data that are not covered by others labels, or ambiguous + // cases where no clear type exists, e.g. "we collect your movement + // data," which could be location, fitness, or even product interaction, + // depending on the context. + DataType string `json:"dataType,omitempty"` + + // EndOffset: Byte offsets for the end of the data type sentence inside + // the full text. + EndOffset int64 `json:"endOffset,omitempty,string"` + + // Score: Score given by the model representing how confident it was + // regarding this `text_content` being of `data_type`. + Score float64 `json:"score,omitempty"` + + // StartOffset: Byte offsets for the start of the data type sentence + // inside the full text. + StartOffset int64 `json:"startOffset,omitempty,string"` + + // TextContent: Actual text content in the section. This makes it much + // easier to consume the information. NOTE: This field might contain + // HTML and does not guarantee a SafeHtml security contract + // go/safehtmltypecontracts#safehtml. + TextContent string `json:"textContent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PolicyDataTypeAnnotation) MarshalJSON() ([]byte, error) { + type NoMethod PolicyDataTypeAnnotation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *PolicyDataTypeAnnotation) UnmarshalJSON(data []byte) error { + type NoMethod PolicyDataTypeAnnotation + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +type PolicyPurposeOfUseAnnotation struct { + // EndOffset: Byte offsets for the end of the purpose of use sentence + // inside the full text. + EndOffset int64 `json:"endOffset,omitempty,string"` + + // PurposeOfUse: Purpose of use mentioned in the policy. + // + // Possible values: + // "PURPOSE_OF_USE_UNSPECIFIED" - Default value. + // "APP_FUNCTIONALITY" - Data is used for general app functions, or + // interface with the user, e.g. customer support. + // "APP_DIAGNOSTICS_AND_PERFORMANCE" - Data is used for minimizing app + // crashes, enabling scalability and performance, etc. + // "FRAUD_PREVENTION_AND_SECURITY" - Data is used for fraud + // prevention, protecting user accounts, or other security purposes. + // "PRODUCT_PERSONALIZATION" - Data is used for + // personalizing/customizing what the user sees. + // "ANALYTICS" - Data is used for evaluating user behavior, measuring + // audience size, etc. + // "DEVELOPERS_COMMUNICATION_AND_MARKETING" - Data is used for sending + // marketing communications directly to your users, notifications, + // reminders, or update notices. + // "THIRD_PARTY_ADVERTISING" - Data is used by a third-party to + // display ads in the app (or elsewhere). + // "GENERAL_ADVERTISING" - Data is used for displaying ads in the app, + // or sharing data with entities who display ads. + // "LEGAL_COMPLIANCE" - Data is used for compliance with legal + // obligations, e.g., regulations, government data requests, law + // enforcement requests in general, etc. + // "MERGERS_AND_ACQUISITIONS" - If a company/organization merges or is + // acquired it transfers users' information to another + // company/organization. + // "OTHER_SPECIFIED_PURPOSE" - Any other specific purposes that are + // not listed above. + // "NO_PURPOSE_MENTIONED" - The purpose of use is not explicitly + // stated or unclear. + PurposeOfUse string `json:"purposeOfUse,omitempty"` + + // Score: Score given by the model representing how confident it was + // regarding this `text_content` being of `purpose_of_use`. + Score float64 `json:"score,omitempty"` + + // StartOffset: Byte offsets for the start of the purpose of use + // sentence inside the full text. + StartOffset int64 `json:"startOffset,omitempty,string"` + + // TextContent: The bytes of actual text content in the sentence that + // mentions the purpose of use. This makes it much easier to consume the + // information. NOTE: This field might contain HTML and does not + // guarantee a SafeHtml security contract + // go/safehtmltypecontracts#safehtml. + TextContent string `json:"textContent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndOffset") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndOffset") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PolicyPurposeOfUseAnnotation) MarshalJSON() ([]byte, error) { + type NoMethod PolicyPurposeOfUseAnnotation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *PolicyPurposeOfUseAnnotation) UnmarshalJSON(data []byte) error { + type NoMethod PolicyPurposeOfUseAnnotation + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +type PolicySectionAnnotation struct { + // EndOffset: Byte offsets for the end of the section inside the full + // text. + EndOffset int64 `json:"endOffset,omitempty,string"` + + // Score: Score given by the model representing how confident it was + // regarding this `text_content` being of `section_type`. + Score float64 `json:"score,omitempty"` + + // SectionType: Type of the high-level category in the policy. + // + // Possible values: + // "SECTION_TYPE_UNSPECIFIED" - Default value. + // "FIRST_PARTY_COLLECTION" - Section of the privacy policy describes + // 1st party collection practices. + // "FIRST_PARTY_USE" - Section of the privacy policy describes 1st + // party use practices. + // "THIRD_PARTY_SHARING" - Section of the privacy policy describes 3rd + // party sharing practices. + // "CHILDREN_RELATED" - Section of the privacy policy describes + // Children related content. + // "DATA_RETENTION" - Section of the privacy policy describes data + // retention practices. + // "PRIVACY_CONTACT" - Section of the privacy policy references + // privacy contact information. + // "RIGHT_TO_DELETE" - Section of the privacy policy describes users' + // right of data deletion. + // "RIGHT_TO_RESTRICT_PROCESSING" - Section of the privacy policy + // about users' right to restrict processing. + // "RIGHT_TO_ACCESS" - Section of the privacy policy about users' + // right to access their data. + // "RIGHT_TO_RECTIFICATION" - Section of the privacy policy about + // users' right to correct inaccuracies. + // "RIGHT_TO_KNOW_ABOUT_SELLING" - Section of the privacy policy about + // users' right to know about information selling. + // "RIGHT_TO_KNOW_ABOUT_SHARING" - Section of the privacy policy about + // users' right to know about information sharing. + // "RIGHT_TO_OPT_OUT_FROM_SELLING" - Section of the privacy policy + // about users' right to opt out from information selling. + // "RIGHT_TO_OPT_OUT_FROM_SHARING" - Section of the privacy policy + // about users' right to opt out from information sharing. + // "METHOD_TO_OPT_OUT_FROM_SELLING_OR_SHARING" - Section of the + // privacy policy about the method to opt out from selling or sharing. + // "AUTHORIZED_AGENT" - Section of the privacy policy about the + // authorized agent designated by user. + // "CCPA_CPRA_REFERENCE" - Section of the privacy policy about the + // mentions of the CCPA or CPRA. + // "DATA_PROTECTION_OFFICER" - Section of the privacy policy about the + // mentions of data protection officer (DPO). + // "DATA_CONTROLLER" - Section of the privacy policy about the + // mentions of a data controller. + // "DO_NOT_SELL" - Section of the privacy policy stating that the + // company does not sell data in general (or as defined by the CCPA), + // without exceptions. + // "GDPR_REFERENCE" - Section of the privacy policy about the mentions + // of the GDPR (General Data Protection Regulation). + // "LAWFUL_LEGAL_BASIS" - Section of the privacy policy about + // lawful/legal basis for data processing. + // "PRIVACY_SHIELD" - Section of the privacy policy about the Privacy + // Shielf framework. + // "RIGHT_TO_LODGE_A_COMPLAINT" - Section of the privacy policy about + // the right to lodge a complaint with a supervisory authority. + // "TRANSFER_MECHANISMS" - Section of the privacy policy about + // transfer mechanisms of data from the EU to third countries + // "NO_CHILDREN_DATA_COLLECTION" - Section of the privacy policy + // stating that the company does not collect data from children. + // "NO_CHILDREN_DATA_SHARING" - Section of the privacy policy stating + // that the company does not share data from children. + // "CHILDREN_INFORMATION_PUBLICITY" - Section of the privacy policy + // stating whether the app allows children to make their personal + // information publicly available. + // "PARENTS_METHOD_OF_INFORMATION_DELETION" - Section of the privacy + // policy stating to parents/caregivers/guardians how they can request + // the deletion of their child's personal information. + // "PARENTS_METHOD_TO_INFORMATION_REVIEW" - Section of the privacy + // policy stating to parents/guardians/caregivers how they can review + // their child's personal information. + // "PARENTS_METHOD_TO_STOP_FURTHER_INFORMATION_COLLECTION_USE" - + // Section of the privacy policy stating to parents/caregivers/guardians + // how they can stop the further collection or use of their child's + // personal information. + // "PARENTS_RIGHT_TO_INFORMATION_DELETION" - Section of the privacy + // policy stating that a parent/caregiver/guardian has the right to + // request the deletion of their child's personal. information. + // "PARENTS_RIGHT_TO_INFORMATION_REVIEW" - Section of the privacy + // policy stating to parents/guardians/caregivers that they have a right + // to review their child's personal information. + // "PARENTS_RIGHT_TO_STOP_FURTHER_INFORMATION_COLLECTION_USE" - + // Section of the privacy policy stating to parents/caregivers/guardians + // that they have the right to stop the further collection or use of + // their child's personal information. + SectionType string `json:"sectionType,omitempty"` + + // StartOffset: Byte offsets for the start of the section inside the + // full text. + StartOffset int64 `json:"startOffset,omitempty,string"` + + // TextContent: Actual text content in the section. This makes it much + // easier to consume the information. NOTE: This field might contain + // HTML and does not guarantee a SafeHtml security contract + // go/safehtmltypecontracts#safehtml. + TextContent string `json:"textContent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndOffset") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndOffset") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PolicySectionAnnotation) MarshalJSON() ([]byte, error) { + type NoMethod PolicySectionAnnotation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *PolicySectionAnnotation) UnmarshalJSON(data []byte) error { + type NoMethod PolicySectionAnnotation + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// Status: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "checks.accounts.apps.operations.get": + +type AccountsAppsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *AccountsAppsOperationsService) Get(name string) *AccountsAppsOperationsGetCall { + c := &AccountsAppsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsAppsOperationsGetCall) Fields(s ...googleapi.Field) *AccountsAppsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AccountsAppsOperationsGetCall) IfNoneMatch(entityTag string) *AccountsAppsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsAppsOperationsGetCall) Context(ctx context.Context) *AccountsAppsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsAppsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsAppsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + 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, "v1alpha/{+name}") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "checks.accounts.apps.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.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 *AccountsAppsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/accounts/{accountsId}/apps/{appsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "checks.accounts.apps.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^accounts/[^/]+/apps/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/xapi.zoo" + // ] + // } + +} + +// method id "checks.privacypolicy.analyze": + +type PrivacypolicyAnalyzeCall struct { + s *Service + analyzeprivacypolicyrequest *AnalyzePrivacyPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Analyze: Analyzes the privacy policy of the given policy URL or +// content. +func (r *PrivacypolicyService) Analyze(analyzeprivacypolicyrequest *AnalyzePrivacyPolicyRequest) *PrivacypolicyAnalyzeCall { + c := &PrivacypolicyAnalyzeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.analyzeprivacypolicyrequest = analyzeprivacypolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PrivacypolicyAnalyzeCall) Fields(s ...googleapi.Field) *PrivacypolicyAnalyzeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PrivacypolicyAnalyzeCall) Context(ctx context.Context) *PrivacypolicyAnalyzeCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PrivacypolicyAnalyzeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PrivacypolicyAnalyzeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.analyzeprivacypolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/privacypolicy:analyze") + 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 "checks.privacypolicy.analyze" call. +// Exactly one of *AnalyzePrivacyPolicyResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *AnalyzePrivacyPolicyResponse.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 *PrivacypolicyAnalyzeCall) Do(opts ...googleapi.CallOption) (*AnalyzePrivacyPolicyResponse, 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 := &AnalyzePrivacyPolicyResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Analyzes the privacy policy of the given policy URL or content.", + // "flatPath": "v1alpha/privacypolicy:analyze", + // "httpMethod": "POST", + // "id": "checks.privacypolicy.analyze", + // "parameterOrder": [], + // "parameters": {}, + // "path": "v1alpha/privacypolicy:analyze", + // "request": { + // "$ref": "AnalyzePrivacyPolicyRequest" + // }, + // "response": { + // "$ref": "AnalyzePrivacyPolicyResponse" + // } + // } + +} diff --git a/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-api.json b/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-api.json index b683e538d9d..9acb59fa745 100644 --- a/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-api.json +++ b/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-api.json @@ -297,6 +297,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getAuthentication-config": { + "description": "", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/contactCenters/{contactCentersId}/authentication-config", + "httpMethod": "GET", + "id": "contactcenteraiplatform.projects.locations.contactCenters.getAuthentication-config", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the AuthenticationConfig resource. Format: projects/{project}/locations/{location}/contactCenters/{contact_center}/authentication-config", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/contactCenters/[^/]+/authentication-config$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+name}", + "response": { + "$ref": "AuthenticationConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "Lists ContactCenters in a given project and location.", "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/contactCenters", @@ -381,6 +406,40 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "updateAuthentication-config": { + "description": "", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/contactCenters/{contactCentersId}/authentication-config", + "httpMethod": "PATCH", + "id": "contactcenteraiplatform.projects.locations.contactCenters.updateAuthentication-config", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of authentication config. Format: projects/{project}/locations/{location}/contactCenters/{contact_center}/authentication-config", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/contactCenters/[^/]+/authentication-config$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Indicates which fields in the provided authentication config to update. Must be specified and non-empty.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha1/{+name}", + "request": { + "$ref": "AuthenticationConfig" + }, + "response": { + "$ref": "AuthenticationConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -512,7 +571,7 @@ } } }, - "revision": "20230424", + "revision": "20230615", "rootUrl": "https://contactcenteraiplatform.googleapis.com/", "schemas": { "AdminUser": { @@ -530,6 +589,31 @@ }, "type": "object" }, + "AuthenticationConfig": { + "id": "AuthenticationConfig", + "properties": { + "basicAuthSetting": { + "$ref": "BasicAuthConfig" + }, + "name": { + "description": "Name of authentication config. Format: projects/{project}/locations/{location}/contactCenters/{contact_center}/authentication-config", + "type": "string" + }, + "samlSetting": { + "$ref": "SamlConfig" + } + }, + "type": "object" + }, + "BasicAuthConfig": { + "id": "BasicAuthConfig", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "type": "object" + }, "CancelOperationRequest": { "description": "The request message for Operations.CancelOperation.", "id": "CancelOperationRequest", @@ -652,6 +736,50 @@ "properties": {}, "type": "object" }, + "GoogleCloudCommonOperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "GoogleCloudCommonOperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "cancelRequested": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "statusDetail": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "InstanceConfig": { "description": "Message storing the instance configuration.", "id": "InstanceConfig", @@ -665,7 +793,8 @@ "STANDARD_LARGE", "STANDARD_XLARGE", "STANDARD_2XLARGE", - "STANDARD_3XLARGE" + "STANDARD_3XLARGE", + "DEV_XSMALL" ], "enumDescriptions": [ "The default value. This value is used if the state is omitted.", @@ -674,7 +803,8 @@ "Instance Size STANDARD_LARGE.", "Instance Size STANDARD_XLARGE.", "Instance Size STANDARD_2XLARGE.", - "Instance Size STANDARD_3XLARGE." + "Instance Size STANDARD_3XLARGE.", + "Instance Size DEV_EXTRA_SMALL." ], "type": "string" } @@ -882,7 +1012,8 @@ "STANDARD_LARGE", "STANDARD_XLARGE", "STANDARD_2XLARGE", - "STANDARD_3XLARGE" + "STANDARD_3XLARGE", + "DEV_XSMALL" ], "enumDescriptions": [ "The default value. This value is used if the state is omitted.", @@ -891,7 +1022,8 @@ "Instance Size STANDARD_LARGE.", "Instance Size STANDARD_XLARGE.", "Instance Size STANDARD_2XLARGE.", - "Instance Size STANDARD_3XLARGE." + "Instance Size STANDARD_3XLARGE.", + "Instance Size DEV_EXTRA_SMALL." ], "type": "string" } @@ -921,6 +1053,28 @@ }, "type": "object" }, + "SamlConfig": { + "id": "SamlConfig", + "properties": { + "cert": { + "description": "X.509 public certificate for IdP", + "type": "string" + }, + "emailMapping": { + "description": "IdP field that maps to the user’s email address", + "type": "string" + }, + "entityId": { + "description": "The entity ID for the identity provider. Example: https://[IDP Domain]/saml/metadata", + "type": "string" + }, + "loginUri": { + "description": "The sso login url. Example: https://[IDP Domain]/saml/sso/login", + "type": "string" + } + }, + "type": "object" + }, "Status": { "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", "id": "Status", diff --git a/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-gen.go b/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-gen.go index 4378ed1ceb5..54db85bc724 100644 --- a/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-gen.go +++ b/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-gen.go @@ -215,6 +215,70 @@ func (s *AdminUser) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type AuthenticationConfig struct { + BasicAuthSetting *BasicAuthConfig `json:"basicAuthSetting,omitempty"` + + // Name: Name of authentication config. Format: + // projects/{project}/locations/{location}/contactCenters/{contact_center + // }/authentication-config + Name string `json:"name,omitempty"` + + SamlSetting *SamlConfig `json:"samlSetting,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "BasicAuthSetting") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BasicAuthSetting") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AuthenticationConfig) MarshalJSON() ([]byte, error) { + type NoMethod AuthenticationConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type BasicAuthConfig struct { + Enabled bool `json:"enabled,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enabled") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BasicAuthConfig) MarshalJSON() ([]byte, error) { + type NoMethod BasicAuthConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CancelOperationRequest: The request message for // Operations.CancelOperation. type CancelOperationRequest struct { @@ -356,6 +420,58 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } +// GoogleCloudCommonOperationMetadata: Represents the metadata of the +// long-running operation. +type GoogleCloudCommonOperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CancelRequested: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have been + // cancelled successfully have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + CancelRequested bool `json:"cancelRequested,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // StatusDetail: Output only. Human-readable status of the operation, if + // any. + StatusDetail string `json:"statusDetail,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudCommonOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudCommonOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // InstanceConfig: Message storing the instance configuration. type InstanceConfig struct { // InstanceSize: The instance size of this the instance configuration. @@ -369,6 +485,7 @@ type InstanceConfig struct { // "STANDARD_XLARGE" - Instance Size STANDARD_XLARGE. // "STANDARD_2XLARGE" - Instance Size STANDARD_2XLARGE. // "STANDARD_3XLARGE" - Instance Size STANDARD_3XLARGE. + // "DEV_XSMALL" - Instance Size DEV_EXTRA_SMALL. InstanceSize string `json:"instanceSize,omitempty"` // ForceSendFields is a list of field names (e.g. "InstanceSize") to @@ -697,6 +814,7 @@ type Quota struct { // "STANDARD_XLARGE" - Instance Size STANDARD_XLARGE. // "STANDARD_2XLARGE" - Instance Size STANDARD_2XLARGE. // "STANDARD_3XLARGE" - Instance Size STANDARD_3XLARGE. + // "DEV_XSMALL" - Instance Size DEV_EXTRA_SMALL. ContactCenterInstanceSize string `json:"contactCenterInstanceSize,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -761,6 +879,44 @@ func (s *SAMLParams) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type SamlConfig struct { + // Cert: X.509 public certificate for IdP + Cert string `json:"cert,omitempty"` + + // EmailMapping: IdP field that maps to the user’s email address + EmailMapping string `json:"emailMapping,omitempty"` + + // EntityId: The entity ID for the identity provider. Example: + // https://[IDP Domain]/saml/metadata + EntityId string `json:"entityId,omitempty"` + + // LoginUri: The sso login url. Example: https://[IDP + // Domain]/saml/sso/login + LoginUri string `json:"loginUri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Cert") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Cert") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SamlConfig) MarshalJSON() ([]byte, error) { + type NoMethod SamlConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Status: The `Status` type defines a logical error model that is // suitable for different programming environments, including REST APIs // and RPC APIs. It is used by gRPC (https://github.com/grpc). Each @@ -1826,6 +1982,154 @@ func (c *ProjectsLocationsContactCentersGetCall) Do(opts ...googleapi.CallOption } +// method id "contactcenteraiplatform.projects.locations.contactCenters.getAuthentication-config": + +type ProjectsLocationsContactCentersGetAuthenticationConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetAuthenticationConfig: +// +// - name: The name of the AuthenticationConfig resource. Format: +// projects/{project}/locations/{location}/contactCenters/{contact_cent +// er}/authentication-config. +func (r *ProjectsLocationsContactCentersService) GetAuthenticationConfig(name string) *ProjectsLocationsContactCentersGetAuthenticationConfigCall { + c := &ProjectsLocationsContactCentersGetAuthenticationConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsContactCentersGetAuthenticationConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsContactCentersGetAuthenticationConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsContactCentersGetAuthenticationConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsContactCentersGetAuthenticationConfigCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsContactCentersGetAuthenticationConfigCall) Context(ctx context.Context) *ProjectsLocationsContactCentersGetAuthenticationConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsContactCentersGetAuthenticationConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsContactCentersGetAuthenticationConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + 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, "v1alpha1/{+name}") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "contactcenteraiplatform.projects.locations.contactCenters.getAuthentication-config" call. +// Exactly one of *AuthenticationConfig or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *AuthenticationConfig.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 *ProjectsLocationsContactCentersGetAuthenticationConfigCall) Do(opts ...googleapi.CallOption) (*AuthenticationConfig, 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 := &AuthenticationConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/contactCenters/{contactCentersId}/authentication-config", + // "httpMethod": "GET", + // "id": "contactcenteraiplatform.projects.locations.contactCenters.getAuthentication-config", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the AuthenticationConfig resource. Format: projects/{project}/locations/{location}/contactCenters/{contact_center}/authentication-config", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/contactCenters/[^/]+/authentication-config$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+name}", + // "response": { + // "$ref": "AuthenticationConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "contactcenteraiplatform.projects.locations.contactCenters.list": type ProjectsLocationsContactCentersListCall struct { @@ -2224,6 +2528,164 @@ func (c *ProjectsLocationsContactCentersPatchCall) Do(opts ...googleapi.CallOpti } +// method id "contactcenteraiplatform.projects.locations.contactCenters.updateAuthentication-config": + +type ProjectsLocationsContactCentersUpdateAuthenticationConfigCall struct { + s *Service + name string + authenticationconfig *AuthenticationConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateAuthenticationConfig: +// +// - name: Name of authentication config. Format: +// projects/{project}/locations/{location}/contactCenters/{contact_cent +// er}/authentication-config. +func (r *ProjectsLocationsContactCentersService) UpdateAuthenticationConfig(name string, authenticationconfig *AuthenticationConfig) *ProjectsLocationsContactCentersUpdateAuthenticationConfigCall { + c := &ProjectsLocationsContactCentersUpdateAuthenticationConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.authenticationconfig = authenticationconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. +// Indicates which fields in the provided authentication config to +// update. Must be specified and non-empty. +func (c *ProjectsLocationsContactCentersUpdateAuthenticationConfigCall) UpdateMask(updateMask string) *ProjectsLocationsContactCentersUpdateAuthenticationConfigCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsContactCentersUpdateAuthenticationConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsContactCentersUpdateAuthenticationConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsContactCentersUpdateAuthenticationConfigCall) Context(ctx context.Context) *ProjectsLocationsContactCentersUpdateAuthenticationConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsContactCentersUpdateAuthenticationConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsContactCentersUpdateAuthenticationConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.authenticationconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "contactcenteraiplatform.projects.locations.contactCenters.updateAuthentication-config" call. +// Exactly one of *AuthenticationConfig or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *AuthenticationConfig.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 *ProjectsLocationsContactCentersUpdateAuthenticationConfigCall) Do(opts ...googleapi.CallOption) (*AuthenticationConfig, 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 := &AuthenticationConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/contactCenters/{contactCentersId}/authentication-config", + // "httpMethod": "PATCH", + // "id": "contactcenteraiplatform.projects.locations.contactCenters.updateAuthentication-config", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Name of authentication config. Format: projects/{project}/locations/{location}/contactCenters/{contact_center}/authentication-config", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/contactCenters/[^/]+/authentication-config$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Indicates which fields in the provided authentication config to update. Must be specified and non-empty.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+name}", + // "request": { + // "$ref": "AuthenticationConfig" + // }, + // "response": { + // "$ref": "AuthenticationConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "contactcenteraiplatform.projects.locations.operations.cancel": type ProjectsLocationsOperationsCancelCall struct { diff --git a/content/v2.1/content-api.json b/content/v2.1/content-api.json index 4e7744be4cf..9cc952d6bc6 100644 --- a/content/v2.1/content-api.json +++ b/content/v2.1/content-api.json @@ -1822,38 +1822,6 @@ } } }, - "customers": { - "methods": { - "create": { - "description": "Allows uploading one customer information entry. Adding a customer with loyalty data enables the customer to see personalized loyalty annotations on search. Uploading a previously existing customer will overwrite the old entry.", - "flatPath": "{merchantId}/customers", - "httpMethod": "POST", - "id": "content.customers.create", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "Required. The ID of the account that owns the customer information.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/customers", - "request": { - "$ref": "Customer" - }, - "response": { - "$ref": "Customer" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, "datafeeds": { "methods": { "custombatch": { @@ -6303,7 +6271,7 @@ } } }, - "revision": "20230605", + "revision": "20230613", "rootUrl": "https://shoppingcontent.googleapis.com/", "schemas": { "Account": { @@ -8256,32 +8224,6 @@ }, "type": "object" }, - "Customer": { - "description": "The object representing a customer to update data for. Includes a customer identifier (such as email address) and any associated metadata to add. LoyaltyData triggers adding customer data for the purpose of loyalty personalization.", - "id": "Customer", - "properties": { - "emailAddress": { - "description": "The customer's email address. No extra string processing needed.", - "type": "string" - }, - "loyaltyData": { - "$ref": "CustomerLoyaltyData", - "description": "Loyalty data associated with the customer." - } - }, - "type": "object" - }, - "CustomerLoyaltyData": { - "description": "The loyalty data of the customer.", - "id": "CustomerLoyaltyData", - "properties": { - "loyaltyTier": { - "description": "The tier information for the given user. Can be an empty string.", - "type": "string" - } - }, - "type": "object" - }, "CustomerReturnReason": { "id": "CustomerReturnReason", "properties": { diff --git a/content/v2.1/content-gen.go b/content/v2.1/content-gen.go index 6bab3e2c2e2..706f8145ce7 100644 --- a/content/v2.1/content-gen.go +++ b/content/v2.1/content-gen.go @@ -126,7 +126,6 @@ func New(client *http.Client) (*APIService, error) { s.Collectionstatuses = NewCollectionstatusesService(s) s.Conversionsources = NewConversionsourcesService(s) s.Csses = NewCssesService(s) - s.Customers = NewCustomersService(s) s.Datafeeds = NewDatafeedsService(s) s.Datafeedstatuses = NewDatafeedstatusesService(s) s.Freelistingsprogram = NewFreelistingsprogramService(s) @@ -180,8 +179,6 @@ type APIService struct { Csses *CssesService - Customers *CustomersService - Datafeeds *DatafeedsService Datafeedstatuses *DatafeedstatusesService @@ -356,15 +353,6 @@ type CssesService struct { s *APIService } -func NewCustomersService(s *APIService) *CustomersService { - rs := &CustomersService{s: s} - return rs -} - -type CustomersService struct { - s *APIService -} - func NewDatafeedsService(s *APIService) *DatafeedsService { rs := &DatafeedsService{s: s} return rs @@ -3857,74 +3845,6 @@ func (s *CustomAttribute) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Customer: The object representing a customer to update data for. -// Includes a customer identifier (such as email address) and any -// associated metadata to add. LoyaltyData triggers adding customer data -// for the purpose of loyalty personalization. -type Customer struct { - // EmailAddress: The customer's email address. No extra string - // processing needed. - EmailAddress string `json:"emailAddress,omitempty"` - - // LoyaltyData: Loyalty data associated with the customer. - LoyaltyData *CustomerLoyaltyData `json:"loyaltyData,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "EmailAddress") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "EmailAddress") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Customer) MarshalJSON() ([]byte, error) { - type NoMethod Customer - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CustomerLoyaltyData: The loyalty data of the customer. -type CustomerLoyaltyData struct { - // LoyaltyTier: The tier information for the given user. Can be an empty - // string. - LoyaltyTier string `json:"loyaltyTier,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LoyaltyTier") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "LoyaltyTier") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CustomerLoyaltyData) MarshalJSON() ([]byte, error) { - type NoMethod CustomerLoyaltyData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - type CustomerReturnReason struct { // Description: Description of the reason. Description string `json:"description,omitempty"` @@ -28260,152 +28180,6 @@ func (c *CssesUpdatelabelsCall) Do(opts ...googleapi.CallOption) (*Css, error) { } -// method id "content.customers.create": - -type CustomersCreateCall struct { - s *APIService - merchantId int64 - customer *Customer - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Allows uploading one customer information entry. Adding a -// customer with loyalty data enables the customer to see personalized -// loyalty annotations on search. Uploading a previously existing -// customer will overwrite the old entry. -// -// - merchantId: The ID of the account that owns the customer -// information. -func (r *CustomersService) Create(merchantId int64, customer *Customer) *CustomersCreateCall { - c := &CustomersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.customer = customer - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *CustomersCreateCall) Fields(s ...googleapi.Field) *CustomersCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *CustomersCreateCall) Context(ctx context.Context) *CustomersCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *CustomersCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *CustomersCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.customer) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/customers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.customers.create" call. -// Exactly one of *Customer or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Customer.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 *CustomersCreateCall) Do(opts ...googleapi.CallOption) (*Customer, 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 := &Customer{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Allows uploading one customer information entry. Adding a customer with loyalty data enables the customer to see personalized loyalty annotations on search. Uploading a previously existing customer will overwrite the old entry.", - // "flatPath": "{merchantId}/customers", - // "httpMethod": "POST", - // "id": "content.customers.create", - // "parameterOrder": [ - // "merchantId" - // ], - // "parameters": { - // "merchantId": { - // "description": "Required. The ID of the account that owns the customer information.", - // "format": "int64", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{merchantId}/customers", - // "request": { - // "$ref": "Customer" - // }, - // "response": { - // "$ref": "Customer" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/content" - // ] - // } - -} - // method id "content.datafeeds.custombatch": type DatafeedsCustombatchCall struct { diff --git a/discoveryengine/v1alpha/discoveryengine-api.json b/discoveryengine/v1alpha/discoveryengine-api.json index 428334d9f38..8ab2db675ad 100644 --- a/discoveryengine/v1alpha/discoveryengine-api.json +++ b/discoveryengine/v1alpha/discoveryengine-api.json @@ -720,6 +720,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "purge": { + "description": "Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:purge", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.purge", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the catalog under which the events are created. The format is `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/userEvents:purge", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "write": { "description": "Writes a single user event.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:write", @@ -1433,6 +1461,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "purge": { + "description": "Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/userEvents:purge", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.userEvents.purge", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the catalog under which the events are created. The format is `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/userEvents:purge", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "write": { "description": "Writes a single user event.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/userEvents:write", @@ -1610,7 +1666,7 @@ } } }, - "revision": "20230525", + "revision": "20230620", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2062,11 +2118,11 @@ "id": "GoogleCloudDiscoveryengineV1alphaDocumentInfo", "properties": { "id": { - "description": "Required. The Document resource ID.", + "description": "The Document resource ID.", "type": "string" }, "name": { - "description": "Required. The Document resource full name, of the form: `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`", + "description": "The Document resource full name, of the form: `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`", "type": "string" }, "promotionIds": { @@ -2082,7 +2138,7 @@ "type": "integer" }, "uri": { - "description": "Required. The Document url - only allowed for DataStores with content_config PUBLIC_WEBSITE.", + "description": "The Document url - only allowed for DataStores with content_config PUBLIC_WEBSITE.", "type": "string" } }, @@ -2093,7 +2149,7 @@ "id": "GoogleCloudDiscoveryengineV1alphaGcsSource", "properties": { "dataSchema": { - "description": "The schema to use when parsing the data from the source. Supported values for document imports: * `document` (default): One JSON Document per line. Each document must have a valid Document.id. * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by `input_uris` will become a document, with the ID set to the first 128 bits of SHA256(URI) encoded as a hex string. * `custom`: One custom data JSON per row in arbitrary format that conforms the defined Schema of the data store. This can only be used by the GENERIC Data Store vertical. Supported values for user even imports: * `user_event` (default): One JSON UserEvent per line.", + "description": "The schema to use when parsing the data from the source. Supported values for document imports: * `document` (default): One JSON Document per line. Each document must have a valid Document.id. * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by `input_uris` will become a document, with the ID set to the first 128 bits of SHA256(URI) encoded as a hex string. * `custom`: One custom data JSON per row in arbitrary format that conforms the defined Schema of the data store. This can only be used by the GENERIC Data Store vertical. * `csv`: A CSV file with header conforming the defined Schema of the data store. Each entry after the header will be imported as a Document. This can only be used by the GENERIC Data Store vertical. Supported values for user even imports: * `user_event` (default): One JSON UserEvent per line.", "type": "string" }, "inputUris": { @@ -2138,7 +2194,7 @@ "id": "GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest", "properties": { "autoGenerateIds": { - "description": "Whether to automatically generate IDs for the documents if absent. If set to `true`, Document.ids are automatically generated based on the hash of the payload, where IDs may not be consistent during multiple imports. In which case ReconciliationMode.FULL is highly recommended to avoid duplicate contents. If unset or set to `false`, Document.ids have to be specified using id_field, otherwises, documents without IDs will fail to be imported. Only set this field when using GcsSource or BigQuerySource, and when GcsSource.data_schema or BigQuerySource.data_schema is `custom`. Otherwise, an INVALID_ARGUMENT error is thrown.", + "description": "Whether to automatically generate IDs for the documents if absent. If set to `true`, Document.ids are automatically generated based on the hash of the payload, where IDs may not be consistent during multiple imports. In which case ReconciliationMode.FULL is highly recommended to avoid duplicate contents. If unset or set to `false`, Document.ids have to be specified using id_field, otherwises, documents without IDs will fail to be imported. Only set this field when using GcsSource or BigQuerySource, and when GcsSource.data_schema or BigQuerySource.data_schema is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.", "type": "boolean" }, "bigquerySource": { @@ -2254,7 +2310,7 @@ "properties": { "bigquerySource": { "$ref": "GoogleCloudDiscoveryengineV1alphaBigQuerySource", - "description": "Required. BigQuery input source." + "description": "BigQuery input source." }, "errorConfig": { "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", @@ -2262,11 +2318,11 @@ }, "gcsSource": { "$ref": "GoogleCloudDiscoveryengineV1alphaGcsSource", - "description": "Required. Cloud Storage location for the input content." + "description": "Cloud Storage location for the input content." }, "inlineSource": { "$ref": "GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource", - "description": "Required. The Inline source for the input content for UserEvents." + "description": "The Inline source for the input content for UserEvents." } }, "type": "object" @@ -2457,6 +2513,60 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata": { + "description": "Metadata related to the progress of the PurgeUserEvents operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of entries that were deleted successfully.", + "format": "int64", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest": { + "description": "Request message for PurgeUserEvents method.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest", + "properties": { + "filter": { + "description": "Required. The filter string to specify the events to be deleted with a length limit of 5,000 characters. The eligible fields for filtering are: * `eventType`: Double quoted UserEvent.event_type string. * `eventTime`: in ISO 8601 \"zulu\" format. * `userPseudoId`: Double quoted string. Specifying this will delete all events associated with a visitor. * `userId`: Double quoted string. Specifying this will delete all events associated with a user. Examples: * Deleting all events in a time range: `eventTime \u003e \"2012-04-23T18:25:43.511Z\" eventTime \u003c \"2012-04-23T18:30:43.511Z\"` * Deleting specific eventType: `eventType = \"search\"` * Deleting all events for a specific visitor: `userPseudoId = \"visitor1024\"` * Deleting all events inside a DataStore: `*` The filtering fields are assumed to have an implicit AND.", + "type": "string" + }, + "force": { + "description": "The `force` field is currently not supported. Purge user event requests will permanently delete all purgeable events. Once the development is complete: If `force` is set to false, the method will return the expected purge count without deleting any user events. This field will default to false if not included in the request.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse": { + "description": "Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse", + "properties": { + "purgeCount": { + "description": "The total count of events purged as a result of the operation.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaRecommendRequest": { "description": "Request message for Recommend method.", "id": "GoogleCloudDiscoveryengineV1alphaRecommendRequest", diff --git a/discoveryengine/v1alpha/discoveryengine-gen.go b/discoveryengine/v1alpha/discoveryengine-gen.go index 379a4ca0eef..21eee7cf7fb 100644 --- a/discoveryengine/v1alpha/discoveryengine-gen.go +++ b/discoveryengine/v1alpha/discoveryengine-gen.go @@ -1329,10 +1329,10 @@ func (s *GoogleCloudDiscoveryengineV1alphaDocument) MarshalJSON() ([]byte, error // GoogleCloudDiscoveryengineV1alphaDocumentInfo: Detailed document // information associated with a user event. type GoogleCloudDiscoveryengineV1alphaDocumentInfo struct { - // Id: Required. The Document resource ID. + // Id: The Document resource ID. Id string `json:"id,omitempty"` - // Name: Required. The Document resource full name, of the form: + // Name: The Document resource full name, of the form: // `projects/{project_id}/locations/{location}/collections/{collection_id // }/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_ // id}` @@ -1348,7 +1348,7 @@ type GoogleCloudDiscoveryengineV1alphaDocumentInfo struct { // events of the following event types: * `add-to-cart` * `purchase` Quantity int64 `json:"quantity,omitempty"` - // Uri: Required. The Document url - only allowed for DataStores with + // Uri: The Document url - only allowed for DataStores with // content_config PUBLIC_WEBSITE. Uri string `json:"uri,omitempty"` @@ -1386,6 +1386,9 @@ type GoogleCloudDiscoveryengineV1alphaGcsSource struct { // bits of SHA256(URI) encoded as a hex string. * `custom`: One custom // data JSON per row in arbitrary format that conforms the defined // Schema of the data store. This can only be used by the GENERIC Data + // Store vertical. * `csv`: A CSV file with header conforming the + // defined Schema of the data store. Each entry after the header will be + // imported as a Document. This can only be used by the GENERIC Data // Store vertical. Supported values for user even imports: * // `user_event` (default): One JSON UserEvent per line. DataSchema string `json:"dataSchema,omitempty"` @@ -1475,7 +1478,7 @@ type GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest struct { // specified using id_field, otherwises, documents without IDs will fail // to be imported. Only set this field when using GcsSource or // BigQuerySource, and when GcsSource.data_schema or - // BigQuerySource.data_schema is `custom`. Otherwise, an + // BigQuerySource.data_schema is `custom` or `csv`. Otherwise, an // INVALID_ARGUMENT error is thrown. AutoGenerateIds bool `json:"autoGenerateIds,omitempty"` @@ -1690,18 +1693,17 @@ func (s *GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata) MarshalJSON( // GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest: Request // message for the ImportUserEvents request. type GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest struct { - // BigquerySource: Required. BigQuery input source. + // BigquerySource: BigQuery input source. BigquerySource *GoogleCloudDiscoveryengineV1alphaBigQuerySource `json:"bigquerySource,omitempty"` // ErrorConfig: The desired location of errors incurred during the // Import. Cannot be set for inline user event imports. ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` - // GcsSource: Required. Cloud Storage location for the input content. + // GcsSource: Cloud Storage location for the input content. GcsSource *GoogleCloudDiscoveryengineV1alphaGcsSource `json:"gcsSource,omitempty"` - // InlineSource: Required. The Inline source for the input content for - // UserEvents. + // InlineSource: The Inline source for the input content for UserEvents. InlineSource *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource `json:"inlineSource,omitempty"` // ForceSendFields is a list of field names (e.g. "BigquerySource") to @@ -2106,6 +2108,127 @@ func (s *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse) MarshalJSON() return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata: Metadata +// related to the progress of the PurgeUserEvents operation. This will +// be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // FailureCount: Count of entries that encountered errors while + // processing. + FailureCount int64 `json:"failureCount,omitempty,string"` + + // SuccessCount: Count of entries that were deleted successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest: Request +// message for PurgeUserEvents method. +type GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest struct { + // Filter: Required. The filter string to specify the events to be + // deleted with a length limit of 5,000 characters. The eligible fields + // for filtering are: * `eventType`: Double quoted UserEvent.event_type + // string. * `eventTime`: in ISO 8601 "zulu" format. * `userPseudoId`: + // Double quoted string. Specifying this will delete all events + // associated with a visitor. * `userId`: Double quoted string. + // Specifying this will delete all events associated with a user. + // Examples: * Deleting all events in a time range: `eventTime > + // "2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z" * + // Deleting specific eventType: `eventType = "search" * Deleting all + // events for a specific visitor: `userPseudoId = "visitor1024" * + // Deleting all events inside a DataStore: `*` The filtering fields are + // assumed to have an implicit AND. + Filter string `json:"filter,omitempty"` + + // Force: The `force` field is currently not supported. Purge user event + // requests will permanently delete all purgeable events. Once the + // development is complete: If `force` is set to false, the method will + // return the expected purge count without deleting any user events. + // This field will default to false if not included in the request. + Force bool `json:"force,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Filter") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Filter") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse: Response of +// the PurgeUserEventsRequest. If the long running operation is +// successfully done, then this message is returned by the +// google.longrunning.Operations.response field. +type GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse struct { + // PurgeCount: The total count of events purged as a result of the + // operation. + PurgeCount int64 `json:"purgeCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "PurgeCount") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PurgeCount") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaRecommendRequest: Request message // for Recommend method. type GoogleCloudDiscoveryengineV1alphaRecommendRequest struct { @@ -6283,6 +6406,154 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ... } +// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.purge": + +type ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphapurgeusereventsrequest *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Purge: Deletes permanently all user events specified by the filter +// provided. Depending on the number of events specified by the filter, +// this operation could take hours or days to complete. To test a +// filter, use the list command first. +// +// - parent: The resource name of the catalog under which the events are +// created. The format is +// `projects/${projectId}/locations/global/collections/{$collectionId}/ +// dataStores/${dataStoreId}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgeusereventsrequest *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphapurgeusereventsrequest = googleclouddiscoveryenginev1alphapurgeusereventsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapurgeusereventsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:purge") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.purge" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.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 *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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 := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:purge", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.purge", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The resource name of the catalog under which the events are created. The format is `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/userEvents:purge", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "discoveryengine.projects.locations.collections.dataStores.userEvents.write": type ProjectsLocationsCollectionsDataStoresUserEventsWriteCall struct { @@ -9815,6 +10086,154 @@ func (c *ProjectsLocationsDataStoresUserEventsImportCall) Do(opts ...googleapi.C } +// method id "discoveryengine.projects.locations.dataStores.userEvents.purge": + +type ProjectsLocationsDataStoresUserEventsPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphapurgeusereventsrequest *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Purge: Deletes permanently all user events specified by the filter +// provided. Depending on the number of events specified by the filter, +// this operation could take hours or days to complete. To test a +// filter, use the list command first. +// +// - parent: The resource name of the catalog under which the events are +// created. The format is +// `projects/${projectId}/locations/global/collections/{$collectionId}/ +// dataStores/${dataStoreId}`. +func (r *ProjectsLocationsDataStoresUserEventsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgeusereventsrequest *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest) *ProjectsLocationsDataStoresUserEventsPurgeCall { + c := &ProjectsLocationsDataStoresUserEventsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphapurgeusereventsrequest = googleclouddiscoveryenginev1alphapurgeusereventsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresUserEventsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresUserEventsPurgeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataStoresUserEventsPurgeCall) Context(ctx context.Context) *ProjectsLocationsDataStoresUserEventsPurgeCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataStoresUserEventsPurgeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresUserEventsPurgeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapurgeusereventsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:purge") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.userEvents.purge" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.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 *ProjectsLocationsDataStoresUserEventsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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 := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/userEvents:purge", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.userEvents.purge", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The resource name of the catalog under which the events are created. The format is `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/userEvents:purge", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "discoveryengine.projects.locations.dataStores.userEvents.write": type ProjectsLocationsDataStoresUserEventsWriteCall struct { diff --git a/discoveryengine/v1beta/discoveryengine-api.json b/discoveryengine/v1beta/discoveryengine-api.json index 180cf9fb7d8..991b160c2e2 100644 --- a/discoveryengine/v1beta/discoveryengine-api.json +++ b/discoveryengine/v1beta/discoveryengine-api.json @@ -1610,7 +1610,7 @@ } } }, - "revision": "20230525", + "revision": "20230620", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2110,6 +2110,45 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata": { + "description": "Metadata related to the progress of the PurgeUserEvents operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of entries that were deleted successfully.", + "format": "int64", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse": { + "description": "Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse", + "properties": { + "purgeCount": { + "description": "The total count of events purged as a result of the operation.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaSchema": { "description": "Defines the structure and layout of a type of document data.", "id": "GoogleCloudDiscoveryengineV1alphaSchema", @@ -2287,11 +2326,11 @@ "id": "GoogleCloudDiscoveryengineV1betaDocumentInfo", "properties": { "id": { - "description": "Required. The Document resource ID.", + "description": "The Document resource ID.", "type": "string" }, "name": { - "description": "Required. The Document resource full name, of the form: `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`", + "description": "The Document resource full name, of the form: `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`", "type": "string" }, "promotionIds": { @@ -2307,7 +2346,7 @@ "type": "integer" }, "uri": { - "description": "Required. The Document url - only allowed for DataStores with content_config PUBLIC_WEBSITE.", + "description": "The Document url - only allowed for DataStores with content_config PUBLIC_WEBSITE.", "type": "string" } }, @@ -2318,7 +2357,7 @@ "id": "GoogleCloudDiscoveryengineV1betaGcsSource", "properties": { "dataSchema": { - "description": "The schema to use when parsing the data from the source. Supported values for document imports: * `document` (default): One JSON Document per line. Each document must have a valid Document.id. * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by `input_uris` will become a document, with the ID set to the first 128 bits of SHA256(URI) encoded as a hex string. * `custom`: One custom data JSON per row in arbitrary format that conforms the defined Schema of the data store. This can only be used by the GENERIC Data Store vertical. Supported values for user even imports: * `user_event` (default): One JSON UserEvent per line.", + "description": "The schema to use when parsing the data from the source. Supported values for document imports: * `document` (default): One JSON Document per line. Each document must have a valid Document.id. * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by `input_uris` will become a document, with the ID set to the first 128 bits of SHA256(URI) encoded as a hex string. * `custom`: One custom data JSON per row in arbitrary format that conforms the defined Schema of the data store. This can only be used by the GENERIC Data Store vertical. * `csv`: A CSV file with header conforming the defined Schema of the data store. Each entry after the header will be imported as a Document. This can only be used by the GENERIC Data Store vertical. Supported values for user even imports: * `user_event` (default): One JSON UserEvent per line.", "type": "string" }, "inputUris": { @@ -2363,7 +2402,7 @@ "id": "GoogleCloudDiscoveryengineV1betaImportDocumentsRequest", "properties": { "autoGenerateIds": { - "description": "Whether to automatically generate IDs for the documents if absent. If set to `true`, Document.ids are automatically generated based on the hash of the payload, where IDs may not be consistent during multiple imports. In which case ReconciliationMode.FULL is highly recommended to avoid duplicate contents. If unset or set to `false`, Document.ids have to be specified using id_field, otherwises, documents without IDs will fail to be imported. Only set this field when using GcsSource or BigQuerySource, and when GcsSource.data_schema or BigQuerySource.data_schema is `custom`. Otherwise, an INVALID_ARGUMENT error is thrown.", + "description": "Whether to automatically generate IDs for the documents if absent. If set to `true`, Document.ids are automatically generated based on the hash of the payload, where IDs may not be consistent during multiple imports. In which case ReconciliationMode.FULL is highly recommended to avoid duplicate contents. If unset or set to `false`, Document.ids have to be specified using id_field, otherwises, documents without IDs will fail to be imported. Only set this field when using GcsSource or BigQuerySource, and when GcsSource.data_schema or BigQuerySource.data_schema is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.", "type": "boolean" }, "bigquerySource": { @@ -2479,7 +2518,7 @@ "properties": { "bigquerySource": { "$ref": "GoogleCloudDiscoveryengineV1betaBigQuerySource", - "description": "Required. BigQuery input source." + "description": "BigQuery input source." }, "errorConfig": { "$ref": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", @@ -2487,11 +2526,11 @@ }, "gcsSource": { "$ref": "GoogleCloudDiscoveryengineV1betaGcsSource", - "description": "Required. Cloud Storage location for the input content." + "description": "Cloud Storage location for the input content." }, "inlineSource": { "$ref": "GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource", - "description": "Required. The Inline source for the input content for UserEvents." + "description": "The Inline source for the input content for UserEvents." } }, "type": "object" diff --git a/discoveryengine/v1beta/discoveryengine-gen.go b/discoveryengine/v1beta/discoveryengine-gen.go index 937228577cd..2158962a057 100644 --- a/discoveryengine/v1beta/discoveryengine-gen.go +++ b/discoveryengine/v1beta/discoveryengine-gen.go @@ -1386,6 +1386,79 @@ func (s *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse) MarshalJSON() return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata: Metadata +// related to the progress of the PurgeUserEvents operation. This will +// be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // FailureCount: Count of entries that encountered errors while + // processing. + FailureCount int64 `json:"failureCount,omitempty,string"` + + // SuccessCount: Count of entries that were deleted successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse: Response of +// the PurgeUserEventsRequest. If the long running operation is +// successfully done, then this message is returned by the +// google.longrunning.Operations.response field. +type GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse struct { + // PurgeCount: The total count of events purged as a result of the + // operation. + PurgeCount int64 `json:"purgeCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "PurgeCount") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PurgeCount") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaSchema: Defines the structure and // layout of a type of document data. type GoogleCloudDiscoveryengineV1alphaSchema struct { @@ -1705,10 +1778,10 @@ func (s *GoogleCloudDiscoveryengineV1betaDocument) MarshalJSON() ([]byte, error) // GoogleCloudDiscoveryengineV1betaDocumentInfo: Detailed document // information associated with a user event. type GoogleCloudDiscoveryengineV1betaDocumentInfo struct { - // Id: Required. The Document resource ID. + // Id: The Document resource ID. Id string `json:"id,omitempty"` - // Name: Required. The Document resource full name, of the form: + // Name: The Document resource full name, of the form: // `projects/{project_id}/locations/{location}/collections/{collection_id // }/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_ // id}` @@ -1724,7 +1797,7 @@ type GoogleCloudDiscoveryengineV1betaDocumentInfo struct { // events of the following event types: * `add-to-cart` * `purchase` Quantity int64 `json:"quantity,omitempty"` - // Uri: Required. The Document url - only allowed for DataStores with + // Uri: The Document url - only allowed for DataStores with // content_config PUBLIC_WEBSITE. Uri string `json:"uri,omitempty"` @@ -1762,6 +1835,9 @@ type GoogleCloudDiscoveryengineV1betaGcsSource struct { // bits of SHA256(URI) encoded as a hex string. * `custom`: One custom // data JSON per row in arbitrary format that conforms the defined // Schema of the data store. This can only be used by the GENERIC Data + // Store vertical. * `csv`: A CSV file with header conforming the + // defined Schema of the data store. Each entry after the header will be + // imported as a Document. This can only be used by the GENERIC Data // Store vertical. Supported values for user even imports: * // `user_event` (default): One JSON UserEvent per line. DataSchema string `json:"dataSchema,omitempty"` @@ -1851,7 +1927,7 @@ type GoogleCloudDiscoveryengineV1betaImportDocumentsRequest struct { // specified using id_field, otherwises, documents without IDs will fail // to be imported. Only set this field when using GcsSource or // BigQuerySource, and when GcsSource.data_schema or - // BigQuerySource.data_schema is `custom`. Otherwise, an + // BigQuerySource.data_schema is `custom` or `csv`. Otherwise, an // INVALID_ARGUMENT error is thrown. AutoGenerateIds bool `json:"autoGenerateIds,omitempty"` @@ -2066,18 +2142,17 @@ func (s *GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata) MarshalJSON() // GoogleCloudDiscoveryengineV1betaImportUserEventsRequest: Request // message for the ImportUserEvents request. type GoogleCloudDiscoveryengineV1betaImportUserEventsRequest struct { - // BigquerySource: Required. BigQuery input source. + // BigquerySource: BigQuery input source. BigquerySource *GoogleCloudDiscoveryengineV1betaBigQuerySource `json:"bigquerySource,omitempty"` // ErrorConfig: The desired location of errors incurred during the // Import. Cannot be set for inline user event imports. ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` - // GcsSource: Required. Cloud Storage location for the input content. + // GcsSource: Cloud Storage location for the input content. GcsSource *GoogleCloudDiscoveryengineV1betaGcsSource `json:"gcsSource,omitempty"` - // InlineSource: Required. The Inline source for the input content for - // UserEvents. + // InlineSource: The Inline source for the input content for UserEvents. InlineSource *GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource `json:"inlineSource,omitempty"` // ForceSendFields is a list of field names (e.g. "BigquerySource") to diff --git a/documentai/v1/documentai-api.json b/documentai/v1/documentai-api.json index 69a7b73904a..7664f89d9af 100644 --- a/documentai/v1/documentai-api.json +++ b/documentai/v1/documentai-api.json @@ -1042,7 +1042,7 @@ } } }, - "revision": "20230609", + "revision": "20230619", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata": { @@ -4370,6 +4370,10 @@ "description": "Optional. The processor version to use as a base for training. This processor version must be a child of `parent`. Format: `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`.", "type": "string" }, + "customDocumentExtractionOptions": { + "$ref": "GoogleCloudDocumentaiV1TrainProcessorVersionRequestCustomDocumentExtractionOptions", + "description": "Options to control Custom Document Extraction (CDE) Processor." + }, "documentSchema": { "$ref": "GoogleCloudDocumentaiV1DocumentSchema", "description": "Optional. The schema the processor version will be trained with." @@ -4385,6 +4389,27 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1TrainProcessorVersionRequestCustomDocumentExtractionOptions": { + "description": "Options to control the training of the Custom Document Extraction (CDE) Processor.", + "id": "GoogleCloudDocumentaiV1TrainProcessorVersionRequestCustomDocumentExtractionOptions", + "properties": { + "trainingMethod": { + "description": "Training method to use for CDE training.", + "enum": [ + "TRAINING_METHOD_UNSPECIFIED", + "MODEL_BASED", + "TEMPLATE_BASED" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1TrainProcessorVersionRequestInputData": { "description": "The input data used to train a new ProcessorVersion.", "id": "GoogleCloudDocumentaiV1TrainProcessorVersionRequestInputData", diff --git a/documentai/v1/documentai-gen.go b/documentai/v1/documentai-gen.go index b6e83eaf4e7..b5c4d944233 100644 --- a/documentai/v1/documentai-gen.go +++ b/documentai/v1/documentai-gen.go @@ -5986,6 +5986,10 @@ type GoogleCloudDocumentaiV1TrainProcessorVersionRequest struct { // sorVersions/{processorVersion}`. BaseProcessorVersion string `json:"baseProcessorVersion,omitempty"` + // CustomDocumentExtractionOptions: Options to control Custom Document + // Extraction (CDE) Processor. + CustomDocumentExtractionOptions *GoogleCloudDocumentaiV1TrainProcessorVersionRequestCustomDocumentExtractionOptions `json:"customDocumentExtractionOptions,omitempty"` + // DocumentSchema: Optional. The schema the processor version will be // trained with. DocumentSchema *GoogleCloudDocumentaiV1DocumentSchema `json:"documentSchema,omitempty"` @@ -6022,6 +6026,42 @@ func (s *GoogleCloudDocumentaiV1TrainProcessorVersionRequest) MarshalJSON() ([]b return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1TrainProcessorVersionRequestCustomDocumentExtra +// ctionOptions: Options to control the training of the Custom Document +// Extraction (CDE) Processor. +type GoogleCloudDocumentaiV1TrainProcessorVersionRequestCustomDocumentExtractionOptions struct { + // TrainingMethod: Training method to use for CDE training. + // + // Possible values: + // "TRAINING_METHOD_UNSPECIFIED" + // "MODEL_BASED" + // "TEMPLATE_BASED" + TrainingMethod string `json:"trainingMethod,omitempty"` + + // ForceSendFields is a list of field names (e.g. "TrainingMethod") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "TrainingMethod") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1TrainProcessorVersionRequestCustomDocumentExtractionOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1TrainProcessorVersionRequestCustomDocumentExtractionOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1TrainProcessorVersionRequestInputData: The // input data used to train a new ProcessorVersion. type GoogleCloudDocumentaiV1TrainProcessorVersionRequestInputData struct { diff --git a/documentai/v1beta3/documentai-api.json b/documentai/v1beta3/documentai-api.json index dde5d9fcddb..53eb55eac28 100644 --- a/documentai/v1beta3/documentai-api.json +++ b/documentai/v1beta3/documentai-api.json @@ -1114,7 +1114,7 @@ } } }, - "revision": "20230609", + "revision": "20230619", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata": { @@ -7882,6 +7882,10 @@ "description": "Optional. The processor version to use as a base for training. This processor version must be a child of `parent`. Format: `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`.", "type": "string" }, + "customDocumentExtractionOptions": { + "$ref": "GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequestCustomDocumentExtractionOptions", + "description": "Options to control Custom Document Extraction (CDE) Processor." + }, "documentSchema": { "$ref": "GoogleCloudDocumentaiV1beta3DocumentSchema", "description": "Optional. The schema the processor version will be trained with." @@ -7897,6 +7901,27 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequestCustomDocumentExtractionOptions": { + "description": "Options to control the training of the Custom Document Extraction (CDE) Processor.", + "id": "GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequestCustomDocumentExtractionOptions", + "properties": { + "trainingMethod": { + "description": "Training method to use for CDE training.", + "enum": [ + "TRAINING_METHOD_UNSPECIFIED", + "MODEL_BASED", + "TEMPLATE_BASED" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequestInputData": { "description": "The input data used to train a new ProcessorVersion.", "id": "GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequestInputData", diff --git a/documentai/v1beta3/documentai-gen.go b/documentai/v1beta3/documentai-gen.go index 8030aede833..ab73d1e7f41 100644 --- a/documentai/v1beta3/documentai-gen.go +++ b/documentai/v1beta3/documentai-gen.go @@ -11743,6 +11743,10 @@ type GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequest struct { // sorVersions/{processorVersion}`. BaseProcessorVersion string `json:"baseProcessorVersion,omitempty"` + // CustomDocumentExtractionOptions: Options to control Custom Document + // Extraction (CDE) Processor. + CustomDocumentExtractionOptions *GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequestCustomDocumentExtractionOptions `json:"customDocumentExtractionOptions,omitempty"` + // DocumentSchema: Optional. The schema the processor version will be // trained with. DocumentSchema *GoogleCloudDocumentaiV1beta3DocumentSchema `json:"documentSchema,omitempty"` @@ -11779,6 +11783,42 @@ func (s *GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequest) MarshalJSON() return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequestCustomDocument +// ExtractionOptions: Options to control the training of the Custom +// Document Extraction (CDE) Processor. +type GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequestCustomDocumentExtractionOptions struct { + // TrainingMethod: Training method to use for CDE training. + // + // Possible values: + // "TRAINING_METHOD_UNSPECIFIED" + // "MODEL_BASED" + // "TEMPLATE_BASED" + TrainingMethod string `json:"trainingMethod,omitempty"` + + // ForceSendFields is a list of field names (e.g. "TrainingMethod") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "TrainingMethod") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequestCustomDocumentExtractionOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequestCustomDocumentExtractionOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequestInputData: // The input data used to train a new ProcessorVersion. type GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequestInputData struct { diff --git a/serviceusage/v1/serviceusage-api.json b/serviceusage/v1/serviceusage-api.json index 8bc239b8bfa..76c4e2080af 100644 --- a/serviceusage/v1/serviceusage-api.json +++ b/serviceusage/v1/serviceusage-api.json @@ -426,7 +426,7 @@ } } }, - "revision": "20230611", + "revision": "20230619", "rootUrl": "https://serviceusage.googleapis.com/", "schemas": { "AddEnableRulesMetadata": { @@ -465,7 +465,7 @@ "additionalProperties": { "type": "string" }, - "description": " If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit. For example, an policy on a limit with the unit `1/{project}/{region}` could contain an entry with the key `region` and the value `us-east-1`; the policy is only applied to quota consumed in that region. This map has the following restrictions: * If `region` appears as a key, its value must be a valid Cloud region. * If `zone` appears as a key, its value must be a valid Cloud zone. * Keys other than `region` or `zone` are not valid.", + "description": " If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit. For example, a policy on a limit with the unit `1/{project}/{region}` could contain an entry with the key `region` and the value `us-east-1`; the policy is only applied to quota consumed in that region. This map has the following restrictions: * If `region` appears as a key, its value must be a valid Cloud region. * If `zone` appears as a key, its value must be a valid Cloud zone. * Keys other than `region` or `zone` are not valid.", "type": "object" }, "metric": { diff --git a/serviceusage/v1/serviceusage-gen.go b/serviceusage/v1/serviceusage-gen.go index ad645508f3f..b8b69ee2d94 100644 --- a/serviceusage/v1/serviceusage-gen.go +++ b/serviceusage/v1/serviceusage-gen.go @@ -219,7 +219,7 @@ type AdminQuotaPolicy struct { // Dimensions: If this map is nonempty, then this policy applies only // to specific values for dimensions defined in the limit unit. For - // example, an policy on a limit with the unit `1/{project}/{region}` + // example, a policy on a limit with the unit `1/{project}/{region}` // could contain an entry with the key `region` and the value // `us-east-1`; the policy is only applied to quota consumed in that // region. This map has the following restrictions: * If `region` diff --git a/serviceusage/v1beta1/serviceusage-api.json b/serviceusage/v1beta1/serviceusage-api.json index 43c0ea8e3a3..76aaf8c13cf 100644 --- a/serviceusage/v1beta1/serviceusage-api.json +++ b/serviceusage/v1beta1/serviceusage-api.json @@ -281,7 +281,7 @@ ], "parameters": { "parent": { - "description": "Name of the consumer and service to generate an identity for. The `GenerateServiceIdentity` methods currently only support projects. An example name would be: `projects/123/services/example.googleapis.com` where `123` is the project number.", + "description": "Name of the consumer and service to generate an identity for. The `GenerateServiceIdentity` methods currently support projects, folders, organizations. Example parents would be: `projects/123/services/example.googleapis.com` `folders/123/services/example.googleapis.com` `organizations/123/services/example.googleapis.com`", "location": "path", "pattern": "^[^/]+/[^/]+/services/[^/]+$", "required": true, @@ -964,7 +964,7 @@ } } }, - "revision": "20230611", + "revision": "20230619", "rootUrl": "https://serviceusage.googleapis.com/", "schemas": { "AddEnableRulesMetadata": { @@ -1003,7 +1003,7 @@ "additionalProperties": { "type": "string" }, - "description": " If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit. For example, an policy on a limit with the unit `1/{project}/{region}` could contain an entry with the key `region` and the value `us-east-1`; the policy is only applied to quota consumed in that region. This map has the following restrictions: * If `region` appears as a key, its value must be a valid Cloud region. * If `zone` appears as a key, its value must be a valid Cloud zone. * Keys other than `region` or `zone` are not valid.", + "description": " If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit. For example, a policy on a limit with the unit `1/{project}/{region}` could contain an entry with the key `region` and the value `us-east-1`; the policy is only applied to quota consumed in that region. This map has the following restrictions: * If `region` appears as a key, its value must be a valid Cloud region. * If `zone` appears as a key, its value must be a valid Cloud zone. * Keys other than `region` or `zone` are not valid.", "type": "object" }, "metric": { diff --git a/serviceusage/v1beta1/serviceusage-gen.go b/serviceusage/v1beta1/serviceusage-gen.go index c318d752487..7240fcb86f7 100644 --- a/serviceusage/v1beta1/serviceusage-gen.go +++ b/serviceusage/v1beta1/serviceusage-gen.go @@ -267,7 +267,7 @@ type AdminQuotaPolicy struct { // Dimensions: If this map is nonempty, then this policy applies only // to specific values for dimensions defined in the limit unit. For - // example, an policy on a limit with the unit `1/{project}/{region}` + // example, a policy on a limit with the unit `1/{project}/{region}` // could contain an entry with the key `region` and the value // `us-east-1`; the policy is only applied to quota consumed in that // region. This map has the following restrictions: * If `region` @@ -6397,10 +6397,11 @@ type ServicesGenerateServiceIdentityCall struct { // GenerateServiceIdentity: Generates service identity for service. // // - parent: Name of the consumer and service to generate an identity -// for. The `GenerateServiceIdentity` methods currently only support -// projects. An example name would be: -// `projects/123/services/example.googleapis.com` where `123` is the -// project number. +// for. The `GenerateServiceIdentity` methods currently support +// projects, folders, organizations. Example parents would be: +// `projects/123/services/example.googleapis.com` +// `folders/123/services/example.googleapis.com` +// `organizations/123/services/example.googleapis.com`. func (r *ServicesService) GenerateServiceIdentity(parent string) *ServicesGenerateServiceIdentityCall { c := &ServicesGenerateServiceIdentityCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -6502,7 +6503,7 @@ func (c *ServicesGenerateServiceIdentityCall) Do(opts ...googleapi.CallOption) ( // ], // "parameters": { // "parent": { - // "description": "Name of the consumer and service to generate an identity for. The `GenerateServiceIdentity` methods currently only support projects. An example name would be: `projects/123/services/example.googleapis.com` where `123` is the project number.", + // "description": "Name of the consumer and service to generate an identity for. The `GenerateServiceIdentity` methods currently support projects, folders, organizations. Example parents would be: `projects/123/services/example.googleapis.com` `folders/123/services/example.googleapis.com` `organizations/123/services/example.googleapis.com`", // "location": "path", // "pattern": "^[^/]+/[^/]+/services/[^/]+$", // "required": true,