diff --git a/assuredworkloads/v1/assuredworkloads-api.json b/assuredworkloads/v1/assuredworkloads-api.json index 5057afec660..37437e94092 100644 --- a/assuredworkloads/v1/assuredworkloads-api.json +++ b/assuredworkloads/v1/assuredworkloads-api.json @@ -491,7 +491,7 @@ } } }, - "revision": "20221028", + "revision": "20221104", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest": { @@ -534,7 +534,8 @@ "CA_REGIONS_AND_SUPPORT", "ITAR", "AU_REGIONS_AND_US_SUPPORT", - "ASSURED_WORKLOADS_FOR_PARTNERS" + "ASSURED_WORKLOADS_FOR_PARTNERS", + "ISR_REGIONS" ], "enumDescriptions": [ "Unknown compliance regime.", @@ -549,7 +550,8 @@ "Assured Workloads For Canada Regions and Support controls", "International Traffic in Arms Regulations", "Assured Workloads for Australia Regions and Support controls Available for public preview consumption. Don't create production workloads.", - "Assured Workloads for Partners" + "Assured Workloads for Partners", + "Assured Workloads for Israel Regions" ], "type": "string" }, @@ -856,7 +858,8 @@ "CA_REGIONS_AND_SUPPORT", "ITAR", "AU_REGIONS_AND_US_SUPPORT", - "ASSURED_WORKLOADS_FOR_PARTNERS" + "ASSURED_WORKLOADS_FOR_PARTNERS", + "ISR_REGIONS" ], "enumDescriptions": [ "Unknown compliance regime.", @@ -871,7 +874,8 @@ "Assured Workloads For Canada Regions and Support controls", "International Traffic in Arms Regulations", "Assured Workloads for Australia Regions and Support controls Available for public preview consumption. Don't create production workloads.", - "Assured Workloads for Partners" + "Assured Workloads for Partners", + "Assured Workloads for Israel Regions" ], "type": "string" }, diff --git a/assuredworkloads/v1/assuredworkloads-gen.go b/assuredworkloads/v1/assuredworkloads-gen.go index e0765a5ade1..083bcf25b04 100644 --- a/assuredworkloads/v1/assuredworkloads-gen.go +++ b/assuredworkloads/v1/assuredworkloads-gen.go @@ -267,6 +267,7 @@ type GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata struct { // Regions and Support controls Available for public preview // consumption. Don't create production workloads. // "ASSURED_WORKLOADS_FOR_PARTNERS" - Assured Workloads for Partners + // "ISR_REGIONS" - Assured Workloads for Israel Regions ComplianceRegime string `json:"complianceRegime,omitempty"` // CreateTime: Optional. Time when the operation was created. @@ -726,6 +727,7 @@ type GoogleCloudAssuredworkloadsV1Workload struct { // Regions and Support controls Available for public preview // consumption. Don't create production workloads. // "ASSURED_WORKLOADS_FOR_PARTNERS" - Assured Workloads for Partners + // "ISR_REGIONS" - Assured Workloads for Israel Regions ComplianceRegime string `json:"complianceRegime,omitempty"` // ComplianceStatus: Output only. Count of active Violations in the diff --git a/assuredworkloads/v1beta1/assuredworkloads-api.json b/assuredworkloads/v1beta1/assuredworkloads-api.json index 5b6b3032ba8..92dacdb2c2b 100644 --- a/assuredworkloads/v1beta1/assuredworkloads-api.json +++ b/assuredworkloads/v1beta1/assuredworkloads-api.json @@ -595,7 +595,7 @@ } } }, - "revision": "20221028", + "revision": "20221104", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationRequest": { @@ -924,7 +924,8 @@ "CA_REGIONS_AND_SUPPORT", "ITAR", "AU_REGIONS_AND_US_SUPPORT", - "ASSURED_WORKLOADS_FOR_PARTNERS" + "ASSURED_WORKLOADS_FOR_PARTNERS", + "ISR_REGIONS" ], "enumDescriptions": [ "Unknown compliance regime.", @@ -939,7 +940,8 @@ "Assured Workloads For Canada Regions and Support controls", "International Traffic in Arms Regulations", "Assured Workloads for Australia Regions and Support controls Available for public preview consumption. Don't create production workloads.", - "Assured Workloads for Partners;" + "Assured Workloads for Partners;", + "Assured Workloads for Israel" ], "type": "string" }, diff --git a/assuredworkloads/v1beta1/assuredworkloads-gen.go b/assuredworkloads/v1beta1/assuredworkloads-gen.go index d437594870f..8b7e312b981 100644 --- a/assuredworkloads/v1beta1/assuredworkloads-gen.go +++ b/assuredworkloads/v1beta1/assuredworkloads-gen.go @@ -789,6 +789,7 @@ type GoogleCloudAssuredworkloadsV1beta1Workload struct { // Regions and Support controls Available for public preview // consumption. Don't create production workloads. // "ASSURED_WORKLOADS_FOR_PARTNERS" - Assured Workloads for Partners; + // "ISR_REGIONS" - Assured Workloads for Israel ComplianceRegime string `json:"complianceRegime,omitempty"` // ComplianceStatus: Output only. Count of active Violations in the diff --git a/cloudchannel/v1/cloudchannel-api.json b/cloudchannel/v1/cloudchannel-api.json index 0a40b2b97a9..861622430b5 100644 --- a/cloudchannel/v1/cloudchannel-api.json +++ b/cloudchannel/v1/cloudchannel-api.json @@ -4,6 +4,9 @@ "scopes": { "https://www.googleapis.com/auth/apps.order": { "description": "Manage users on your domain" + }, + "https://www.googleapis.com/auth/apps.reports.usage.readonly": { + "description": "View usage reports for your G Suite domain" } } } @@ -1681,6 +1684,111 @@ ] } } + }, + "reportJobs": { + "methods": { + "fetchReportResults": { + "description": "Retrieves data generated by CloudChannelReportsService.RunReportJob.", + "flatPath": "v1/accounts/{accountsId}/reportJobs/{reportJobsId}:fetchReportResults", + "httpMethod": "POST", + "id": "cloudchannel.accounts.reportJobs.fetchReportResults", + "parameterOrder": [ + "reportJob" + ], + "parameters": { + "reportJob": { + "description": "Required. The report job created by CloudChannelReportsService.RunReportJob. Report_job uses the format: accounts/{account_id}/reportJobs/{report_job_id}", + "location": "path", + "pattern": "^accounts/[^/]+/reportJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+reportJob}:fetchReportResults", + "request": { + "$ref": "GoogleCloudChannelV1FetchReportResultsRequest" + }, + "response": { + "$ref": "GoogleCloudChannelV1FetchReportResultsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/apps.reports.usage.readonly" + ] + } + } + }, + "reports": { + "methods": { + "list": { + "description": "Lists the reports that RunReportJob can run. These reports include an ID, a description, and the list of columns that will be in the result.", + "flatPath": "v1/accounts/{accountsId}/reports", + "httpMethod": "GET", + "id": "cloudchannel.accounts.reports.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "languageCode": { + "description": "Optional. The BCP-47 language code, such as \"en-US\". If specified, the response is localized to the corresponding language code if the original data sources support it. Default is \"en-US\".", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size of the report. The server might return fewer results than requested. If unspecified, returns 20 reports. The maximum value is 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token that specifies a page of results beyond the first page. Obtained through ListReportsResponse.next_page_token of the previous CloudChannelReportsService.ListReports call.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the partner account to list available reports for. Parent uses the format: accounts/{account_id}", + "location": "path", + "pattern": "^accounts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/reports", + "response": { + "$ref": "GoogleCloudChannelV1ListReportsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/apps.reports.usage.readonly" + ] + }, + "run": { + "description": "Begins generation of data for a given report. The report identifier is a UID (for example, `613bf59q`). Possible error codes: * PERMISSION_DENIED: The user doesn't have access to this report. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The report identifier was not found. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata contains an instance of OperationMetadata. To get the results of report generation, call CloudChannelReportsService.FetchReportResults with the RunReportJobResponse.report_job.", + "flatPath": "v1/accounts/{accountsId}/reports/{reportsId}:run", + "httpMethod": "POST", + "id": "cloudchannel.accounts.reports.run", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The report's resource name. Specifies the account and report used to generate report data. The report_id identifier is a UID (for example, `613bf59q`). Name uses the format: accounts/{account_id}/reports/{report_id}", + "location": "path", + "pattern": "^accounts/[^/]+/reports/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:run", + "request": { + "$ref": "GoogleCloudChannelV1RunReportJobRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/apps.reports.usage.readonly" + ] + } + } } } }, @@ -1901,7 +2009,7 @@ } } }, - "revision": "20221023", + "revision": "20221106", "rootUrl": "https://cloudchannel.googleapis.com/", "schemas": { "GoogleCloudChannelV1ActivateEntitlementRequest": { @@ -2202,6 +2310,43 @@ }, "type": "object" }, + "GoogleCloudChannelV1Column": { + "description": "The definition of a report column. Specifies the data properties in the corresponding position of the report rows.", + "id": "GoogleCloudChannelV1Column", + "properties": { + "columnId": { + "description": "The unique name of the column (for example, customer_domain, channel_partner, customer_cost). You can use column IDs in RunReportJobRequest.filter. To see all reports and their columns, call CloudChannelReportsService.ListReports.", + "type": "string" + }, + "dataType": { + "description": "The type of the values for this column.", + "enum": [ + "DATA_TYPE_UNSPECIFIED", + "STRING", + "INT", + "DECIMAL", + "MONEY", + "DATE", + "DATE_TIME" + ], + "enumDescriptions": [ + "Not used.", + "ReportValues for this column will use string_value.", + "ReportValues for this column will use int_value.", + "ReportValues for this column will use decimal_value.", + "ReportValues for this column will use money_value.", + "ReportValues for this column will use date_value.", + "ReportValues for this column will use date_time_value." + ], + "type": "string" + }, + "displayName": { + "description": "The column's display name.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudChannelV1CommitmentSettings": { "description": "Commitment settings for commitment-based offers.", "id": "GoogleCloudChannelV1CommitmentSettings", @@ -2442,6 +2587,29 @@ }, "type": "object" }, + "GoogleCloudChannelV1DateRange": { + "description": "A representation of usage or invoice date ranges.", + "id": "GoogleCloudChannelV1DateRange", + "properties": { + "invoiceEndDate": { + "$ref": "GoogleTypeDate", + "description": "The latest invoice date (exclusive). If your product uses monthly invoices, and this value is not the beginning of a month, this will adjust the date to the first day of the following month." + }, + "invoiceStartDate": { + "$ref": "GoogleTypeDate", + "description": "The earliest invoice date (inclusive). If your product uses monthly invoices, and this value is not the beginning of a month, this will adjust the date to the first day of the given month." + }, + "usageEndDateTime": { + "$ref": "GoogleTypeDateTime", + "description": "The latest usage date time (exclusive). If you use time groupings (daily, weekly, etc), each group uses midnight to midnight (Pacific time). The usage end date is rounded down to include all usage from the specified date. We recommend that clients pass `usage_start_date_time` in Pacific time." + }, + "usageStartDateTime": { + "$ref": "GoogleTypeDateTime", + "description": "The earliest usage date time (inclusive). If you use time groupings (daily, weekly, etc), each group uses midnight to midnight (Pacific time). The usage start date is rounded down to include all usage from the specified date. We recommend that clients pass `usage_start_date_time` in Pacific time." + } + }, + "type": "object" + }, "GoogleCloudChannelV1EduData": { "description": "Required Edu Attributes", "id": "GoogleCloudChannelV1EduData", @@ -2632,6 +2800,44 @@ }, "type": "object" }, + "GoogleCloudChannelV1FetchReportResultsRequest": { + "description": "Request message for CloudChannelReportsService.FetchReportResults.", + "id": "GoogleCloudChannelV1FetchReportResultsRequest", + "properties": { + "pageSize": { + "description": "Optional. Requested page size of the report. The server may return fewer results than requested. If you don't specify a page size, the server uses a sensible default (may change over time). The maximum value is 30,000; the server will change larger values to 30,000.", + "format": "int32", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token that specifies a page of results beyond the first page. Obtained through FetchReportResultsResponse.next_page_token of the previous CloudChannelReportsService.FetchReportResults call.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudChannelV1FetchReportResultsResponse": { + "description": "Response message for CloudChannelReportsService.FetchReportResults. Contains a tabular representation of the report results.", + "id": "GoogleCloudChannelV1FetchReportResultsResponse", + "properties": { + "nextPageToken": { + "description": "Pass this token to FetchReportResultsRequest.page_token to retrieve the next page of results.", + "type": "string" + }, + "reportMetadata": { + "$ref": "GoogleCloudChannelV1ReportResultsMetadata", + "description": "The metadata for the report results (display name, columns, row count, and date ranges)." + }, + "rows": { + "description": "The report's lists of values. Each row follows the settings and ordering of the columns from `report_metadata`.", + "items": { + "$ref": "GoogleCloudChannelV1Row" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudChannelV1ImportCustomerRequest": { "description": "Request message for CloudChannelService.ImportCustomer", "id": "GoogleCloudChannelV1ImportCustomerRequest", @@ -2825,6 +3031,24 @@ }, "type": "object" }, + "GoogleCloudChannelV1ListReportsResponse": { + "description": "Response message for CloudChannelReportsService.ListReports.", + "id": "GoogleCloudChannelV1ListReportsResponse", + "properties": { + "nextPageToken": { + "description": "Pass this token to FetchReportResultsRequest.page_token to retrieve the next page of results.", + "type": "string" + }, + "reports": { + "description": "The reports available to the partner.", + "items": { + "$ref": "GoogleCloudChannelV1Report" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudChannelV1ListSkusResponse": { "description": "Response message for ListSkus.", "id": "GoogleCloudChannelV1ListSkusResponse", @@ -3019,6 +3243,10 @@ "$ref": "GoogleCloudChannelV1Constraints", "description": "Constraints on transacting the Offer." }, + "dealCode": { + "description": "The deal code of the offer to get a special promotion or discount.", + "type": "string" + }, "endTime": { "description": "Output only. End of the Offer validity time.", "format": "google-datetime", @@ -3530,6 +3758,138 @@ }, "type": "object" }, + "GoogleCloudChannelV1Report": { + "description": "The ID and description of a report that was used to generate report data. For example, \"GCP Daily Spend\", \"Google Workspace License Activity\", etc.", + "id": "GoogleCloudChannelV1Report", + "properties": { + "columns": { + "description": "The list of columns included in the report. This defines the schema of the report results.", + "items": { + "$ref": "GoogleCloudChannelV1Column" + }, + "type": "array" + }, + "description": { + "description": "A description of other aspects of the report, such as the products it supports.", + "type": "string" + }, + "displayName": { + "description": "A human-readable name for this report.", + "type": "string" + }, + "name": { + "description": "Required. The report's resource name. Specifies the account and report used to generate report data. The report_id identifier is a UID (for example, `613bf59q`). Name uses the format: accounts/{account_id}/reports/{report_id}", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudChannelV1ReportJob": { + "description": "The result of a RunReportJob operation. Contains the name to use in FetchReportResultsRequest.report_job and the status of the operation.", + "id": "GoogleCloudChannelV1ReportJob", + "properties": { + "name": { + "description": "Required. The resource name of a report job. Name uses the format: `accounts/{account_id}/reportJobs/{report_job_id}`", + "type": "string" + }, + "reportStatus": { + "$ref": "GoogleCloudChannelV1ReportStatus", + "description": "The current status of report generation." + } + }, + "type": "object" + }, + "GoogleCloudChannelV1ReportResultsMetadata": { + "description": "The features describing the data. Returned by CloudChannelReportsService.RunReportJob and CloudChannelReportsService.FetchReportResults.", + "id": "GoogleCloudChannelV1ReportResultsMetadata", + "properties": { + "dateRange": { + "$ref": "GoogleCloudChannelV1DateRange", + "description": "The date range of reported usage." + }, + "precedingDateRange": { + "$ref": "GoogleCloudChannelV1DateRange", + "description": "The usage dates immediately preceding `date_range` with the same duration. Use this to calculate trending usage and costs. This is only populated if you request trending data. For example, if `date_range` is July 1-15, `preceding_date_range` will be June 16-30." + }, + "report": { + "$ref": "GoogleCloudChannelV1Report", + "description": "Details of the completed report." + }, + "rowCount": { + "description": "The total number of rows of data in the final report.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudChannelV1ReportStatus": { + "description": "Status of a report generation process.", + "id": "GoogleCloudChannelV1ReportStatus", + "properties": { + "endTime": { + "description": "The report generation's completion time.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "The report generation's start time.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "description": "The current state of the report generation process.", + "enum": [ + "STATE_UNSPECIFIED", + "STARTED", + "WRITING", + "AVAILABLE", + "FAILED" + ], + "enumDescriptions": [ + "Not used.", + "Report processing started.", + "Data generated from the report is being staged.", + "Report data is available for access.", + "Report failed." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudChannelV1ReportValue": { + "description": "A single report value.", + "id": "GoogleCloudChannelV1ReportValue", + "properties": { + "dateTimeValue": { + "$ref": "GoogleTypeDateTime", + "description": "A value of type `google.type.DateTime` (year, month, day, hour, minute, second, and UTC offset or timezone.)" + }, + "dateValue": { + "$ref": "GoogleTypeDate", + "description": "A value of type `google.type.Date` (year, month, day)." + }, + "decimalValue": { + "$ref": "GoogleTypeDecimal", + "description": "A value of type `google.type.Decimal`, representing non-integer numeric values." + }, + "intValue": { + "description": "A value of type `int`.", + "format": "int64", + "type": "string" + }, + "moneyValue": { + "$ref": "GoogleTypeMoney", + "description": "A value of type `google.type.Money` (currency code, whole units, decimal units)." + }, + "stringValue": { + "description": "A value of type `string`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudChannelV1RepricingAdjustment": { "description": "A type that represents the various adjustments you can apply to a bill.", "id": "GoogleCloudChannelV1RepricingAdjustment", @@ -3595,6 +3955,54 @@ }, "type": "object" }, + "GoogleCloudChannelV1Row": { + "description": "A row of report values.", + "id": "GoogleCloudChannelV1Row", + "properties": { + "values": { + "description": "The list of values in the row.", + "items": { + "$ref": "GoogleCloudChannelV1ReportValue" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudChannelV1RunReportJobRequest": { + "description": "Request message for CloudChannelReportsService.RunReportJob.", + "id": "GoogleCloudChannelV1RunReportJobRequest", + "properties": { + "dateRange": { + "$ref": "GoogleCloudChannelV1DateRange", + "description": "Optional. The range of usage or invoice dates to include in the result." + }, + "filter": { + "description": "Optional. A structured string that defines conditions on dimension columns to restrict the report output. Filters support logical operators (AND, OR, NOT) and conditional operators (=, !=, \u003c, \u003e, \u003c=, and \u003e=) using `column_id` as keys. For example: `(customer:\"accounts/C123abc/customers/S456def\" OR customer:\"accounts/C123abc/customers/S789ghi\") AND invoice_start_date.year \u003e= 2022`", + "type": "string" + }, + "languageCode": { + "description": "Optional. The BCP-47 language code, such as \"en-US\". If specified, the response is localized to the corresponding language code if the original data sources support it. Default is \"en-US\".", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudChannelV1RunReportJobResponse": { + "description": "Response message for CloudChannelReportsService.RunReportJob.", + "id": "GoogleCloudChannelV1RunReportJobResponse", + "properties": { + "reportJob": { + "$ref": "GoogleCloudChannelV1ReportJob", + "description": "Pass `report_job.name` to FetchReportResultsRequest.report_job to retrieve the report's results." + }, + "reportMetadata": { + "$ref": "GoogleCloudChannelV1ReportResultsMetadata", + "description": "The metadata for the report's results (display name, columns, row count, and date range). If you view this before the operation finishes, you may see incomplete data." + } + }, + "type": "object" + }, "GoogleCloudChannelV1Sku": { "description": "Represents a product's purchasable Stock Keeping Unit (SKU). SKUs represent the different variations of the product. For example, Google Workspace Business Standard and Google Workspace Business Plus are Google Workspace product SKUs.", "id": "GoogleCloudChannelV1Sku", @@ -3889,6 +4297,43 @@ }, "type": "object" }, + "GoogleCloudChannelV1alpha1Column": { + "description": "The definition of a report column. Specifies the data properties in the corresponding position of the report rows.", + "id": "GoogleCloudChannelV1alpha1Column", + "properties": { + "columnId": { + "description": "The unique name of the column (for example, customer_domain, channel_partner, customer_cost). You can use column IDs in RunReportJobRequest.filter. To see all reports and their columns, call CloudChannelReportsService.ListReports.", + "type": "string" + }, + "dataType": { + "description": "The type of the values for this column.", + "enum": [ + "DATA_TYPE_UNSPECIFIED", + "STRING", + "INT", + "DECIMAL", + "MONEY", + "DATE", + "DATE_TIME" + ], + "enumDescriptions": [ + "Not used.", + "ReportValues for this column will use string_value.", + "ReportValues for this column will use int_value.", + "ReportValues for this column will use decimal_value.", + "ReportValues for this column will use money_value.", + "ReportValues for this column will use date_value.", + "ReportValues for this column will use date_time_value." + ], + "type": "string" + }, + "displayName": { + "description": "The column's display name.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudChannelV1alpha1CommitmentSettings": { "description": "Commitment settings for commitment-based offers.", "id": "GoogleCloudChannelV1alpha1CommitmentSettings", @@ -3937,6 +4382,29 @@ }, "type": "object" }, + "GoogleCloudChannelV1alpha1DateRange": { + "description": "A representation of usage or invoice date ranges.", + "id": "GoogleCloudChannelV1alpha1DateRange", + "properties": { + "invoiceEndDate": { + "$ref": "GoogleTypeDate", + "description": "The latest invoice date (exclusive). If your product uses monthly invoices, and this value is not the beginning of a month, this will adjust the date to the first day of the following month." + }, + "invoiceStartDate": { + "$ref": "GoogleTypeDate", + "description": "The earliest invoice date (inclusive). If your product uses monthly invoices, and this value is not the beginning of a month, this will adjust the date to the first day of the given month." + }, + "usageEndDateTime": { + "$ref": "GoogleTypeDateTime", + "description": "The latest usage date time (exclusive). If you use time groupings (daily, weekly, etc), each group uses midnight to midnight (Pacific time). The usage end date is rounded down to include all usage from the specified date. We recommend that clients pass `usage_start_date_time` in Pacific time." + }, + "usageStartDateTime": { + "$ref": "GoogleTypeDateTime", + "description": "The earliest usage date time (inclusive). If you use time groupings (daily, weekly, etc), each group uses midnight to midnight (Pacific time). The usage start date is rounded down to include all usage from the specified date. We recommend that clients pass `usage_start_date_time` in Pacific time." + } + }, + "type": "object" + }, "GoogleCloudChannelV1alpha1Entitlement": { "description": "An entitlement is a representation of a customer's ability to use a service.", "id": "GoogleCloudChannelV1alpha1Entitlement", @@ -4275,6 +4743,121 @@ }, "type": "object" }, + "GoogleCloudChannelV1alpha1Report": { + "description": "The ID and description of a report that was used to generate report data. For example, \"GCP Daily Spend\", \"Google Workspace License Activity\", etc.", + "id": "GoogleCloudChannelV1alpha1Report", + "properties": { + "columns": { + "description": "The list of columns included in the report. This defines the schema of the report results.", + "items": { + "$ref": "GoogleCloudChannelV1alpha1Column" + }, + "type": "array" + }, + "description": { + "description": "A description of other aspects of the report, such as the products it supports.", + "type": "string" + }, + "displayName": { + "description": "A human-readable name for this report.", + "type": "string" + }, + "name": { + "description": "Required. The report's resource name. Specifies the account and report used to generate report data. The report_id identifier is a UID (for example, `613bf59q`). Name uses the format: accounts/{account_id}/reports/{report_id}", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudChannelV1alpha1ReportJob": { + "description": "The result of a RunReportJob operation. Contains the name to use in FetchReportResultsRequest.report_job and the status of the operation.", + "id": "GoogleCloudChannelV1alpha1ReportJob", + "properties": { + "name": { + "description": "Required. The resource name of a report job. Name uses the format: `accounts/{account_id}/reportJobs/{report_job_id}`", + "type": "string" + }, + "reportStatus": { + "$ref": "GoogleCloudChannelV1alpha1ReportStatus", + "description": "The current status of report generation." + } + }, + "type": "object" + }, + "GoogleCloudChannelV1alpha1ReportResultsMetadata": { + "description": "The features describing the data. Returned by CloudChannelReportsService.RunReportJob and CloudChannelReportsService.FetchReportResults.", + "id": "GoogleCloudChannelV1alpha1ReportResultsMetadata", + "properties": { + "dateRange": { + "$ref": "GoogleCloudChannelV1alpha1DateRange", + "description": "The date range of reported usage." + }, + "precedingDateRange": { + "$ref": "GoogleCloudChannelV1alpha1DateRange", + "description": "The usage dates immediately preceding `date_range` with the same duration. Use this to calculate trending usage and costs. This is only populated if you request trending data. For example, if `date_range` is July 1-15, `preceding_date_range` will be June 16-30." + }, + "report": { + "$ref": "GoogleCloudChannelV1alpha1Report", + "description": "Details of the completed report." + }, + "rowCount": { + "description": "The total number of rows of data in the final report.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudChannelV1alpha1ReportStatus": { + "description": "Status of a report generation process.", + "id": "GoogleCloudChannelV1alpha1ReportStatus", + "properties": { + "endTime": { + "description": "The report generation's completion time.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "The report generation's start time.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "description": "The current state of the report generation process.", + "enum": [ + "STATE_UNSPECIFIED", + "STARTED", + "WRITING", + "AVAILABLE", + "FAILED" + ], + "enumDescriptions": [ + "Not used.", + "Report processing started.", + "Data generated from the report is being staged.", + "Report data is available for access.", + "Report failed." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudChannelV1alpha1RunReportJobResponse": { + "description": "Response message for CloudChannelReportsService.RunReportJob.", + "id": "GoogleCloudChannelV1alpha1RunReportJobResponse", + "properties": { + "reportJob": { + "$ref": "GoogleCloudChannelV1alpha1ReportJob", + "description": "Pass `report_job.name` to FetchReportResultsRequest.report_job to retrieve the report's results." + }, + "reportMetadata": { + "$ref": "GoogleCloudChannelV1alpha1ReportResultsMetadata", + "description": "The metadata for the report's results (display name, columns, row count, and date range). If you view this before the operation finishes, you may see incomplete data." + } + }, + "type": "object" + }, "GoogleCloudChannelV1alpha1SubscriberEvent": { "description": "Represents information which resellers will get as part of notification from Pub/Sub.", "id": "GoogleCloudChannelV1alpha1SubscriberEvent", @@ -4471,6 +5054,57 @@ }, "type": "object" }, + "GoogleTypeDateTime": { + "description": "Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user's timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application's limitations.", + "id": "GoogleTypeDateTime", + "properties": { + "day": { + "description": "Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.", + "format": "int32", + "type": "integer" + }, + "hours": { + "description": "Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", + "format": "int32", + "type": "integer" + }, + "minutes": { + "description": "Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.", + "format": "int32", + "type": "integer" + }, + "month": { + "description": "Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.", + "format": "int32", + "type": "integer" + }, + "nanos": { + "description": "Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.", + "format": "int32", + "type": "integer" + }, + "seconds": { + "description": "Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.", + "format": "int32", + "type": "integer" + }, + "timeZone": { + "$ref": "GoogleTypeTimeZone", + "description": "Time zone." + }, + "utcOffset": { + "description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.", + "format": "google-duration", + "type": "string" + }, + "year": { + "description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleTypeDecimal": { "description": "A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal. [BigDecimal]: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html [decimal.Decimal]: https://docs.python.org/3/library/decimal.html", "id": "GoogleTypeDecimal", @@ -4560,6 +5194,21 @@ } }, "type": "object" + }, + "GoogleTypeTimeZone": { + "description": "Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones).", + "id": "GoogleTypeTimeZone", + "properties": { + "id": { + "description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", + "type": "string" + }, + "version": { + "description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/cloudchannel/v1/cloudchannel-gen.go b/cloudchannel/v1/cloudchannel-gen.go index 5ea6dbf4384..bb5cd527fe2 100644 --- a/cloudchannel/v1/cloudchannel-gen.go +++ b/cloudchannel/v1/cloudchannel-gen.go @@ -23,6 +23,10 @@ // // # Other authentication options // +// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// +// cloudchannelService, err := cloudchannel.NewService(ctx, option.WithScopes(cloudchannel.AppsReportsUsageReadonlyScope)) +// // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: // // cloudchannelService, err := cloudchannel.NewService(ctx, option.WithAPIKey("AIza...")) @@ -82,12 +86,16 @@ const mtlsBasePath = "https://cloudchannel.mtls.googleapis.com/" const ( // Manage users on your domain AppsOrderScope = "https://www.googleapis.com/auth/apps.order" + + // View usage reports for your G Suite domain + AppsReportsUsageReadonlyScope = "https://www.googleapis.com/auth/apps.reports.usage.readonly" ) // NewService creates a new Service. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { scopesOption := internaloption.WithDefaultScopes( "https://www.googleapis.com/auth/apps.order", + "https://www.googleapis.com/auth/apps.reports.usage.readonly", ) // NOTE: prepend, so we don't override user-specified scopes. opts = append([]option.ClientOption{scopesOption}, opts...) @@ -147,6 +155,8 @@ func NewAccountsService(s *Service) *AccountsService { rs.ChannelPartnerLinks = NewAccountsChannelPartnerLinksService(s) rs.Customers = NewAccountsCustomersService(s) rs.Offers = NewAccountsOffersService(s) + rs.ReportJobs = NewAccountsReportJobsService(s) + rs.Reports = NewAccountsReportsService(s) return rs } @@ -158,6 +168,10 @@ type AccountsService struct { Customers *AccountsCustomersService Offers *AccountsOffersService + + ReportJobs *AccountsReportJobsService + + Reports *AccountsReportsService } func NewAccountsChannelPartnerLinksService(s *Service) *AccountsChannelPartnerLinksService { @@ -235,6 +249,24 @@ type AccountsOffersService struct { s *Service } +func NewAccountsReportJobsService(s *Service) *AccountsReportJobsService { + rs := &AccountsReportJobsService{s: s} + return rs +} + +type AccountsReportJobsService struct { + s *Service +} + +func NewAccountsReportsService(s *Service) *AccountsReportsService { + rs := &AccountsReportsService{s: s} + return rs +} + +type AccountsReportsService struct { + s *Service +} + func NewOperationsService(s *Service) *OperationsService { rs := &OperationsService{s: s} return rs @@ -841,6 +873,55 @@ func (s *GoogleCloudChannelV1CloudIdentityInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudChannelV1Column: The definition of a report column. +// Specifies the data properties in the corresponding position of the +// report rows. +type GoogleCloudChannelV1Column struct { + // ColumnId: The unique name of the column (for example, + // customer_domain, channel_partner, customer_cost). You can use column + // IDs in RunReportJobRequest.filter. To see all reports and their + // columns, call CloudChannelReportsService.ListReports. + ColumnId string `json:"columnId,omitempty"` + + // DataType: The type of the values for this column. + // + // Possible values: + // "DATA_TYPE_UNSPECIFIED" - Not used. + // "STRING" - ReportValues for this column will use string_value. + // "INT" - ReportValues for this column will use int_value. + // "DECIMAL" - ReportValues for this column will use decimal_value. + // "MONEY" - ReportValues for this column will use money_value. + // "DATE" - ReportValues for this column will use date_value. + // "DATE_TIME" - ReportValues for this column will use + // date_time_value. + DataType string `json:"dataType,omitempty"` + + // DisplayName: The column's display name. + DisplayName string `json:"displayName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ColumnId") 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. "ColumnId") 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 *GoogleCloudChannelV1Column) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1Column + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudChannelV1CommitmentSettings: Commitment settings for // commitment-based offers. type GoogleCloudChannelV1CommitmentSettings struct { @@ -1222,6 +1303,59 @@ func (s *GoogleCloudChannelV1CustomerRepricingConfig) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudChannelV1DateRange: A representation of usage or invoice +// date ranges. +type GoogleCloudChannelV1DateRange struct { + // InvoiceEndDate: The latest invoice date (exclusive). If your product + // uses monthly invoices, and this value is not the beginning of a + // month, this will adjust the date to the first day of the following + // month. + InvoiceEndDate *GoogleTypeDate `json:"invoiceEndDate,omitempty"` + + // InvoiceStartDate: The earliest invoice date (inclusive). If your + // product uses monthly invoices, and this value is not the beginning of + // a month, this will adjust the date to the first day of the given + // month. + InvoiceStartDate *GoogleTypeDate `json:"invoiceStartDate,omitempty"` + + // UsageEndDateTime: The latest usage date time (exclusive). If you use + // time groupings (daily, weekly, etc), each group uses midnight to + // midnight (Pacific time). The usage end date is rounded down to + // include all usage from the specified date. We recommend that clients + // pass `usage_start_date_time` in Pacific time. + UsageEndDateTime *GoogleTypeDateTime `json:"usageEndDateTime,omitempty"` + + // UsageStartDateTime: The earliest usage date time (inclusive). If you + // use time groupings (daily, weekly, etc), each group uses midnight to + // midnight (Pacific time). The usage start date is rounded down to + // include all usage from the specified date. We recommend that clients + // pass `usage_start_date_time` in Pacific time. + UsageStartDateTime *GoogleTypeDateTime `json:"usageStartDateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InvoiceEndDate") 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. "InvoiceEndDate") 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 *GoogleCloudChannelV1DateRange) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1DateRange + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudChannelV1EduData: Required Edu Attributes type GoogleCloudChannelV1EduData struct { // InstituteSize: Size of the institute. @@ -1432,6 +1566,89 @@ func (s *GoogleCloudChannelV1EntitlementEvent) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudChannelV1FetchReportResultsRequest: Request message for +// CloudChannelReportsService.FetchReportResults. +type GoogleCloudChannelV1FetchReportResultsRequest struct { + // PageSize: Optional. Requested page size of the report. The server may + // return fewer results than requested. If you don't specify a page + // size, the server uses a sensible default (may change over time). The + // maximum value is 30,000; the server will change larger values to + // 30,000. + PageSize int64 `json:"pageSize,omitempty"` + + // PageToken: Optional. A token that specifies a page of results beyond + // the first page. Obtained through + // FetchReportResultsResponse.next_page_token of the previous + // CloudChannelReportsService.FetchReportResults call. + PageToken string `json:"pageToken,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PageSize") 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. "PageSize") 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 *GoogleCloudChannelV1FetchReportResultsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1FetchReportResultsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudChannelV1FetchReportResultsResponse: Response message for +// CloudChannelReportsService.FetchReportResults. Contains a tabular +// representation of the report results. +type GoogleCloudChannelV1FetchReportResultsResponse struct { + // NextPageToken: Pass this token to + // FetchReportResultsRequest.page_token to retrieve the next page of + // results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ReportMetadata: The metadata for the report results (display name, + // columns, row count, and date ranges). + ReportMetadata *GoogleCloudChannelV1ReportResultsMetadata `json:"reportMetadata,omitempty"` + + // Rows: The report's lists of values. Each row follows the settings and + // ordering of the columns from `report_metadata`. + Rows []*GoogleCloudChannelV1Row `json:"rows,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") 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. "NextPageToken") 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 *GoogleCloudChannelV1FetchReportResultsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1FetchReportResultsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudChannelV1ImportCustomerRequest: Request message for // CloudChannelService.ImportCustomer type GoogleCloudChannelV1ImportCustomerRequest struct { @@ -1825,6 +2042,44 @@ func (s *GoogleCloudChannelV1ListPurchasableSkusResponse) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudChannelV1ListReportsResponse: Response message for +// CloudChannelReportsService.ListReports. +type GoogleCloudChannelV1ListReportsResponse struct { + // NextPageToken: Pass this token to + // FetchReportResultsRequest.page_token to retrieve the next page of + // results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Reports: The reports available to the partner. + Reports []*GoogleCloudChannelV1Report `json:"reports,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") 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. "NextPageToken") 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 *GoogleCloudChannelV1ListReportsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1ListReportsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudChannelV1ListSkusResponse: Response message for ListSkus. type GoogleCloudChannelV1ListSkusResponse struct { // NextPageToken: A token to retrieve the next page of results. @@ -2167,6 +2422,10 @@ type GoogleCloudChannelV1Offer struct { // Constraints: Constraints on transacting the Offer. Constraints *GoogleCloudChannelV1Constraints `json:"constraints,omitempty"` + // DealCode: The deal code of the offer to get a special promotion or + // discount. + DealCode string `json:"dealCode,omitempty"` + // EndTime: Output only. End of the Offer validity time. EndTime string `json:"endTime,omitempty"` @@ -2972,72 +3231,28 @@ func (s *GoogleCloudChannelV1RenewalSettings) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudChannelV1RepricingAdjustment: A type that represents the -// various adjustments you can apply to a bill. -type GoogleCloudChannelV1RepricingAdjustment struct { - // PercentageAdjustment: Flat markup or markdown on an entire bill. - PercentageAdjustment *GoogleCloudChannelV1PercentageAdjustment `json:"percentageAdjustment,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "PercentageAdjustment") 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. "PercentageAdjustment") 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 *GoogleCloudChannelV1RepricingAdjustment) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudChannelV1RepricingAdjustment - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudChannelV1RepricingConfig: Configuration for repricing a -// Google bill over a period of time. -type GoogleCloudChannelV1RepricingConfig struct { - // Adjustment: Required. Information about the adjustment. - Adjustment *GoogleCloudChannelV1RepricingAdjustment `json:"adjustment,omitempty"` - - // ChannelPartnerGranularity: Applies the repricing configuration at the - // channel partner level. This is the only supported value for - // ChannelPartnerRepricingConfig. - ChannelPartnerGranularity *GoogleCloudChannelV1RepricingConfigChannelPartnerGranularity `json:"channelPartnerGranularity,omitempty"` +// GoogleCloudChannelV1Report: The ID and description of a report that +// was used to generate report data. For example, "GCP Daily Spend", +// "Google Workspace License Activity", etc. +type GoogleCloudChannelV1Report struct { + // Columns: The list of columns included in the report. This defines the + // schema of the report results. + Columns []*GoogleCloudChannelV1Column `json:"columns,omitempty"` - // EffectiveInvoiceMonth: Required. The YearMonth when these adjustments - // activate. The Day field needs to be "0" since we only accept - // YearMonth repricing boundaries. - EffectiveInvoiceMonth *GoogleTypeDate `json:"effectiveInvoiceMonth,omitempty"` + // Description: A description of other aspects of the report, such as + // the products it supports. + Description string `json:"description,omitempty"` - // EntitlementGranularity: Applies the repricing configuration at the - // entitlement level. This is the only supported value for - // CustomerRepricingConfig. - EntitlementGranularity *GoogleCloudChannelV1RepricingConfigEntitlementGranularity `json:"entitlementGranularity,omitempty"` + // DisplayName: A human-readable name for this report. + DisplayName string `json:"displayName,omitempty"` - // RebillingBasis: Required. The RebillingBasis to use for this bill. - // Specifies the relative cost based on repricing costs you will apply. - // - // Possible values: - // "REBILLING_BASIS_UNSPECIFIED" - Not used. - // "COST_AT_LIST" - Use the list cost, also known as the MSRP. - // "DIRECT_CUSTOMER_COST" - Pass through all discounts except the - // Reseller Program Discount. If this is the default cost base and no - // adjustments are specified, the output cost will be exactly what the - // customer would see if they viewed the bill in the Google Cloud - // Console. - RebillingBasis string `json:"rebillingBasis,omitempty"` + // Name: Required. The report's resource name. Specifies the account and + // report used to generate report data. The report_id identifier is a + // UID (for example, `613bf59q`). Name uses the format: + // accounts/{account_id}/reports/{report_id} + Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Adjustment") to + // ForceSendFields is a list of field names (e.g. "Columns") 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 @@ -3045,7 +3260,7 @@ type GoogleCloudChannelV1RepricingConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Adjustment") to include in + // NullFields is a list of field names (e.g. "Columns") 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 @@ -3054,28 +3269,24 @@ type GoogleCloudChannelV1RepricingConfig struct { NullFields []string `json:"-"` } -func (s *GoogleCloudChannelV1RepricingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudChannelV1RepricingConfig +func (s *GoogleCloudChannelV1Report) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1Report raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudChannelV1RepricingConfigChannelPartnerGranularity: Applies -// the repricing configuration at the channel partner level. The channel -// partner value is derived from the resource name. Takes an empty json -// object. -type GoogleCloudChannelV1RepricingConfigChannelPartnerGranularity struct { -} +// GoogleCloudChannelV1ReportJob: The result of a RunReportJob +// operation. Contains the name to use in +// FetchReportResultsRequest.report_job and the status of the operation. +type GoogleCloudChannelV1ReportJob struct { + // Name: Required. The resource name of a report job. Name uses the + // format: `accounts/{account_id}/reportJobs/{report_job_id}` + Name string `json:"name,omitempty"` -// GoogleCloudChannelV1RepricingConfigEntitlementGranularity: Applies -// the repricing configuration at the entitlement level. -type GoogleCloudChannelV1RepricingConfigEntitlementGranularity struct { - // Entitlement: Resource name of the entitlement. Format: - // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlemen - // t_id} - Entitlement string `json:"entitlement,omitempty"` + // ReportStatus: The current status of report generation. + ReportStatus *GoogleCloudChannelV1ReportStatus `json:"reportStatus,omitempty"` - // ForceSendFields is a list of field names (e.g. "Entitlement") to + // ForceSendFields is a list of field names (e.g. "Name") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3083,37 +3294,42 @@ type GoogleCloudChannelV1RepricingConfigEntitlementGranularity struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entitlement") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudChannelV1RepricingConfigEntitlementGranularity) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudChannelV1RepricingConfigEntitlementGranularity +func (s *GoogleCloudChannelV1ReportJob) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1ReportJob raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudChannelV1Sku: Represents a product's purchasable Stock -// Keeping Unit (SKU). SKUs represent the different variations of the -// product. For example, Google Workspace Business Standard and Google -// Workspace Business Plus are Google Workspace product SKUs. -type GoogleCloudChannelV1Sku struct { - // MarketingInfo: Marketing information for the SKU. - MarketingInfo *GoogleCloudChannelV1MarketingInfo `json:"marketingInfo,omitempty"` +// GoogleCloudChannelV1ReportResultsMetadata: The features describing +// the data. Returned by CloudChannelReportsService.RunReportJob and +// CloudChannelReportsService.FetchReportResults. +type GoogleCloudChannelV1ReportResultsMetadata struct { + // DateRange: The date range of reported usage. + DateRange *GoogleCloudChannelV1DateRange `json:"dateRange,omitempty"` - // Name: Resource Name of the SKU. Format: - // products/{product_id}/skus/{sku_id} - Name string `json:"name,omitempty"` + // PrecedingDateRange: The usage dates immediately preceding + // `date_range` with the same duration. Use this to calculate trending + // usage and costs. This is only populated if you request trending data. + // For example, if `date_range` is July 1-15, `preceding_date_range` + // will be June 16-30. + PrecedingDateRange *GoogleCloudChannelV1DateRange `json:"precedingDateRange,omitempty"` - // Product: Product the SKU is associated with. - Product *GoogleCloudChannelV1Product `json:"product,omitempty"` + // Report: Details of the completed report. + Report *GoogleCloudChannelV1Report `json:"report,omitempty"` - // ForceSendFields is a list of field names (e.g. "MarketingInfo") to + // RowCount: The total number of rows of data in the final report. + RowCount int64 `json:"rowCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "DateRange") 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 @@ -3121,36 +3337,41 @@ type GoogleCloudChannelV1Sku struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MarketingInfo") 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 is a list of field names (e.g. "DateRange") 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 *GoogleCloudChannelV1Sku) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudChannelV1Sku +func (s *GoogleCloudChannelV1ReportResultsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1ReportResultsMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudChannelV1StartPaidServiceRequest: Request message for -// CloudChannelService.StartPaidService. -type GoogleCloudChannelV1StartPaidServiceRequest struct { - // RequestId: Optional. You can specify an optional unique request ID, - // and if you need to retry your request, the server will know to ignore - // the request if it's complete. For example, you make an initial - // request and the request times out. If you make the request again with - // the same request ID, the server can check if it received the original - // operation with the same request ID. If it did, it will ignore the - // second request. The request ID must be a valid UUID - // (https://tools.ietf.org/html/rfc4122) with the exception that zero - // UUID is not supported (`00000000-0000-0000-0000-000000000000`). - RequestId string `json:"requestId,omitempty"` +// GoogleCloudChannelV1ReportStatus: Status of a report generation +// process. +type GoogleCloudChannelV1ReportStatus struct { + // EndTime: The report generation's completion time. + EndTime string `json:"endTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "RequestId") to + // StartTime: The report generation's start time. + StartTime string `json:"startTime,omitempty"` + + // State: The current state of the report generation process. + // + // Possible values: + // "STATE_UNSPECIFIED" - Not used. + // "STARTED" - Report processing started. + // "WRITING" - Data generated from the report is being staged. + // "AVAILABLE" - Report data is available for access. + // "FAILED" - Report failed. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndTime") 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 @@ -3158,7 +3379,7 @@ type GoogleCloudChannelV1StartPaidServiceRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RequestId") to include in + // NullFields is a list of field names (e.g. "EndTime") 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 @@ -3167,24 +3388,36 @@ type GoogleCloudChannelV1StartPaidServiceRequest struct { NullFields []string `json:"-"` } -func (s *GoogleCloudChannelV1StartPaidServiceRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudChannelV1StartPaidServiceRequest +func (s *GoogleCloudChannelV1ReportStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1ReportStatus raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudChannelV1SubscriberEvent: Represents information which -// resellers will get as part of notification from Pub/Sub. -type GoogleCloudChannelV1SubscriberEvent struct { - // CustomerEvent: Customer event sent as part of Pub/Sub event to - // partners. - CustomerEvent *GoogleCloudChannelV1CustomerEvent `json:"customerEvent,omitempty"` +// GoogleCloudChannelV1ReportValue: A single report value. +type GoogleCloudChannelV1ReportValue struct { + // DateTimeValue: A value of type `google.type.DateTime` (year, month, + // day, hour, minute, second, and UTC offset or timezone.) + DateTimeValue *GoogleTypeDateTime `json:"dateTimeValue,omitempty"` - // EntitlementEvent: Entitlement event sent as part of Pub/Sub event to - // partners. - EntitlementEvent *GoogleCloudChannelV1EntitlementEvent `json:"entitlementEvent,omitempty"` + // DateValue: A value of type `google.type.Date` (year, month, day). + DateValue *GoogleTypeDate `json:"dateValue,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomerEvent") to + // DecimalValue: A value of type `google.type.Decimal`, representing + // non-integer numeric values. + DecimalValue *GoogleTypeDecimal `json:"decimalValue,omitempty"` + + // IntValue: A value of type `int`. + IntValue int64 `json:"intValue,omitempty,string"` + + // MoneyValue: A value of type `google.type.Money` (currency code, whole + // units, decimal units). + MoneyValue *GoogleTypeMoney `json:"moneyValue,omitempty"` + + // StringValue: A value of type `string`. + StringValue string `json:"stringValue,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DateTimeValue") 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 @@ -3192,7 +3425,7 @@ type GoogleCloudChannelV1SubscriberEvent struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomerEvent") to include + // NullFields is a list of field names (e.g. "DateTimeValue") 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 @@ -3201,27 +3434,78 @@ type GoogleCloudChannelV1SubscriberEvent struct { NullFields []string `json:"-"` } -func (s *GoogleCloudChannelV1SubscriberEvent) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudChannelV1SubscriberEvent +func (s *GoogleCloudChannelV1ReportValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1ReportValue raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudChannelV1SuspendEntitlementRequest: Request message for -// CloudChannelService.SuspendEntitlement. -type GoogleCloudChannelV1SuspendEntitlementRequest struct { - // RequestId: Optional. You can specify an optional unique request ID, - // and if you need to retry your request, the server will know to ignore - // the request if it's complete. For example, you make an initial - // request and the request times out. If you make the request again with - // the same request ID, the server can check if it received the original - // operation with the same request ID. If it did, it will ignore the - // second request. The request ID must be a valid UUID - // (https://tools.ietf.org/html/rfc4122) with the exception that zero - // UUID is not supported (`00000000-0000-0000-0000-000000000000`). - RequestId string `json:"requestId,omitempty"` +// GoogleCloudChannelV1RepricingAdjustment: A type that represents the +// various adjustments you can apply to a bill. +type GoogleCloudChannelV1RepricingAdjustment struct { + // PercentageAdjustment: Flat markup or markdown on an entire bill. + PercentageAdjustment *GoogleCloudChannelV1PercentageAdjustment `json:"percentageAdjustment,omitempty"` - // ForceSendFields is a list of field names (e.g. "RequestId") to + // ForceSendFields is a list of field names (e.g. + // "PercentageAdjustment") 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. "PercentageAdjustment") 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 *GoogleCloudChannelV1RepricingAdjustment) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1RepricingAdjustment + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudChannelV1RepricingConfig: Configuration for repricing a +// Google bill over a period of time. +type GoogleCloudChannelV1RepricingConfig struct { + // Adjustment: Required. Information about the adjustment. + Adjustment *GoogleCloudChannelV1RepricingAdjustment `json:"adjustment,omitempty"` + + // ChannelPartnerGranularity: Applies the repricing configuration at the + // channel partner level. This is the only supported value for + // ChannelPartnerRepricingConfig. + ChannelPartnerGranularity *GoogleCloudChannelV1RepricingConfigChannelPartnerGranularity `json:"channelPartnerGranularity,omitempty"` + + // EffectiveInvoiceMonth: Required. The YearMonth when these adjustments + // activate. The Day field needs to be "0" since we only accept + // YearMonth repricing boundaries. + EffectiveInvoiceMonth *GoogleTypeDate `json:"effectiveInvoiceMonth,omitempty"` + + // EntitlementGranularity: Applies the repricing configuration at the + // entitlement level. This is the only supported value for + // CustomerRepricingConfig. + EntitlementGranularity *GoogleCloudChannelV1RepricingConfigEntitlementGranularity `json:"entitlementGranularity,omitempty"` + + // RebillingBasis: Required. The RebillingBasis to use for this bill. + // Specifies the relative cost based on repricing costs you will apply. + // + // Possible values: + // "REBILLING_BASIS_UNSPECIFIED" - Not used. + // "COST_AT_LIST" - Use the list cost, also known as the MSRP. + // "DIRECT_CUSTOMER_COST" - Pass through all discounts except the + // Reseller Program Discount. If this is the default cost base and no + // adjustments are specified, the output cost will be exactly what the + // customer would see if they viewed the bill in the Google Cloud + // Console. + RebillingBasis string `json:"rebillingBasis,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Adjustment") 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 @@ -3229,7 +3513,7 @@ type GoogleCloudChannelV1SuspendEntitlementRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RequestId") to include in + // NullFields is a list of field names (e.g. "Adjustment") 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 @@ -3238,33 +3522,28 @@ type GoogleCloudChannelV1SuspendEntitlementRequest struct { NullFields []string `json:"-"` } -func (s *GoogleCloudChannelV1SuspendEntitlementRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudChannelV1SuspendEntitlementRequest +func (s *GoogleCloudChannelV1RepricingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1RepricingConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudChannelV1TransferEligibility: Specifies transfer -// eligibility of a SKU. -type GoogleCloudChannelV1TransferEligibility struct { - // Description: Localized description if reseller is not eligible to - // transfer the SKU. - Description string `json:"description,omitempty"` - - // IneligibilityReason: Specified the reason for ineligibility. - // - // Possible values: - // "REASON_UNSPECIFIED" - Not used. - // "PENDING_TOS_ACCEPTANCE" - Reseller needs to accept TOS before - // transferring the SKU. - // "SKU_NOT_ELIGIBLE" - Reseller not eligible to sell the SKU. - // "SKU_SUSPENDED" - SKU subscription is suspended - IneligibilityReason string `json:"ineligibilityReason,omitempty"` +// GoogleCloudChannelV1RepricingConfigChannelPartnerGranularity: Applies +// the repricing configuration at the channel partner level. The channel +// partner value is derived from the resource name. Takes an empty json +// object. +type GoogleCloudChannelV1RepricingConfigChannelPartnerGranularity struct { +} - // IsEligible: Whether reseller is eligible to transfer the SKU. - IsEligible bool `json:"isEligible,omitempty"` +// GoogleCloudChannelV1RepricingConfigEntitlementGranularity: Applies +// the repricing configuration at the entitlement level. +type GoogleCloudChannelV1RepricingConfigEntitlementGranularity struct { + // Entitlement: Resource name of the entitlement. Format: + // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlemen + // t_id} + Entitlement string `json:"entitlement,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to + // ForceSendFields is a list of field names (e.g. "Entitlement") 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 @@ -3272,7 +3551,7 @@ type GoogleCloudChannelV1TransferEligibility struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include + // NullFields is a list of field names (e.g. "Entitlement") 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 @@ -3281,37 +3560,18 @@ type GoogleCloudChannelV1TransferEligibility struct { NullFields []string `json:"-"` } -func (s *GoogleCloudChannelV1TransferEligibility) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudChannelV1TransferEligibility +func (s *GoogleCloudChannelV1RepricingConfigEntitlementGranularity) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1RepricingConfigEntitlementGranularity raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudChannelV1TransferEntitlementsRequest: Request message for -// CloudChannelService.TransferEntitlements. -type GoogleCloudChannelV1TransferEntitlementsRequest struct { - // AuthToken: The super admin of the resold customer generates this - // token to authorize a reseller to access their Cloud Identity and - // purchase entitlements on their behalf. You can omit this token after - // authorization. See https://support.google.com/a/answer/7643790 for - // more details. - AuthToken string `json:"authToken,omitempty"` - - // Entitlements: Required. The new entitlements to create or transfer. - Entitlements []*GoogleCloudChannelV1Entitlement `json:"entitlements,omitempty"` - - // RequestId: Optional. You can specify an optional unique request ID, - // and if you need to retry your request, the server will know to ignore - // the request if it's complete. For example, you make an initial - // request and the request times out. If you make the request again with - // the same request ID, the server can check if it received the original - // operation with the same request ID. If it did, it will ignore the - // second request. The request ID must be a valid UUID - // (https://tools.ietf.org/html/rfc4122) with the exception that zero - // UUID is not supported (`00000000-0000-0000-0000-000000000000`). - RequestId string `json:"requestId,omitempty"` +// GoogleCloudChannelV1Row: A row of report values. +type GoogleCloudChannelV1Row struct { + // Values: The list of values in the row. + Values []*GoogleCloudChannelV1ReportValue `json:"values,omitempty"` - // ForceSendFields is a list of field names (e.g. "AuthToken") to + // ForceSendFields is a list of field names (e.g. "Values") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3319,8 +3579,8 @@ type GoogleCloudChannelV1TransferEntitlementsRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuthToken") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Values") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -3328,20 +3588,34 @@ type GoogleCloudChannelV1TransferEntitlementsRequest struct { NullFields []string `json:"-"` } -func (s *GoogleCloudChannelV1TransferEntitlementsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudChannelV1TransferEntitlementsRequest +func (s *GoogleCloudChannelV1Row) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1Row raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudChannelV1TransferEntitlementsResponse: Response message -// for CloudChannelService.TransferEntitlements. This is put in the -// response field of google.longrunning.Operation. -type GoogleCloudChannelV1TransferEntitlementsResponse struct { - // Entitlements: The transferred entitlements. - Entitlements []*GoogleCloudChannelV1Entitlement `json:"entitlements,omitempty"` +// GoogleCloudChannelV1RunReportJobRequest: Request message for +// CloudChannelReportsService.RunReportJob. +type GoogleCloudChannelV1RunReportJobRequest struct { + // DateRange: Optional. The range of usage or invoice dates to include + // in the result. + DateRange *GoogleCloudChannelV1DateRange `json:"dateRange,omitempty"` + + // Filter: Optional. A structured string that defines conditions on + // dimension columns to restrict the report output. Filters support + // logical operators (AND, OR, NOT) and conditional operators (=, !=, <, + // >, <=, and >=) using `column_id` as keys. For example: + // `(customer:"accounts/C123abc/customers/S456def" OR + // customer:"accounts/C123abc/customers/S789ghi") AND + // invoice_start_date.year >= 2022` + Filter string `json:"filter,omitempty"` + + // LanguageCode: Optional. The BCP-47 language code, such as "en-US". If + // specified, the response is localized to the corresponding language + // code if the original data sources support it. Default is "en-US". + LanguageCode string `json:"languageCode,omitempty"` - // ForceSendFields is a list of field names (e.g. "Entitlements") to + // ForceSendFields is a list of field names (e.g. "DateRange") 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 @@ -3349,39 +3623,35 @@ type GoogleCloudChannelV1TransferEntitlementsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entitlements") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "DateRange") 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 *GoogleCloudChannelV1TransferEntitlementsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudChannelV1TransferEntitlementsResponse +func (s *GoogleCloudChannelV1RunReportJobRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1RunReportJobRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudChannelV1TransferEntitlementsToGoogleRequest: Request -// message for CloudChannelService.TransferEntitlementsToGoogle. -type GoogleCloudChannelV1TransferEntitlementsToGoogleRequest struct { - // Entitlements: Required. The entitlements to transfer to Google. - Entitlements []*GoogleCloudChannelV1Entitlement `json:"entitlements,omitempty"` +// GoogleCloudChannelV1RunReportJobResponse: Response message for +// CloudChannelReportsService.RunReportJob. +type GoogleCloudChannelV1RunReportJobResponse struct { + // ReportJob: Pass `report_job.name` to + // FetchReportResultsRequest.report_job to retrieve the report's + // results. + ReportJob *GoogleCloudChannelV1ReportJob `json:"reportJob,omitempty"` - // RequestId: Optional. You can specify an optional unique request ID, - // and if you need to retry your request, the server will know to ignore - // the request if it's complete. For example, you make an initial - // request and the request times out. If you make the request again with - // the same request ID, the server can check if it received the original - // operation with the same request ID. If it did, it will ignore the - // second request. The request ID must be a valid UUID - // (https://tools.ietf.org/html/rfc4122) with the exception that zero - // UUID is not supported (`00000000-0000-0000-0000-000000000000`). - RequestId string `json:"requestId,omitempty"` + // ReportMetadata: The metadata for the report's results (display name, + // columns, row count, and date range). If you view this before the + // operation finishes, you may see incomplete data. + ReportMetadata *GoogleCloudChannelV1ReportResultsMetadata `json:"reportMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "Entitlements") to + // ForceSendFields is a list of field names (e.g. "ReportJob") 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 @@ -3389,67 +3659,37 @@ type GoogleCloudChannelV1TransferEntitlementsToGoogleRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entitlements") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ReportJob") 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 *GoogleCloudChannelV1TransferEntitlementsToGoogleRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudChannelV1TransferEntitlementsToGoogleRequest +func (s *GoogleCloudChannelV1RunReportJobResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1RunReportJobResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudChannelV1TransferableOffer: TransferableOffer represents -// an Offer that can be used in Transfer. Read-only. -type GoogleCloudChannelV1TransferableOffer struct { - // Offer: Offer with parameter constraints updated to allow the - // Transfer. - Offer *GoogleCloudChannelV1Offer `json:"offer,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Offer") 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. "Offer") 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 *GoogleCloudChannelV1TransferableOffer) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudChannelV1TransferableOffer - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudChannelV1TransferableSku: TransferableSku represents -// information a reseller needs to view existing provisioned services -// for a customer that they do not own. Read-only. -type GoogleCloudChannelV1TransferableSku struct { - // LegacySku: Optional. The customer to transfer has an entitlement with - // the populated legacy SKU. - LegacySku *GoogleCloudChannelV1Sku `json:"legacySku,omitempty"` +// GoogleCloudChannelV1Sku: Represents a product's purchasable Stock +// Keeping Unit (SKU). SKUs represent the different variations of the +// product. For example, Google Workspace Business Standard and Google +// Workspace Business Plus are Google Workspace product SKUs. +type GoogleCloudChannelV1Sku struct { + // MarketingInfo: Marketing information for the SKU. + MarketingInfo *GoogleCloudChannelV1MarketingInfo `json:"marketingInfo,omitempty"` - // Sku: The SKU pertaining to the provisioning resource as specified in - // the Offer. - Sku *GoogleCloudChannelV1Sku `json:"sku,omitempty"` + // Name: Resource Name of the SKU. Format: + // products/{product_id}/skus/{sku_id} + Name string `json:"name,omitempty"` - // TransferEligibility: Describes the transfer eligibility of a SKU. - TransferEligibility *GoogleCloudChannelV1TransferEligibility `json:"transferEligibility,omitempty"` + // Product: Product the SKU is associated with. + Product *GoogleCloudChannelV1Product `json:"product,omitempty"` - // ForceSendFields is a list of field names (e.g. "LegacySku") to + // ForceSendFields is a list of field names (e.g. "MarketingInfo") 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 @@ -3457,34 +3697,36 @@ type GoogleCloudChannelV1TransferableSku struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LegacySku") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "MarketingInfo") 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 *GoogleCloudChannelV1TransferableSku) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudChannelV1TransferableSku +func (s *GoogleCloudChannelV1Sku) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1Sku raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudChannelV1TrialSettings: Settings for trial offers. -type GoogleCloudChannelV1TrialSettings struct { - // EndTime: Date when the trial ends. The value is in milliseconds using - // the UNIX Epoch format. See an example Epoch converter - // (https://www.epochconverter.com). - EndTime string `json:"endTime,omitempty"` - - // Trial: Determines if the entitlement is in a trial or not: * `true` - - // The entitlement is in trial. * `false` - The entitlement is not in - // trial. - Trial bool `json:"trial,omitempty"` +// GoogleCloudChannelV1StartPaidServiceRequest: Request message for +// CloudChannelService.StartPaidService. +type GoogleCloudChannelV1StartPaidServiceRequest struct { + // RequestId: Optional. You can specify an optional unique request ID, + // and if you need to retry your request, the server will know to ignore + // the request if it's complete. For example, you make an initial + // request and the request times out. If you make the request again with + // the same request ID, the server can check if it received the original + // operation with the same request ID. If it did, it will ignore the + // second request. The request ID must be a valid UUID + // (https://tools.ietf.org/html/rfc4122) with the exception that zero + // UUID is not supported (`00000000-0000-0000-0000-000000000000`). + RequestId string `json:"requestId,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndTime") to + // ForceSendFields is a list of field names (e.g. "RequestId") 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 @@ -3492,7 +3734,7 @@ type GoogleCloudChannelV1TrialSettings struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndTime") to include in + // NullFields is a list of field names (e.g. "RequestId") 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 @@ -3501,20 +3743,24 @@ type GoogleCloudChannelV1TrialSettings struct { NullFields []string `json:"-"` } -func (s *GoogleCloudChannelV1TrialSettings) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudChannelV1TrialSettings +func (s *GoogleCloudChannelV1StartPaidServiceRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1StartPaidServiceRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudChannelV1UnregisterSubscriberRequest: Request Message for -// UnregisterSubscriber. -type GoogleCloudChannelV1UnregisterSubscriberRequest struct { - // ServiceAccount: Required. Service account to unregister from - // subscriber access to the topic. - ServiceAccount string `json:"serviceAccount,omitempty"` +// GoogleCloudChannelV1SubscriberEvent: Represents information which +// resellers will get as part of notification from Pub/Sub. +type GoogleCloudChannelV1SubscriberEvent struct { + // CustomerEvent: Customer event sent as part of Pub/Sub event to + // partners. + CustomerEvent *GoogleCloudChannelV1CustomerEvent `json:"customerEvent,omitempty"` - // ForceSendFields is a list of field names (e.g. "ServiceAccount") to + // EntitlementEvent: Entitlement event sent as part of Pub/Sub event to + // partners. + EntitlementEvent *GoogleCloudChannelV1EntitlementEvent `json:"entitlementEvent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomerEvent") 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 @@ -3522,34 +3768,36 @@ type GoogleCloudChannelV1UnregisterSubscriberRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ServiceAccount") 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 is a list of field names (e.g. "CustomerEvent") 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 *GoogleCloudChannelV1UnregisterSubscriberRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudChannelV1UnregisterSubscriberRequest +func (s *GoogleCloudChannelV1SubscriberEvent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1SubscriberEvent raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudChannelV1UnregisterSubscriberResponse: Response Message -// for UnregisterSubscriber. -type GoogleCloudChannelV1UnregisterSubscriberResponse struct { - // Topic: Name of the topic the service account subscriber access was - // removed from. - Topic string `json:"topic,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +// GoogleCloudChannelV1SuspendEntitlementRequest: Request message for +// CloudChannelService.SuspendEntitlement. +type GoogleCloudChannelV1SuspendEntitlementRequest struct { + // RequestId: Optional. You can specify an optional unique request ID, + // and if you need to retry your request, the server will know to ignore + // the request if it's complete. For example, you make an initial + // request and the request times out. If you make the request again with + // the same request ID, the server can check if it received the original + // operation with the same request ID. If it did, it will ignore the + // second request. The request ID must be a valid UUID + // (https://tools.ietf.org/html/rfc4122) with the exception that zero + // UUID is not supported (`00000000-0000-0000-0000-000000000000`). + RequestId string `json:"requestId,omitempty"` - // ForceSendFields is a list of field names (e.g. "Topic") to + // ForceSendFields is a list of field names (e.g. "RequestId") 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 @@ -3557,8 +3805,8 @@ type GoogleCloudChannelV1UnregisterSubscriberResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Topic") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "RequestId") 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. @@ -3566,66 +3814,80 @@ type GoogleCloudChannelV1UnregisterSubscriberResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudChannelV1UnregisterSubscriberResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudChannelV1UnregisterSubscriberResponse +func (s *GoogleCloudChannelV1SuspendEntitlementRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1SuspendEntitlementRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudChannelV1UpdateChannelPartnerLinkRequest: Request message -// for CloudChannelService.UpdateChannelPartnerLink -type GoogleCloudChannelV1UpdateChannelPartnerLinkRequest struct { - // ChannelPartnerLink: Required. The channel partner link to update. - // Only channel_partner_link.link_state is allowed for updates. - ChannelPartnerLink *GoogleCloudChannelV1ChannelPartnerLink `json:"channelPartnerLink,omitempty"` +// GoogleCloudChannelV1TransferEligibility: Specifies transfer +// eligibility of a SKU. +type GoogleCloudChannelV1TransferEligibility struct { + // Description: Localized description if reseller is not eligible to + // transfer the SKU. + Description string `json:"description,omitempty"` - // UpdateMask: Required. The update mask that applies to the resource. - // The only allowable value for an update mask is - // channel_partner_link.link_state. - UpdateMask string `json:"updateMask,omitempty"` + // IneligibilityReason: Specified the reason for ineligibility. + // + // Possible values: + // "REASON_UNSPECIFIED" - Not used. + // "PENDING_TOS_ACCEPTANCE" - Reseller needs to accept TOS before + // transferring the SKU. + // "SKU_NOT_ELIGIBLE" - Reseller not eligible to sell the SKU. + // "SKU_SUSPENDED" - SKU subscription is suspended + IneligibilityReason string `json:"ineligibilityReason,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChannelPartnerLink") - // to unconditionally include in API requests. By default, fields with + // IsEligible: Whether reseller is eligible to transfer the SKU. + IsEligible bool `json:"isEligible,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChannelPartnerLink") 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 is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudChannelV1UpdateChannelPartnerLinkRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudChannelV1UpdateChannelPartnerLinkRequest +func (s *GoogleCloudChannelV1TransferEligibility) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1TransferEligibility raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudChannelV1Value: Data type and value of a parameter. -type GoogleCloudChannelV1Value struct { - // BoolValue: Represents a boolean value. - BoolValue bool `json:"boolValue,omitempty"` - - // DoubleValue: Represents a double value. - DoubleValue float64 `json:"doubleValue,omitempty"` - - // Int64Value: Represents an int64 value. - Int64Value int64 `json:"int64Value,omitempty,string"` +// GoogleCloudChannelV1TransferEntitlementsRequest: Request message for +// CloudChannelService.TransferEntitlements. +type GoogleCloudChannelV1TransferEntitlementsRequest struct { + // AuthToken: The super admin of the resold customer generates this + // token to authorize a reseller to access their Cloud Identity and + // purchase entitlements on their behalf. You can omit this token after + // authorization. See https://support.google.com/a/answer/7643790 for + // more details. + AuthToken string `json:"authToken,omitempty"` - // ProtoValue: Represents an 'Any' proto value. - ProtoValue googleapi.RawMessage `json:"protoValue,omitempty"` + // Entitlements: Required. The new entitlements to create or transfer. + Entitlements []*GoogleCloudChannelV1Entitlement `json:"entitlements,omitempty"` - // StringValue: Represents a string value. - StringValue string `json:"stringValue,omitempty"` + // RequestId: Optional. You can specify an optional unique request ID, + // and if you need to retry your request, the server will know to ignore + // the request if it's complete. For example, you make an initial + // request and the request times out. If you make the request again with + // the same request ID, the server can check if it received the original + // operation with the same request ID. If it did, it will ignore the + // second request. The request ID must be a valid UUID + // (https://tools.ietf.org/html/rfc4122) with the exception that zero + // UUID is not supported (`00000000-0000-0000-0000-000000000000`). + RequestId string `json:"requestId,omitempty"` - // ForceSendFields is a list of field names (e.g. "BoolValue") to + // ForceSendFields is a list of field names (e.g. "AuthToken") 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 @@ -3633,7 +3895,7 @@ type GoogleCloudChannelV1Value struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BoolValue") to include in + // NullFields is a list of field names (e.g. "AuthToken") 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 @@ -3642,19 +3904,333 @@ type GoogleCloudChannelV1Value struct { NullFields []string `json:"-"` } -func (s *GoogleCloudChannelV1Value) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudChannelV1Value +func (s *GoogleCloudChannelV1TransferEntitlementsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1TransferEntitlementsRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudChannelV1Value) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudChannelV1Value - var s1 struct { - DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) +// GoogleCloudChannelV1TransferEntitlementsResponse: Response message +// for CloudChannelService.TransferEntitlements. This is put in the +// response field of google.longrunning.Operation. +type GoogleCloudChannelV1TransferEntitlementsResponse struct { + // Entitlements: The transferred entitlements. + Entitlements []*GoogleCloudChannelV1Entitlement `json:"entitlements,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Entitlements") 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. "Entitlements") 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 *GoogleCloudChannelV1TransferEntitlementsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1TransferEntitlementsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudChannelV1TransferEntitlementsToGoogleRequest: Request +// message for CloudChannelService.TransferEntitlementsToGoogle. +type GoogleCloudChannelV1TransferEntitlementsToGoogleRequest struct { + // Entitlements: Required. The entitlements to transfer to Google. + Entitlements []*GoogleCloudChannelV1Entitlement `json:"entitlements,omitempty"` + + // RequestId: Optional. You can specify an optional unique request ID, + // and if you need to retry your request, the server will know to ignore + // the request if it's complete. For example, you make an initial + // request and the request times out. If you make the request again with + // the same request ID, the server can check if it received the original + // operation with the same request ID. If it did, it will ignore the + // second request. The request ID must be a valid UUID + // (https://tools.ietf.org/html/rfc4122) with the exception that zero + // UUID is not supported (`00000000-0000-0000-0000-000000000000`). + RequestId string `json:"requestId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Entitlements") 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. "Entitlements") 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 *GoogleCloudChannelV1TransferEntitlementsToGoogleRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1TransferEntitlementsToGoogleRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudChannelV1TransferableOffer: TransferableOffer represents +// an Offer that can be used in Transfer. Read-only. +type GoogleCloudChannelV1TransferableOffer struct { + // Offer: Offer with parameter constraints updated to allow the + // Transfer. + Offer *GoogleCloudChannelV1Offer `json:"offer,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Offer") 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. "Offer") 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 *GoogleCloudChannelV1TransferableOffer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1TransferableOffer + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudChannelV1TransferableSku: TransferableSku represents +// information a reseller needs to view existing provisioned services +// for a customer that they do not own. Read-only. +type GoogleCloudChannelV1TransferableSku struct { + // LegacySku: Optional. The customer to transfer has an entitlement with + // the populated legacy SKU. + LegacySku *GoogleCloudChannelV1Sku `json:"legacySku,omitempty"` + + // Sku: The SKU pertaining to the provisioning resource as specified in + // the Offer. + Sku *GoogleCloudChannelV1Sku `json:"sku,omitempty"` + + // TransferEligibility: Describes the transfer eligibility of a SKU. + TransferEligibility *GoogleCloudChannelV1TransferEligibility `json:"transferEligibility,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LegacySku") 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. "LegacySku") 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 *GoogleCloudChannelV1TransferableSku) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1TransferableSku + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudChannelV1TrialSettings: Settings for trial offers. +type GoogleCloudChannelV1TrialSettings struct { + // EndTime: Date when the trial ends. The value is in milliseconds using + // the UNIX Epoch format. See an example Epoch converter + // (https://www.epochconverter.com). + EndTime string `json:"endTime,omitempty"` + + // Trial: Determines if the entitlement is in a trial or not: * `true` - + // The entitlement is in trial. * `false` - The entitlement is not in + // trial. + Trial bool `json:"trial,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndTime") 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. "EndTime") 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 *GoogleCloudChannelV1TrialSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1TrialSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudChannelV1UnregisterSubscriberRequest: Request Message for +// UnregisterSubscriber. +type GoogleCloudChannelV1UnregisterSubscriberRequest struct { + // ServiceAccount: Required. Service account to unregister from + // subscriber access to the topic. + ServiceAccount string `json:"serviceAccount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ServiceAccount") 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. "ServiceAccount") 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 *GoogleCloudChannelV1UnregisterSubscriberRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1UnregisterSubscriberRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudChannelV1UnregisterSubscriberResponse: Response Message +// for UnregisterSubscriber. +type GoogleCloudChannelV1UnregisterSubscriberResponse struct { + // Topic: Name of the topic the service account subscriber access was + // removed from. + Topic string `json:"topic,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Topic") 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. "Topic") 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 *GoogleCloudChannelV1UnregisterSubscriberResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1UnregisterSubscriberResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudChannelV1UpdateChannelPartnerLinkRequest: Request message +// for CloudChannelService.UpdateChannelPartnerLink +type GoogleCloudChannelV1UpdateChannelPartnerLinkRequest struct { + // ChannelPartnerLink: Required. The channel partner link to update. + // Only channel_partner_link.link_state is allowed for updates. + ChannelPartnerLink *GoogleCloudChannelV1ChannelPartnerLink `json:"channelPartnerLink,omitempty"` + + // UpdateMask: Required. The update mask that applies to the resource. + // The only allowable value for an update mask is + // channel_partner_link.link_state. + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ChannelPartnerLink") + // 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. "ChannelPartnerLink") 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 *GoogleCloudChannelV1UpdateChannelPartnerLinkRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1UpdateChannelPartnerLinkRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudChannelV1Value: Data type and value of a parameter. +type GoogleCloudChannelV1Value struct { + // BoolValue: Represents a boolean value. + BoolValue bool `json:"boolValue,omitempty"` + + // DoubleValue: Represents a double value. + DoubleValue float64 `json:"doubleValue,omitempty"` + + // Int64Value: Represents an int64 value. + Int64Value int64 `json:"int64Value,omitempty,string"` + + // ProtoValue: Represents an 'Any' proto value. + ProtoValue googleapi.RawMessage `json:"protoValue,omitempty"` + + // StringValue: Represents a string value. + StringValue string `json:"stringValue,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BoolValue") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. 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. "BoolValue") 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 *GoogleCloudChannelV1Value) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1Value + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudChannelV1Value) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudChannelV1Value + var s1 struct { + DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) if err := json.Unmarshal(data, &s1); err != nil { return err } @@ -3737,6 +4313,55 @@ func (s *GoogleCloudChannelV1alpha1ChannelPartnerEvent) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudChannelV1alpha1Column: The definition of a report column. +// Specifies the data properties in the corresponding position of the +// report rows. +type GoogleCloudChannelV1alpha1Column struct { + // ColumnId: The unique name of the column (for example, + // customer_domain, channel_partner, customer_cost). You can use column + // IDs in RunReportJobRequest.filter. To see all reports and their + // columns, call CloudChannelReportsService.ListReports. + ColumnId string `json:"columnId,omitempty"` + + // DataType: The type of the values for this column. + // + // Possible values: + // "DATA_TYPE_UNSPECIFIED" - Not used. + // "STRING" - ReportValues for this column will use string_value. + // "INT" - ReportValues for this column will use int_value. + // "DECIMAL" - ReportValues for this column will use decimal_value. + // "MONEY" - ReportValues for this column will use money_value. + // "DATE" - ReportValues for this column will use date_value. + // "DATE_TIME" - ReportValues for this column will use + // date_time_value. + DataType string `json:"dataType,omitempty"` + + // DisplayName: The column's display name. + DisplayName string `json:"displayName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ColumnId") 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. "ColumnId") 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 *GoogleCloudChannelV1alpha1Column) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1alpha1Column + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudChannelV1alpha1CommitmentSettings: Commitment settings for // commitment-based offers. type GoogleCloudChannelV1alpha1CommitmentSettings struct { @@ -3812,6 +4437,59 @@ func (s *GoogleCloudChannelV1alpha1CustomerEvent) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudChannelV1alpha1DateRange: A representation of usage or +// invoice date ranges. +type GoogleCloudChannelV1alpha1DateRange struct { + // InvoiceEndDate: The latest invoice date (exclusive). If your product + // uses monthly invoices, and this value is not the beginning of a + // month, this will adjust the date to the first day of the following + // month. + InvoiceEndDate *GoogleTypeDate `json:"invoiceEndDate,omitempty"` + + // InvoiceStartDate: The earliest invoice date (inclusive). If your + // product uses monthly invoices, and this value is not the beginning of + // a month, this will adjust the date to the first day of the given + // month. + InvoiceStartDate *GoogleTypeDate `json:"invoiceStartDate,omitempty"` + + // UsageEndDateTime: The latest usage date time (exclusive). If you use + // time groupings (daily, weekly, etc), each group uses midnight to + // midnight (Pacific time). The usage end date is rounded down to + // include all usage from the specified date. We recommend that clients + // pass `usage_start_date_time` in Pacific time. + UsageEndDateTime *GoogleTypeDateTime `json:"usageEndDateTime,omitempty"` + + // UsageStartDateTime: The earliest usage date time (inclusive). If you + // use time groupings (daily, weekly, etc), each group uses midnight to + // midnight (Pacific time). The usage start date is rounded down to + // include all usage from the specified date. We recommend that clients + // pass `usage_start_date_time` in Pacific time. + UsageStartDateTime *GoogleTypeDateTime `json:"usageStartDateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InvoiceEndDate") 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. "InvoiceEndDate") 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 *GoogleCloudChannelV1alpha1DateRange) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1alpha1DateRange + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudChannelV1alpha1Entitlement: An entitlement is a // representation of a customer's ability to use a service. type GoogleCloudChannelV1alpha1Entitlement struct { @@ -4214,31 +4892,231 @@ type GoogleCloudChannelV1alpha1RenewalSettings struct { // "OFFLINE" - Price and ordering not available through API. PaymentPlan string `json:"paymentPlan,omitempty"` - // ResizeUnitCount: If true and enable_renewal = true, the unit (for - // example seats or licenses) will be set to the number of active units - // at renewal time. - ResizeUnitCount bool `json:"resizeUnitCount,omitempty"` + // ResizeUnitCount: If true and enable_renewal = true, the unit (for + // example seats or licenses) will be set to the number of active units + // at renewal time. + ResizeUnitCount bool `json:"resizeUnitCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisableCommitment") + // 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. "DisableCommitment") 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 *GoogleCloudChannelV1alpha1RenewalSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1alpha1RenewalSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudChannelV1alpha1Report: The ID and description of a report +// that was used to generate report data. For example, "GCP Daily +// Spend", "Google Workspace License Activity", etc. +type GoogleCloudChannelV1alpha1Report struct { + // Columns: The list of columns included in the report. This defines the + // schema of the report results. + Columns []*GoogleCloudChannelV1alpha1Column `json:"columns,omitempty"` + + // Description: A description of other aspects of the report, such as + // the products it supports. + Description string `json:"description,omitempty"` + + // DisplayName: A human-readable name for this report. + DisplayName string `json:"displayName,omitempty"` + + // Name: Required. The report's resource name. Specifies the account and + // report used to generate report data. The report_id identifier is a + // UID (for example, `613bf59q`). Name uses the format: + // accounts/{account_id}/reports/{report_id} + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Columns") 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. "Columns") 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 *GoogleCloudChannelV1alpha1Report) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1alpha1Report + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudChannelV1alpha1ReportJob: The result of a RunReportJob +// operation. Contains the name to use in +// FetchReportResultsRequest.report_job and the status of the operation. +type GoogleCloudChannelV1alpha1ReportJob struct { + // Name: Required. The resource name of a report job. Name uses the + // format: `accounts/{account_id}/reportJobs/{report_job_id}` + Name string `json:"name,omitempty"` + + // ReportStatus: The current status of report generation. + ReportStatus *GoogleCloudChannelV1alpha1ReportStatus `json:"reportStatus,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudChannelV1alpha1ReportJob) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1alpha1ReportJob + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudChannelV1alpha1ReportResultsMetadata: The features +// describing the data. Returned by +// CloudChannelReportsService.RunReportJob and +// CloudChannelReportsService.FetchReportResults. +type GoogleCloudChannelV1alpha1ReportResultsMetadata struct { + // DateRange: The date range of reported usage. + DateRange *GoogleCloudChannelV1alpha1DateRange `json:"dateRange,omitempty"` + + // PrecedingDateRange: The usage dates immediately preceding + // `date_range` with the same duration. Use this to calculate trending + // usage and costs. This is only populated if you request trending data. + // For example, if `date_range` is July 1-15, `preceding_date_range` + // will be June 16-30. + PrecedingDateRange *GoogleCloudChannelV1alpha1DateRange `json:"precedingDateRange,omitempty"` + + // Report: Details of the completed report. + Report *GoogleCloudChannelV1alpha1Report `json:"report,omitempty"` + + // RowCount: The total number of rows of data in the final report. + RowCount int64 `json:"rowCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "DateRange") 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. "DateRange") 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 *GoogleCloudChannelV1alpha1ReportResultsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1alpha1ReportResultsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudChannelV1alpha1ReportStatus: Status of a report generation +// process. +type GoogleCloudChannelV1alpha1ReportStatus struct { + // EndTime: The report generation's completion time. + EndTime string `json:"endTime,omitempty"` + + // StartTime: The report generation's start time. + StartTime string `json:"startTime,omitempty"` + + // State: The current state of the report generation process. + // + // Possible values: + // "STATE_UNSPECIFIED" - Not used. + // "STARTED" - Report processing started. + // "WRITING" - Data generated from the report is being staged. + // "AVAILABLE" - Report data is available for access. + // "FAILED" - Report failed. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndTime") 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. "EndTime") 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 *GoogleCloudChannelV1alpha1ReportStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1alpha1ReportStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudChannelV1alpha1RunReportJobResponse: Response message for +// CloudChannelReportsService.RunReportJob. +type GoogleCloudChannelV1alpha1RunReportJobResponse struct { + // ReportJob: Pass `report_job.name` to + // FetchReportResultsRequest.report_job to retrieve the report's + // results. + ReportJob *GoogleCloudChannelV1alpha1ReportJob `json:"reportJob,omitempty"` + + // ReportMetadata: The metadata for the report's results (display name, + // columns, row count, and date range). If you view this before the + // operation finishes, you may see incomplete data. + ReportMetadata *GoogleCloudChannelV1alpha1ReportResultsMetadata `json:"reportMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisableCommitment") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "ReportJob") 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. "DisableCommitment") 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 is a list of field names (e.g. "ReportJob") 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 *GoogleCloudChannelV1alpha1RenewalSettings) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudChannelV1alpha1RenewalSettings +func (s *GoogleCloudChannelV1alpha1RunReportJobResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1alpha1RunReportJobResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -4607,6 +5485,84 @@ func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleTypeDateTime: Represents civil time (or occasionally physical +// time). This type can represent a civil time in one of a few possible +// ways: * When utc_offset is set and time_zone is unset: a civil time +// on a calendar day with a particular offset from UTC. * When time_zone +// is set and utc_offset is unset: a civil time on a calendar day in a +// particular time zone. * When neither time_zone nor utc_offset is set: +// a civil time on a calendar day in local time. The date is relative to +// the Proleptic Gregorian Calendar. If year, month, or day are 0, the +// DateTime is considered not to have a specific year, month, or day +// respectively. This type may also be used to represent a physical time +// if all the date and time fields are set and either case of the +// `time_offset` oneof is set. Consider using `Timestamp` message for +// physical time instead. If your use case also would like to store the +// user's timezone, that can be done in another field. This type is more +// flexible than some applications may want. Make sure to document and +// validate your application's limitations. +type GoogleTypeDateTime struct { + // Day: Optional. Day of month. Must be from 1 to 31 and valid for the + // year and month, or 0 if specifying a datetime without a day. + Day int64 `json:"day,omitempty"` + + // Hours: Optional. Hours of day in 24 hour format. Should be from 0 to + // 23, defaults to 0 (midnight). An API may choose to allow the value + // "24:00:00" for scenarios like business closing time. + Hours int64 `json:"hours,omitempty"` + + // Minutes: Optional. Minutes of hour of day. Must be from 0 to 59, + // defaults to 0. + Minutes int64 `json:"minutes,omitempty"` + + // Month: Optional. Month of year. Must be from 1 to 12, or 0 if + // specifying a datetime without a month. + Month int64 `json:"month,omitempty"` + + // Nanos: Optional. Fractions of seconds in nanoseconds. Must be from 0 + // to 999,999,999, defaults to 0. + Nanos int64 `json:"nanos,omitempty"` + + // Seconds: Optional. Seconds of minutes of the time. Must normally be + // from 0 to 59, defaults to 0. An API may allow the value 60 if it + // allows leap-seconds. + Seconds int64 `json:"seconds,omitempty"` + + // TimeZone: Time zone. + TimeZone *GoogleTypeTimeZone `json:"timeZone,omitempty"` + + // UtcOffset: UTC offset. Must be whole seconds, between -18 hours and + // +18 hours. For example, a UTC offset of -4:00 would be represented as + // { seconds: -14400 }. + UtcOffset string `json:"utcOffset,omitempty"` + + // Year: Optional. Year of date. Must be from 1 to 9999, or 0 if + // specifying a datetime 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 *GoogleTypeDateTime) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeDateTime + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleTypeDecimal: A representation of a decimal value, such as 2.5. // Clients may convert values into language-native decimal formats, such // as Java's BigDecimal or Python's decimal.Decimal. [BigDecimal]: @@ -4841,6 +5797,39 @@ func (s *GoogleTypePostalAddress) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleTypeTimeZone: Represents a time zone from the IANA Time Zone +// Database (https://www.iana.org/time-zones). +type GoogleTypeTimeZone struct { + // Id: IANA Time Zone Database time zone, e.g. "America/New_York". + Id string `json:"id,omitempty"` + + // Version: Optional. IANA Time Zone Database version number, e.g. + // "2019a". + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. 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. "Id") 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 *GoogleTypeTimeZone) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeTimeZone + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // method id "cloudchannel.accounts.checkCloudIdentityAccountsExist": type AccountsCheckCloudIdentityAccountsExistCall struct { @@ -9003,7 +9992,190 @@ func (c *AccountsCustomersImportCall) Do(opts ...googleapi.CallOption) (*GoogleC if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudChannelV1Customer{ + ret := &GoogleCloudChannelV1Customer{ + 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": "Imports a Customer from the Cloud Identity associated with the provided Cloud Identity ID or domain before a TransferEntitlements call. If a linked Customer already exists and overwrite_if_exists is true, it will update that Customer's data. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * NOT_FOUND: Cloud Identity doesn't exist or was deleted. * INVALID_ARGUMENT: Required parameters are missing, or the auth_token is expired or invalid. * ALREADY_EXISTS: A customer already exists and has conflicting critical fields. Requires an overwrite. Return value: The Customer.", + // "flatPath": "v1/accounts/{accountsId}/customers:import", + // "httpMethod": "POST", + // "id": "cloudchannel.accounts.customers.import", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The resource name of the reseller's account. Parent takes the format: accounts/{account_id} or accounts/{account_id}/channelPartnerLinks/{channel_partner_id}", + // "location": "path", + // "pattern": "^accounts/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/customers:import", + // "request": { + // "$ref": "GoogleCloudChannelV1ImportCustomerRequest" + // }, + // "response": { + // "$ref": "GoogleCloudChannelV1Customer" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/apps.order" + // ] + // } + +} + +// method id "cloudchannel.accounts.customers.list": + +type AccountsCustomersListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List Customers. Possible error codes: * PERMISSION_DENIED: The +// reseller account making the request is different from the reseller +// account in the API request. * INVALID_ARGUMENT: Required request +// parameters are missing or invalid. Return value: List of Customers, +// or an empty list if there are no customers. +// +// - parent: The resource name of the reseller account to list customers +// from. Parent uses the format: accounts/{account_id}. +func (r *AccountsCustomersService) List(parent string) *AccountsCustomersListCall { + c := &AccountsCustomersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filters applied to the +// [CloudChannelService.ListCustomers] results. See +// https://cloud.google.com/channel/docs/concepts/google-cloud/filter-customers +// for more information. +func (c *AccountsCustomersListCall) Filter(filter string) *AccountsCustomersListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of customers to return. The service may return fewer than this value. +// If unspecified, returns at most 10 customers. The maximum value is +// 50. +func (c *AccountsCustomersListCall) PageSize(pageSize int64) *AccountsCustomersListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results other than the first page. Obtained +// through ListCustomersResponse.next_page_token of the previous +// CloudChannelService.ListCustomers call. +func (c *AccountsCustomersListCall) PageToken(pageToken string) *AccountsCustomersListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsCustomersListCall) Fields(s ...googleapi.Field) *AccountsCustomersListCall { + 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 *AccountsCustomersListCall) IfNoneMatch(entityTag string) *AccountsCustomersListCall { + 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 *AccountsCustomersListCall) Context(ctx context.Context) *AccountsCustomersListCall { + 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 *AccountsCustomersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsCustomersListCall) 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, "v1/{+parent}/customers") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudchannel.accounts.customers.list" call. +// Exactly one of *GoogleCloudChannelV1ListCustomersResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudChannelV1ListCustomersResponse.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 *AccountsCustomersListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1ListCustomersResponse, 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 := &GoogleCloudChannelV1ListCustomersResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9015,28 +10187,41 @@ func (c *AccountsCustomersImportCall) Do(opts ...googleapi.CallOption) (*GoogleC } return ret, nil // { - // "description": "Imports a Customer from the Cloud Identity associated with the provided Cloud Identity ID or domain before a TransferEntitlements call. If a linked Customer already exists and overwrite_if_exists is true, it will update that Customer's data. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * NOT_FOUND: Cloud Identity doesn't exist or was deleted. * INVALID_ARGUMENT: Required parameters are missing, or the auth_token is expired or invalid. * ALREADY_EXISTS: A customer already exists and has conflicting critical fields. Requires an overwrite. Return value: The Customer.", - // "flatPath": "v1/accounts/{accountsId}/customers:import", - // "httpMethod": "POST", - // "id": "cloudchannel.accounts.customers.import", + // "description": "List Customers. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. Return value: List of Customers, or an empty list if there are no customers.", + // "flatPath": "v1/accounts/{accountsId}/customers", + // "httpMethod": "GET", + // "id": "cloudchannel.accounts.customers.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "filter": { + // "description": "Optional. Filters applied to the [CloudChannelService.ListCustomers] results. See https://cloud.google.com/channel/docs/concepts/google-cloud/filter-customers for more information.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of customers to return. The service may return fewer than this value. If unspecified, returns at most 10 customers. The maximum value is 50.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A token identifying a page of results other than the first page. Obtained through ListCustomersResponse.next_page_token of the previous CloudChannelService.ListCustomers call.", + // "location": "query", + // "type": "string" + // }, // "parent": { - // "description": "Required. The resource name of the reseller's account. Parent takes the format: accounts/{account_id} or accounts/{account_id}/channelPartnerLinks/{channel_partner_id}", + // "description": "Required. The resource name of the reseller account to list customers from. Parent uses the format: accounts/{account_id}.", // "location": "path", // "pattern": "^accounts/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/customers:import", - // "request": { - // "$ref": "GoogleCloudChannelV1ImportCustomerRequest" - // }, + // "path": "v1/{+parent}/customers", // "response": { - // "$ref": "GoogleCloudChannelV1Customer" + // "$ref": "GoogleCloudChannelV1ListCustomersResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.order" @@ -9045,54 +10230,100 @@ func (c *AccountsCustomersImportCall) Do(opts ...googleapi.CallOption) (*GoogleC } -// method id "cloudchannel.accounts.customers.list": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AccountsCustomersListCall) Pages(ctx context.Context, f func(*GoogleCloudChannelV1ListCustomersResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type AccountsCustomersListCall struct { +// method id "cloudchannel.accounts.customers.listPurchasableOffers": + +type AccountsCustomersListPurchasableOffersCall struct { s *Service - parent string + customer string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: List Customers. Possible error codes: * PERMISSION_DENIED: The -// reseller account making the request is different from the reseller -// account in the API request. * INVALID_ARGUMENT: Required request -// parameters are missing or invalid. Return value: List of Customers, -// or an empty list if there are no customers. +// ListPurchasableOffers: Lists the following: * Offers that you can +// purchase for a customer. * Offers that you can change for an +// entitlement. Possible error codes: * PERMISSION_DENIED: The customer +// doesn't belong to the reseller * INVALID_ARGUMENT: Required request +// parameters are missing or invalid. // -// - parent: The resource name of the reseller account to list customers -// from. Parent uses the format: accounts/{account_id}. -func (r *AccountsCustomersService) List(parent string) *AccountsCustomersListCall { - c := &AccountsCustomersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - customer: The resource name of the customer to list Offers for. +// Format: accounts/{account_id}/customers/{customer_id}. +func (r *AccountsCustomersService) ListPurchasableOffers(customer string) *AccountsCustomersListPurchasableOffersCall { + c := &AccountsCustomersListPurchasableOffersCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer return c } -// Filter sets the optional parameter "filter": Filters applied to the -// [CloudChannelService.ListCustomers] results. See -// https://cloud.google.com/channel/docs/concepts/google-cloud/filter-customers -// for more information. -func (c *AccountsCustomersListCall) Filter(filter string) *AccountsCustomersListCall { - c.urlParams_.Set("filter", filter) +// ChangeOfferPurchaseEntitlement sets the optional parameter +// "changeOfferPurchase.entitlement": Required. Resource name of the +// entitlement. Format: +// accounts/{account_id}/customers/{customer_id}/entitlements/{entitlemen +// t_id} +func (c *AccountsCustomersListPurchasableOffersCall) ChangeOfferPurchaseEntitlement(changeOfferPurchaseEntitlement string) *AccountsCustomersListPurchasableOffersCall { + c.urlParams_.Set("changeOfferPurchase.entitlement", changeOfferPurchaseEntitlement) return c } -// PageSize sets the optional parameter "pageSize": The maximum number -// of customers to return. The service may return fewer than this value. -// If unspecified, returns at most 10 customers. The maximum value is -// 50. -func (c *AccountsCustomersListCall) PageSize(pageSize int64) *AccountsCustomersListCall { +// ChangeOfferPurchaseNewSku sets the optional parameter +// "changeOfferPurchase.newSku": Resource name of the new target SKU. +// Provide this SKU when upgrading or downgrading an entitlement. +// Format: products/{product_id}/skus/{sku_id} +func (c *AccountsCustomersListPurchasableOffersCall) ChangeOfferPurchaseNewSku(changeOfferPurchaseNewSku string) *AccountsCustomersListPurchasableOffersCall { + c.urlParams_.Set("changeOfferPurchase.newSku", changeOfferPurchaseNewSku) + return c +} + +// CreateEntitlementPurchaseSku sets the optional parameter +// "createEntitlementPurchase.sku": Required. SKU that the result should +// be restricted to. Format: products/{product_id}/skus/{sku_id}. +func (c *AccountsCustomersListPurchasableOffersCall) CreateEntitlementPurchaseSku(createEntitlementPurchaseSku string) *AccountsCustomersListPurchasableOffersCall { + c.urlParams_.Set("createEntitlementPurchase.sku", createEntitlementPurchaseSku) + return c +} + +// LanguageCode sets the optional parameter "languageCode": The BCP-47 +// language code. For example, "en-US". The response will localize in +// the corresponding language code, if specified. The default value is +// "en-US". +func (c *AccountsCustomersListPurchasableOffersCall) LanguageCode(languageCode string) *AccountsCustomersListPurchasableOffersCall { + c.urlParams_.Set("languageCode", languageCode) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server might return fewer results than requested. If unspecified, +// returns at most 100 Offers. The maximum value is 1000; the server +// will coerce values above 1000. +func (c *AccountsCustomersListPurchasableOffersCall) PageSize(pageSize int64) *AccountsCustomersListPurchasableOffersCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A token -// identifying a page of results other than the first page. Obtained -// through ListCustomersResponse.next_page_token of the previous -// CloudChannelService.ListCustomers call. -func (c *AccountsCustomersListCall) PageToken(pageToken string) *AccountsCustomersListCall { +// PageToken sets the optional parameter "pageToken": A token for a page +// of results other than the first page. +func (c *AccountsCustomersListPurchasableOffersCall) PageToken(pageToken string) *AccountsCustomersListPurchasableOffersCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -9100,7 +10331,7 @@ func (c *AccountsCustomersListCall) PageToken(pageToken string) *AccountsCustome // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsCustomersListCall) Fields(s ...googleapi.Field) *AccountsCustomersListCall { +func (c *AccountsCustomersListPurchasableOffersCall) Fields(s ...googleapi.Field) *AccountsCustomersListPurchasableOffersCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9110,7 +10341,7 @@ func (c *AccountsCustomersListCall) Fields(s ...googleapi.Field) *AccountsCustom // 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 *AccountsCustomersListCall) IfNoneMatch(entityTag string) *AccountsCustomersListCall { +func (c *AccountsCustomersListPurchasableOffersCall) IfNoneMatch(entityTag string) *AccountsCustomersListPurchasableOffersCall { c.ifNoneMatch_ = entityTag return c } @@ -9118,21 +10349,21 @@ func (c *AccountsCustomersListCall) IfNoneMatch(entityTag string) *AccountsCusto // 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 *AccountsCustomersListCall) Context(ctx context.Context) *AccountsCustomersListCall { +func (c *AccountsCustomersListPurchasableOffersCall) Context(ctx context.Context) *AccountsCustomersListPurchasableOffersCall { 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 *AccountsCustomersListCall) Header() http.Header { +func (c *AccountsCustomersListPurchasableOffersCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersListCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustomersListPurchasableOffersCall) 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_ { @@ -9145,7 +10376,7 @@ func (c *AccountsCustomersListCall) doRequest(alt string) (*http.Response, error var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customers") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}:listPurchasableOffers") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -9153,21 +10384,21 @@ func (c *AccountsCustomersListCall) doRequest(alt string) (*http.Response, error } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "customer": c.customer, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.list" call. -// Exactly one of *GoogleCloudChannelV1ListCustomersResponse or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "cloudchannel.accounts.customers.listPurchasableOffers" call. +// Exactly one of *GoogleCloudChannelV1ListPurchasableOffersResponse or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudChannelV1ListCustomersResponse.ServerResponse.Header or -// (if a response was returned at all) in +// *GoogleCloudChannelV1ListPurchasableOffersResponse.ServerResponse.Head +// er 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 *AccountsCustomersListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1ListCustomersResponse, error) { +func (c *AccountsCustomersListPurchasableOffersCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1ListPurchasableOffersResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9186,7 +10417,7 @@ func (c *AccountsCustomersListCall) Do(opts ...googleapi.CallOption) (*GoogleClo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudChannelV1ListCustomersResponse{ + ret := &GoogleCloudChannelV1ListPurchasableOffersResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9198,41 +10429,56 @@ func (c *AccountsCustomersListCall) Do(opts ...googleapi.CallOption) (*GoogleClo } return ret, nil // { - // "description": "List Customers. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. Return value: List of Customers, or an empty list if there are no customers.", - // "flatPath": "v1/accounts/{accountsId}/customers", + // "description": "Lists the following: * Offers that you can purchase for a customer. * Offers that you can change for an entitlement. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller * INVALID_ARGUMENT: Required request parameters are missing or invalid.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:listPurchasableOffers", // "httpMethod": "GET", - // "id": "cloudchannel.accounts.customers.list", + // "id": "cloudchannel.accounts.customers.listPurchasableOffers", // "parameterOrder": [ - // "parent" + // "customer" // ], // "parameters": { - // "filter": { - // "description": "Optional. Filters applied to the [CloudChannelService.ListCustomers] results. See https://cloud.google.com/channel/docs/concepts/google-cloud/filter-customers for more information.", + // "changeOfferPurchase.entitlement": { + // "description": "Required. Resource name of the entitlement. Format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", // "location": "query", // "type": "string" // }, - // "pageSize": { - // "description": "Optional. The maximum number of customers to return. The service may return fewer than this value. If unspecified, returns at most 10 customers. The maximum value is 50.", - // "format": "int32", + // "changeOfferPurchase.newSku": { + // "description": "Optional. Resource name of the new target SKU. Provide this SKU when upgrading or downgrading an entitlement. Format: products/{product_id}/skus/{sku_id}", // "location": "query", - // "type": "integer" + // "type": "string" // }, - // "pageToken": { - // "description": "Optional. A token identifying a page of results other than the first page. Obtained through ListCustomersResponse.next_page_token of the previous CloudChannelService.ListCustomers call.", + // "createEntitlementPurchase.sku": { + // "description": "Required. SKU that the result should be restricted to. Format: products/{product_id}/skus/{sku_id}.", // "location": "query", // "type": "string" // }, - // "parent": { - // "description": "Required. The resource name of the reseller account to list customers from. Parent uses the format: accounts/{account_id}.", + // "customer": { + // "description": "Required. The resource name of the customer to list Offers for. Format: accounts/{account_id}/customers/{customer_id}.", // "location": "path", - // "pattern": "^accounts/[^/]+$", + // "pattern": "^accounts/[^/]+/customers/[^/]+$", // "required": true, // "type": "string" + // }, + // "languageCode": { + // "description": "Optional. The BCP-47 language code. For example, \"en-US\". The response will localize in the corresponding language code, if specified. The default value is \"en-US\".", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 Offers. The maximum value is 1000; the server will coerce values above 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A token for a page of results other than the first page.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+parent}/customers", + // "path": "v1/{+customer}:listPurchasableOffers", // "response": { - // "$ref": "GoogleCloudChannelV1ListCustomersResponse" + // "$ref": "GoogleCloudChannelV1ListPurchasableOffersResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.order" @@ -9244,7 +10490,7 @@ func (c *AccountsCustomersListCall) Do(opts ...googleapi.CallOption) (*GoogleClo // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *AccountsCustomersListCall) Pages(ctx context.Context, f func(*GoogleCloudChannelV1ListCustomersResponse) error) error { +func (c *AccountsCustomersListPurchasableOffersCall) Pages(ctx context.Context, f func(*GoogleCloudChannelV1ListPurchasableOffersResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -9262,9 +10508,9 @@ func (c *AccountsCustomersListCall) Pages(ctx context.Context, f func(*GoogleClo } } -// method id "cloudchannel.accounts.customers.listPurchasableOffers": +// method id "cloudchannel.accounts.customers.listPurchasableSkus": -type AccountsCustomersListPurchasableOffersCall struct { +type AccountsCustomersListPurchasableSkusCall struct { s *Service customer string urlParams_ gensupport.URLParams @@ -9273,44 +10519,50 @@ type AccountsCustomersListPurchasableOffersCall struct { header_ http.Header } -// ListPurchasableOffers: Lists the following: * Offers that you can -// purchase for a customer. * Offers that you can change for an -// entitlement. Possible error codes: * PERMISSION_DENIED: The customer -// doesn't belong to the reseller * INVALID_ARGUMENT: Required request -// parameters are missing or invalid. +// ListPurchasableSkus: Lists the following: * SKUs that you can +// purchase for a customer * SKUs that you can upgrade or downgrade for +// an entitlement. Possible error codes: * PERMISSION_DENIED: The +// customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required +// request parameters are missing or invalid. // -// - customer: The resource name of the customer to list Offers for. +// - customer: The resource name of the customer to list SKUs for. // Format: accounts/{account_id}/customers/{customer_id}. -func (r *AccountsCustomersService) ListPurchasableOffers(customer string) *AccountsCustomersListPurchasableOffersCall { - c := &AccountsCustomersListPurchasableOffersCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AccountsCustomersService) ListPurchasableSkus(customer string) *AccountsCustomersListPurchasableSkusCall { + c := &AccountsCustomersListPurchasableSkusCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.customer = customer return c } +// ChangeOfferPurchaseChangeType sets the optional parameter +// "changeOfferPurchase.changeType": Required. Change Type for the +// entitlement. +// +// Possible values: +// +// "CHANGE_TYPE_UNSPECIFIED" - Not used. +// "UPGRADE" - SKU is an upgrade on the current entitlement. +// "DOWNGRADE" - SKU is a downgrade on the current entitlement. +func (c *AccountsCustomersListPurchasableSkusCall) ChangeOfferPurchaseChangeType(changeOfferPurchaseChangeType string) *AccountsCustomersListPurchasableSkusCall { + c.urlParams_.Set("changeOfferPurchase.changeType", changeOfferPurchaseChangeType) + return c +} + // ChangeOfferPurchaseEntitlement sets the optional parameter // "changeOfferPurchase.entitlement": Required. Resource name of the // entitlement. Format: // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlemen // t_id} -func (c *AccountsCustomersListPurchasableOffersCall) ChangeOfferPurchaseEntitlement(changeOfferPurchaseEntitlement string) *AccountsCustomersListPurchasableOffersCall { +func (c *AccountsCustomersListPurchasableSkusCall) ChangeOfferPurchaseEntitlement(changeOfferPurchaseEntitlement string) *AccountsCustomersListPurchasableSkusCall { c.urlParams_.Set("changeOfferPurchase.entitlement", changeOfferPurchaseEntitlement) return c } -// ChangeOfferPurchaseNewSku sets the optional parameter -// "changeOfferPurchase.newSku": Resource name of the new target SKU. -// Provide this SKU when upgrading or downgrading an entitlement. -// Format: products/{product_id}/skus/{sku_id} -func (c *AccountsCustomersListPurchasableOffersCall) ChangeOfferPurchaseNewSku(changeOfferPurchaseNewSku string) *AccountsCustomersListPurchasableOffersCall { - c.urlParams_.Set("changeOfferPurchase.newSku", changeOfferPurchaseNewSku) - return c -} - -// CreateEntitlementPurchaseSku sets the optional parameter -// "createEntitlementPurchase.sku": Required. SKU that the result should -// be restricted to. Format: products/{product_id}/skus/{sku_id}. -func (c *AccountsCustomersListPurchasableOffersCall) CreateEntitlementPurchaseSku(createEntitlementPurchaseSku string) *AccountsCustomersListPurchasableOffersCall { - c.urlParams_.Set("createEntitlementPurchase.sku", createEntitlementPurchaseSku) +// CreateEntitlementPurchaseProduct sets the optional parameter +// "createEntitlementPurchase.product": Required. List SKUs belonging to +// this Product. Format: products/{product_id}. Supports products/- to +// retrieve SKUs for all products. +func (c *AccountsCustomersListPurchasableSkusCall) CreateEntitlementPurchaseProduct(createEntitlementPurchaseProduct string) *AccountsCustomersListPurchasableSkusCall { + c.urlParams_.Set("createEntitlementPurchase.product", createEntitlementPurchaseProduct) return c } @@ -9318,23 +10570,23 @@ func (c *AccountsCustomersListPurchasableOffersCall) CreateEntitlementPurchaseSk // language code. For example, "en-US". The response will localize in // the corresponding language code, if specified. The default value is // "en-US". -func (c *AccountsCustomersListPurchasableOffersCall) LanguageCode(languageCode string) *AccountsCustomersListPurchasableOffersCall { +func (c *AccountsCustomersListPurchasableSkusCall) LanguageCode(languageCode string) *AccountsCustomersListPurchasableSkusCall { c.urlParams_.Set("languageCode", languageCode) return c } // PageSize sets the optional parameter "pageSize": Requested page size. // Server might return fewer results than requested. If unspecified, -// returns at most 100 Offers. The maximum value is 1000; the server -// will coerce values above 1000. -func (c *AccountsCustomersListPurchasableOffersCall) PageSize(pageSize int64) *AccountsCustomersListPurchasableOffersCall { +// returns at most 100 SKUs. The maximum value is 1000; the server will +// coerce values above 1000. +func (c *AccountsCustomersListPurchasableSkusCall) PageSize(pageSize int64) *AccountsCustomersListPurchasableSkusCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A token for a page // of results other than the first page. -func (c *AccountsCustomersListPurchasableOffersCall) PageToken(pageToken string) *AccountsCustomersListPurchasableOffersCall { +func (c *AccountsCustomersListPurchasableSkusCall) PageToken(pageToken string) *AccountsCustomersListPurchasableSkusCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -9342,7 +10594,7 @@ func (c *AccountsCustomersListPurchasableOffersCall) PageToken(pageToken string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsCustomersListPurchasableOffersCall) Fields(s ...googleapi.Field) *AccountsCustomersListPurchasableOffersCall { +func (c *AccountsCustomersListPurchasableSkusCall) Fields(s ...googleapi.Field) *AccountsCustomersListPurchasableSkusCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9352,7 +10604,7 @@ func (c *AccountsCustomersListPurchasableOffersCall) Fields(s ...googleapi.Field // 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 *AccountsCustomersListPurchasableOffersCall) IfNoneMatch(entityTag string) *AccountsCustomersListPurchasableOffersCall { +func (c *AccountsCustomersListPurchasableSkusCall) IfNoneMatch(entityTag string) *AccountsCustomersListPurchasableSkusCall { c.ifNoneMatch_ = entityTag return c } @@ -9360,21 +10612,21 @@ func (c *AccountsCustomersListPurchasableOffersCall) IfNoneMatch(entityTag strin // 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 *AccountsCustomersListPurchasableOffersCall) Context(ctx context.Context) *AccountsCustomersListPurchasableOffersCall { +func (c *AccountsCustomersListPurchasableSkusCall) Context(ctx context.Context) *AccountsCustomersListPurchasableSkusCall { 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 *AccountsCustomersListPurchasableOffersCall) Header() http.Header { +func (c *AccountsCustomersListPurchasableSkusCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersListPurchasableOffersCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustomersListPurchasableSkusCall) 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_ { @@ -9387,7 +10639,7 @@ func (c *AccountsCustomersListPurchasableOffersCall) doRequest(alt string) (*htt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}:listPurchasableOffers") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}:listPurchasableSkus") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -9400,16 +10652,18 @@ func (c *AccountsCustomersListPurchasableOffersCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.listPurchasableOffers" call. -// Exactly one of *GoogleCloudChannelV1ListPurchasableOffersResponse or +// Do executes the "cloudchannel.accounts.customers.listPurchasableSkus" call. +// Exactly one of *GoogleCloudChannelV1ListPurchasableSkusResponse or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudChannelV1ListPurchasableOffersResponse.ServerResponse.Head -// er or (if a response was returned at all) in +// *GoogleCloudChannelV1ListPurchasableSkusResponse.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 *AccountsCustomersListPurchasableOffersCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1ListPurchasableOffersResponse, error) { +func (c *AccountsCustomersListPurchasableSkusCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1ListPurchasableSkusResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9428,7 +10682,7 @@ func (c *AccountsCustomersListPurchasableOffersCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudChannelV1ListPurchasableOffersResponse{ + ret := &GoogleCloudChannelV1ListPurchasableSkusResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9440,31 +10694,41 @@ func (c *AccountsCustomersListPurchasableOffersCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Lists the following: * Offers that you can purchase for a customer. * Offers that you can change for an entitlement. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller * INVALID_ARGUMENT: Required request parameters are missing or invalid.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:listPurchasableOffers", + // "description": "Lists the following: * SKUs that you can purchase for a customer * SKUs that you can upgrade or downgrade for an entitlement. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:listPurchasableSkus", // "httpMethod": "GET", - // "id": "cloudchannel.accounts.customers.listPurchasableOffers", + // "id": "cloudchannel.accounts.customers.listPurchasableSkus", // "parameterOrder": [ // "customer" // ], // "parameters": { - // "changeOfferPurchase.entitlement": { - // "description": "Required. Resource name of the entitlement. Format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", + // "changeOfferPurchase.changeType": { + // "description": "Required. Change Type for the entitlement.", + // "enum": [ + // "CHANGE_TYPE_UNSPECIFIED", + // "UPGRADE", + // "DOWNGRADE" + // ], + // "enumDescriptions": [ + // "Not used.", + // "SKU is an upgrade on the current entitlement.", + // "SKU is a downgrade on the current entitlement." + // ], // "location": "query", // "type": "string" // }, - // "changeOfferPurchase.newSku": { - // "description": "Optional. Resource name of the new target SKU. Provide this SKU when upgrading or downgrading an entitlement. Format: products/{product_id}/skus/{sku_id}", + // "changeOfferPurchase.entitlement": { + // "description": "Required. Resource name of the entitlement. Format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", // "location": "query", // "type": "string" // }, - // "createEntitlementPurchase.sku": { - // "description": "Required. SKU that the result should be restricted to. Format: products/{product_id}/skus/{sku_id}.", + // "createEntitlementPurchase.product": { + // "description": "Required. List SKUs belonging to this Product. Format: products/{product_id}. Supports products/- to retrieve SKUs for all products.", // "location": "query", // "type": "string" // }, // "customer": { - // "description": "Required. The resource name of the customer to list Offers for. Format: accounts/{account_id}/customers/{customer_id}.", + // "description": "Required. The resource name of the customer to list SKUs for. Format: accounts/{account_id}/customers/{customer_id}.", // "location": "path", // "pattern": "^accounts/[^/]+/customers/[^/]+$", // "required": true, @@ -9476,7 +10740,7 @@ func (c *AccountsCustomersListPurchasableOffersCall) Do(opts ...googleapi.CallOp // "type": "string" // }, // "pageSize": { - // "description": "Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 Offers. The maximum value is 1000; the server will coerce values above 1000.", + // "description": "Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 SKUs. The maximum value is 1000; the server will coerce values above 1000.", // "format": "int32", // "location": "query", // "type": "integer" @@ -9487,9 +10751,9 @@ func (c *AccountsCustomersListPurchasableOffersCall) Do(opts ...googleapi.CallOp // "type": "string" // } // }, - // "path": "v1/{+customer}:listPurchasableOffers", + // "path": "v1/{+customer}:listPurchasableSkus", // "response": { - // "$ref": "GoogleCloudChannelV1ListPurchasableOffersResponse" + // "$ref": "GoogleCloudChannelV1ListPurchasableSkusResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.order" @@ -9501,7 +10765,7 @@ func (c *AccountsCustomersListPurchasableOffersCall) Do(opts ...googleapi.CallOp // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *AccountsCustomersListPurchasableOffersCall) Pages(ctx context.Context, f func(*GoogleCloudChannelV1ListPurchasableOffersResponse) error) error { +func (c *AccountsCustomersListPurchasableSkusCall) Pages(ctx context.Context, f func(*GoogleCloudChannelV1ListPurchasableSkusResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -9519,140 +10783,245 @@ func (c *AccountsCustomersListPurchasableOffersCall) Pages(ctx context.Context, } } -// method id "cloudchannel.accounts.customers.listPurchasableSkus": +// method id "cloudchannel.accounts.customers.patch": + +type AccountsCustomersPatchCall struct { + s *Service + name string + googlecloudchannelv1customer *GoogleCloudChannelV1Customer + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an existing Customer resource for the reseller or +// distributor. Possible error codes: * PERMISSION_DENIED: The reseller +// account making the request is different from the reseller account in +// the API request. * INVALID_ARGUMENT: Required request parameters are +// missing or invalid. * NOT_FOUND: No Customer resource found for the +// name in the request. Return value: The updated Customer resource. +// +// - name: Output only. Resource name of the customer. Format: +// accounts/{account_id}/customers/{customer_id}. +func (r *AccountsCustomersService) Patch(name string, googlecloudchannelv1customer *GoogleCloudChannelV1Customer) *AccountsCustomersPatchCall { + c := &AccountsCustomersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudchannelv1customer = googlecloudchannelv1customer + return c +} + +// UpdateMask sets the optional parameter "updateMask": The update mask +// that applies to the resource. +func (c *AccountsCustomersPatchCall) UpdateMask(updateMask string) *AccountsCustomersPatchCall { + 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 *AccountsCustomersPatchCall) Fields(s ...googleapi.Field) *AccountsCustomersPatchCall { + 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 *AccountsCustomersPatchCall) Context(ctx context.Context) *AccountsCustomersPatchCall { + 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 *AccountsCustomersPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsCustomersPatchCall) 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.googlecloudchannelv1customer) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + 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 "cloudchannel.accounts.customers.patch" call. +// Exactly one of *GoogleCloudChannelV1Customer or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudChannelV1Customer.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 *AccountsCustomersPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1Customer, 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 := &GoogleCloudChannelV1Customer{ + 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": "Updates an existing Customer resource for the reseller or distributor. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: No Customer resource found for the name in the request. Return value: The updated Customer resource.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}", + // "httpMethod": "PATCH", + // "id": "cloudchannel.accounts.customers.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. Resource name of the customer. Format: accounts/{account_id}/customers/{customer_id}", + // "location": "path", + // "pattern": "^accounts/[^/]+/customers/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The update mask that applies to the resource. Optional.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudChannelV1Customer" + // }, + // "response": { + // "$ref": "GoogleCloudChannelV1Customer" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/apps.order" + // ] + // } + +} + +// method id "cloudchannel.accounts.customers.provisionCloudIdentity": -type AccountsCustomersListPurchasableSkusCall struct { - s *Service - customer string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccountsCustomersProvisionCloudIdentityCall struct { + s *Service + customer string + googlecloudchannelv1provisioncloudidentityrequest *GoogleCloudChannelV1ProvisionCloudIdentityRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ListPurchasableSkus: Lists the following: * SKUs that you can -// purchase for a customer * SKUs that you can upgrade or downgrade for -// an entitlement. Possible error codes: * PERMISSION_DENIED: The +// ProvisionCloudIdentity: Creates a Cloud Identity for the given +// customer using the customer's information, or the information +// provided here. Possible error codes: * PERMISSION_DENIED: The // customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required -// request parameters are missing or invalid. +// request parameters are missing or invalid. * NOT_FOUND: The customer +// was not found. * ALREADY_EXISTS: The customer's primary email already +// exists. Retry after changing the customer's primary contact email. * +// INTERNAL: Any non-user error related to a technical issue in the +// backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error +// related to a technical issue in the backend. Contact Cloud Channel +// support. Return value: The ID of a long-running operation. To get the +// results of the operation, call the GetOperation method of +// CloudChannelOperationsService. The Operation metadata contains an +// instance of OperationMetadata. // -// - customer: The resource name of the customer to list SKUs for. -// Format: accounts/{account_id}/customers/{customer_id}. -func (r *AccountsCustomersService) ListPurchasableSkus(customer string) *AccountsCustomersListPurchasableSkusCall { - c := &AccountsCustomersListPurchasableSkusCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - customer: Resource name of the customer. Format: +// accounts/{account_id}/customers/{customer_id}. +func (r *AccountsCustomersService) ProvisionCloudIdentity(customer string, googlecloudchannelv1provisioncloudidentityrequest *GoogleCloudChannelV1ProvisionCloudIdentityRequest) *AccountsCustomersProvisionCloudIdentityCall { + c := &AccountsCustomersProvisionCloudIdentityCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.customer = customer - return c -} - -// ChangeOfferPurchaseChangeType sets the optional parameter -// "changeOfferPurchase.changeType": Required. Change Type for the -// entitlement. -// -// Possible values: -// -// "CHANGE_TYPE_UNSPECIFIED" - Not used. -// "UPGRADE" - SKU is an upgrade on the current entitlement. -// "DOWNGRADE" - SKU is a downgrade on the current entitlement. -func (c *AccountsCustomersListPurchasableSkusCall) ChangeOfferPurchaseChangeType(changeOfferPurchaseChangeType string) *AccountsCustomersListPurchasableSkusCall { - c.urlParams_.Set("changeOfferPurchase.changeType", changeOfferPurchaseChangeType) - return c -} - -// ChangeOfferPurchaseEntitlement sets the optional parameter -// "changeOfferPurchase.entitlement": Required. Resource name of the -// entitlement. Format: -// accounts/{account_id}/customers/{customer_id}/entitlements/{entitlemen -// t_id} -func (c *AccountsCustomersListPurchasableSkusCall) ChangeOfferPurchaseEntitlement(changeOfferPurchaseEntitlement string) *AccountsCustomersListPurchasableSkusCall { - c.urlParams_.Set("changeOfferPurchase.entitlement", changeOfferPurchaseEntitlement) - return c -} - -// CreateEntitlementPurchaseProduct sets the optional parameter -// "createEntitlementPurchase.product": Required. List SKUs belonging to -// this Product. Format: products/{product_id}. Supports products/- to -// retrieve SKUs for all products. -func (c *AccountsCustomersListPurchasableSkusCall) CreateEntitlementPurchaseProduct(createEntitlementPurchaseProduct string) *AccountsCustomersListPurchasableSkusCall { - c.urlParams_.Set("createEntitlementPurchase.product", createEntitlementPurchaseProduct) - return c -} - -// LanguageCode sets the optional parameter "languageCode": The BCP-47 -// language code. For example, "en-US". The response will localize in -// the corresponding language code, if specified. The default value is -// "en-US". -func (c *AccountsCustomersListPurchasableSkusCall) LanguageCode(languageCode string) *AccountsCustomersListPurchasableSkusCall { - c.urlParams_.Set("languageCode", languageCode) - return c -} - -// PageSize sets the optional parameter "pageSize": Requested page size. -// Server might return fewer results than requested. If unspecified, -// returns at most 100 SKUs. The maximum value is 1000; the server will -// coerce values above 1000. -func (c *AccountsCustomersListPurchasableSkusCall) PageSize(pageSize int64) *AccountsCustomersListPurchasableSkusCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A token for a page -// of results other than the first page. -func (c *AccountsCustomersListPurchasableSkusCall) PageToken(pageToken string) *AccountsCustomersListPurchasableSkusCall { - c.urlParams_.Set("pageToken", pageToken) + c.googlecloudchannelv1provisioncloudidentityrequest = googlecloudchannelv1provisioncloudidentityrequest 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 *AccountsCustomersListPurchasableSkusCall) Fields(s ...googleapi.Field) *AccountsCustomersListPurchasableSkusCall { +func (c *AccountsCustomersProvisionCloudIdentityCall) Fields(s ...googleapi.Field) *AccountsCustomersProvisionCloudIdentityCall { 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 *AccountsCustomersListPurchasableSkusCall) IfNoneMatch(entityTag string) *AccountsCustomersListPurchasableSkusCall { - 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 *AccountsCustomersListPurchasableSkusCall) Context(ctx context.Context) *AccountsCustomersListPurchasableSkusCall { +func (c *AccountsCustomersProvisionCloudIdentityCall) Context(ctx context.Context) *AccountsCustomersProvisionCloudIdentityCall { 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 *AccountsCustomersListPurchasableSkusCall) Header() http.Header { +func (c *AccountsCustomersProvisionCloudIdentityCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersListPurchasableSkusCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustomersProvisionCloudIdentityCall) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1provisioncloudidentityrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}:listPurchasableSkus") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}:provisionCloudIdentity") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -9663,18 +11032,14 @@ func (c *AccountsCustomersListPurchasableSkusCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.listPurchasableSkus" call. -// Exactly one of *GoogleCloudChannelV1ListPurchasableSkusResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudChannelV1ListPurchasableSkusResponse.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 *AccountsCustomersListPurchasableSkusCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1ListPurchasableSkusResponse, error) { +// Do executes the "cloudchannel.accounts.customers.provisionCloudIdentity" 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 *AccountsCustomersProvisionCloudIdentityCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9693,7 +11058,7 @@ func (c *AccountsCustomersListPurchasableSkusCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudChannelV1ListPurchasableSkusResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9705,66 +11070,28 @@ func (c *AccountsCustomersListPurchasableSkusCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Lists the following: * SKUs that you can purchase for a customer * SKUs that you can upgrade or downgrade for an entitlement. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:listPurchasableSkus", - // "httpMethod": "GET", - // "id": "cloudchannel.accounts.customers.listPurchasableSkus", + // "description": "Creates a Cloud Identity for the given customer using the customer's information, or the information provided here. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer was not found. * ALREADY_EXISTS: The customer's primary email already exists. Retry after changing the customer's primary contact email. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata contains an instance of OperationMetadata.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:provisionCloudIdentity", + // "httpMethod": "POST", + // "id": "cloudchannel.accounts.customers.provisionCloudIdentity", // "parameterOrder": [ // "customer" // ], // "parameters": { - // "changeOfferPurchase.changeType": { - // "description": "Required. Change Type for the entitlement.", - // "enum": [ - // "CHANGE_TYPE_UNSPECIFIED", - // "UPGRADE", - // "DOWNGRADE" - // ], - // "enumDescriptions": [ - // "Not used.", - // "SKU is an upgrade on the current entitlement.", - // "SKU is a downgrade on the current entitlement." - // ], - // "location": "query", - // "type": "string" - // }, - // "changeOfferPurchase.entitlement": { - // "description": "Required. Resource name of the entitlement. Format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", - // "location": "query", - // "type": "string" - // }, - // "createEntitlementPurchase.product": { - // "description": "Required. List SKUs belonging to this Product. Format: products/{product_id}. Supports products/- to retrieve SKUs for all products.", - // "location": "query", - // "type": "string" - // }, // "customer": { - // "description": "Required. The resource name of the customer to list SKUs for. Format: accounts/{account_id}/customers/{customer_id}.", + // "description": "Required. Resource name of the customer. Format: accounts/{account_id}/customers/{customer_id}", // "location": "path", // "pattern": "^accounts/[^/]+/customers/[^/]+$", // "required": true, // "type": "string" - // }, - // "languageCode": { - // "description": "Optional. The BCP-47 language code. For example, \"en-US\". The response will localize in the corresponding language code, if specified. The default value is \"en-US\".", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 SKUs. The maximum value is 1000; the server will coerce values above 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. A token for a page of results other than the first page.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+customer}:listPurchasableSkus", + // "path": "v1/{+customer}:provisionCloudIdentity", + // "request": { + // "$ref": "GoogleCloudChannelV1ProvisionCloudIdentityRequest" + // }, // "response": { - // "$ref": "GoogleCloudChannelV1ListPurchasableSkusResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.order" @@ -9773,65 +11100,51 @@ func (c *AccountsCustomersListPurchasableSkusCall) Do(opts ...googleapi.CallOpti } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AccountsCustomersListPurchasableSkusCall) Pages(ctx context.Context, f func(*GoogleCloudChannelV1ListPurchasableSkusResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "cloudchannel.accounts.customers.patch": - -type AccountsCustomersPatchCall struct { - s *Service - name string - googlecloudchannelv1customer *GoogleCloudChannelV1Customer - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates an existing Customer resource for the reseller or -// distributor. Possible error codes: * PERMISSION_DENIED: The reseller -// account making the request is different from the reseller account in -// the API request. * INVALID_ARGUMENT: Required request parameters are -// missing or invalid. * NOT_FOUND: No Customer resource found for the -// name in the request. Return value: The updated Customer resource. -// -// - name: Output only. Resource name of the customer. Format: -// accounts/{account_id}/customers/{customer_id}. -func (r *AccountsCustomersService) Patch(name string, googlecloudchannelv1customer *GoogleCloudChannelV1Customer) *AccountsCustomersPatchCall { - c := &AccountsCustomersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudchannelv1customer = googlecloudchannelv1customer - return c +// method id "cloudchannel.accounts.customers.transferEntitlements": + +type AccountsCustomersTransferEntitlementsCall struct { + s *Service + parent string + googlecloudchannelv1transferentitlementsrequest *GoogleCloudChannelV1TransferEntitlementsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateMask sets the optional parameter "updateMask": The update mask -// that applies to the resource. -func (c *AccountsCustomersPatchCall) UpdateMask(updateMask string) *AccountsCustomersPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// TransferEntitlements: Transfers customer entitlements to new +// reseller. Possible error codes: * PERMISSION_DENIED: The customer +// doesn't belong to the reseller. * INVALID_ARGUMENT: Required request +// parameters are missing or invalid. * NOT_FOUND: The customer or offer +// resource was not found. * ALREADY_EXISTS: The SKU was already +// transferred for the customer. * CONDITION_NOT_MET or +// FAILED_PRECONDITION: * The SKU requires domain verification to +// transfer, but the domain is not verified. * An Add-On SKU (example, +// Vault or Drive) is missing the pre-requisite SKU (example, G Suite +// Basic). * (Developer accounts only) Reseller and resold domain must +// meet the following naming requirements: * Domain names must start +// with goog-test. * Domain names must include the reseller domain. * +// Specify all transferring entitlements. * INTERNAL: Any non-user error +// related to a technical issue in the backend. Contact Cloud Channel +// support. * UNKNOWN: Any non-user error related to a technical issue +// in the backend. Contact Cloud Channel support. Return value: The ID +// of a long-running operation. To get the results of the operation, +// call the GetOperation method of CloudChannelOperationsService. The +// Operation metadata will contain an instance of OperationMetadata. +// +// - parent: The resource name of the reseller's customer account that +// will receive transferred entitlements. Parent uses the format: +// accounts/{account_id}/customers/{customer_id}. +func (r *AccountsCustomersService) TransferEntitlements(parent string, googlecloudchannelv1transferentitlementsrequest *GoogleCloudChannelV1TransferEntitlementsRequest) *AccountsCustomersTransferEntitlementsCall { + c := &AccountsCustomersTransferEntitlementsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudchannelv1transferentitlementsrequest = googlecloudchannelv1transferentitlementsrequest 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 *AccountsCustomersPatchCall) Fields(s ...googleapi.Field) *AccountsCustomersPatchCall { +func (c *AccountsCustomersTransferEntitlementsCall) Fields(s ...googleapi.Field) *AccountsCustomersTransferEntitlementsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9839,21 +11152,21 @@ func (c *AccountsCustomersPatchCall) Fields(s ...googleapi.Field) *AccountsCusto // 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 *AccountsCustomersPatchCall) Context(ctx context.Context) *AccountsCustomersPatchCall { +func (c *AccountsCustomersTransferEntitlementsCall) Context(ctx context.Context) *AccountsCustomersTransferEntitlementsCall { 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 *AccountsCustomersPatchCall) Header() http.Header { +func (c *AccountsCustomersTransferEntitlementsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustomersTransferEntitlementsCall) 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_ { @@ -9861,34 +11174,34 @@ func (c *AccountsCustomersPatchCall) doRequest(alt string) (*http.Response, erro } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1customer) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1transferentitlementsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:transferEntitlements") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.patch" call. -// Exactly one of *GoogleCloudChannelV1Customer or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudChannelV1Customer.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "cloudchannel.accounts.customers.transferEntitlements" 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 *AccountsCustomersPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1Customer, error) { +func (c *AccountsCustomersTransferEntitlementsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9907,7 +11220,7 @@ func (c *AccountsCustomersPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudChannelV1Customer{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9919,34 +11232,28 @@ func (c *AccountsCustomersPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCl } return ret, nil // { - // "description": "Updates an existing Customer resource for the reseller or distributor. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: No Customer resource found for the name in the request. Return value: The updated Customer resource.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}", - // "httpMethod": "PATCH", - // "id": "cloudchannel.accounts.customers.patch", + // "description": "Transfers customer entitlements to new reseller. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer or offer resource was not found. * ALREADY_EXISTS: The SKU was already transferred for the customer. * CONDITION_NOT_MET or FAILED_PRECONDITION: * The SKU requires domain verification to transfer, but the domain is not verified. * An Add-On SKU (example, Vault or Drive) is missing the pre-requisite SKU (example, G Suite Basic). * (Developer accounts only) Reseller and resold domain must meet the following naming requirements: * Domain names must start with goog-test. * Domain names must include the reseller domain. * Specify all transferring entitlements. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:transferEntitlements", + // "httpMethod": "POST", + // "id": "cloudchannel.accounts.customers.transferEntitlements", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Output only. Resource name of the customer. Format: accounts/{account_id}/customers/{customer_id}", + // "parent": { + // "description": "Required. The resource name of the reseller's customer account that will receive transferred entitlements. Parent uses the format: accounts/{account_id}/customers/{customer_id}", // "location": "path", // "pattern": "^accounts/[^/]+/customers/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "The update mask that applies to the resource. Optional.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}:transferEntitlements", // "request": { - // "$ref": "GoogleCloudChannelV1Customer" + // "$ref": "GoogleCloudChannelV1TransferEntitlementsRequest" // }, // "response": { - // "$ref": "GoogleCloudChannelV1Customer" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.order" @@ -9955,45 +11262,52 @@ func (c *AccountsCustomersPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCl } -// method id "cloudchannel.accounts.customers.provisionCloudIdentity": +// method id "cloudchannel.accounts.customers.transferEntitlementsToGoogle": -type AccountsCustomersProvisionCloudIdentityCall struct { - s *Service - customer string - googlecloudchannelv1provisioncloudidentityrequest *GoogleCloudChannelV1ProvisionCloudIdentityRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsCustomersTransferEntitlementsToGoogleCall struct { + s *Service + parent string + googlecloudchannelv1transferentitlementstogooglerequest *GoogleCloudChannelV1TransferEntitlementsToGoogleRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ProvisionCloudIdentity: Creates a Cloud Identity for the given -// customer using the customer's information, or the information -// provided here. Possible error codes: * PERMISSION_DENIED: The -// customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required -// request parameters are missing or invalid. * NOT_FOUND: The customer -// was not found. * ALREADY_EXISTS: The customer's primary email already -// exists. Retry after changing the customer's primary contact email. * -// INTERNAL: Any non-user error related to a technical issue in the -// backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error -// related to a technical issue in the backend. Contact Cloud Channel -// support. Return value: The ID of a long-running operation. To get the -// results of the operation, call the GetOperation method of -// CloudChannelOperationsService. The Operation metadata contains an -// instance of OperationMetadata. +// TransferEntitlementsToGoogle: Transfers customer entitlements from +// their current reseller to Google. Possible error codes: * +// PERMISSION_DENIED: The customer doesn't belong to the reseller. * +// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// * NOT_FOUND: The customer or offer resource was not found. * +// ALREADY_EXISTS: The SKU was already transferred for the customer. * +// CONDITION_NOT_MET or FAILED_PRECONDITION: * The SKU requires domain +// verification to transfer, but the domain is not verified. * An Add-On +// SKU (example, Vault or Drive) is missing the pre-requisite SKU +// (example, G Suite Basic). * (Developer accounts only) Reseller and +// resold domain must meet the following naming requirements: * Domain +// names must start with goog-test. * Domain names must include the +// reseller domain. * INTERNAL: Any non-user error related to a +// technical issue in the backend. Contact Cloud Channel support. * +// UNKNOWN: Any non-user error related to a technical issue in the +// backend. Contact Cloud Channel support. Return value: The ID of a +// long-running operation. To get the results of the operation, call the +// GetOperation method of CloudChannelOperationsService. The response +// will contain google.protobuf.Empty on success. The Operation metadata +// will contain an instance of OperationMetadata. // -// - customer: Resource name of the customer. Format: +// - parent: The resource name of the reseller's customer account where +// the entitlements transfer from. Parent uses the format: // accounts/{account_id}/customers/{customer_id}. -func (r *AccountsCustomersService) ProvisionCloudIdentity(customer string, googlecloudchannelv1provisioncloudidentityrequest *GoogleCloudChannelV1ProvisionCloudIdentityRequest) *AccountsCustomersProvisionCloudIdentityCall { - c := &AccountsCustomersProvisionCloudIdentityCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.customer = customer - c.googlecloudchannelv1provisioncloudidentityrequest = googlecloudchannelv1provisioncloudidentityrequest +func (r *AccountsCustomersService) TransferEntitlementsToGoogle(parent string, googlecloudchannelv1transferentitlementstogooglerequest *GoogleCloudChannelV1TransferEntitlementsToGoogleRequest) *AccountsCustomersTransferEntitlementsToGoogleCall { + c := &AccountsCustomersTransferEntitlementsToGoogleCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudchannelv1transferentitlementstogooglerequest = googlecloudchannelv1transferentitlementstogooglerequest 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 *AccountsCustomersProvisionCloudIdentityCall) Fields(s ...googleapi.Field) *AccountsCustomersProvisionCloudIdentityCall { +func (c *AccountsCustomersTransferEntitlementsToGoogleCall) Fields(s ...googleapi.Field) *AccountsCustomersTransferEntitlementsToGoogleCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10001,21 +11315,21 @@ func (c *AccountsCustomersProvisionCloudIdentityCall) Fields(s ...googleapi.Fiel // 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 *AccountsCustomersProvisionCloudIdentityCall) Context(ctx context.Context) *AccountsCustomersProvisionCloudIdentityCall { +func (c *AccountsCustomersTransferEntitlementsToGoogleCall) Context(ctx context.Context) *AccountsCustomersTransferEntitlementsToGoogleCall { 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 *AccountsCustomersProvisionCloudIdentityCall) Header() http.Header { +func (c *AccountsCustomersTransferEntitlementsToGoogleCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersProvisionCloudIdentityCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustomersTransferEntitlementsToGoogleCall) 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_ { @@ -10023,14 +11337,14 @@ func (c *AccountsCustomersProvisionCloudIdentityCall) doRequest(alt string) (*ht } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1provisioncloudidentityrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1transferentitlementstogooglerequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}:provisionCloudIdentity") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:transferEntitlementsToGoogle") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -10038,19 +11352,19 @@ func (c *AccountsCustomersProvisionCloudIdentityCall) doRequest(alt string) (*ht } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "customer": c.customer, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.provisionCloudIdentity" call. +// Do executes the "cloudchannel.accounts.customers.transferEntitlementsToGoogle" 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 *AccountsCustomersProvisionCloudIdentityCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *AccountsCustomersTransferEntitlementsToGoogleCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10081,25 +11395,25 @@ func (c *AccountsCustomersProvisionCloudIdentityCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Creates a Cloud Identity for the given customer using the customer's information, or the information provided here. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer was not found. * ALREADY_EXISTS: The customer's primary email already exists. Retry after changing the customer's primary contact email. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata contains an instance of OperationMetadata.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:provisionCloudIdentity", + // "description": "Transfers customer entitlements from their current reseller to Google. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer or offer resource was not found. * ALREADY_EXISTS: The SKU was already transferred for the customer. * CONDITION_NOT_MET or FAILED_PRECONDITION: * The SKU requires domain verification to transfer, but the domain is not verified. * An Add-On SKU (example, Vault or Drive) is missing the pre-requisite SKU (example, G Suite Basic). * (Developer accounts only) Reseller and resold domain must meet the following naming requirements: * Domain names must start with goog-test. * Domain names must include the reseller domain. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The Operation metadata will contain an instance of OperationMetadata.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:transferEntitlementsToGoogle", // "httpMethod": "POST", - // "id": "cloudchannel.accounts.customers.provisionCloudIdentity", + // "id": "cloudchannel.accounts.customers.transferEntitlementsToGoogle", // "parameterOrder": [ - // "customer" + // "parent" // ], // "parameters": { - // "customer": { - // "description": "Required. Resource name of the customer. Format: accounts/{account_id}/customers/{customer_id}", + // "parent": { + // "description": "Required. The resource name of the reseller's customer account where the entitlements transfer from. Parent uses the format: accounts/{account_id}/customers/{customer_id}", // "location": "path", // "pattern": "^accounts/[^/]+/customers/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+customer}:provisionCloudIdentity", + // "path": "v1/{+parent}:transferEntitlementsToGoogle", // "request": { - // "$ref": "GoogleCloudChannelV1ProvisionCloudIdentityRequest" + // "$ref": "GoogleCloudChannelV1TransferEntitlementsToGoogleRequest" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -10111,51 +11425,58 @@ func (c *AccountsCustomersProvisionCloudIdentityCall) Do(opts ...googleapi.CallO } -// method id "cloudchannel.accounts.customers.transferEntitlements": +// method id "cloudchannel.accounts.customers.customerRepricingConfigs.create": -type AccountsCustomersTransferEntitlementsCall struct { - s *Service - parent string - googlecloudchannelv1transferentitlementsrequest *GoogleCloudChannelV1TransferEntitlementsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsCustomersCustomerRepricingConfigsCreateCall struct { + s *Service + parent string + googlecloudchannelv1customerrepricingconfig *GoogleCloudChannelV1CustomerRepricingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TransferEntitlements: Transfers customer entitlements to new -// reseller. Possible error codes: * PERMISSION_DENIED: The customer -// doesn't belong to the reseller. * INVALID_ARGUMENT: Required request -// parameters are missing or invalid. * NOT_FOUND: The customer or offer -// resource was not found. * ALREADY_EXISTS: The SKU was already -// transferred for the customer. * CONDITION_NOT_MET or -// FAILED_PRECONDITION: * The SKU requires domain verification to -// transfer, but the domain is not verified. * An Add-On SKU (example, -// Vault or Drive) is missing the pre-requisite SKU (example, G Suite -// Basic). * (Developer accounts only) Reseller and resold domain must -// meet the following naming requirements: * Domain names must start -// with goog-test. * Domain names must include the reseller domain. * -// Specify all transferring entitlements. * INTERNAL: Any non-user error -// related to a technical issue in the backend. Contact Cloud Channel -// support. * UNKNOWN: Any non-user error related to a technical issue -// in the backend. Contact Cloud Channel support. Return value: The ID -// of a long-running operation. To get the results of the operation, -// call the GetOperation method of CloudChannelOperationsService. The -// Operation metadata will contain an instance of OperationMetadata. +// Create: Creates a CustomerRepricingConfig. Call this method to set +// modifications for a specific customer's bill. You can only create +// configs if the RepricingConfig.effective_invoice_month is a future +// month. If needed, you can create a config for the current month, with +// some restrictions. When creating a config for a future month, make +// sure there are no existing configs for that +// RepricingConfig.effective_invoice_month. The following restrictions +// are for creating configs in the current month. * This functionality +// is reserved for recovering from an erroneous config, and should not +// be used for regular business cases. * The new config will not modify +// exports used with other configs. Changes to the config may be +// immediate, but may take up to 24 hours. * There is a limit of ten +// configs for any RepricingConfig.EntitlementGranularity.entitlement or +// RepricingConfig.effective_invoice_month. * The contained +// CustomerRepricingConfig.repricing_config vaule must be different from +// the value used in the current config for a +// RepricingConfig.EntitlementGranularity.entitlement. Possible Error +// Codes: * PERMISSION_DENIED: If the account making the request and the +// account being queried are different. * INVALID_ARGUMENT: Missing or +// invalid required parameters in the request. Also displays if the +// updated config is for the current month or past months. * NOT_FOUND: +// The CustomerRepricingConfig specified does not exist or is not +// associated with the given account. * INTERNAL: Any non-user error +// related to technical issues in the backend. In this case, contact +// Cloud Channel support. Return Value: If successful, the updated +// CustomerRepricingConfig resource, otherwise returns an error. // -// - parent: The resource name of the reseller's customer account that -// will receive transferred entitlements. Parent uses the format: +// - parent: The resource name of the customer that will receive this +// repricing config. Parent uses the format: // accounts/{account_id}/customers/{customer_id}. -func (r *AccountsCustomersService) TransferEntitlements(parent string, googlecloudchannelv1transferentitlementsrequest *GoogleCloudChannelV1TransferEntitlementsRequest) *AccountsCustomersTransferEntitlementsCall { - c := &AccountsCustomersTransferEntitlementsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AccountsCustomersCustomerRepricingConfigsService) Create(parent string, googlecloudchannelv1customerrepricingconfig *GoogleCloudChannelV1CustomerRepricingConfig) *AccountsCustomersCustomerRepricingConfigsCreateCall { + c := &AccountsCustomersCustomerRepricingConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudchannelv1transferentitlementsrequest = googlecloudchannelv1transferentitlementsrequest + c.googlecloudchannelv1customerrepricingconfig = googlecloudchannelv1customerrepricingconfig 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 *AccountsCustomersTransferEntitlementsCall) Fields(s ...googleapi.Field) *AccountsCustomersTransferEntitlementsCall { +func (c *AccountsCustomersCustomerRepricingConfigsCreateCall) Fields(s ...googleapi.Field) *AccountsCustomersCustomerRepricingConfigsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10163,21 +11484,21 @@ func (c *AccountsCustomersTransferEntitlementsCall) Fields(s ...googleapi.Field) // 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 *AccountsCustomersTransferEntitlementsCall) Context(ctx context.Context) *AccountsCustomersTransferEntitlementsCall { +func (c *AccountsCustomersCustomerRepricingConfigsCreateCall) Context(ctx context.Context) *AccountsCustomersCustomerRepricingConfigsCreateCall { 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 *AccountsCustomersTransferEntitlementsCall) Header() http.Header { +func (c *AccountsCustomersCustomerRepricingConfigsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersTransferEntitlementsCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustomersCustomerRepricingConfigsCreateCall) 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_ { @@ -10185,14 +11506,14 @@ func (c *AccountsCustomersTransferEntitlementsCall) doRequest(alt string) (*http } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1transferentitlementsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1customerrepricingconfig) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:transferEntitlements") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customerRepricingConfigs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -10205,14 +11526,16 @@ func (c *AccountsCustomersTransferEntitlementsCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.transferEntitlements" 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 *AccountsCustomersTransferEntitlementsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "cloudchannel.accounts.customers.customerRepricingConfigs.create" call. +// Exactly one of *GoogleCloudChannelV1CustomerRepricingConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudChannelV1CustomerRepricingConfig.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 *AccountsCustomersCustomerRepricingConfigsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1CustomerRepricingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10231,7 +11554,7 @@ func (c *AccountsCustomersTransferEntitlementsCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudChannelV1CustomerRepricingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10243,28 +11566,28 @@ func (c *AccountsCustomersTransferEntitlementsCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Transfers customer entitlements to new reseller. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer or offer resource was not found. * ALREADY_EXISTS: The SKU was already transferred for the customer. * CONDITION_NOT_MET or FAILED_PRECONDITION: * The SKU requires domain verification to transfer, but the domain is not verified. * An Add-On SKU (example, Vault or Drive) is missing the pre-requisite SKU (example, G Suite Basic). * (Developer accounts only) Reseller and resold domain must meet the following naming requirements: * Domain names must start with goog-test. * Domain names must include the reseller domain. * Specify all transferring entitlements. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:transferEntitlements", + // "description": "Creates a CustomerRepricingConfig. Call this method to set modifications for a specific customer's bill. You can only create configs if the RepricingConfig.effective_invoice_month is a future month. If needed, you can create a config for the current month, with some restrictions. When creating a config for a future month, make sure there are no existing configs for that RepricingConfig.effective_invoice_month. The following restrictions are for creating configs in the current month. * This functionality is reserved for recovering from an erroneous config, and should not be used for regular business cases. * The new config will not modify exports used with other configs. Changes to the config may be immediate, but may take up to 24 hours. * There is a limit of ten configs for any RepricingConfig.EntitlementGranularity.entitlement or RepricingConfig.effective_invoice_month. * The contained CustomerRepricingConfig.repricing_config vaule must be different from the value used in the current config for a RepricingConfig.EntitlementGranularity.entitlement. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if the updated config is for the current month or past months. * NOT_FOUND: The CustomerRepricingConfig specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the updated CustomerRepricingConfig resource, otherwise returns an error.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/customerRepricingConfigs", // "httpMethod": "POST", - // "id": "cloudchannel.accounts.customers.transferEntitlements", + // "id": "cloudchannel.accounts.customers.customerRepricingConfigs.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. The resource name of the reseller's customer account that will receive transferred entitlements. Parent uses the format: accounts/{account_id}/customers/{customer_id}", + // "description": "Required. The resource name of the customer that will receive this repricing config. Parent uses the format: accounts/{account_id}/customers/{customer_id}", // "location": "path", // "pattern": "^accounts/[^/]+/customers/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}:transferEntitlements", + // "path": "v1/{+parent}/customerRepricingConfigs", // "request": { - // "$ref": "GoogleCloudChannelV1TransferEntitlementsRequest" + // "$ref": "GoogleCloudChannelV1CustomerRepricingConfig" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudChannelV1CustomerRepricingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.order" @@ -10273,52 +11596,40 @@ func (c *AccountsCustomersTransferEntitlementsCall) Do(opts ...googleapi.CallOpt } -// method id "cloudchannel.accounts.customers.transferEntitlementsToGoogle": +// method id "cloudchannel.accounts.customers.customerRepricingConfigs.delete": -type AccountsCustomersTransferEntitlementsToGoogleCall struct { - s *Service - parent string - googlecloudchannelv1transferentitlementstogooglerequest *GoogleCloudChannelV1TransferEntitlementsToGoogleRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsCustomersCustomerRepricingConfigsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TransferEntitlementsToGoogle: Transfers customer entitlements from -// their current reseller to Google. Possible error codes: * -// PERMISSION_DENIED: The customer doesn't belong to the reseller. * -// INVALID_ARGUMENT: Required request parameters are missing or invalid. -// * NOT_FOUND: The customer or offer resource was not found. * -// ALREADY_EXISTS: The SKU was already transferred for the customer. * -// CONDITION_NOT_MET or FAILED_PRECONDITION: * The SKU requires domain -// verification to transfer, but the domain is not verified. * An Add-On -// SKU (example, Vault or Drive) is missing the pre-requisite SKU -// (example, G Suite Basic). * (Developer accounts only) Reseller and -// resold domain must meet the following naming requirements: * Domain -// names must start with goog-test. * Domain names must include the -// reseller domain. * INTERNAL: Any non-user error related to a -// technical issue in the backend. Contact Cloud Channel support. * -// UNKNOWN: Any non-user error related to a technical issue in the -// backend. Contact Cloud Channel support. Return value: The ID of a -// long-running operation. To get the results of the operation, call the -// GetOperation method of CloudChannelOperationsService. The response -// will contain google.protobuf.Empty on success. The Operation metadata -// will contain an instance of OperationMetadata. +// Delete: Deletes the given CustomerRepricingConfig permanently. You +// can only delete configs if their +// RepricingConfig.effective_invoice_month is set to a date after the +// current month. Possible error codes: * PERMISSION_DENIED: The account +// making the request does not own this customer. * INVALID_ARGUMENT: +// Required request parameters are missing or invalid. * +// FAILED_PRECONDITION: The CustomerRepricingConfig is active or in the +// past. * NOT_FOUND: No CustomerRepricingConfig found for the name in +// the request. // -// - parent: The resource name of the reseller's customer account where -// the entitlements transfer from. Parent uses the format: -// accounts/{account_id}/customers/{customer_id}. -func (r *AccountsCustomersService) TransferEntitlementsToGoogle(parent string, googlecloudchannelv1transferentitlementstogooglerequest *GoogleCloudChannelV1TransferEntitlementsToGoogleRequest) *AccountsCustomersTransferEntitlementsToGoogleCall { - c := &AccountsCustomersTransferEntitlementsToGoogleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudchannelv1transferentitlementstogooglerequest = googlecloudchannelv1transferentitlementstogooglerequest +// - name: The resource name of the customer repricing config rule to +// delete. Format: +// accounts/{account_id}/customers/{customer_id}/customerRepricingConfi +// gs/{id}. +func (r *AccountsCustomersCustomerRepricingConfigsService) Delete(name string) *AccountsCustomersCustomerRepricingConfigsDeleteCall { + c := &AccountsCustomersCustomerRepricingConfigsDeleteCall{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 *AccountsCustomersTransferEntitlementsToGoogleCall) Fields(s ...googleapi.Field) *AccountsCustomersTransferEntitlementsToGoogleCall { +func (c *AccountsCustomersCustomerRepricingConfigsDeleteCall) Fields(s ...googleapi.Field) *AccountsCustomersCustomerRepricingConfigsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10326,21 +11637,21 @@ func (c *AccountsCustomersTransferEntitlementsToGoogleCall) Fields(s ...googleap // 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 *AccountsCustomersTransferEntitlementsToGoogleCall) Context(ctx context.Context) *AccountsCustomersTransferEntitlementsToGoogleCall { +func (c *AccountsCustomersCustomerRepricingConfigsDeleteCall) Context(ctx context.Context) *AccountsCustomersCustomerRepricingConfigsDeleteCall { 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 *AccountsCustomersTransferEntitlementsToGoogleCall) Header() http.Header { +func (c *AccountsCustomersCustomerRepricingConfigsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersTransferEntitlementsToGoogleCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustomersCustomerRepricingConfigsDeleteCall) 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_ { @@ -10348,34 +11659,29 @@ func (c *AccountsCustomersTransferEntitlementsToGoogleCall) doRequest(alt string } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1transferentitlementstogooglerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:transferEntitlementsToGoogle") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.transferEntitlementsToGoogle" 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 +// Do executes the "cloudchannel.accounts.customers.customerRepricingConfigs.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.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 *AccountsCustomersTransferEntitlementsToGoogleCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *AccountsCustomersCustomerRepricingConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10394,7 +11700,7 @@ func (c *AccountsCustomersTransferEntitlementsToGoogleCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10406,28 +11712,25 @@ func (c *AccountsCustomersTransferEntitlementsToGoogleCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Transfers customer entitlements from their current reseller to Google. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer or offer resource was not found. * ALREADY_EXISTS: The SKU was already transferred for the customer. * CONDITION_NOT_MET or FAILED_PRECONDITION: * The SKU requires domain verification to transfer, but the domain is not verified. * An Add-On SKU (example, Vault or Drive) is missing the pre-requisite SKU (example, G Suite Basic). * (Developer accounts only) Reseller and resold domain must meet the following naming requirements: * Domain names must start with goog-test. * Domain names must include the reseller domain. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The Operation metadata will contain an instance of OperationMetadata.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:transferEntitlementsToGoogle", - // "httpMethod": "POST", - // "id": "cloudchannel.accounts.customers.transferEntitlementsToGoogle", + // "description": "Deletes the given CustomerRepricingConfig permanently. You can only delete configs if their RepricingConfig.effective_invoice_month is set to a date after the current month. Possible error codes: * PERMISSION_DENIED: The account making the request does not own this customer. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * FAILED_PRECONDITION: The CustomerRepricingConfig is active or in the past. * NOT_FOUND: No CustomerRepricingConfig found for the name in the request.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/customerRepricingConfigs/{customerRepricingConfigsId}", + // "httpMethod": "DELETE", + // "id": "cloudchannel.accounts.customers.customerRepricingConfigs.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The resource name of the reseller's customer account where the entitlements transfer from. Parent uses the format: accounts/{account_id}/customers/{customer_id}", + // "name": { + // "description": "Required. The resource name of the customer repricing config rule to delete. Format: accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}.", // "location": "path", - // "pattern": "^accounts/[^/]+/customers/[^/]+$", + // "pattern": "^accounts/[^/]+/customers/[^/]+/customerRepricingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}:transferEntitlementsToGoogle", - // "request": { - // "$ref": "GoogleCloudChannelV1TransferEntitlementsToGoogleRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.order" @@ -10436,108 +11739,97 @@ func (c *AccountsCustomersTransferEntitlementsToGoogleCall) Do(opts ...googleapi } -// method id "cloudchannel.accounts.customers.customerRepricingConfigs.create": +// method id "cloudchannel.accounts.customers.customerRepricingConfigs.get": -type AccountsCustomersCustomerRepricingConfigsCreateCall struct { - s *Service - parent string - googlecloudchannelv1customerrepricingconfig *GoogleCloudChannelV1CustomerRepricingConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsCustomersCustomerRepricingConfigsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a CustomerRepricingConfig. Call this method to set -// modifications for a specific customer's bill. You can only create -// configs if the RepricingConfig.effective_invoice_month is a future -// month. If needed, you can create a config for the current month, with -// some restrictions. When creating a config for a future month, make -// sure there are no existing configs for that -// RepricingConfig.effective_invoice_month. The following restrictions -// are for creating configs in the current month. * This functionality -// is reserved for recovering from an erroneous config, and should not -// be used for regular business cases. * The new config will not modify -// exports used with other configs. Changes to the config may be -// immediate, but may take up to 24 hours. * There is a limit of ten -// configs for any RepricingConfig.EntitlementGranularity.entitlement or -// RepricingConfig.effective_invoice_month. * The contained -// CustomerRepricingConfig.repricing_config vaule must be different from -// the value used in the current config for a -// RepricingConfig.EntitlementGranularity.entitlement. Possible Error -// Codes: * PERMISSION_DENIED: If the account making the request and the -// account being queried are different. * INVALID_ARGUMENT: Missing or -// invalid required parameters in the request. Also displays if the -// updated config is for the current month or past months. * NOT_FOUND: -// The CustomerRepricingConfig specified does not exist or is not -// associated with the given account. * INTERNAL: Any non-user error -// related to technical issues in the backend. In this case, contact -// Cloud Channel support. Return Value: If successful, the updated -// CustomerRepricingConfig resource, otherwise returns an error. +// Get: Gets information about how a Reseller modifies their bill before +// sending it to a Customer. Possible Error Codes: * PERMISSION_DENIED: +// If the account making the request and the account being queried are +// different. * NOT_FOUND: The CustomerRepricingConfig was not found. * +// INTERNAL: Any non-user error related to technical issues in the +// backend. In this case, contact Cloud Channel support. Return Value: +// If successful, the CustomerRepricingConfig resource, otherwise +// returns an error. // -// - parent: The resource name of the customer that will receive this -// repricing config. Parent uses the format: -// accounts/{account_id}/customers/{customer_id}. -func (r *AccountsCustomersCustomerRepricingConfigsService) Create(parent string, googlecloudchannelv1customerrepricingconfig *GoogleCloudChannelV1CustomerRepricingConfig) *AccountsCustomersCustomerRepricingConfigsCreateCall { - c := &AccountsCustomersCustomerRepricingConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudchannelv1customerrepricingconfig = googlecloudchannelv1customerrepricingconfig +// - name: The resource name of the CustomerRepricingConfig. Format: +// accounts/{account_id}/customers/{customer_id}/customerRepricingConfi +// gs/{id}. +func (r *AccountsCustomersCustomerRepricingConfigsService) Get(name string) *AccountsCustomersCustomerRepricingConfigsGetCall { + c := &AccountsCustomersCustomerRepricingConfigsGetCall{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 *AccountsCustomersCustomerRepricingConfigsCreateCall) Fields(s ...googleapi.Field) *AccountsCustomersCustomerRepricingConfigsCreateCall { +func (c *AccountsCustomersCustomerRepricingConfigsGetCall) Fields(s ...googleapi.Field) *AccountsCustomersCustomerRepricingConfigsGetCall { 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 *AccountsCustomersCustomerRepricingConfigsGetCall) IfNoneMatch(entityTag string) *AccountsCustomersCustomerRepricingConfigsGetCall { + 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 *AccountsCustomersCustomerRepricingConfigsCreateCall) Context(ctx context.Context) *AccountsCustomersCustomerRepricingConfigsCreateCall { +func (c *AccountsCustomersCustomerRepricingConfigsGetCall) Context(ctx context.Context) *AccountsCustomersCustomerRepricingConfigsGetCall { 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 *AccountsCustomersCustomerRepricingConfigsCreateCall) Header() http.Header { +func (c *AccountsCustomersCustomerRepricingConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersCustomerRepricingConfigsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustomersCustomerRepricingConfigsGetCall) 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.googlecloudchannelv1customerrepricingconfig) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customerRepricingConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.customerRepricingConfigs.create" call. +// Do executes the "cloudchannel.accounts.customers.customerRepricingConfigs.get" call. // Exactly one of *GoogleCloudChannelV1CustomerRepricingConfig or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either @@ -10546,7 +11838,7 @@ func (c *AccountsCustomersCustomerRepricingConfigsCreateCall) doRequest(alt stri // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *AccountsCustomersCustomerRepricingConfigsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1CustomerRepricingConfig, error) { +func (c *AccountsCustomersCustomerRepricingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1CustomerRepricingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10577,26 +11869,23 @@ func (c *AccountsCustomersCustomerRepricingConfigsCreateCall) Do(opts ...googlea } return ret, nil // { - // "description": "Creates a CustomerRepricingConfig. Call this method to set modifications for a specific customer's bill. You can only create configs if the RepricingConfig.effective_invoice_month is a future month. If needed, you can create a config for the current month, with some restrictions. When creating a config for a future month, make sure there are no existing configs for that RepricingConfig.effective_invoice_month. The following restrictions are for creating configs in the current month. * This functionality is reserved for recovering from an erroneous config, and should not be used for regular business cases. * The new config will not modify exports used with other configs. Changes to the config may be immediate, but may take up to 24 hours. * There is a limit of ten configs for any RepricingConfig.EntitlementGranularity.entitlement or RepricingConfig.effective_invoice_month. * The contained CustomerRepricingConfig.repricing_config vaule must be different from the value used in the current config for a RepricingConfig.EntitlementGranularity.entitlement. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if the updated config is for the current month or past months. * NOT_FOUND: The CustomerRepricingConfig specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the updated CustomerRepricingConfig resource, otherwise returns an error.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/customerRepricingConfigs", - // "httpMethod": "POST", - // "id": "cloudchannel.accounts.customers.customerRepricingConfigs.create", + // "description": "Gets information about how a Reseller modifies their bill before sending it to a Customer. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * NOT_FOUND: The CustomerRepricingConfig was not found. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the CustomerRepricingConfig resource, otherwise returns an error.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/customerRepricingConfigs/{customerRepricingConfigsId}", + // "httpMethod": "GET", + // "id": "cloudchannel.accounts.customers.customerRepricingConfigs.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The resource name of the customer that will receive this repricing config. Parent uses the format: accounts/{account_id}/customers/{customer_id}", + // "name": { + // "description": "Required. The resource name of the CustomerRepricingConfig. Format: accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}.", // "location": "path", - // "pattern": "^accounts/[^/]+/customers/[^/]+$", + // "pattern": "^accounts/[^/]+/customers/[^/]+/customerRepricingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/customerRepricingConfigs", - // "request": { - // "$ref": "GoogleCloudChannelV1CustomerRepricingConfig" - // }, + // "path": "v1/{+name}", // "response": { // "$ref": "GoogleCloudChannelV1CustomerRepricingConfig" // }, @@ -10607,92 +11896,143 @@ func (c *AccountsCustomersCustomerRepricingConfigsCreateCall) Do(opts ...googlea } -// method id "cloudchannel.accounts.customers.customerRepricingConfigs.delete": +// method id "cloudchannel.accounts.customers.customerRepricingConfigs.list": -type AccountsCustomersCustomerRepricingConfigsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsCustomersCustomerRepricingConfigsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the given CustomerRepricingConfig permanently. You -// can only delete configs if their -// RepricingConfig.effective_invoice_month is set to a date after the -// current month. Possible error codes: * PERMISSION_DENIED: The account -// making the request does not own this customer. * INVALID_ARGUMENT: -// Required request parameters are missing or invalid. * -// FAILED_PRECONDITION: The CustomerRepricingConfig is active or in the -// past. * NOT_FOUND: No CustomerRepricingConfig found for the name in -// the request. +// List: Lists information about how a Reseller modifies their bill +// before sending it to a Customer. Possible Error Codes: * +// PERMISSION_DENIED: If the account making the request and the account +// being queried are different. * NOT_FOUND: The CustomerRepricingConfig +// specified does not exist or is not associated with the given account. +// * INTERNAL: Any non-user error related to technical issues in the +// backend. In this case, contact Cloud Channel support. Return Value: +// If successful, the CustomerRepricingConfig resources. The data for +// each resource is displayed in the ascending order of: * customer ID * +// RepricingConfig.EntitlementGranularity.entitlement * +// RepricingConfig.effective_invoice_month * +// CustomerRepricingConfig.update_time If unsuccessful, returns an +// error. // -// - name: The resource name of the customer repricing config rule to -// delete. Format: -// accounts/{account_id}/customers/{customer_id}/customerRepricingConfi -// gs/{id}. -func (r *AccountsCustomersCustomerRepricingConfigsService) Delete(name string) *AccountsCustomersCustomerRepricingConfigsDeleteCall { - c := &AccountsCustomersCustomerRepricingConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the customer. Parent uses the format: +// accounts/{account_id}/customers/{customer_id}. Supports +// accounts/{account_id}/customers/- to retrieve configs for all +// customers. +func (r *AccountsCustomersCustomerRepricingConfigsService) List(parent string) *AccountsCustomersCustomerRepricingConfigsListCall { + c := &AccountsCustomersCustomerRepricingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter for +// [CloudChannelService.ListCustomerRepricingConfigs] results (customer +// only). You can use this filter when you support a BatchGet-like +// query. To use the filter, you must set +// `parent=accounts/{account_id}/customers/-`. Example: customer = +// accounts/account_id/customers/c1 OR customer = +// accounts/account_id/customers/c2. +func (c *AccountsCustomersCustomerRepricingConfigsListCall) Filter(filter string) *AccountsCustomersCustomerRepricingConfigsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of repricing configs to return. The service may return fewer than +// this value. If unspecified, returns a maximum of 50 rules. The +// maximum value is 100; values above 100 will be coerced to 100. +func (c *AccountsCustomersCustomerRepricingConfigsListCall) PageSize(pageSize int64) *AccountsCustomersCustomerRepricingConfigsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results beyond the first page. Obtained through +// ListCustomerRepricingConfigsResponse.next_page_token of the previous +// CloudChannelService.ListCustomerRepricingConfigs call. +func (c *AccountsCustomersCustomerRepricingConfigsListCall) PageToken(pageToken string) *AccountsCustomersCustomerRepricingConfigsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsCustomersCustomerRepricingConfigsDeleteCall) Fields(s ...googleapi.Field) *AccountsCustomersCustomerRepricingConfigsDeleteCall { +func (c *AccountsCustomersCustomerRepricingConfigsListCall) Fields(s ...googleapi.Field) *AccountsCustomersCustomerRepricingConfigsListCall { 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 *AccountsCustomersCustomerRepricingConfigsListCall) IfNoneMatch(entityTag string) *AccountsCustomersCustomerRepricingConfigsListCall { + 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 *AccountsCustomersCustomerRepricingConfigsDeleteCall) Context(ctx context.Context) *AccountsCustomersCustomerRepricingConfigsDeleteCall { +func (c *AccountsCustomersCustomerRepricingConfigsListCall) Context(ctx context.Context) *AccountsCustomersCustomerRepricingConfigsListCall { 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 *AccountsCustomersCustomerRepricingConfigsDeleteCall) Header() http.Header { +func (c *AccountsCustomersCustomerRepricingConfigsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersCustomerRepricingConfigsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustomersCustomerRepricingConfigsListCall) 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, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customerRepricingConfigs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.customerRepricingConfigs.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.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 *AccountsCustomersCustomerRepricingConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "cloudchannel.accounts.customers.customerRepricingConfigs.list" call. +// Exactly one of +// *GoogleCloudChannelV1ListCustomerRepricingConfigsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudChannelV1ListCustomerRepricingConfigsResponse.ServerRespon +// se.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 *AccountsCustomersCustomerRepricingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1ListCustomerRepricingConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10711,7 +12051,7 @@ func (c *AccountsCustomersCustomerRepricingConfigsDeleteCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudChannelV1ListCustomerRepricingConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10723,25 +12063,41 @@ func (c *AccountsCustomersCustomerRepricingConfigsDeleteCall) Do(opts ...googlea } return ret, nil // { - // "description": "Deletes the given CustomerRepricingConfig permanently. You can only delete configs if their RepricingConfig.effective_invoice_month is set to a date after the current month. Possible error codes: * PERMISSION_DENIED: The account making the request does not own this customer. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * FAILED_PRECONDITION: The CustomerRepricingConfig is active or in the past. * NOT_FOUND: No CustomerRepricingConfig found for the name in the request.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/customerRepricingConfigs/{customerRepricingConfigsId}", - // "httpMethod": "DELETE", - // "id": "cloudchannel.accounts.customers.customerRepricingConfigs.delete", + // "description": "Lists information about how a Reseller modifies their bill before sending it to a Customer. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * NOT_FOUND: The CustomerRepricingConfig specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the CustomerRepricingConfig resources. The data for each resource is displayed in the ascending order of: * customer ID * RepricingConfig.EntitlementGranularity.entitlement * RepricingConfig.effective_invoice_month * CustomerRepricingConfig.update_time If unsuccessful, returns an error.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/customerRepricingConfigs", + // "httpMethod": "GET", + // "id": "cloudchannel.accounts.customers.customerRepricingConfigs.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The resource name of the customer repricing config rule to delete. Format: accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}.", + // "filter": { + // "description": "Optional. A filter for [CloudChannelService.ListCustomerRepricingConfigs] results (customer only). You can use this filter when you support a BatchGet-like query. To use the filter, you must set `parent=accounts/{account_id}/customers/-`. Example: customer = accounts/account_id/customers/c1 OR customer = accounts/account_id/customers/c2.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of repricing configs to return. The service may return fewer than this value. If unspecified, returns a maximum of 50 rules. The maximum value is 100; values above 100 will be coerced to 100.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A token identifying a page of results beyond the first page. Obtained through ListCustomerRepricingConfigsResponse.next_page_token of the previous CloudChannelService.ListCustomerRepricingConfigs call.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the customer. Parent uses the format: accounts/{account_id}/customers/{customer_id}. Supports accounts/{account_id}/customers/- to retrieve configs for all customers.", // "location": "path", - // "pattern": "^accounts/[^/]+/customers/[^/]+/customerRepricingConfigs/[^/]+$", + // "pattern": "^accounts/[^/]+/customers/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/customerRepricingConfigs", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleCloudChannelV1ListCustomerRepricingConfigsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.order" @@ -10750,86 +12106,111 @@ func (c *AccountsCustomersCustomerRepricingConfigsDeleteCall) Do(opts ...googlea } -// method id "cloudchannel.accounts.customers.customerRepricingConfigs.get": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AccountsCustomersCustomerRepricingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudChannelV1ListCustomerRepricingConfigsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type AccountsCustomersCustomerRepricingConfigsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "cloudchannel.accounts.customers.customerRepricingConfigs.patch": + +type AccountsCustomersCustomerRepricingConfigsPatchCall struct { + s *Service + name string + googlecloudchannelv1customerrepricingconfig *GoogleCloudChannelV1CustomerRepricingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets information about how a Reseller modifies their bill before -// sending it to a Customer. Possible Error Codes: * PERMISSION_DENIED: -// If the account making the request and the account being queried are -// different. * NOT_FOUND: The CustomerRepricingConfig was not found. * +// Patch: Updates a CustomerRepricingConfig. Call this method to set +// modifications for a specific customer's bill. This method overwrites +// the existing CustomerRepricingConfig. You can only update configs if +// the RepricingConfig.effective_invoice_month is a future month. To +// make changes to configs for the current month, use +// CreateCustomerRepricingConfig, taking note of its restrictions. You +// cannot update the RepricingConfig.effective_invoice_month. When +// updating a config in the future: * This config must already exist. +// Possible Error Codes: * PERMISSION_DENIED: If the account making the +// request and the account being queried are different. * +// INVALID_ARGUMENT: Missing or invalid required parameters in the +// request. Also displays if the updated config is for the current month +// or past months. * NOT_FOUND: The CustomerRepricingConfig specified +// does not exist or is not associated with the given account. * // INTERNAL: Any non-user error related to technical issues in the // backend. In this case, contact Cloud Channel support. Return Value: -// If successful, the CustomerRepricingConfig resource, otherwise -// returns an error. +// If successful, the updated CustomerRepricingConfig resource, +// otherwise returns an error. // -// - name: The resource name of the CustomerRepricingConfig. Format: +// - name: Output only. Resource name of the CustomerRepricingConfig. +// Format: // accounts/{account_id}/customers/{customer_id}/customerRepricingConfi // gs/{id}. -func (r *AccountsCustomersCustomerRepricingConfigsService) Get(name string) *AccountsCustomersCustomerRepricingConfigsGetCall { - c := &AccountsCustomersCustomerRepricingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AccountsCustomersCustomerRepricingConfigsService) Patch(name string, googlecloudchannelv1customerrepricingconfig *GoogleCloudChannelV1CustomerRepricingConfig) *AccountsCustomersCustomerRepricingConfigsPatchCall { + c := &AccountsCustomersCustomerRepricingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudchannelv1customerrepricingconfig = googlecloudchannelv1customerrepricingconfig 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 *AccountsCustomersCustomerRepricingConfigsGetCall) Fields(s ...googleapi.Field) *AccountsCustomersCustomerRepricingConfigsGetCall { +func (c *AccountsCustomersCustomerRepricingConfigsPatchCall) Fields(s ...googleapi.Field) *AccountsCustomersCustomerRepricingConfigsPatchCall { 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 *AccountsCustomersCustomerRepricingConfigsGetCall) IfNoneMatch(entityTag string) *AccountsCustomersCustomerRepricingConfigsGetCall { - 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 *AccountsCustomersCustomerRepricingConfigsGetCall) Context(ctx context.Context) *AccountsCustomersCustomerRepricingConfigsGetCall { +func (c *AccountsCustomersCustomerRepricingConfigsPatchCall) Context(ctx context.Context) *AccountsCustomersCustomerRepricingConfigsPatchCall { 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 *AccountsCustomersCustomerRepricingConfigsGetCall) Header() http.Header { +func (c *AccountsCustomersCustomerRepricingConfigsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersCustomerRepricingConfigsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustomersCustomerRepricingConfigsPatchCall) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1customerrepricingconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -10840,7 +12221,7 @@ func (c *AccountsCustomersCustomerRepricingConfigsGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.customerRepricingConfigs.get" call. +// Do executes the "cloudchannel.accounts.customers.customerRepricingConfigs.patch" call. // Exactly one of *GoogleCloudChannelV1CustomerRepricingConfig or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either @@ -10849,7 +12230,7 @@ func (c *AccountsCustomersCustomerRepricingConfigsGetCall) doRequest(alt string) // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *AccountsCustomersCustomerRepricingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1CustomerRepricingConfig, error) { +func (c *AccountsCustomersCustomerRepricingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1CustomerRepricingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10880,16 +12261,16 @@ func (c *AccountsCustomersCustomerRepricingConfigsGetCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Gets information about how a Reseller modifies their bill before sending it to a Customer. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * NOT_FOUND: The CustomerRepricingConfig was not found. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the CustomerRepricingConfig resource, otherwise returns an error.", + // "description": "Updates a CustomerRepricingConfig. Call this method to set modifications for a specific customer's bill. This method overwrites the existing CustomerRepricingConfig. You can only update configs if the RepricingConfig.effective_invoice_month is a future month. To make changes to configs for the current month, use CreateCustomerRepricingConfig, taking note of its restrictions. You cannot update the RepricingConfig.effective_invoice_month. When updating a config in the future: * This config must already exist. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if the updated config is for the current month or past months. * NOT_FOUND: The CustomerRepricingConfig specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the updated CustomerRepricingConfig resource, otherwise returns an error.", // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/customerRepricingConfigs/{customerRepricingConfigsId}", - // "httpMethod": "GET", - // "id": "cloudchannel.accounts.customers.customerRepricingConfigs.get", + // "httpMethod": "PATCH", + // "id": "cloudchannel.accounts.customers.customerRepricingConfigs.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the CustomerRepricingConfig. Format: accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}.", + // "description": "Output only. Resource name of the CustomerRepricingConfig. Format: accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}.", // "location": "path", // "pattern": "^accounts/[^/]+/customers/[^/]+/customerRepricingConfigs/[^/]+$", // "required": true, @@ -10897,6 +12278,9 @@ func (c *AccountsCustomersCustomerRepricingConfigsGetCall) Do(opts ...googleapi. // } // }, // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudChannelV1CustomerRepricingConfig" + // }, // "response": { // "$ref": "GoogleCloudChannelV1CustomerRepricingConfig" // }, @@ -10907,143 +12291,108 @@ func (c *AccountsCustomersCustomerRepricingConfigsGetCall) Do(opts ...googleapi. } -// method id "cloudchannel.accounts.customers.customerRepricingConfigs.list": +// method id "cloudchannel.accounts.customers.entitlements.activate": -type AccountsCustomersCustomerRepricingConfigsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccountsCustomersEntitlementsActivateCall struct { + s *Service + name string + googlecloudchannelv1activateentitlementrequest *GoogleCloudChannelV1ActivateEntitlementRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists information about how a Reseller modifies their bill -// before sending it to a Customer. Possible Error Codes: * -// PERMISSION_DENIED: If the account making the request and the account -// being queried are different. * NOT_FOUND: The CustomerRepricingConfig -// specified does not exist or is not associated with the given account. -// * INTERNAL: Any non-user error related to technical issues in the -// backend. In this case, contact Cloud Channel support. Return Value: -// If successful, the CustomerRepricingConfig resources. The data for -// each resource is displayed in the ascending order of: * customer ID * -// RepricingConfig.EntitlementGranularity.entitlement * -// RepricingConfig.effective_invoice_month * -// CustomerRepricingConfig.update_time If unsuccessful, returns an -// error. +// Activate: Activates a previously suspended entitlement. Entitlements +// suspended for pending ToS acceptance can't be activated using this +// method. An entitlement activation is a long-running operation and it +// updates the state of the customer entitlement. Possible error codes: +// * PERMISSION_DENIED: The reseller account making the request is +// different from the reseller account in the API request. * +// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// * NOT_FOUND: Entitlement resource not found. * +// SUSPENSION_NOT_RESELLER_INITIATED: Can only activate +// reseller-initiated suspensions and entitlements that have accepted +// the TOS. * NOT_SUSPENDED: Can only activate suspended entitlements +// not in an ACTIVE state. * INTERNAL: Any non-user error related to a +// technical issue in the backend. Contact Cloud Channel support. * +// UNKNOWN: Any non-user error related to a technical issue in the +// backend. Contact Cloud Channel support. Return value: The ID of a +// long-running operation. To get the results of the operation, call the +// GetOperation method of CloudChannelOperationsService. The Operation +// metadata will contain an instance of OperationMetadata. // -// - parent: The resource name of the customer. Parent uses the format: -// accounts/{account_id}/customers/{customer_id}. Supports -// accounts/{account_id}/customers/- to retrieve configs for all -// customers. -func (r *AccountsCustomersCustomerRepricingConfigsService) List(parent string) *AccountsCustomersCustomerRepricingConfigsListCall { - c := &AccountsCustomersCustomerRepricingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": A filter for -// [CloudChannelService.ListCustomerRepricingConfigs] results (customer -// only). You can use this filter when you support a BatchGet-like -// query. To use the filter, you must set -// `parent=accounts/{account_id}/customers/-`. Example: customer = -// accounts/account_id/customers/c1 OR customer = -// accounts/account_id/customers/c2. -func (c *AccountsCustomersCustomerRepricingConfigsListCall) Filter(filter string) *AccountsCustomersCustomerRepricingConfigsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of repricing configs to return. The service may return fewer than -// this value. If unspecified, returns a maximum of 50 rules. The -// maximum value is 100; values above 100 will be coerced to 100. -func (c *AccountsCustomersCustomerRepricingConfigsListCall) PageSize(pageSize int64) *AccountsCustomersCustomerRepricingConfigsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A token -// identifying a page of results beyond the first page. Obtained through -// ListCustomerRepricingConfigsResponse.next_page_token of the previous -// CloudChannelService.ListCustomerRepricingConfigs call. -func (c *AccountsCustomersCustomerRepricingConfigsListCall) PageToken(pageToken string) *AccountsCustomersCustomerRepricingConfigsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The resource name of the entitlement to activate. Name uses +// the format: +// accounts/{account_id}/customers/{customer_id}/entitlements/{entitlem +// ent_id}. +func (r *AccountsCustomersEntitlementsService) Activate(name string, googlecloudchannelv1activateentitlementrequest *GoogleCloudChannelV1ActivateEntitlementRequest) *AccountsCustomersEntitlementsActivateCall { + c := &AccountsCustomersEntitlementsActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudchannelv1activateentitlementrequest = googlecloudchannelv1activateentitlementrequest 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 *AccountsCustomersCustomerRepricingConfigsListCall) Fields(s ...googleapi.Field) *AccountsCustomersCustomerRepricingConfigsListCall { +func (c *AccountsCustomersEntitlementsActivateCall) Fields(s ...googleapi.Field) *AccountsCustomersEntitlementsActivateCall { 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 *AccountsCustomersCustomerRepricingConfigsListCall) IfNoneMatch(entityTag string) *AccountsCustomersCustomerRepricingConfigsListCall { - 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 *AccountsCustomersCustomerRepricingConfigsListCall) Context(ctx context.Context) *AccountsCustomersCustomerRepricingConfigsListCall { +func (c *AccountsCustomersEntitlementsActivateCall) Context(ctx context.Context) *AccountsCustomersEntitlementsActivateCall { 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 *AccountsCustomersCustomerRepricingConfigsListCall) Header() http.Header { +func (c *AccountsCustomersEntitlementsActivateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersCustomerRepricingConfigsListCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustomersEntitlementsActivateCall) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1activateentitlementrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customerRepricingConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:activate") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.customerRepricingConfigs.list" call. -// Exactly one of -// *GoogleCloudChannelV1ListCustomerRepricingConfigsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudChannelV1ListCustomerRepricingConfigsResponse.ServerRespon -// se.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 *AccountsCustomersCustomerRepricingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1ListCustomerRepricingConfigsResponse, error) { +// Do executes the "cloudchannel.accounts.customers.entitlements.activate" 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 *AccountsCustomersEntitlementsActivateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11062,7 +12411,7 @@ func (c *AccountsCustomersCustomerRepricingConfigsListCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudChannelV1ListCustomerRepricingConfigsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11074,41 +12423,28 @@ func (c *AccountsCustomersCustomerRepricingConfigsListCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Lists information about how a Reseller modifies their bill before sending it to a Customer. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * NOT_FOUND: The CustomerRepricingConfig specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the CustomerRepricingConfig resources. The data for each resource is displayed in the ascending order of: * customer ID * RepricingConfig.EntitlementGranularity.entitlement * RepricingConfig.effective_invoice_month * CustomerRepricingConfig.update_time If unsuccessful, returns an error.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/customerRepricingConfigs", - // "httpMethod": "GET", - // "id": "cloudchannel.accounts.customers.customerRepricingConfigs.list", + // "description": "Activates a previously suspended entitlement. Entitlements suspended for pending ToS acceptance can't be activated using this method. An entitlement activation is a long-running operation and it updates the state of the customer entitlement. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement resource not found. * SUSPENSION_NOT_RESELLER_INITIATED: Can only activate reseller-initiated suspensions and entitlements that have accepted the TOS. * NOT_SUSPENDED: Can only activate suspended entitlements not in an ACTIVE state. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements/{entitlementsId}:activate", + // "httpMethod": "POST", + // "id": "cloudchannel.accounts.customers.entitlements.activate", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "filter": { - // "description": "Optional. A filter for [CloudChannelService.ListCustomerRepricingConfigs] results (customer only). You can use this filter when you support a BatchGet-like query. To use the filter, you must set `parent=accounts/{account_id}/customers/-`. Example: customer = accounts/account_id/customers/c1 OR customer = accounts/account_id/customers/c2.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. The maximum number of repricing configs to return. The service may return fewer than this value. If unspecified, returns a maximum of 50 rules. The maximum value is 100; values above 100 will be coerced to 100.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. A token identifying a page of results beyond the first page. Obtained through ListCustomerRepricingConfigsResponse.next_page_token of the previous CloudChannelService.ListCustomerRepricingConfigs call.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource name of the customer. Parent uses the format: accounts/{account_id}/customers/{customer_id}. Supports accounts/{account_id}/customers/- to retrieve configs for all customers.", + // "name": { + // "description": "Required. The resource name of the entitlement to activate. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", // "location": "path", - // "pattern": "^accounts/[^/]+/customers/[^/]+$", + // "pattern": "^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/customerRepricingConfigs", + // "path": "v1/{+name}:activate", + // "request": { + // "$ref": "GoogleCloudChannelV1ActivateEntitlementRequest" + // }, // "response": { - // "$ref": "GoogleCloudChannelV1ListCustomerRepricingConfigsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.order" @@ -11117,72 +12453,51 @@ func (c *AccountsCustomersCustomerRepricingConfigsListCall) Do(opts ...googleapi } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AccountsCustomersCustomerRepricingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudChannelV1ListCustomerRepricingConfigsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "cloudchannel.accounts.customers.customerRepricingConfigs.patch": +// method id "cloudchannel.accounts.customers.entitlements.cancel": -type AccountsCustomersCustomerRepricingConfigsPatchCall struct { - s *Service - name string - googlecloudchannelv1customerrepricingconfig *GoogleCloudChannelV1CustomerRepricingConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsCustomersEntitlementsCancelCall struct { + s *Service + name string + googlecloudchannelv1cancelentitlementrequest *GoogleCloudChannelV1CancelEntitlementRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a CustomerRepricingConfig. Call this method to set -// modifications for a specific customer's bill. This method overwrites -// the existing CustomerRepricingConfig. You can only update configs if -// the RepricingConfig.effective_invoice_month is a future month. To -// make changes to configs for the current month, use -// CreateCustomerRepricingConfig, taking note of its restrictions. You -// cannot update the RepricingConfig.effective_invoice_month. When -// updating a config in the future: * This config must already exist. -// Possible Error Codes: * PERMISSION_DENIED: If the account making the -// request and the account being queried are different. * -// INVALID_ARGUMENT: Missing or invalid required parameters in the -// request. Also displays if the updated config is for the current month -// or past months. * NOT_FOUND: The CustomerRepricingConfig specified -// does not exist or is not associated with the given account. * -// INTERNAL: Any non-user error related to technical issues in the -// backend. In this case, contact Cloud Channel support. Return Value: -// If successful, the updated CustomerRepricingConfig resource, -// otherwise returns an error. +// Cancel: Cancels a previously fulfilled entitlement. An entitlement +// cancellation is a long-running operation. Possible error codes: * +// PERMISSION_DENIED: The reseller account making the request is +// different from the reseller account in the API request. * +// FAILED_PRECONDITION: There are Google Cloud projects linked to the +// Google Cloud entitlement's Cloud Billing subaccount. * +// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// * NOT_FOUND: Entitlement resource not found. * +// DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google +// Workspace add-ons, or entitlements for Google Cloud's development +// platform. * INTERNAL: Any non-user error related to a technical issue +// in the backend. Contact Cloud Channel support. * UNKNOWN: Any +// non-user error related to a technical issue in the backend. Contact +// Cloud Channel support. Return value: The ID of a long-running +// operation. To get the results of the operation, call the GetOperation +// method of CloudChannelOperationsService. The response will contain +// google.protobuf.Empty on success. The Operation metadata will contain +// an instance of OperationMetadata. // -// - name: Output only. Resource name of the CustomerRepricingConfig. -// Format: -// accounts/{account_id}/customers/{customer_id}/customerRepricingConfi -// gs/{id}. -func (r *AccountsCustomersCustomerRepricingConfigsService) Patch(name string, googlecloudchannelv1customerrepricingconfig *GoogleCloudChannelV1CustomerRepricingConfig) *AccountsCustomersCustomerRepricingConfigsPatchCall { - c := &AccountsCustomersCustomerRepricingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the entitlement to cancel. Name uses the +// format: +// accounts/{account_id}/customers/{customer_id}/entitlements/{entitlem +// ent_id}. +func (r *AccountsCustomersEntitlementsService) Cancel(name string, googlecloudchannelv1cancelentitlementrequest *GoogleCloudChannelV1CancelEntitlementRequest) *AccountsCustomersEntitlementsCancelCall { + c := &AccountsCustomersEntitlementsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudchannelv1customerrepricingconfig = googlecloudchannelv1customerrepricingconfig + c.googlecloudchannelv1cancelentitlementrequest = googlecloudchannelv1cancelentitlementrequest 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 *AccountsCustomersCustomerRepricingConfigsPatchCall) Fields(s ...googleapi.Field) *AccountsCustomersCustomerRepricingConfigsPatchCall { +func (c *AccountsCustomersEntitlementsCancelCall) Fields(s ...googleapi.Field) *AccountsCustomersEntitlementsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11190,21 +12505,21 @@ func (c *AccountsCustomersCustomerRepricingConfigsPatchCall) Fields(s ...googlea // 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 *AccountsCustomersCustomerRepricingConfigsPatchCall) Context(ctx context.Context) *AccountsCustomersCustomerRepricingConfigsPatchCall { +func (c *AccountsCustomersEntitlementsCancelCall) Context(ctx context.Context) *AccountsCustomersEntitlementsCancelCall { 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 *AccountsCustomersCustomerRepricingConfigsPatchCall) Header() http.Header { +func (c *AccountsCustomersEntitlementsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersCustomerRepricingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustomersEntitlementsCancelCall) 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_ { @@ -11212,16 +12527,16 @@ func (c *AccountsCustomersCustomerRepricingConfigsPatchCall) doRequest(alt strin } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1customerrepricingconfig) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1cancelentitlementrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -11232,16 +12547,14 @@ func (c *AccountsCustomersCustomerRepricingConfigsPatchCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.customerRepricingConfigs.patch" call. -// Exactly one of *GoogleCloudChannelV1CustomerRepricingConfig or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudChannelV1CustomerRepricingConfig.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 *AccountsCustomersCustomerRepricingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1CustomerRepricingConfig, error) { +// Do executes the "cloudchannel.accounts.customers.entitlements.cancel" 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 *AccountsCustomersEntitlementsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11260,7 +12573,7 @@ func (c *AccountsCustomersCustomerRepricingConfigsPatchCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudChannelV1CustomerRepricingConfig{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11272,28 +12585,28 @@ func (c *AccountsCustomersCustomerRepricingConfigsPatchCall) Do(opts ...googleap } return ret, nil // { - // "description": "Updates a CustomerRepricingConfig. Call this method to set modifications for a specific customer's bill. This method overwrites the existing CustomerRepricingConfig. You can only update configs if the RepricingConfig.effective_invoice_month is a future month. To make changes to configs for the current month, use CreateCustomerRepricingConfig, taking note of its restrictions. You cannot update the RepricingConfig.effective_invoice_month. When updating a config in the future: * This config must already exist. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if the updated config is for the current month or past months. * NOT_FOUND: The CustomerRepricingConfig specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the updated CustomerRepricingConfig resource, otherwise returns an error.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/customerRepricingConfigs/{customerRepricingConfigsId}", - // "httpMethod": "PATCH", - // "id": "cloudchannel.accounts.customers.customerRepricingConfigs.patch", + // "description": "Cancels a previously fulfilled entitlement. An entitlement cancellation is a long-running operation. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * FAILED_PRECONDITION: There are Google Cloud projects linked to the Google Cloud entitlement's Cloud Billing subaccount. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement resource not found. * DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace add-ons, or entitlements for Google Cloud's development platform. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The Operation metadata will contain an instance of OperationMetadata.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements/{entitlementsId}:cancel", + // "httpMethod": "POST", + // "id": "cloudchannel.accounts.customers.entitlements.cancel", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. Resource name of the CustomerRepricingConfig. Format: accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}.", + // "description": "Required. The resource name of the entitlement to cancel. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", // "location": "path", - // "pattern": "^accounts/[^/]+/customers/[^/]+/customerRepricingConfigs/[^/]+$", + // "pattern": "^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+name}:cancel", // "request": { - // "$ref": "GoogleCloudChannelV1CustomerRepricingConfig" + // "$ref": "GoogleCloudChannelV1CancelEntitlementRequest" // }, // "response": { - // "$ref": "GoogleCloudChannelV1CustomerRepricingConfig" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.order" @@ -11302,51 +12615,46 @@ func (c *AccountsCustomersCustomerRepricingConfigsPatchCall) Do(opts ...googleap } -// method id "cloudchannel.accounts.customers.entitlements.activate": +// method id "cloudchannel.accounts.customers.entitlements.changeOffer": -type AccountsCustomersEntitlementsActivateCall struct { - s *Service - name string - googlecloudchannelv1activateentitlementrequest *GoogleCloudChannelV1ActivateEntitlementRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsCustomersEntitlementsChangeOfferCall struct { + s *Service + name string + googlecloudchannelv1changeofferrequest *GoogleCloudChannelV1ChangeOfferRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Activate: Activates a previously suspended entitlement. Entitlements -// suspended for pending ToS acceptance can't be activated using this -// method. An entitlement activation is a long-running operation and it -// updates the state of the customer entitlement. Possible error codes: -// * PERMISSION_DENIED: The reseller account making the request is -// different from the reseller account in the API request. * +// ChangeOffer: Updates the Offer for an existing customer entitlement. +// An entitlement update is a long-running operation and it updates the +// entitlement as a result of fulfillment. Possible error codes: * +// PERMISSION_DENIED: The customer doesn't belong to the reseller. * // INVALID_ARGUMENT: Required request parameters are missing or invalid. -// * NOT_FOUND: Entitlement resource not found. * -// SUSPENSION_NOT_RESELLER_INITIATED: Can only activate -// reseller-initiated suspensions and entitlements that have accepted -// the TOS. * NOT_SUSPENDED: Can only activate suspended entitlements -// not in an ACTIVE state. * INTERNAL: Any non-user error related to a -// technical issue in the backend. Contact Cloud Channel support. * -// UNKNOWN: Any non-user error related to a technical issue in the -// backend. Contact Cloud Channel support. Return value: The ID of a -// long-running operation. To get the results of the operation, call the -// GetOperation method of CloudChannelOperationsService. The Operation -// metadata will contain an instance of OperationMetadata. +// * NOT_FOUND: Offer or Entitlement resource not found. * INTERNAL: Any +// non-user error related to a technical issue in the backend. Contact +// Cloud Channel support. * UNKNOWN: Any non-user error related to a +// technical issue in the backend. Contact Cloud Channel support. Return +// value: The ID of a long-running operation. To get the results of the +// operation, call the GetOperation method of +// CloudChannelOperationsService. The Operation metadata will contain an +// instance of OperationMetadata. // -// - name: The resource name of the entitlement to activate. Name uses -// the format: +// - name: The resource name of the entitlement to update. Name uses the +// format: // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlem // ent_id}. -func (r *AccountsCustomersEntitlementsService) Activate(name string, googlecloudchannelv1activateentitlementrequest *GoogleCloudChannelV1ActivateEntitlementRequest) *AccountsCustomersEntitlementsActivateCall { - c := &AccountsCustomersEntitlementsActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AccountsCustomersEntitlementsService) ChangeOffer(name string, googlecloudchannelv1changeofferrequest *GoogleCloudChannelV1ChangeOfferRequest) *AccountsCustomersEntitlementsChangeOfferCall { + c := &AccountsCustomersEntitlementsChangeOfferCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudchannelv1activateentitlementrequest = googlecloudchannelv1activateentitlementrequest + c.googlecloudchannelv1changeofferrequest = googlecloudchannelv1changeofferrequest 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 *AccountsCustomersEntitlementsActivateCall) Fields(s ...googleapi.Field) *AccountsCustomersEntitlementsActivateCall { +func (c *AccountsCustomersEntitlementsChangeOfferCall) Fields(s ...googleapi.Field) *AccountsCustomersEntitlementsChangeOfferCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11354,21 +12662,21 @@ func (c *AccountsCustomersEntitlementsActivateCall) Fields(s ...googleapi.Field) // 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 *AccountsCustomersEntitlementsActivateCall) Context(ctx context.Context) *AccountsCustomersEntitlementsActivateCall { +func (c *AccountsCustomersEntitlementsChangeOfferCall) Context(ctx context.Context) *AccountsCustomersEntitlementsChangeOfferCall { 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 *AccountsCustomersEntitlementsActivateCall) Header() http.Header { +func (c *AccountsCustomersEntitlementsChangeOfferCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersEntitlementsActivateCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustomersEntitlementsChangeOfferCall) 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_ { @@ -11376,14 +12684,14 @@ func (c *AccountsCustomersEntitlementsActivateCall) doRequest(alt string) (*http } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1activateentitlementrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1changeofferrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:activate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:changeOffer") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -11396,14 +12704,14 @@ func (c *AccountsCustomersEntitlementsActivateCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.entitlements.activate" call. +// Do executes the "cloudchannel.accounts.customers.entitlements.changeOffer" 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 *AccountsCustomersEntitlementsActivateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *AccountsCustomersEntitlementsChangeOfferCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11434,25 +12742,25 @@ func (c *AccountsCustomersEntitlementsActivateCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Activates a previously suspended entitlement. Entitlements suspended for pending ToS acceptance can't be activated using this method. An entitlement activation is a long-running operation and it updates the state of the customer entitlement. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement resource not found. * SUSPENSION_NOT_RESELLER_INITIATED: Can only activate reseller-initiated suspensions and entitlements that have accepted the TOS. * NOT_SUSPENDED: Can only activate suspended entitlements not in an ACTIVE state. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements/{entitlementsId}:activate", + // "description": "Updates the Offer for an existing customer entitlement. An entitlement update is a long-running operation and it updates the entitlement as a result of fulfillment. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Offer or Entitlement resource not found. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements/{entitlementsId}:changeOffer", // "httpMethod": "POST", - // "id": "cloudchannel.accounts.customers.entitlements.activate", + // "id": "cloudchannel.accounts.customers.entitlements.changeOffer", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the entitlement to activate. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", + // "description": "Required. The resource name of the entitlement to update. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", // "location": "path", // "pattern": "^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:activate", + // "path": "v1/{+name}:changeOffer", // "request": { - // "$ref": "GoogleCloudChannelV1ActivateEntitlementRequest" + // "$ref": "GoogleCloudChannelV1ChangeOfferRequest" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -11464,51 +12772,47 @@ func (c *AccountsCustomersEntitlementsActivateCall) Do(opts ...googleapi.CallOpt } -// method id "cloudchannel.accounts.customers.entitlements.cancel": +// method id "cloudchannel.accounts.customers.entitlements.changeParameters": -type AccountsCustomersEntitlementsCancelCall struct { - s *Service - name string - googlecloudchannelv1cancelentitlementrequest *GoogleCloudChannelV1CancelEntitlementRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsCustomersEntitlementsChangeParametersCall struct { + s *Service + name string + googlecloudchannelv1changeparametersrequest *GoogleCloudChannelV1ChangeParametersRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Cancel: Cancels a previously fulfilled entitlement. An entitlement -// cancellation is a long-running operation. Possible error codes: * -// PERMISSION_DENIED: The reseller account making the request is -// different from the reseller account in the API request. * -// FAILED_PRECONDITION: There are Google Cloud projects linked to the -// Google Cloud entitlement's Cloud Billing subaccount. * +// ChangeParameters: Change parameters of the entitlement. An +// entitlement update is a long-running operation and it updates the +// entitlement as a result of fulfillment. Possible error codes: * +// PERMISSION_DENIED: The customer doesn't belong to the reseller. * // INVALID_ARGUMENT: Required request parameters are missing or invalid. -// * NOT_FOUND: Entitlement resource not found. * -// DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google -// Workspace add-ons, or entitlements for Google Cloud's development -// platform. * INTERNAL: Any non-user error related to a technical issue -// in the backend. Contact Cloud Channel support. * UNKNOWN: Any -// non-user error related to a technical issue in the backend. Contact -// Cloud Channel support. Return value: The ID of a long-running -// operation. To get the results of the operation, call the GetOperation -// method of CloudChannelOperationsService. The response will contain -// google.protobuf.Empty on success. The Operation metadata will contain -// an instance of OperationMetadata. +// For example, the number of seats being changed is greater than the +// allowed number of max seats, or decreasing seats for a commitment +// based plan. * NOT_FOUND: Entitlement resource not found. * INTERNAL: +// Any non-user error related to a technical issue in the backend. +// Contact Cloud Channel support. * UNKNOWN: Any non-user error related +// to a technical issue in the backend. Contact Cloud Channel support. +// Return value: The ID of a long-running operation. To get the results +// of the operation, call the GetOperation method of +// CloudChannelOperationsService. The Operation metadata will contain an +// instance of OperationMetadata. // -// - name: The resource name of the entitlement to cancel. Name uses the -// format: +// - name: The name of the entitlement to update. Name uses the format: // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlem // ent_id}. -func (r *AccountsCustomersEntitlementsService) Cancel(name string, googlecloudchannelv1cancelentitlementrequest *GoogleCloudChannelV1CancelEntitlementRequest) *AccountsCustomersEntitlementsCancelCall { - c := &AccountsCustomersEntitlementsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AccountsCustomersEntitlementsService) ChangeParameters(name string, googlecloudchannelv1changeparametersrequest *GoogleCloudChannelV1ChangeParametersRequest) *AccountsCustomersEntitlementsChangeParametersCall { + c := &AccountsCustomersEntitlementsChangeParametersCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudchannelv1cancelentitlementrequest = googlecloudchannelv1cancelentitlementrequest + c.googlecloudchannelv1changeparametersrequest = googlecloudchannelv1changeparametersrequest 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 *AccountsCustomersEntitlementsCancelCall) Fields(s ...googleapi.Field) *AccountsCustomersEntitlementsCancelCall { +func (c *AccountsCustomersEntitlementsChangeParametersCall) Fields(s ...googleapi.Field) *AccountsCustomersEntitlementsChangeParametersCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11516,21 +12820,21 @@ func (c *AccountsCustomersEntitlementsCancelCall) Fields(s ...googleapi.Field) * // 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 *AccountsCustomersEntitlementsCancelCall) Context(ctx context.Context) *AccountsCustomersEntitlementsCancelCall { +func (c *AccountsCustomersEntitlementsChangeParametersCall) Context(ctx context.Context) *AccountsCustomersEntitlementsChangeParametersCall { 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 *AccountsCustomersEntitlementsCancelCall) Header() http.Header { +func (c *AccountsCustomersEntitlementsChangeParametersCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersEntitlementsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustomersEntitlementsChangeParametersCall) 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_ { @@ -11538,14 +12842,14 @@ func (c *AccountsCustomersEntitlementsCancelCall) doRequest(alt string) (*http.R } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1cancelentitlementrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1changeparametersrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:changeParameters") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -11558,14 +12862,14 @@ func (c *AccountsCustomersEntitlementsCancelCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.entitlements.cancel" call. +// Do executes the "cloudchannel.accounts.customers.entitlements.changeParameters" 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 *AccountsCustomersEntitlementsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *AccountsCustomersEntitlementsChangeParametersCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11596,25 +12900,25 @@ func (c *AccountsCustomersEntitlementsCancelCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Cancels a previously fulfilled entitlement. An entitlement cancellation is a long-running operation. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * FAILED_PRECONDITION: There are Google Cloud projects linked to the Google Cloud entitlement's Cloud Billing subaccount. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement resource not found. * DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace add-ons, or entitlements for Google Cloud's development platform. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The Operation metadata will contain an instance of OperationMetadata.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements/{entitlementsId}:cancel", + // "description": "Change parameters of the entitlement. An entitlement update is a long-running operation and it updates the entitlement as a result of fulfillment. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. For example, the number of seats being changed is greater than the allowed number of max seats, or decreasing seats for a commitment based plan. * NOT_FOUND: Entitlement resource not found. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements/{entitlementsId}:changeParameters", // "httpMethod": "POST", - // "id": "cloudchannel.accounts.customers.entitlements.cancel", + // "id": "cloudchannel.accounts.customers.entitlements.changeParameters", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the entitlement to cancel. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", + // "description": "Required. The name of the entitlement to update. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", // "location": "path", // "pattern": "^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:cancel", + // "path": "v1/{+name}:changeParameters", // "request": { - // "$ref": "GoogleCloudChannelV1CancelEntitlementRequest" + // "$ref": "GoogleCloudChannelV1ChangeParametersRequest" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -11626,46 +12930,47 @@ func (c *AccountsCustomersEntitlementsCancelCall) Do(opts ...googleapi.CallOptio } -// method id "cloudchannel.accounts.customers.entitlements.changeOffer": +// method id "cloudchannel.accounts.customers.entitlements.changeRenewalSettings": -type AccountsCustomersEntitlementsChangeOfferCall struct { - s *Service - name string - googlecloudchannelv1changeofferrequest *GoogleCloudChannelV1ChangeOfferRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsCustomersEntitlementsChangeRenewalSettingsCall struct { + s *Service + name string + googlecloudchannelv1changerenewalsettingsrequest *GoogleCloudChannelV1ChangeRenewalSettingsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ChangeOffer: Updates the Offer for an existing customer entitlement. -// An entitlement update is a long-running operation and it updates the -// entitlement as a result of fulfillment. Possible error codes: * -// PERMISSION_DENIED: The customer doesn't belong to the reseller. * -// INVALID_ARGUMENT: Required request parameters are missing or invalid. -// * NOT_FOUND: Offer or Entitlement resource not found. * INTERNAL: Any -// non-user error related to a technical issue in the backend. Contact -// Cloud Channel support. * UNKNOWN: Any non-user error related to a -// technical issue in the backend. Contact Cloud Channel support. Return -// value: The ID of a long-running operation. To get the results of the -// operation, call the GetOperation method of -// CloudChannelOperationsService. The Operation metadata will contain an -// instance of OperationMetadata. +// ChangeRenewalSettings: Updates the renewal settings for an existing +// customer entitlement. An entitlement update is a long-running +// operation and it updates the entitlement as a result of fulfillment. +// Possible error codes: * PERMISSION_DENIED: The customer doesn't +// belong to the reseller. * INVALID_ARGUMENT: Required request +// parameters are missing or invalid. * NOT_FOUND: Entitlement resource +// not found. * NOT_COMMITMENT_PLAN: Renewal Settings are only +// applicable for a commitment plan. Can't enable or disable renewals +// for non-commitment plans. * INTERNAL: Any non-user error related to a +// technical issue in the backend. Contact Cloud Channel support. * +// UNKNOWN: Any non-user error related to a technical issue in the +// backend. Contact Cloud Channel support. Return value: The ID of a +// long-running operation. To get the results of the operation, call the +// GetOperation method of CloudChannelOperationsService. The Operation +// metadata will contain an instance of OperationMetadata. // -// - name: The resource name of the entitlement to update. Name uses the -// format: +// - name: The name of the entitlement to update. Name uses the format: // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlem // ent_id}. -func (r *AccountsCustomersEntitlementsService) ChangeOffer(name string, googlecloudchannelv1changeofferrequest *GoogleCloudChannelV1ChangeOfferRequest) *AccountsCustomersEntitlementsChangeOfferCall { - c := &AccountsCustomersEntitlementsChangeOfferCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AccountsCustomersEntitlementsService) ChangeRenewalSettings(name string, googlecloudchannelv1changerenewalsettingsrequest *GoogleCloudChannelV1ChangeRenewalSettingsRequest) *AccountsCustomersEntitlementsChangeRenewalSettingsCall { + c := &AccountsCustomersEntitlementsChangeRenewalSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudchannelv1changeofferrequest = googlecloudchannelv1changeofferrequest + c.googlecloudchannelv1changerenewalsettingsrequest = googlecloudchannelv1changerenewalsettingsrequest 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 *AccountsCustomersEntitlementsChangeOfferCall) Fields(s ...googleapi.Field) *AccountsCustomersEntitlementsChangeOfferCall { +func (c *AccountsCustomersEntitlementsChangeRenewalSettingsCall) Fields(s ...googleapi.Field) *AccountsCustomersEntitlementsChangeRenewalSettingsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11673,21 +12978,21 @@ func (c *AccountsCustomersEntitlementsChangeOfferCall) Fields(s ...googleapi.Fie // 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 *AccountsCustomersEntitlementsChangeOfferCall) Context(ctx context.Context) *AccountsCustomersEntitlementsChangeOfferCall { +func (c *AccountsCustomersEntitlementsChangeRenewalSettingsCall) Context(ctx context.Context) *AccountsCustomersEntitlementsChangeRenewalSettingsCall { 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 *AccountsCustomersEntitlementsChangeOfferCall) Header() http.Header { +func (c *AccountsCustomersEntitlementsChangeRenewalSettingsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersEntitlementsChangeOfferCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustomersEntitlementsChangeRenewalSettingsCall) 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_ { @@ -11695,14 +13000,14 @@ func (c *AccountsCustomersEntitlementsChangeOfferCall) doRequest(alt string) (*h } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1changeofferrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1changerenewalsettingsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:changeOffer") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:changeRenewalSettings") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -11715,14 +13020,14 @@ func (c *AccountsCustomersEntitlementsChangeOfferCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.entitlements.changeOffer" call. +// Do executes the "cloudchannel.accounts.customers.entitlements.changeRenewalSettings" 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 *AccountsCustomersEntitlementsChangeOfferCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *AccountsCustomersEntitlementsChangeRenewalSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11753,25 +13058,25 @@ func (c *AccountsCustomersEntitlementsChangeOfferCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Updates the Offer for an existing customer entitlement. An entitlement update is a long-running operation and it updates the entitlement as a result of fulfillment. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Offer or Entitlement resource not found. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements/{entitlementsId}:changeOffer", + // "description": "Updates the renewal settings for an existing customer entitlement. An entitlement update is a long-running operation and it updates the entitlement as a result of fulfillment. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement resource not found. * NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a commitment plan. Can't enable or disable renewals for non-commitment plans. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements/{entitlementsId}:changeRenewalSettings", // "httpMethod": "POST", - // "id": "cloudchannel.accounts.customers.entitlements.changeOffer", + // "id": "cloudchannel.accounts.customers.entitlements.changeRenewalSettings", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the entitlement to update. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", + // "description": "Required. The name of the entitlement to update. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", // "location": "path", // "pattern": "^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:changeOffer", + // "path": "v1/{+name}:changeRenewalSettings", // "request": { - // "$ref": "GoogleCloudChannelV1ChangeOfferRequest" + // "$ref": "GoogleCloudChannelV1ChangeRenewalSettingsRequest" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -11783,47 +13088,56 @@ func (c *AccountsCustomersEntitlementsChangeOfferCall) Do(opts ...googleapi.Call } -// method id "cloudchannel.accounts.customers.entitlements.changeParameters": +// method id "cloudchannel.accounts.customers.entitlements.create": -type AccountsCustomersEntitlementsChangeParametersCall struct { - s *Service - name string - googlecloudchannelv1changeparametersrequest *GoogleCloudChannelV1ChangeParametersRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsCustomersEntitlementsCreateCall struct { + s *Service + parent string + googlecloudchannelv1createentitlementrequest *GoogleCloudChannelV1CreateEntitlementRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ChangeParameters: Change parameters of the entitlement. An -// entitlement update is a long-running operation and it updates the -// entitlement as a result of fulfillment. Possible error codes: * -// PERMISSION_DENIED: The customer doesn't belong to the reseller. * -// INVALID_ARGUMENT: Required request parameters are missing or invalid. -// For example, the number of seats being changed is greater than the -// allowed number of max seats, or decreasing seats for a commitment -// based plan. * NOT_FOUND: Entitlement resource not found. * INTERNAL: -// Any non-user error related to a technical issue in the backend. -// Contact Cloud Channel support. * UNKNOWN: Any non-user error related -// to a technical issue in the backend. Contact Cloud Channel support. -// Return value: The ID of a long-running operation. To get the results -// of the operation, call the GetOperation method of +// Create: Creates an entitlement for a customer. Possible error codes: +// * PERMISSION_DENIED: The customer doesn't belong to the reseller. * +// INVALID_ARGUMENT: * Required request parameters are missing or +// invalid. * There is already a customer entitlement for a SKU from the +// same product family. * INVALID_VALUE: Make sure the OfferId is valid. +// If it is, contact Google Channel support for further troubleshooting. +// * NOT_FOUND: The customer or offer resource was not found. * +// ALREADY_EXISTS: * The SKU was already purchased for the customer. * +// The customer's primary email already exists. Retry after changing the +// customer's primary contact email. * CONDITION_NOT_MET or +// FAILED_PRECONDITION: * The domain required for purchasing a SKU has +// not been verified. * A pre-requisite SKU required to purchase an +// Add-On SKU is missing. For example, Google Workspace Business Starter +// is required to purchase Vault or Drive. * (Developer accounts only) +// Reseller and resold domain must meet the following naming +// requirements: * Domain names must start with goog-test. * Domain +// names must include the reseller domain. * INTERNAL: Any non-user +// error related to a technical issue in the backend. Contact Cloud +// Channel support. * UNKNOWN: Any non-user error related to a technical +// issue in the backend. Contact Cloud Channel support. Return value: +// The ID of a long-running operation. To get the results of the +// operation, call the GetOperation method of // CloudChannelOperationsService. The Operation metadata will contain an // instance of OperationMetadata. // -// - name: The name of the entitlement to update. Name uses the format: -// accounts/{account_id}/customers/{customer_id}/entitlements/{entitlem -// ent_id}. -func (r *AccountsCustomersEntitlementsService) ChangeParameters(name string, googlecloudchannelv1changeparametersrequest *GoogleCloudChannelV1ChangeParametersRequest) *AccountsCustomersEntitlementsChangeParametersCall { - c := &AccountsCustomersEntitlementsChangeParametersCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudchannelv1changeparametersrequest = googlecloudchannelv1changeparametersrequest +// - parent: The resource name of the reseller's customer account in +// which to create the entitlement. Parent uses the format: +// accounts/{account_id}/customers/{customer_id}. +func (r *AccountsCustomersEntitlementsService) Create(parent string, googlecloudchannelv1createentitlementrequest *GoogleCloudChannelV1CreateEntitlementRequest) *AccountsCustomersEntitlementsCreateCall { + c := &AccountsCustomersEntitlementsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudchannelv1createentitlementrequest = googlecloudchannelv1createentitlementrequest 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 *AccountsCustomersEntitlementsChangeParametersCall) Fields(s ...googleapi.Field) *AccountsCustomersEntitlementsChangeParametersCall { +func (c *AccountsCustomersEntitlementsCreateCall) Fields(s ...googleapi.Field) *AccountsCustomersEntitlementsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11831,21 +13145,21 @@ func (c *AccountsCustomersEntitlementsChangeParametersCall) Fields(s ...googleap // 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 *AccountsCustomersEntitlementsChangeParametersCall) Context(ctx context.Context) *AccountsCustomersEntitlementsChangeParametersCall { +func (c *AccountsCustomersEntitlementsCreateCall) Context(ctx context.Context) *AccountsCustomersEntitlementsCreateCall { 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 *AccountsCustomersEntitlementsChangeParametersCall) Header() http.Header { +func (c *AccountsCustomersEntitlementsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersEntitlementsChangeParametersCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustomersEntitlementsCreateCall) 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_ { @@ -11853,14 +13167,14 @@ func (c *AccountsCustomersEntitlementsChangeParametersCall) doRequest(alt string } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1changeparametersrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1createentitlementrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:changeParameters") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entitlements") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -11868,19 +13182,19 @@ func (c *AccountsCustomersEntitlementsChangeParametersCall) doRequest(alt string } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.entitlements.changeParameters" call. +// Do executes the "cloudchannel.accounts.customers.entitlements.create" 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 *AccountsCustomersEntitlementsChangeParametersCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *AccountsCustomersEntitlementsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11911,25 +13225,25 @@ func (c *AccountsCustomersEntitlementsChangeParametersCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Change parameters of the entitlement. An entitlement update is a long-running operation and it updates the entitlement as a result of fulfillment. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. For example, the number of seats being changed is greater than the allowed number of max seats, or decreasing seats for a commitment based plan. * NOT_FOUND: Entitlement resource not found. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements/{entitlementsId}:changeParameters", + // "description": "Creates an entitlement for a customer. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: * Required request parameters are missing or invalid. * There is already a customer entitlement for a SKU from the same product family. * INVALID_VALUE: Make sure the OfferId is valid. If it is, contact Google Channel support for further troubleshooting. * NOT_FOUND: The customer or offer resource was not found. * ALREADY_EXISTS: * The SKU was already purchased for the customer. * The customer's primary email already exists. Retry after changing the customer's primary contact email. * CONDITION_NOT_MET or FAILED_PRECONDITION: * The domain required for purchasing a SKU has not been verified. * A pre-requisite SKU required to purchase an Add-On SKU is missing. For example, Google Workspace Business Starter is required to purchase Vault or Drive. * (Developer accounts only) Reseller and resold domain must meet the following naming requirements: * Domain names must start with goog-test. * Domain names must include the reseller domain. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements", // "httpMethod": "POST", - // "id": "cloudchannel.accounts.customers.entitlements.changeParameters", + // "id": "cloudchannel.accounts.customers.entitlements.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the entitlement to update. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", + // "parent": { + // "description": "Required. The resource name of the reseller's customer account in which to create the entitlement. Parent uses the format: accounts/{account_id}/customers/{customer_id}", // "location": "path", - // "pattern": "^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+$", + // "pattern": "^accounts/[^/]+/customers/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:changeParameters", + // "path": "v1/{+parent}/entitlements", // "request": { - // "$ref": "GoogleCloudChannelV1ChangeParametersRequest" + // "$ref": "GoogleCloudChannelV1CreateEntitlementRequest" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -11941,86 +13255,84 @@ func (c *AccountsCustomersEntitlementsChangeParametersCall) Do(opts ...googleapi } -// method id "cloudchannel.accounts.customers.entitlements.changeRenewalSettings": +// method id "cloudchannel.accounts.customers.entitlements.get": -type AccountsCustomersEntitlementsChangeRenewalSettingsCall struct { - s *Service - name string - googlecloudchannelv1changerenewalsettingsrequest *GoogleCloudChannelV1ChangeRenewalSettingsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsCustomersEntitlementsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// ChangeRenewalSettings: Updates the renewal settings for an existing -// customer entitlement. An entitlement update is a long-running -// operation and it updates the entitlement as a result of fulfillment. -// Possible error codes: * PERMISSION_DENIED: The customer doesn't -// belong to the reseller. * INVALID_ARGUMENT: Required request -// parameters are missing or invalid. * NOT_FOUND: Entitlement resource -// not found. * NOT_COMMITMENT_PLAN: Renewal Settings are only -// applicable for a commitment plan. Can't enable or disable renewals -// for non-commitment plans. * INTERNAL: Any non-user error related to a -// technical issue in the backend. Contact Cloud Channel support. * -// UNKNOWN: Any non-user error related to a technical issue in the -// backend. Contact Cloud Channel support. Return value: The ID of a -// long-running operation. To get the results of the operation, call the -// GetOperation method of CloudChannelOperationsService. The Operation -// metadata will contain an instance of OperationMetadata. +// Get: Returns the requested Entitlement resource. Possible error +// codes: * PERMISSION_DENIED: The customer doesn't belong to the +// reseller. * INVALID_ARGUMENT: Required request parameters are missing +// or invalid. * NOT_FOUND: The customer entitlement was not found. +// Return value: The requested Entitlement resource. // -// - name: The name of the entitlement to update. Name uses the format: +// - name: The resource name of the entitlement to retrieve. Name uses +// the format: // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlem // ent_id}. -func (r *AccountsCustomersEntitlementsService) ChangeRenewalSettings(name string, googlecloudchannelv1changerenewalsettingsrequest *GoogleCloudChannelV1ChangeRenewalSettingsRequest) *AccountsCustomersEntitlementsChangeRenewalSettingsCall { - c := &AccountsCustomersEntitlementsChangeRenewalSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AccountsCustomersEntitlementsService) Get(name string) *AccountsCustomersEntitlementsGetCall { + c := &AccountsCustomersEntitlementsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudchannelv1changerenewalsettingsrequest = googlecloudchannelv1changerenewalsettingsrequest 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 *AccountsCustomersEntitlementsChangeRenewalSettingsCall) Fields(s ...googleapi.Field) *AccountsCustomersEntitlementsChangeRenewalSettingsCall { +func (c *AccountsCustomersEntitlementsGetCall) Fields(s ...googleapi.Field) *AccountsCustomersEntitlementsGetCall { 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 *AccountsCustomersEntitlementsGetCall) IfNoneMatch(entityTag string) *AccountsCustomersEntitlementsGetCall { + 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 *AccountsCustomersEntitlementsChangeRenewalSettingsCall) Context(ctx context.Context) *AccountsCustomersEntitlementsChangeRenewalSettingsCall { +func (c *AccountsCustomersEntitlementsGetCall) Context(ctx context.Context) *AccountsCustomersEntitlementsGetCall { 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 *AccountsCustomersEntitlementsChangeRenewalSettingsCall) Header() http.Header { +func (c *AccountsCustomersEntitlementsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersEntitlementsChangeRenewalSettingsCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustomersEntitlementsGetCall) 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.googlecloudchannelv1changerenewalsettingsrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:changeRenewalSettings") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -12031,14 +13343,14 @@ func (c *AccountsCustomersEntitlementsChangeRenewalSettingsCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.entitlements.changeRenewalSettings" 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 +// Do executes the "cloudchannel.accounts.customers.entitlements.get" call. +// Exactly one of *GoogleCloudChannelV1Entitlement or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudChannelV1Entitlement.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 *AccountsCustomersEntitlementsChangeRenewalSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *AccountsCustomersEntitlementsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1Entitlement, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12057,7 +13369,7 @@ func (c *AccountsCustomersEntitlementsChangeRenewalSettingsCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudChannelV1Entitlement{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12069,28 +13381,25 @@ func (c *AccountsCustomersEntitlementsChangeRenewalSettingsCall) Do(opts ...goog } return ret, nil // { - // "description": "Updates the renewal settings for an existing customer entitlement. An entitlement update is a long-running operation and it updates the entitlement as a result of fulfillment. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement resource not found. * NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a commitment plan. Can't enable or disable renewals for non-commitment plans. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements/{entitlementsId}:changeRenewalSettings", - // "httpMethod": "POST", - // "id": "cloudchannel.accounts.customers.entitlements.changeRenewalSettings", + // "description": "Returns the requested Entitlement resource. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer entitlement was not found. Return value: The requested Entitlement resource.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements/{entitlementsId}", + // "httpMethod": "GET", + // "id": "cloudchannel.accounts.customers.entitlements.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the entitlement to update. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", + // "description": "Required. The resource name of the entitlement to retrieve. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", // "location": "path", // "pattern": "^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:changeRenewalSettings", - // "request": { - // "$ref": "GoogleCloudChannelV1ChangeRenewalSettingsRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudChannelV1Entitlement" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.order" @@ -12099,95 +13408,100 @@ func (c *AccountsCustomersEntitlementsChangeRenewalSettingsCall) Do(opts ...goog } -// method id "cloudchannel.accounts.customers.entitlements.create": +// method id "cloudchannel.accounts.customers.entitlements.list": -type AccountsCustomersEntitlementsCreateCall struct { - s *Service - parent string - googlecloudchannelv1createentitlementrequest *GoogleCloudChannelV1CreateEntitlementRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsCustomersEntitlementsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates an entitlement for a customer. Possible error codes: -// * PERMISSION_DENIED: The customer doesn't belong to the reseller. * -// INVALID_ARGUMENT: * Required request parameters are missing or -// invalid. * There is already a customer entitlement for a SKU from the -// same product family. * INVALID_VALUE: Make sure the OfferId is valid. -// If it is, contact Google Channel support for further troubleshooting. -// * NOT_FOUND: The customer or offer resource was not found. * -// ALREADY_EXISTS: * The SKU was already purchased for the customer. * -// The customer's primary email already exists. Retry after changing the -// customer's primary contact email. * CONDITION_NOT_MET or -// FAILED_PRECONDITION: * The domain required for purchasing a SKU has -// not been verified. * A pre-requisite SKU required to purchase an -// Add-On SKU is missing. For example, Google Workspace Business Starter -// is required to purchase Vault or Drive. * (Developer accounts only) -// Reseller and resold domain must meet the following naming -// requirements: * Domain names must start with goog-test. * Domain -// names must include the reseller domain. * INTERNAL: Any non-user -// error related to a technical issue in the backend. Contact Cloud -// Channel support. * UNKNOWN: Any non-user error related to a technical -// issue in the backend. Contact Cloud Channel support. Return value: -// The ID of a long-running operation. To get the results of the -// operation, call the GetOperation method of -// CloudChannelOperationsService. The Operation metadata will contain an -// instance of OperationMetadata. +// List: Lists Entitlements belonging to a customer. Possible error +// codes: * PERMISSION_DENIED: The customer doesn't belong to the +// reseller. * INVALID_ARGUMENT: Required request parameters are missing +// or invalid. Return value: A list of the customer's Entitlements. // -// - parent: The resource name of the reseller's customer account in -// which to create the entitlement. Parent uses the format: +// - parent: The resource name of the reseller's customer account to +// list entitlements for. Parent uses the format: // accounts/{account_id}/customers/{customer_id}. -func (r *AccountsCustomersEntitlementsService) Create(parent string, googlecloudchannelv1createentitlementrequest *GoogleCloudChannelV1CreateEntitlementRequest) *AccountsCustomersEntitlementsCreateCall { - c := &AccountsCustomersEntitlementsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AccountsCustomersEntitlementsService) List(parent string) *AccountsCustomersEntitlementsListCall { + c := &AccountsCustomersEntitlementsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudchannelv1createentitlementrequest = googlecloudchannelv1createentitlementrequest + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server might return fewer results than requested. If unspecified, +// return at most 50 entitlements. The maximum value is 100; the server +// will coerce values above 100. +func (c *AccountsCustomersEntitlementsListCall) PageSize(pageSize int64) *AccountsCustomersEntitlementsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token for a page +// of results other than the first page. Obtained using +// ListEntitlementsResponse.next_page_token of the previous +// CloudChannelService.ListEntitlements call. +func (c *AccountsCustomersEntitlementsListCall) PageToken(pageToken string) *AccountsCustomersEntitlementsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsCustomersEntitlementsCreateCall) Fields(s ...googleapi.Field) *AccountsCustomersEntitlementsCreateCall { +func (c *AccountsCustomersEntitlementsListCall) Fields(s ...googleapi.Field) *AccountsCustomersEntitlementsListCall { 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 *AccountsCustomersEntitlementsListCall) IfNoneMatch(entityTag string) *AccountsCustomersEntitlementsListCall { + 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 *AccountsCustomersEntitlementsCreateCall) Context(ctx context.Context) *AccountsCustomersEntitlementsCreateCall { +func (c *AccountsCustomersEntitlementsListCall) Context(ctx context.Context) *AccountsCustomersEntitlementsListCall { 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 *AccountsCustomersEntitlementsCreateCall) Header() http.Header { +func (c *AccountsCustomersEntitlementsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersEntitlementsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustomersEntitlementsListCall) 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.googlecloudchannelv1createentitlementrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entitlements") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -12198,14 +13512,16 @@ func (c *AccountsCustomersEntitlementsCreateCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.entitlements.create" 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 *AccountsCustomersEntitlementsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "cloudchannel.accounts.customers.entitlements.list" call. +// Exactly one of *GoogleCloudChannelV1ListEntitlementsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudChannelV1ListEntitlementsResponse.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 *AccountsCustomersEntitlementsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1ListEntitlementsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12224,7 +13540,7 @@ func (c *AccountsCustomersEntitlementsCreateCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudChannelV1ListEntitlementsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12236,16 +13552,27 @@ func (c *AccountsCustomersEntitlementsCreateCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Creates an entitlement for a customer. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: * Required request parameters are missing or invalid. * There is already a customer entitlement for a SKU from the same product family. * INVALID_VALUE: Make sure the OfferId is valid. If it is, contact Google Channel support for further troubleshooting. * NOT_FOUND: The customer or offer resource was not found. * ALREADY_EXISTS: * The SKU was already purchased for the customer. * The customer's primary email already exists. Retry after changing the customer's primary contact email. * CONDITION_NOT_MET or FAILED_PRECONDITION: * The domain required for purchasing a SKU has not been verified. * A pre-requisite SKU required to purchase an Add-On SKU is missing. For example, Google Workspace Business Starter is required to purchase Vault or Drive. * (Developer accounts only) Reseller and resold domain must meet the following naming requirements: * Domain names must start with goog-test. * Domain names must include the reseller domain. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", + // "description": "Lists Entitlements belonging to a customer. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. Return value: A list of the customer's Entitlements.", // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements", - // "httpMethod": "POST", - // "id": "cloudchannel.accounts.customers.entitlements.create", + // "httpMethod": "GET", + // "id": "cloudchannel.accounts.customers.entitlements.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "pageSize": { + // "description": "Optional. Requested page size. Server might return fewer results than requested. If unspecified, return at most 50 entitlements. The maximum value is 100; the server will coerce values above 100.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A token for a page of results other than the first page. Obtained using ListEntitlementsResponse.next_page_token of the previous CloudChannelService.ListEntitlements call.", + // "location": "query", + // "type": "string" + // }, // "parent": { - // "description": "Required. The resource name of the reseller's customer account in which to create the entitlement. Parent uses the format: accounts/{account_id}/customers/{customer_id}", + // "description": "Required. The resource name of the reseller's customer account to list entitlements for. Parent uses the format: accounts/{account_id}/customers/{customer_id}", // "location": "path", // "pattern": "^accounts/[^/]+/customers/[^/]+$", // "required": true, @@ -12253,11 +13580,8 @@ func (c *AccountsCustomersEntitlementsCreateCall) Do(opts ...googleapi.CallOptio // } // }, // "path": "v1/{+parent}/entitlements", - // "request": { - // "$ref": "GoogleCloudChannelV1CreateEntitlementRequest" - // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudChannelV1ListEntitlementsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.order" @@ -12266,37 +13590,58 @@ func (c *AccountsCustomersEntitlementsCreateCall) Do(opts ...googleapi.CallOptio } -// method id "cloudchannel.accounts.customers.entitlements.get": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AccountsCustomersEntitlementsListCall) Pages(ctx context.Context, f func(*GoogleCloudChannelV1ListEntitlementsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type AccountsCustomersEntitlementsGetCall struct { +// method id "cloudchannel.accounts.customers.entitlements.lookupOffer": + +type AccountsCustomersEntitlementsLookupOfferCall struct { s *Service - name string + entitlement string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Returns the requested Entitlement resource. Possible error -// codes: * PERMISSION_DENIED: The customer doesn't belong to the +// LookupOffer: Returns the requested Offer resource. Possible error +// codes: * PERMISSION_DENIED: The entitlement doesn't belong to the // reseller. * INVALID_ARGUMENT: Required request parameters are missing -// or invalid. * NOT_FOUND: The customer entitlement was not found. -// Return value: The requested Entitlement resource. +// or invalid. * NOT_FOUND: Entitlement or offer was not found. Return +// value: The Offer resource. // -// - name: The resource name of the entitlement to retrieve. Name uses -// the format: +// - entitlement: The resource name of the entitlement to retrieve the +// Offer. Entitlement uses the format: // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlem // ent_id}. -func (r *AccountsCustomersEntitlementsService) Get(name string) *AccountsCustomersEntitlementsGetCall { - c := &AccountsCustomersEntitlementsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +func (r *AccountsCustomersEntitlementsService) LookupOffer(entitlement string) *AccountsCustomersEntitlementsLookupOfferCall { + c := &AccountsCustomersEntitlementsLookupOfferCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.entitlement = entitlement 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 *AccountsCustomersEntitlementsGetCall) Fields(s ...googleapi.Field) *AccountsCustomersEntitlementsGetCall { +func (c *AccountsCustomersEntitlementsLookupOfferCall) Fields(s ...googleapi.Field) *AccountsCustomersEntitlementsLookupOfferCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12306,7 +13651,7 @@ func (c *AccountsCustomersEntitlementsGetCall) Fields(s ...googleapi.Field) *Acc // 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 *AccountsCustomersEntitlementsGetCall) IfNoneMatch(entityTag string) *AccountsCustomersEntitlementsGetCall { +func (c *AccountsCustomersEntitlementsLookupOfferCall) IfNoneMatch(entityTag string) *AccountsCustomersEntitlementsLookupOfferCall { c.ifNoneMatch_ = entityTag return c } @@ -12314,21 +13659,21 @@ func (c *AccountsCustomersEntitlementsGetCall) IfNoneMatch(entityTag string) *Ac // 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 *AccountsCustomersEntitlementsGetCall) Context(ctx context.Context) *AccountsCustomersEntitlementsGetCall { +func (c *AccountsCustomersEntitlementsLookupOfferCall) Context(ctx context.Context) *AccountsCustomersEntitlementsLookupOfferCall { 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 *AccountsCustomersEntitlementsGetCall) Header() http.Header { +func (c *AccountsCustomersEntitlementsLookupOfferCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersEntitlementsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustomersEntitlementsLookupOfferCall) 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_ { @@ -12341,7 +13686,7 @@ func (c *AccountsCustomersEntitlementsGetCall) doRequest(alt string) (*http.Resp var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+entitlement}:lookupOffer") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -12349,19 +13694,19 @@ func (c *AccountsCustomersEntitlementsGetCall) doRequest(alt string) (*http.Resp } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "entitlement": c.entitlement, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.entitlements.get" call. -// Exactly one of *GoogleCloudChannelV1Entitlement or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudChannelV1Entitlement.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 +// Do executes the "cloudchannel.accounts.customers.entitlements.lookupOffer" call. +// Exactly one of *GoogleCloudChannelV1Offer or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudChannelV1Offer.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 *AccountsCustomersEntitlementsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1Entitlement, error) { +func (c *AccountsCustomersEntitlementsLookupOfferCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1Offer, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12380,7 +13725,7 @@ func (c *AccountsCustomersEntitlementsGetCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudChannelV1Entitlement{ + ret := &GoogleCloudChannelV1Offer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12392,25 +13737,25 @@ func (c *AccountsCustomersEntitlementsGetCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Returns the requested Entitlement resource. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer entitlement was not found. Return value: The requested Entitlement resource.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements/{entitlementsId}", + // "description": "Returns the requested Offer resource. Possible error codes: * PERMISSION_DENIED: The entitlement doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement or offer was not found. Return value: The Offer resource.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements/{entitlementsId}:lookupOffer", // "httpMethod": "GET", - // "id": "cloudchannel.accounts.customers.entitlements.get", + // "id": "cloudchannel.accounts.customers.entitlements.lookupOffer", // "parameterOrder": [ - // "name" + // "entitlement" // ], // "parameters": { - // "name": { - // "description": "Required. The resource name of the entitlement to retrieve. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", + // "entitlement": { + // "description": "Required. The resource name of the entitlement to retrieve the Offer. Entitlement uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", // "location": "path", // "pattern": "^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+entitlement}:lookupOffer", // "response": { - // "$ref": "GoogleCloudChannelV1Entitlement" + // "$ref": "GoogleCloudChannelV1Offer" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.order" @@ -12419,120 +13764,105 @@ func (c *AccountsCustomersEntitlementsGetCall) Do(opts ...googleapi.CallOption) } -// method id "cloudchannel.accounts.customers.entitlements.list": +// method id "cloudchannel.accounts.customers.entitlements.startPaidService": -type AccountsCustomersEntitlementsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccountsCustomersEntitlementsStartPaidServiceCall struct { + s *Service + name string + googlecloudchannelv1startpaidservicerequest *GoogleCloudChannelV1StartPaidServiceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists Entitlements belonging to a customer. Possible error -// codes: * PERMISSION_DENIED: The customer doesn't belong to the -// reseller. * INVALID_ARGUMENT: Required request parameters are missing -// or invalid. Return value: A list of the customer's Entitlements. +// StartPaidService: Starts paid service for a trial entitlement. Starts +// paid service for a trial entitlement immediately. This method is only +// applicable if a plan is set up for a trial entitlement but has some +// trial days remaining. Possible error codes: * PERMISSION_DENIED: The +// customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required +// request parameters are missing or invalid. * NOT_FOUND: Entitlement +// resource not found. * FAILED_PRECONDITION/NOT_IN_TRIAL: This method +// only works for entitlement on trial plans. * INTERNAL: Any non-user +// error related to a technical issue in the backend. Contact Cloud +// Channel support. * UNKNOWN: Any non-user error related to a technical +// issue in the backend. Contact Cloud Channel support. Return value: +// The ID of a long-running operation. To get the results of the +// operation, call the GetOperation method of +// CloudChannelOperationsService. The Operation metadata will contain an +// instance of OperationMetadata. // -// - parent: The resource name of the reseller's customer account to -// list entitlements for. Parent uses the format: -// accounts/{account_id}/customers/{customer_id}. -func (r *AccountsCustomersEntitlementsService) List(parent string) *AccountsCustomersEntitlementsListCall { - c := &AccountsCustomersEntitlementsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Requested page size. -// Server might return fewer results than requested. If unspecified, -// return at most 50 entitlements. The maximum value is 100; the server -// will coerce values above 100. -func (c *AccountsCustomersEntitlementsListCall) PageSize(pageSize int64) *AccountsCustomersEntitlementsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A token for a page -// of results other than the first page. Obtained using -// ListEntitlementsResponse.next_page_token of the previous -// CloudChannelService.ListEntitlements call. -func (c *AccountsCustomersEntitlementsListCall) PageToken(pageToken string) *AccountsCustomersEntitlementsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The name of the entitlement to start a paid service for. Name +// uses the format: +// accounts/{account_id}/customers/{customer_id}/entitlements/{entitlem +// ent_id}. +func (r *AccountsCustomersEntitlementsService) StartPaidService(name string, googlecloudchannelv1startpaidservicerequest *GoogleCloudChannelV1StartPaidServiceRequest) *AccountsCustomersEntitlementsStartPaidServiceCall { + c := &AccountsCustomersEntitlementsStartPaidServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudchannelv1startpaidservicerequest = googlecloudchannelv1startpaidservicerequest 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 *AccountsCustomersEntitlementsListCall) Fields(s ...googleapi.Field) *AccountsCustomersEntitlementsListCall { +func (c *AccountsCustomersEntitlementsStartPaidServiceCall) Fields(s ...googleapi.Field) *AccountsCustomersEntitlementsStartPaidServiceCall { 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 *AccountsCustomersEntitlementsListCall) IfNoneMatch(entityTag string) *AccountsCustomersEntitlementsListCall { - 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 *AccountsCustomersEntitlementsListCall) Context(ctx context.Context) *AccountsCustomersEntitlementsListCall { +func (c *AccountsCustomersEntitlementsStartPaidServiceCall) Context(ctx context.Context) *AccountsCustomersEntitlementsStartPaidServiceCall { 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 *AccountsCustomersEntitlementsListCall) Header() http.Header { +func (c *AccountsCustomersEntitlementsStartPaidServiceCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersEntitlementsListCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustomersEntitlementsStartPaidServiceCall) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1startpaidservicerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entitlements") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:startPaidService") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.entitlements.list" call. -// Exactly one of *GoogleCloudChannelV1ListEntitlementsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudChannelV1ListEntitlementsResponse.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 *AccountsCustomersEntitlementsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1ListEntitlementsResponse, error) { +// Do executes the "cloudchannel.accounts.customers.entitlements.startPaidService" 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 *AccountsCustomersEntitlementsStartPaidServiceCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12551,7 +13881,7 @@ func (c *AccountsCustomersEntitlementsListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudChannelV1ListEntitlementsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12563,36 +13893,28 @@ func (c *AccountsCustomersEntitlementsListCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Lists Entitlements belonging to a customer. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. Return value: A list of the customer's Entitlements.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements", - // "httpMethod": "GET", - // "id": "cloudchannel.accounts.customers.entitlements.list", + // "description": "Starts paid service for a trial entitlement. Starts paid service for a trial entitlement immediately. This method is only applicable if a plan is set up for a trial entitlement but has some trial days remaining. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement resource not found. * FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for entitlement on trial plans. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements/{entitlementsId}:startPaidService", + // "httpMethod": "POST", + // "id": "cloudchannel.accounts.customers.entitlements.startPaidService", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "Optional. Requested page size. Server might return fewer results than requested. If unspecified, return at most 50 entitlements. The maximum value is 100; the server will coerce values above 100.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. A token for a page of results other than the first page. Obtained using ListEntitlementsResponse.next_page_token of the previous CloudChannelService.ListEntitlements call.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource name of the reseller's customer account to list entitlements for. Parent uses the format: accounts/{account_id}/customers/{customer_id}", + // "name": { + // "description": "Required. The name of the entitlement to start a paid service for. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", // "location": "path", - // "pattern": "^accounts/[^/]+/customers/[^/]+$", + // "pattern": "^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/entitlements", + // "path": "v1/{+name}:startPaidService", + // "request": { + // "$ref": "GoogleCloudChannelV1StartPaidServiceRequest" + // }, // "response": { - // "$ref": "GoogleCloudChannelV1ListEntitlementsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.order" @@ -12601,123 +13923,102 @@ func (c *AccountsCustomersEntitlementsListCall) Do(opts ...googleapi.CallOption) } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AccountsCustomersEntitlementsListCall) Pages(ctx context.Context, f func(*GoogleCloudChannelV1ListEntitlementsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "cloudchannel.accounts.customers.entitlements.lookupOffer": +// method id "cloudchannel.accounts.customers.entitlements.suspend": -type AccountsCustomersEntitlementsLookupOfferCall struct { - s *Service - entitlement string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccountsCustomersEntitlementsSuspendCall struct { + s *Service + name string + googlecloudchannelv1suspendentitlementrequest *GoogleCloudChannelV1SuspendEntitlementRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// LookupOffer: Returns the requested Offer resource. Possible error -// codes: * PERMISSION_DENIED: The entitlement doesn't belong to the -// reseller. * INVALID_ARGUMENT: Required request parameters are missing -// or invalid. * NOT_FOUND: Entitlement or offer was not found. Return -// value: The Offer resource. +// Suspend: Suspends a previously fulfilled entitlement. An entitlement +// suspension is a long-running operation. Possible error codes: * +// PERMISSION_DENIED: The customer doesn't belong to the reseller. * +// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// * NOT_FOUND: Entitlement resource not found. * NOT_ACTIVE: +// Entitlement is not active. * INTERNAL: Any non-user error related to +// a technical issue in the backend. Contact Cloud Channel support. * +// UNKNOWN: Any non-user error related to a technical issue in the +// backend. Contact Cloud Channel support. Return value: The ID of a +// long-running operation. To get the results of the operation, call the +// GetOperation method of CloudChannelOperationsService. The Operation +// metadata will contain an instance of OperationMetadata. // -// - entitlement: The resource name of the entitlement to retrieve the -// Offer. Entitlement uses the format: +// - name: The resource name of the entitlement to suspend. Name uses +// the format: // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlem // ent_id}. -func (r *AccountsCustomersEntitlementsService) LookupOffer(entitlement string) *AccountsCustomersEntitlementsLookupOfferCall { - c := &AccountsCustomersEntitlementsLookupOfferCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.entitlement = entitlement +func (r *AccountsCustomersEntitlementsService) Suspend(name string, googlecloudchannelv1suspendentitlementrequest *GoogleCloudChannelV1SuspendEntitlementRequest) *AccountsCustomersEntitlementsSuspendCall { + c := &AccountsCustomersEntitlementsSuspendCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudchannelv1suspendentitlementrequest = googlecloudchannelv1suspendentitlementrequest 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 *AccountsCustomersEntitlementsLookupOfferCall) Fields(s ...googleapi.Field) *AccountsCustomersEntitlementsLookupOfferCall { +func (c *AccountsCustomersEntitlementsSuspendCall) Fields(s ...googleapi.Field) *AccountsCustomersEntitlementsSuspendCall { 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 *AccountsCustomersEntitlementsLookupOfferCall) IfNoneMatch(entityTag string) *AccountsCustomersEntitlementsLookupOfferCall { - 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 *AccountsCustomersEntitlementsLookupOfferCall) Context(ctx context.Context) *AccountsCustomersEntitlementsLookupOfferCall { +func (c *AccountsCustomersEntitlementsSuspendCall) Context(ctx context.Context) *AccountsCustomersEntitlementsSuspendCall { 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 *AccountsCustomersEntitlementsLookupOfferCall) Header() http.Header { +func (c *AccountsCustomersEntitlementsSuspendCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersEntitlementsLookupOfferCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustomersEntitlementsSuspendCall) 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 + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1suspendentitlementrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+entitlement}:lookupOffer") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:suspend") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "entitlement": c.entitlement, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.entitlements.lookupOffer" call. -// Exactly one of *GoogleCloudChannelV1Offer or error will be non-nil. +// Do executes the "cloudchannel.accounts.customers.entitlements.suspend" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudChannelV1Offer.ServerResponse.Header or (if a response +// *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 *AccountsCustomersEntitlementsLookupOfferCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1Offer, error) { +func (c *AccountsCustomersEntitlementsSuspendCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12736,7 +14037,7 @@ func (c *AccountsCustomersEntitlementsLookupOfferCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudChannelV1Offer{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12748,25 +14049,28 @@ func (c *AccountsCustomersEntitlementsLookupOfferCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Returns the requested Offer resource. Possible error codes: * PERMISSION_DENIED: The entitlement doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement or offer was not found. Return value: The Offer resource.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements/{entitlementsId}:lookupOffer", - // "httpMethod": "GET", - // "id": "cloudchannel.accounts.customers.entitlements.lookupOffer", + // "description": "Suspends a previously fulfilled entitlement. An entitlement suspension is a long-running operation. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement resource not found. * NOT_ACTIVE: Entitlement is not active. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements/{entitlementsId}:suspend", + // "httpMethod": "POST", + // "id": "cloudchannel.accounts.customers.entitlements.suspend", // "parameterOrder": [ - // "entitlement" + // "name" // ], // "parameters": { - // "entitlement": { - // "description": "Required. The resource name of the entitlement to retrieve the Offer. Entitlement uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", + // "name": { + // "description": "Required. The resource name of the entitlement to suspend. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", // "location": "path", // "pattern": "^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+entitlement}:lookupOffer", + // "path": "v1/{+name}:suspend", + // "request": { + // "$ref": "GoogleCloudChannelV1SuspendEntitlementRequest" + // }, // "response": { - // "$ref": "GoogleCloudChannelV1Offer" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.order" @@ -12775,105 +14079,133 @@ func (c *AccountsCustomersEntitlementsLookupOfferCall) Do(opts ...googleapi.Call } -// method id "cloudchannel.accounts.customers.entitlements.startPaidService": +// method id "cloudchannel.accounts.offers.list": -type AccountsCustomersEntitlementsStartPaidServiceCall struct { - s *Service - name string - googlecloudchannelv1startpaidservicerequest *GoogleCloudChannelV1StartPaidServiceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsOffersListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// StartPaidService: Starts paid service for a trial entitlement. Starts -// paid service for a trial entitlement immediately. This method is only -// applicable if a plan is set up for a trial entitlement but has some -// trial days remaining. Possible error codes: * PERMISSION_DENIED: The -// customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required -// request parameters are missing or invalid. * NOT_FOUND: Entitlement -// resource not found. * FAILED_PRECONDITION/NOT_IN_TRIAL: This method -// only works for entitlement on trial plans. * INTERNAL: Any non-user -// error related to a technical issue in the backend. Contact Cloud -// Channel support. * UNKNOWN: Any non-user error related to a technical -// issue in the backend. Contact Cloud Channel support. Return value: -// The ID of a long-running operation. To get the results of the -// operation, call the GetOperation method of -// CloudChannelOperationsService. The Operation metadata will contain an -// instance of OperationMetadata. +// List: Lists the Offers the reseller can sell. Possible error codes: * +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // -// - name: The name of the entitlement to start a paid service for. Name -// uses the format: -// accounts/{account_id}/customers/{customer_id}/entitlements/{entitlem -// ent_id}. -func (r *AccountsCustomersEntitlementsService) StartPaidService(name string, googlecloudchannelv1startpaidservicerequest *GoogleCloudChannelV1StartPaidServiceRequest) *AccountsCustomersEntitlementsStartPaidServiceCall { - c := &AccountsCustomersEntitlementsStartPaidServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudchannelv1startpaidservicerequest = googlecloudchannelv1startpaidservicerequest +// - parent: The resource name of the reseller account from which to +// list Offers. Parent uses the format: accounts/{account_id}. +func (r *AccountsOffersService) List(parent string) *AccountsOffersListCall { + c := &AccountsOffersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The expression to filter +// results by name (name of the Offer), sku.name (name of the SKU), or +// sku.product.name (name of the Product). Example 1: +// sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1 +// Example 2: name=accounts/a1/offers/o1 +func (c *AccountsOffersListCall) Filter(filter string) *AccountsOffersListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// LanguageCode sets the optional parameter "languageCode": The BCP-47 +// language code. For example, "en-US". The response will localize in +// the corresponding language code, if specified. The default value is +// "en-US". +func (c *AccountsOffersListCall) LanguageCode(languageCode string) *AccountsOffersListCall { + c.urlParams_.Set("languageCode", languageCode) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server might return fewer results than requested. If unspecified, +// returns at most 500 Offers. The maximum value is 1000; the server +// will coerce values above 1000. +func (c *AccountsOffersListCall) PageSize(pageSize int64) *AccountsOffersListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token for a page +// of results other than the first page. +func (c *AccountsOffersListCall) PageToken(pageToken string) *AccountsOffersListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsCustomersEntitlementsStartPaidServiceCall) Fields(s ...googleapi.Field) *AccountsCustomersEntitlementsStartPaidServiceCall { +func (c *AccountsOffersListCall) Fields(s ...googleapi.Field) *AccountsOffersListCall { 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 *AccountsOffersListCall) IfNoneMatch(entityTag string) *AccountsOffersListCall { + 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 *AccountsCustomersEntitlementsStartPaidServiceCall) Context(ctx context.Context) *AccountsCustomersEntitlementsStartPaidServiceCall { +func (c *AccountsOffersListCall) Context(ctx context.Context) *AccountsOffersListCall { 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 *AccountsCustomersEntitlementsStartPaidServiceCall) Header() http.Header { +func (c *AccountsOffersListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersEntitlementsStartPaidServiceCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsOffersListCall) 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.googlecloudchannelv1startpaidservicerequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:startPaidService") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/offers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.entitlements.startPaidService" 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 +// Do executes the "cloudchannel.accounts.offers.list" call. +// Exactly one of *GoogleCloudChannelV1ListOffersResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudChannelV1ListOffersResponse.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 *AccountsCustomersEntitlementsStartPaidServiceCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *AccountsOffersListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1ListOffersResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12892,7 +14224,7 @@ func (c *AccountsCustomersEntitlementsStartPaidServiceCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudChannelV1ListOffersResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12904,28 +14236,46 @@ func (c *AccountsCustomersEntitlementsStartPaidServiceCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Starts paid service for a trial entitlement. Starts paid service for a trial entitlement immediately. This method is only applicable if a plan is set up for a trial entitlement but has some trial days remaining. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement resource not found. * FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for entitlement on trial plans. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements/{entitlementsId}:startPaidService", - // "httpMethod": "POST", - // "id": "cloudchannel.accounts.customers.entitlements.startPaidService", + // "description": "Lists the Offers the reseller can sell. Possible error codes: * INVALID_ARGUMENT: Required request parameters are missing or invalid.", + // "flatPath": "v1/accounts/{accountsId}/offers", + // "httpMethod": "GET", + // "id": "cloudchannel.accounts.offers.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the entitlement to start a paid service for. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", + // "filter": { + // "description": "Optional. The expression to filter results by name (name of the Offer), sku.name (name of the SKU), or sku.product.name (name of the Product). Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1 Example 2: name=accounts/a1/offers/o1", + // "location": "query", + // "type": "string" + // }, + // "languageCode": { + // "description": "Optional. The BCP-47 language code. For example, \"en-US\". The response will localize in the corresponding language code, if specified. The default value is \"en-US\".", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 500 Offers. The maximum value is 1000; the server will coerce values above 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A token for a page of results other than the first page.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the reseller account from which to list Offers. Parent uses the format: accounts/{account_id}.", // "location": "path", - // "pattern": "^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+$", + // "pattern": "^accounts/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:startPaidService", - // "request": { - // "$ref": "GoogleCloudChannelV1StartPaidServiceRequest" - // }, + // "path": "v1/{+parent}/offers", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudChannelV1ListOffersResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.order" @@ -12934,45 +14284,55 @@ func (c *AccountsCustomersEntitlementsStartPaidServiceCall) Do(opts ...googleapi } -// method id "cloudchannel.accounts.customers.entitlements.suspend": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AccountsOffersListCall) Pages(ctx context.Context, f func(*GoogleCloudChannelV1ListOffersResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "cloudchannel.accounts.reportJobs.fetchReportResults": -type AccountsCustomersEntitlementsSuspendCall struct { +type AccountsReportJobsFetchReportResultsCall struct { s *Service - name string - googlecloudchannelv1suspendentitlementrequest *GoogleCloudChannelV1SuspendEntitlementRequest + reportJob string + googlecloudchannelv1fetchreportresultsrequest *GoogleCloudChannelV1FetchReportResultsRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Suspend: Suspends a previously fulfilled entitlement. An entitlement -// suspension is a long-running operation. Possible error codes: * -// PERMISSION_DENIED: The customer doesn't belong to the reseller. * -// INVALID_ARGUMENT: Required request parameters are missing or invalid. -// * NOT_FOUND: Entitlement resource not found. * NOT_ACTIVE: -// Entitlement is not active. * INTERNAL: Any non-user error related to -// a technical issue in the backend. Contact Cloud Channel support. * -// UNKNOWN: Any non-user error related to a technical issue in the -// backend. Contact Cloud Channel support. Return value: The ID of a -// long-running operation. To get the results of the operation, call the -// GetOperation method of CloudChannelOperationsService. The Operation -// metadata will contain an instance of OperationMetadata. +// FetchReportResults: Retrieves data generated by +// CloudChannelReportsService.RunReportJob. // -// - name: The resource name of the entitlement to suspend. Name uses -// the format: -// accounts/{account_id}/customers/{customer_id}/entitlements/{entitlem -// ent_id}. -func (r *AccountsCustomersEntitlementsService) Suspend(name string, googlecloudchannelv1suspendentitlementrequest *GoogleCloudChannelV1SuspendEntitlementRequest) *AccountsCustomersEntitlementsSuspendCall { - c := &AccountsCustomersEntitlementsSuspendCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudchannelv1suspendentitlementrequest = googlecloudchannelv1suspendentitlementrequest +// - reportJob: The report job created by +// CloudChannelReportsService.RunReportJob. Report_job uses the +// format: accounts/{account_id}/reportJobs/{report_job_id}. +func (r *AccountsReportJobsService) FetchReportResults(reportJob string, googlecloudchannelv1fetchreportresultsrequest *GoogleCloudChannelV1FetchReportResultsRequest) *AccountsReportJobsFetchReportResultsCall { + c := &AccountsReportJobsFetchReportResultsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.reportJob = reportJob + c.googlecloudchannelv1fetchreportresultsrequest = googlecloudchannelv1fetchreportresultsrequest 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 *AccountsCustomersEntitlementsSuspendCall) Fields(s ...googleapi.Field) *AccountsCustomersEntitlementsSuspendCall { +func (c *AccountsReportJobsFetchReportResultsCall) Fields(s ...googleapi.Field) *AccountsReportJobsFetchReportResultsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12980,21 +14340,21 @@ func (c *AccountsCustomersEntitlementsSuspendCall) Fields(s ...googleapi.Field) // 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 *AccountsCustomersEntitlementsSuspendCall) Context(ctx context.Context) *AccountsCustomersEntitlementsSuspendCall { +func (c *AccountsReportJobsFetchReportResultsCall) Context(ctx context.Context) *AccountsReportJobsFetchReportResultsCall { 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 *AccountsCustomersEntitlementsSuspendCall) Header() http.Header { +func (c *AccountsReportJobsFetchReportResultsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsCustomersEntitlementsSuspendCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsReportJobsFetchReportResultsCall) 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_ { @@ -13002,14 +14362,14 @@ func (c *AccountsCustomersEntitlementsSuspendCall) doRequest(alt string) (*http. } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1suspendentitlementrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudchannelv1fetchreportresultsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:suspend") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+reportJob}:fetchReportResults") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -13017,19 +14377,21 @@ func (c *AccountsCustomersEntitlementsSuspendCall) doRequest(alt string) (*http. } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "reportJob": c.reportJob, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.customers.entitlements.suspend" 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 *AccountsCustomersEntitlementsSuspendCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "cloudchannel.accounts.reportJobs.fetchReportResults" call. +// Exactly one of *GoogleCloudChannelV1FetchReportResultsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudChannelV1FetchReportResultsResponse.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 *AccountsReportJobsFetchReportResultsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1FetchReportResultsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13048,7 +14410,7 @@ func (c *AccountsCustomersEntitlementsSuspendCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudChannelV1FetchReportResultsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13060,39 +14422,60 @@ func (c *AccountsCustomersEntitlementsSuspendCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Suspends a previously fulfilled entitlement. An entitlement suspension is a long-running operation. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement resource not found. * NOT_ACTIVE: Entitlement is not active. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", - // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements/{entitlementsId}:suspend", + // "description": "Retrieves data generated by CloudChannelReportsService.RunReportJob.", + // "flatPath": "v1/accounts/{accountsId}/reportJobs/{reportJobsId}:fetchReportResults", // "httpMethod": "POST", - // "id": "cloudchannel.accounts.customers.entitlements.suspend", + // "id": "cloudchannel.accounts.reportJobs.fetchReportResults", // "parameterOrder": [ - // "name" + // "reportJob" // ], // "parameters": { - // "name": { - // "description": "Required. The resource name of the entitlement to suspend. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", + // "reportJob": { + // "description": "Required. The report job created by CloudChannelReportsService.RunReportJob. Report_job uses the format: accounts/{account_id}/reportJobs/{report_job_id}", // "location": "path", - // "pattern": "^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+$", + // "pattern": "^accounts/[^/]+/reportJobs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:suspend", + // "path": "v1/{+reportJob}:fetchReportResults", // "request": { - // "$ref": "GoogleCloudChannelV1SuspendEntitlementRequest" + // "$ref": "GoogleCloudChannelV1FetchReportResultsRequest" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudChannelV1FetchReportResultsResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/apps.order" + // "https://www.googleapis.com/auth/apps.reports.usage.readonly" // ] // } } -// method id "cloudchannel.accounts.offers.list": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AccountsReportJobsFetchReportResultsCall) Pages(ctx context.Context, f func(*GoogleCloudChannelV1FetchReportResultsResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googlecloudchannelv1fetchreportresultsrequest.PageToken = pt }(c.googlecloudchannelv1fetchreportresultsrequest.PageToken) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.googlecloudchannelv1fetchreportresultsrequest.PageToken = x.NextPageToken + } +} -type AccountsOffersListCall struct { +// method id "cloudchannel.accounts.reports.list": + +type AccountsReportsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -13101,48 +14484,40 @@ type AccountsOffersListCall struct { header_ http.Header } -// List: Lists the Offers the reseller can sell. Possible error codes: * -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// List: Lists the reports that RunReportJob can run. These reports +// include an ID, a description, and the list of columns that will be in +// the result. // -// - parent: The resource name of the reseller account from which to -// list Offers. Parent uses the format: accounts/{account_id}. -func (r *AccountsOffersService) List(parent string) *AccountsOffersListCall { - c := &AccountsOffersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the partner account to list available +// reports for. Parent uses the format: accounts/{account_id}. +func (r *AccountsReportsService) List(parent string) *AccountsReportsListCall { + c := &AccountsReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": The expression to filter -// results by name (name of the Offer), sku.name (name of the SKU), or -// sku.product.name (name of the Product). Example 1: -// sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1 -// Example 2: name=accounts/a1/offers/o1 -func (c *AccountsOffersListCall) Filter(filter string) *AccountsOffersListCall { - c.urlParams_.Set("filter", filter) - return c -} - // LanguageCode sets the optional parameter "languageCode": The BCP-47 -// language code. For example, "en-US". The response will localize in -// the corresponding language code, if specified. The default value is -// "en-US". -func (c *AccountsOffersListCall) LanguageCode(languageCode string) *AccountsOffersListCall { +// language code, such as "en-US". If specified, the response is +// localized to the corresponding language code if the original data +// sources support it. Default is "en-US". +func (c *AccountsReportsListCall) LanguageCode(languageCode string) *AccountsReportsListCall { c.urlParams_.Set("languageCode", languageCode) return c } -// PageSize sets the optional parameter "pageSize": Requested page size. -// Server might return fewer results than requested. If unspecified, -// returns at most 500 Offers. The maximum value is 1000; the server -// will coerce values above 1000. -func (c *AccountsOffersListCall) PageSize(pageSize int64) *AccountsOffersListCall { +// PageSize sets the optional parameter "pageSize": Requested page size +// of the report. The server might return fewer results than requested. +// If unspecified, returns 20 reports. The maximum value is 100. +func (c *AccountsReportsListCall) PageSize(pageSize int64) *AccountsReportsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A token for a page -// of results other than the first page. -func (c *AccountsOffersListCall) PageToken(pageToken string) *AccountsOffersListCall { +// PageToken sets the optional parameter "pageToken": A token that +// specifies a page of results beyond the first page. Obtained through +// ListReportsResponse.next_page_token of the previous +// CloudChannelReportsService.ListReports call. +func (c *AccountsReportsListCall) PageToken(pageToken string) *AccountsReportsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -13150,7 +14525,7 @@ func (c *AccountsOffersListCall) PageToken(pageToken string) *AccountsOffersList // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsOffersListCall) Fields(s ...googleapi.Field) *AccountsOffersListCall { +func (c *AccountsReportsListCall) Fields(s ...googleapi.Field) *AccountsReportsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13160,7 +14535,7 @@ func (c *AccountsOffersListCall) Fields(s ...googleapi.Field) *AccountsOffersLis // 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 *AccountsOffersListCall) IfNoneMatch(entityTag string) *AccountsOffersListCall { +func (c *AccountsReportsListCall) IfNoneMatch(entityTag string) *AccountsReportsListCall { c.ifNoneMatch_ = entityTag return c } @@ -13168,21 +14543,21 @@ func (c *AccountsOffersListCall) IfNoneMatch(entityTag string) *AccountsOffersLi // 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 *AccountsOffersListCall) Context(ctx context.Context) *AccountsOffersListCall { +func (c *AccountsReportsListCall) Context(ctx context.Context) *AccountsReportsListCall { 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 *AccountsOffersListCall) Header() http.Header { +func (c *AccountsReportsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsOffersListCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsReportsListCall) 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_ { @@ -13195,7 +14570,7 @@ func (c *AccountsOffersListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/offers") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/reports") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -13208,15 +14583,15 @@ func (c *AccountsOffersListCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudchannel.accounts.offers.list" call. -// Exactly one of *GoogleCloudChannelV1ListOffersResponse or error will +// Do executes the "cloudchannel.accounts.reports.list" call. +// Exactly one of *GoogleCloudChannelV1ListReportsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either -// *GoogleCloudChannelV1ListOffersResponse.ServerResponse.Header or (if +// *GoogleCloudChannelV1ListReportsResponse.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 *AccountsOffersListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1ListOffersResponse, error) { +func (c *AccountsReportsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1ListReportsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13235,7 +14610,7 @@ func (c *AccountsOffersListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudC if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudChannelV1ListOffersResponse{ + ret := &GoogleCloudChannelV1ListReportsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13247,49 +14622,44 @@ func (c *AccountsOffersListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudC } return ret, nil // { - // "description": "Lists the Offers the reseller can sell. Possible error codes: * INVALID_ARGUMENT: Required request parameters are missing or invalid.", - // "flatPath": "v1/accounts/{accountsId}/offers", + // "description": "Lists the reports that RunReportJob can run. These reports include an ID, a description, and the list of columns that will be in the result.", + // "flatPath": "v1/accounts/{accountsId}/reports", // "httpMethod": "GET", - // "id": "cloudchannel.accounts.offers.list", + // "id": "cloudchannel.accounts.reports.list", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "filter": { - // "description": "Optional. The expression to filter results by name (name of the Offer), sku.name (name of the SKU), or sku.product.name (name of the Product). Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1 Example 2: name=accounts/a1/offers/o1", - // "location": "query", - // "type": "string" - // }, // "languageCode": { - // "description": "Optional. The BCP-47 language code. For example, \"en-US\". The response will localize in the corresponding language code, if specified. The default value is \"en-US\".", + // "description": "Optional. The BCP-47 language code, such as \"en-US\". If specified, the response is localized to the corresponding language code if the original data sources support it. Default is \"en-US\".", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 500 Offers. The maximum value is 1000; the server will coerce values above 1000.", + // "description": "Optional. Requested page size of the report. The server might return fewer results than requested. If unspecified, returns 20 reports. The maximum value is 100.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Optional. A token for a page of results other than the first page.", + // "description": "Optional. A token that specifies a page of results beyond the first page. Obtained through ListReportsResponse.next_page_token of the previous CloudChannelReportsService.ListReports call.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the reseller account from which to list Offers. Parent uses the format: accounts/{account_id}.", + // "description": "Required. The resource name of the partner account to list available reports for. Parent uses the format: accounts/{account_id}", // "location": "path", // "pattern": "^accounts/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/offers", + // "path": "v1/{+parent}/reports", // "response": { - // "$ref": "GoogleCloudChannelV1ListOffersResponse" + // "$ref": "GoogleCloudChannelV1ListReportsResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/apps.order" + // "https://www.googleapis.com/auth/apps.reports.usage.readonly" // ] // } @@ -13298,7 +14668,7 @@ func (c *AccountsOffersListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudC // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *AccountsOffersListCall) Pages(ctx context.Context, f func(*GoogleCloudChannelV1ListOffersResponse) error) error { +func (c *AccountsReportsListCall) Pages(ctx context.Context, f func(*GoogleCloudChannelV1ListReportsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -13316,6 +14686,164 @@ func (c *AccountsOffersListCall) Pages(ctx context.Context, f func(*GoogleCloudC } } +// method id "cloudchannel.accounts.reports.run": + +type AccountsReportsRunCall struct { + s *Service + nameid string + googlecloudchannelv1runreportjobrequest *GoogleCloudChannelV1RunReportJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Run: Begins generation of data for a given report. The report +// identifier is a UID (for example, `613bf59q`). Possible error codes: +// * PERMISSION_DENIED: The user doesn't have access to this report. * +// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// * NOT_FOUND: The report identifier was not found. * INTERNAL: Any +// non-user error related to a technical issue in the backend. Contact +// Cloud Channel support. * UNKNOWN: Any non-user error related to a +// technical issue in the backend. Contact Cloud Channel support. Return +// value: The ID of a long-running operation. To get the results of the +// operation, call the GetOperation method of +// CloudChannelOperationsService. The Operation metadata contains an +// instance of OperationMetadata. To get the results of report +// generation, call CloudChannelReportsService.FetchReportResults with +// the RunReportJobResponse.report_job. +// +// - name: The report's resource name. Specifies the account and report +// used to generate report data. The report_id identifier is a UID +// (for example, `613bf59q`). Name uses the format: +// accounts/{account_id}/reports/{report_id}. +func (r *AccountsReportsService) Run(nameid string, googlecloudchannelv1runreportjobrequest *GoogleCloudChannelV1RunReportJobRequest) *AccountsReportsRunCall { + c := &AccountsReportsRunCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.nameid = nameid + c.googlecloudchannelv1runreportjobrequest = googlecloudchannelv1runreportjobrequest + 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 *AccountsReportsRunCall) Fields(s ...googleapi.Field) *AccountsReportsRunCall { + 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 *AccountsReportsRunCall) Context(ctx context.Context) *AccountsReportsRunCall { + 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 *AccountsReportsRunCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsReportsRunCall) 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.googlecloudchannelv1runreportjobrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:run") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.nameid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudchannel.accounts.reports.run" 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 *AccountsReportsRunCall) 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": "Begins generation of data for a given report. The report identifier is a UID (for example, `613bf59q`). Possible error codes: * PERMISSION_DENIED: The user doesn't have access to this report. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The report identifier was not found. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata contains an instance of OperationMetadata. To get the results of report generation, call CloudChannelReportsService.FetchReportResults with the RunReportJobResponse.report_job.", + // "flatPath": "v1/accounts/{accountsId}/reports/{reportsId}:run", + // "httpMethod": "POST", + // "id": "cloudchannel.accounts.reports.run", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The report's resource name. Specifies the account and report used to generate report data. The report_id identifier is a UID (for example, `613bf59q`). Name uses the format: accounts/{account_id}/reports/{report_id}", + // "location": "path", + // "pattern": "^accounts/[^/]+/reports/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:run", + // "request": { + // "$ref": "GoogleCloudChannelV1RunReportJobRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/apps.reports.usage.readonly" + // ] + // } + +} + // method id "cloudchannel.operations.cancel": type OperationsCancelCall struct { diff --git a/containeranalysis/v1beta1/containeranalysis-api.json b/containeranalysis/v1beta1/containeranalysis-api.json index 7e566fe1298..4706915223c 100644 --- a/containeranalysis/v1beta1/containeranalysis-api.json +++ b/containeranalysis/v1beta1/containeranalysis-api.json @@ -751,109 +751,11 @@ ] } } - }, - "scanConfigs": { - "methods": { - "get": { - "description": "Gets the specified scan configuration.", - "flatPath": "v1beta1/projects/{projectsId}/scanConfigs/{scanConfigsId}", - "httpMethod": "GET", - "id": "containeranalysis.projects.scanConfigs.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the scan configuration in the form of `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`.", - "location": "path", - "pattern": "^projects/[^/]+/scanConfigs/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "ScanConfig" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists scan configurations for the specified project.", - "flatPath": "v1beta1/projects/{projectsId}/scanConfigs", - "httpMethod": "GET", - "id": "containeranalysis.projects.scanConfigs.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "filter": { - "description": "Required. The filter expression.", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "The number of scan configs to return in the list.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Token to provide to skip to a particular spot in the list.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The name of the project to list scan configurations for in the form of `projects/[PROJECT_ID]`.", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+parent}/scanConfigs", - "response": { - "$ref": "ListScanConfigsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "update": { - "description": "Updates the specified scan configuration.", - "flatPath": "v1beta1/projects/{projectsId}/scanConfigs/{scanConfigsId}", - "httpMethod": "PUT", - "id": "containeranalysis.projects.scanConfigs.update", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the scan configuration in the form of `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`.", - "location": "path", - "pattern": "^projects/[^/]+/scanConfigs/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "request": { - "$ref": "ScanConfig" - }, - "response": { - "$ref": "ScanConfig" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } } } } }, - "revision": "20221015", + "revision": "20221104", "rootUrl": "https://containeranalysis.googleapis.com/", "schemas": { "AliasContext": { @@ -4061,24 +3963,6 @@ }, "type": "object" }, - "ListScanConfigsResponse": { - "description": "Response for listing scan configurations.", - "id": "ListScanConfigsResponse", - "properties": { - "nextPageToken": { - "description": "The next pagination token in the list response. It should be used as `page_token` for the following request. An empty value means no more results.", - "type": "string" - }, - "scanConfigs": { - "description": "The scan configurations requested.", - "items": { - "$ref": "ScanConfig" - }, - "type": "array" - } - }, - "type": "object" - }, "Location": { "description": "An occurrence of a particular package installation found within a system's filesystem. E.g., glibc was found in `/var/lib/dpkg/status`.", "id": "Location", @@ -4925,35 +4809,6 @@ }, "type": "object" }, - "ScanConfig": { - "description": "A scan configuration specifies whether Cloud components in a project have a particular type of analysis being run. For example, it can configure whether vulnerability scanning is being done on Docker images or not.", - "id": "ScanConfig", - "properties": { - "createTime": { - "description": "Output only. The time this scan config was created.", - "format": "google-datetime", - "type": "string" - }, - "description": { - "description": "Output only. A human-readable description of what the scan configuration does.", - "type": "string" - }, - "enabled": { - "description": "Whether the scan is enabled.", - "type": "boolean" - }, - "name": { - "description": "Output only. The name of the scan configuration in the form of `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`.", - "type": "string" - }, - "updateTime": { - "description": "Output only. The time this scan config was last updated.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, "SetIamPolicyRequest": { "description": "Request message for `SetIamPolicy` method.", "id": "SetIamPolicyRequest", diff --git a/containeranalysis/v1beta1/containeranalysis-gen.go b/containeranalysis/v1beta1/containeranalysis-gen.go index 68f36289f7d..c7f41859f62 100644 --- a/containeranalysis/v1beta1/containeranalysis-gen.go +++ b/containeranalysis/v1beta1/containeranalysis-gen.go @@ -141,7 +141,6 @@ func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} rs.Notes = NewProjectsNotesService(s) rs.Occurrences = NewProjectsOccurrencesService(s) - rs.ScanConfigs = NewProjectsScanConfigsService(s) return rs } @@ -151,8 +150,6 @@ type ProjectsService struct { Notes *ProjectsNotesService Occurrences *ProjectsOccurrencesService - - ScanConfigs *ProjectsScanConfigsService } func NewProjectsNotesService(s *Service) *ProjectsNotesService { @@ -185,15 +182,6 @@ type ProjectsOccurrencesService struct { s *Service } -func NewProjectsScanConfigsService(s *Service) *ProjectsScanConfigsService { - rs := &ProjectsScanConfigsService{s: s} - return rs -} - -type ProjectsScanConfigsService struct { - s *Service -} - // AliasContext: An alias to a repo revision. type AliasContext struct { // Kind: The alias kind. @@ -4957,43 +4945,6 @@ func (s *ListOccurrencesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListScanConfigsResponse: Response for listing scan configurations. -type ListScanConfigsResponse struct { - // NextPageToken: The next pagination token in the list response. It - // should be used as `page_token` for the following request. An empty - // value means no more results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ScanConfigs: The scan configurations requested. - ScanConfigs []*ScanConfig `json:"scanConfigs,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "NextPageToken") 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. "NextPageToken") 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 *ListScanConfigsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListScanConfigsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // Location: An occurrence of a particular package installation found // within a system's filesystem. E.g., glibc was found in // `/var/lib/dpkg/status`. @@ -6120,55 +6071,6 @@ func (s *Resource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ScanConfig: A scan configuration specifies whether Cloud components -// in a project have a particular type of analysis being run. For -// example, it can configure whether vulnerability scanning is being -// done on Docker images or not. -type ScanConfig struct { - // CreateTime: Output only. The time this scan config was created. - CreateTime string `json:"createTime,omitempty"` - - // Description: Output only. A human-readable description of what the - // scan configuration does. - Description string `json:"description,omitempty"` - - // Enabled: Whether the scan is enabled. - Enabled bool `json:"enabled,omitempty"` - - // Name: Output only. The name of the scan configuration in the form of - // `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`. - Name string `json:"name,omitempty"` - - // UpdateTime: Output only. The time this scan config was last updated. - UpdateTime string `json:"updateTime,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreateTime") to - // unconditionally include in API requests. By default, fields with - // empty 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 *ScanConfig) MarshalJSON() ([]byte, error) { - type NoMethod ScanConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // SetIamPolicyRequest: Request message for `SetIamPolicy` method. type SetIamPolicyRequest struct { // Policy: REQUIRED: The complete policy to be applied to the @@ -10119,498 +10021,3 @@ func (c *ProjectsOccurrencesTestIamPermissionsCall) Do(opts ...googleapi.CallOpt // } } - -// method id "containeranalysis.projects.scanConfigs.get": - -type ProjectsScanConfigsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the specified scan configuration. -// -// - name: The name of the scan configuration in the form of -// `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`. -func (r *ProjectsScanConfigsService) Get(name string) *ProjectsScanConfigsGetCall { - c := &ProjectsScanConfigsGetCall{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 *ProjectsScanConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsScanConfigsGetCall { - 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 *ProjectsScanConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsScanConfigsGetCall { - 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 *ProjectsScanConfigsGetCall) Context(ctx context.Context) *ProjectsScanConfigsGetCall { - 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 *ProjectsScanConfigsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsScanConfigsGetCall) 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, "v1beta1/{+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 "containeranalysis.projects.scanConfigs.get" call. -// Exactly one of *ScanConfig or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *ScanConfig.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 *ProjectsScanConfigsGetCall) Do(opts ...googleapi.CallOption) (*ScanConfig, 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 := &ScanConfig{ - 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 specified scan configuration.", - // "flatPath": "v1beta1/projects/{projectsId}/scanConfigs/{scanConfigsId}", - // "httpMethod": "GET", - // "id": "containeranalysis.projects.scanConfigs.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the scan configuration in the form of `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`.", - // "location": "path", - // "pattern": "^projects/[^/]+/scanConfigs/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}", - // "response": { - // "$ref": "ScanConfig" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "containeranalysis.projects.scanConfigs.list": - -type ProjectsScanConfigsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists scan configurations for the specified project. -// -// - parent: The name of the project to list scan configurations for in -// the form of `projects/[PROJECT_ID]`. -func (r *ProjectsScanConfigsService) List(parent string) *ProjectsScanConfigsListCall { - c := &ProjectsScanConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Required. The filter -// expression. -func (c *ProjectsScanConfigsListCall) Filter(filter string) *ProjectsScanConfigsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The number of scan -// configs to return in the list. -func (c *ProjectsScanConfigsListCall) PageSize(pageSize int64) *ProjectsScanConfigsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Token to provide -// to skip to a particular spot in the list. -func (c *ProjectsScanConfigsListCall) PageToken(pageToken string) *ProjectsScanConfigsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsScanConfigsListCall) Fields(s ...googleapi.Field) *ProjectsScanConfigsListCall { - 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 *ProjectsScanConfigsListCall) IfNoneMatch(entityTag string) *ProjectsScanConfigsListCall { - 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 *ProjectsScanConfigsListCall) Context(ctx context.Context) *ProjectsScanConfigsListCall { - 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 *ProjectsScanConfigsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsScanConfigsListCall) 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, "v1beta1/{+parent}/scanConfigs") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "containeranalysis.projects.scanConfigs.list" call. -// Exactly one of *ListScanConfigsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListScanConfigsResponse.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 *ProjectsScanConfigsListCall) Do(opts ...googleapi.CallOption) (*ListScanConfigsResponse, 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 := &ListScanConfigsResponse{ - 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": "Lists scan configurations for the specified project.", - // "flatPath": "v1beta1/projects/{projectsId}/scanConfigs", - // "httpMethod": "GET", - // "id": "containeranalysis.projects.scanConfigs.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "filter": { - // "description": "Required. The filter expression.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "The number of scan configs to return in the list.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Token to provide to skip to a particular spot in the list.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The name of the project to list scan configurations for in the form of `projects/[PROJECT_ID]`.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+parent}/scanConfigs", - // "response": { - // "$ref": "ListScanConfigsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsScanConfigsListCall) Pages(ctx context.Context, f func(*ListScanConfigsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "containeranalysis.projects.scanConfigs.update": - -type ProjectsScanConfigsUpdateCall struct { - s *Service - name string - scanconfig *ScanConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified scan configuration. -// -// - name: The name of the scan configuration in the form of -// `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`. -func (r *ProjectsScanConfigsService) Update(name string, scanconfig *ScanConfig) *ProjectsScanConfigsUpdateCall { - c := &ProjectsScanConfigsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.scanconfig = scanconfig - 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 *ProjectsScanConfigsUpdateCall) Fields(s ...googleapi.Field) *ProjectsScanConfigsUpdateCall { - 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 *ProjectsScanConfigsUpdateCall) Context(ctx context.Context) *ProjectsScanConfigsUpdateCall { - 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 *ProjectsScanConfigsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsScanConfigsUpdateCall) 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.scanconfig) - 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, "v1beta1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", 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 "containeranalysis.projects.scanConfigs.update" call. -// Exactly one of *ScanConfig or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *ScanConfig.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 *ProjectsScanConfigsUpdateCall) Do(opts ...googleapi.CallOption) (*ScanConfig, 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 := &ScanConfig{ - 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": "Updates the specified scan configuration.", - // "flatPath": "v1beta1/projects/{projectsId}/scanConfigs/{scanConfigsId}", - // "httpMethod": "PUT", - // "id": "containeranalysis.projects.scanConfigs.update", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the scan configuration in the form of `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`.", - // "location": "path", - // "pattern": "^projects/[^/]+/scanConfigs/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}", - // "request": { - // "$ref": "ScanConfig" - // }, - // "response": { - // "$ref": "ScanConfig" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} diff --git a/contentwarehouse/v1/contentwarehouse-api.json b/contentwarehouse/v1/contentwarehouse-api.json index 04c167cdd5a..49a5d715adf 100644 --- a/contentwarehouse/v1/contentwarehouse-api.json +++ b/contentwarehouse/v1/contentwarehouse-api.json @@ -1046,7 +1046,7 @@ } } }, - "revision": "20221018", + "revision": "20221104", "rootUrl": "https://contentwarehouse.googleapis.com/", "schemas": { "AbuseiamAbuseType": { @@ -3493,7 +3493,8 @@ "VOICE_PBX_AFFINITY", "VOICE_WEB_AFFINITY", "SKILLSSTACK_AFFINITY", - "WHOSTORY_AFFINITY" + "WHOSTORY_AFFINITY", + "PHOTOS_PARTNER_SHARING_EMAIL_ONLY" ], "enumDescriptions": [ "", @@ -3722,6 +3723,7 @@ "", "", "", + "", "" ], "type": "string" @@ -4197,6 +4199,10 @@ "description": "Contact-level people-prompts settings and contact-level connection reminders. Part of go/people-prompts.", "id": "AppsPeopleOzExternalMergedpeopleapiConnectionReminder", "properties": { + "contactPromptSettings": { + "$ref": "SocialGraphApiProtoContactPromptSettings", + "description": "Contains the Contact level settings that will affect all reminders." + }, "metadata": { "$ref": "AppsPeopleOzExternalMergedpeopleapiPersonFieldMetadata" }, @@ -4639,7 +4645,7 @@ "type": "object" }, "AppsPeopleOzExternalMergedpeopleapiEmailCertificate": { - "description": "Under development. Represents a hosted S/MIME certificate config for use with Gmail. See //caribou/smime/proto/certificate_status.proto. There can be zero or more certificates associated with an email address, be it profile email or contact email.", + "description": "Represents a hosted S/MIME certificate config for use with Gmail. See //caribou/smime/proto/certificate_status.proto. There can be zero or more certificates associated with an email address, be it profile email or contact email.", "id": "AppsPeopleOzExternalMergedpeopleapiEmailCertificate", "properties": { "configurationName": { @@ -8846,7 +8852,15 @@ "id": "AssistantApiAppControlSupport", "properties": { "enabled": { - "type": "boolean" + "enum": [ + "DEFAULT_DISABLED", + "ENABLED_WITH_SMART_DICTATION" + ], + "enumDescriptions": [ + "Disable all app control capabilities.", + "Enable app control SD-dependent capabilities." + ], + "type": "string" } }, "type": "object" @@ -9251,6 +9265,8 @@ "ACTIVE_EDGE_SENSITIVITY", "ADAPTIVE_BATTERY", "ADAPTIVE_BRIGHTNESS", + "ADAPTIVE_CHARGING", + "ADAPTIVE_CONNECTIVITY", "ADD_BLUETOOTH_DEVICE", "ADD_DEVICE", "ADD_FINGERPRINT", @@ -9269,6 +9285,7 @@ "ASSISTANT_LANGUAGE", "ASSISTANT_VOICE_MATCH", "AUTO_ROTATE", + "AUTO_ROTATE_FACE_DETECTION", "BATTERY_LEVEL", "BATTERY_LOW", "BATTERY_PERCENTAGE", @@ -9278,10 +9295,13 @@ "BIOMETRIC", "BLUETOOTH", "BRIGHTNESS_LEVEL", + "BUBBLES", "CALL_VOLUME", "CAMERA_DOUBLE_TWIST", "CAST", "COLOR_INVERSION", + "CHARGING_SOUNDS_AND_VIBRATION", + "CHARGING_STATE", "CONTACTLESS_PAYMENTS", "DATA_ROAMING", "DATA_SAVER", @@ -9292,6 +9312,7 @@ "DISPLAY_SIZE", "DO_NOT_DISTURB", "DOUBLE_TAP_CHECK_PHONE", + "EMERGENCY_ALERTS", "EMERGENCY_INFORMATION", "ETHERNET_TETHERING", "FACTORY_RESET", @@ -9300,14 +9321,22 @@ "FONT_SIZE", "FREE_UP_SPACE", "GESTURES", + "HAPTIC_FEEDBACK_VIBRATION", + "HEADS_UP", "HOT_SPOT", "HOTSPOT_TETHERING", "HOT_WORD", + "IMPROVE_LOCATION_ACCURACY", "JUMP_TO_CAMERA", "KEYBOARD_SHORTCUTS", "LIFT_CHECK_PHONE", "LOCATION", + "LOCATION_BLUETOOTH_SCANNING", + "LOCATION_WIFI_SCANNING", "LOCK_SCREEN", + "LOCK_SCREEN_DEVICE_CONTROLS", + "LOCK_SCREEN_WALLET", + "MAGNIFICATION", "MAGNIFY_BUTTON", "MAGNIFY_TRIPLE_TAP", "MANIFY_BUTTON", @@ -9324,16 +9353,24 @@ "NIGHT_LIGHT_SWITCH", "NIGHT_MODE", "NOTIFICATION_BADGE", + "NOTIFICATION_ON_SCREEN", + "NOTIFY_FOR_PUBLIC_NETWORKS", + "ONEHANDED_MODE", "PASSWORD", "PERSONALIZATION", "PICTURE_IN_PICTURE", + "POINTER_SPEED", "POWER_MENU", "REMINDERS", "REQUIRE_DEVICE_UNLOCK_FOR_NFC", "RINGTONE", "RING_VOLUME", + "SCREEN_LOCKING_SOUND", + "SCREEN_MAGNIFICATION", "SCREEN_TIMEOUT", "SELECT_TO_SPEAK", + "SET_TIME_AUTOMATICALLY", + "SET_TIME_ZONE_AUTOMATICALLY", "SETTINGS", "SIM", "SPEECH_RATE", @@ -9341,9 +9378,11 @@ "SWIPE_FOR_NOTIFICATION", "SWITCH_ACCESS", "SYSTEM_UPDATE", + "TALKBACK_PASSWORDS", "TEXT_TO_SPEECH", "USB_TETHERING", "VERBOSE_TTS", + "VIBRATE", "VIBRATION_MODE", "VOICE", "VOLUME_LEVEL", @@ -9408,6 +9447,8 @@ "", "", "", + "", + "", "Pair a bluetooth device.", "Link a device to Assistant/Google Home.", "", @@ -9442,6 +9483,10 @@ "", "", "", + "", + "", + "", + "", "Cellular carrier (non-wifi) data usage statistics \u0026 settings for the device.", "", "", @@ -9471,6 +9516,15 @@ "", "", "", + "", + "", + "", + "", + "", + "", + "", + "", + "", "Wireless internet settings, including WiFi, Cellular, etc.", "Setting to enable/disable cellular data connection being used on the device. https://screenshot.googleplex.com/jMSRtW3Aq4o", "", @@ -9510,6 +9564,16 @@ "", "", "", + "Corresponds to \"Vibration \u0026 haptics\" toggle in the settings app. Reference: http://shortn/_wE1WCid2aM", + "", + "", + "", + "", + "", + "", + "", + "", + "", "Begin of NGA proto consistence", "", "", @@ -9645,7 +9709,7 @@ "type": "object" }, "AssistantApiCoreTypesAndroidAppInfo": { - "description": "The android app information of the provider. Like, Spotify. Next ID: 15 LINT.IfChange", + "description": "The android app information of the provider. Like, Spotify. Next ID: 16 LINT.IfChange", "id": "AssistantApiCoreTypesAndroidAppInfo", "properties": { "accountType": { @@ -9711,6 +9775,10 @@ "description": "Id of the app's Android shortcut to be launched by Assistant. The client is expected to use the Android LauncherApps API to execute this shortcut which in turn will open the app. For example, Whatsapp may create an Android shortcut for a frequently messaged contact with an id \"contact_123\". This field will contain that id and the client can execute it to open up the chat with that particular contact. If this field is set, the package_name field must also be set since both will be used by the LauncherApps API for execution. If this field is set, the intent related fields will be ignored and not used as a fallback. Design: go/shortcut-id-in-provider-open-clientop This field should only be set for devices with Android API level \u003e= 25 (since that is the version from which the LauncherApps startShortcut API is available)", "type": "string" }, + "targetClass": { + "description": "The fully qualified target class name of the provider, like \"com.example.myapp.GetOrderService\".", + "type": "string" + }, "versionName": { "description": "The android app version name, like \"4.1.091.05.40d\", \"11.2.7.21.alpha\". Android Docs: https://developer.android.com/reference/android/content/pm/PackageInfo#versionName", "type": "string" @@ -11104,7 +11172,7 @@ "The Android platform that powers smart televisions, set-top-boxes, and over-the-top devices. See go/atv-eng and go/opa-tv. OWNERS: opa-tv-eng@", "Wear OS Assistant. OWNERS: wear-assistant-eng@", "AssistantKit (go/assistantkit) is a collection of iOS libraries allowing first party apps to integrate Google Assistant features. OWNERS: assistantkit-eng@", - "Standalone libassistant speakers, such as Bose and Sonos. OWNERS: assistant-speaker-leads@", + "Standalone gRPC based client. See go/easi. OWNERS: assistant-sdk-service-eng@", "Automobile. OWNERS: surfaces-infra-core@", "Cast OS (go/opal-castos-docs#what-is-castos). OWNERS: surfaces-infra-core@", "Chrome OS (go/chromsos) OWNERS: surfaces-infra-core@", @@ -12082,13 +12150,18 @@ "type": "object" }, "AssistantApiLoggingOnlyData": { - "description": "Data which is produced for logging and debugging. Servers MUST NOT use this for any other purposes, such as branching on it.", + "description": "Data which is produced for logging and debugging. Servers MUST NOT use this for any other purposes, such as branching on it. Next ID: 14", "id": "AssistantApiLoggingOnlyData", "properties": { "acpVersion": { "description": "A user-readable string describing the ACP version (go/acp-version) of the client app used by the user to originate the conversation.", "type": "string" }, + "androidId": { + "description": "Random identifier assigned to Android mobile devices. Older logs may have previously stored other kinds of android IDs in this field, but all current logs should use the GServices Id. See go/androidids.", + "format": "int64", + "type": "string" + }, "appVersion": { "description": "A user-readable string describing the version of the client app used by the user to originate the conversation.", "type": "string" @@ -15262,7 +15335,7 @@ "description": "Which kind of sign in the client supports." }, "sleepSensingSupported": { - "description": "Whether the client can monitor sleep. This allows us to show sleep CUJ realted information: go/TwilightDesign Use for development only, see the same field in DeviceCapabilities.SoftwareCapabilities.SelinaCapabilities.", + "description": "Whether the client can monitor sleep. This allows us to show sleep CUJ related information: go/TwilightDesign Use for development only, see the same field in DeviceCapabilities.SoftwareCapabilities.SelinaCapabilities.", "type": "boolean" }, "smartspaceCrossDeviceTimerSupported": { @@ -16597,6 +16670,13 @@ }, "type": "array" }, + "devicesAfterPromoters": { + "description": "DeviceInfo for devices after the filters and promoters. - When device targeting is only configured for single target, these are ambiguous devices that would have been the output of Lumos. Downstream may perform extra check before disambiguation dialog. For example, Media Initiation checks playability for devices. The output here is before the check. - When configured for multi-target, these are just the target devices. For privacy consideration, we may only log device id field inside.", + "items": { + "$ref": "AssistantLogsDeviceInfoLog" + }, + "type": "array" + }, "finalTargetDevice": { "$ref": "AssistantLogsDeviceInfoLog", "description": "the final targeted device selected by playability filter or DeviceSelectionDialog" @@ -17140,7 +17220,8 @@ "MEDIA_PLAYBACK_PROMOTER", "SAME_NAME_DEVICE_PROMOTER", "PHONE_TARGETING_PROMOTER", - "TRAITS_PROMOTER" + "TRAITS_PROMOTER", + "DEVICE_TYPE_PROMOTER" ], "enumDescriptions": [ "", @@ -17164,6 +17245,7 @@ "", "", "", + "", "" ], "type": "string" @@ -17842,7 +17924,8 @@ "MEDIA_PLAYBACK_PROMOTER", "SAME_NAME_DEVICE_PROMOTER", "PHONE_TARGETING_PROMOTER", - "TRAITS_PROMOTER" + "TRAITS_PROMOTER", + "DEVICE_TYPE_PROMOTER" ], "enumDescriptions": [ "", @@ -17866,6 +17949,7 @@ "", "", "", + "", "" ], "type": "string" @@ -18271,7 +18355,7 @@ "type": "object" }, "AssistantLogsTargetDeviceLog": { - "description": "Represents the case where the library successfully selects the target device. It could be one or multiple devices. Next ID: 3", + "description": "Represents the case where the library successfully selects the target device. It could be one or multiple devices. Next ID: 4", "id": "AssistantLogsTargetDeviceLog", "properties": { "devices": { @@ -18280,6 +18364,21 @@ }, "type": "array" }, + "lowConfidenceReason": { + "enum": [ + "UNKNOWN_REASON", + "LOCAL_FALLBACK", + "STOP_PLAYBACK_ON_PAUSED_PHONE", + "SINGLE_NEARBY_DEVICE" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ], + "type": "string" + }, "resultConfidenceLevel": { "enum": [ "UNKNOWN", @@ -18297,7 +18396,7 @@ "type": "object" }, "AssistantPrefulfillmentRankerPrefulfillmentSignals": { - "description": "Signals to be used by the Prefulfillment Ranker. Derived from the ParsingSignals and GroundingSignals carried by the FunctionCall. LINT.IfChange Next ID: 30", + "description": "Signals to be used by the Prefulfillment Ranker. Derived from the ParsingSignals and GroundingSignals carried by the FunctionCall. LINT.IfChange Next ID: 33", "id": "AssistantPrefulfillmentRankerPrefulfillmentSignals", "properties": { "bindingSetAuis": { @@ -18347,6 +18446,11 @@ "format": "double", "type": "number" }, + "kscorerRank": { + "description": "The rank order of the interpretation as determined by kscorer. The kscorer-determined dominant interpretation, if any, gets a rank of 0. The remaining N interpretations get a rank of 1 through N.", + "format": "int32", + "type": "integer" + }, "maskCandidateLevelFeatures": { "description": "This feature is always false / no-op in serving time. In training time, this feature may be set true on specific examples for weighted training where when this signal is true, only cross-intent level features are used for training and other candidate level features are masked (set as missing).", "type": "boolean" @@ -18396,6 +18500,33 @@ "format": "double", "type": "number" }, + "predictedIntentConfidence": { + "description": "Intent confidence predicted by the AssistantVerticalClassifier QRewrite servlet.", + "format": "float", + "type": "number" + }, + "searchDispatch": { + "description": "The determination made by the SearchDispatchingConfig as to whether and how this interpretation should be dispatched to Search.", + "enum": [ + "UNKNOWN", + "NONE", + "BRIDGE_API", + "FULFILL_INTENT", + "EMIT_ONLY", + "COUNTERFACTUAL_LOG_ONLY", + "CAPACITY_ACCOUNTING" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "These rules are no-ops wrt. dispatching. The only effect they produce is the logging of the associated |counterfactual_events|.", + "These rules only consume capacity constraints, but are not dispatched. This way the rules can be used for the suppression for intents lower in the list." + ], + "type": "string" + }, "topHypothesisConfidence": { "description": "Average of per-word confidence for top speech recognition hypothesis. The value is from RecognizerHypothesisLog: http://google3/logs/proto/speech/service/recognizer_log.proto?l=848\u0026rcl=281400256", "format": "float", @@ -18926,7 +19057,7 @@ "type": "object" }, "AssistantVerticalsHomeautomationProtoHomeAutomation_MetaData": { - "description": "Next ID: 40", + "description": "Next ID: 42", "id": "AssistantVerticalsHomeautomationProtoHomeAutomation_MetaData", "properties": { "actionProjectConfigs": { @@ -19007,6 +19138,27 @@ }, "type": "array" }, + "otherDeviceSources": { + "description": "Additional device sources. This can be the result of the device being merged with other devices with a different source.", + "items": { + "enum": [ + "UNKNOWN", + "CLOUD_SYNC", + "ASSISTANT_SETTING_OOBE", + "LOCAL_SYNC", + "CHIP_SYNC" + ], + "enumDescriptions": [ + "", + "Device is created through HA2 SyncDevices flow, are HA2 cloud agent devices. ultravox is a cloud agent as well as surface device and it's using Sync flow.", + "Device created through Assistant Setting at OOBE time, they're things that are mastered within google internally.", + "Device is created through the local device platform to HGS sync flow. These devices are not necessarily mastered in a 3P cloud - they are locally detected by an assistant device and then synced to HGS directly. See go/aogh-dd.", + "Device created through local CHIP provision and sync up. Chip synced devices can be the same devices as the devices synced from cloud, and the sync and de-dup logic can be very complicated." + ], + "type": "string" + }, + "type": "array" + }, "parentNode": { "description": "LINT.IfChange(home_graph_single_parent) At the moment, we just have a single string. In future this will expand with additional metadata from client or cloud execution data store. In today's 'tree' HomeGraph each object has a single parent. In the future this may have a mesh for complex cases -- zones, doors, etc -- so we make this a repeated element today. LINT.ThenChange(//depot/google3/assistant/assistant_server/settings/user_defined_actions/footprints/footprint_accessor.cc:home_graph_single_parent)", "items": { @@ -19104,6 +19256,11 @@ "description": "Only present for an AoGH device. HGS Device ID of a target device and the signal strength (RSSI in dB, higher is better) between that target device and the AoGH device. If this map is empty, there are no target devices reachable by this AoGH device.", "type": "object" }, + "tdssUpdateTimestamp": { + "description": "The timestamp at which the TDSS map was last updated. This information is used to help determine which hub would be preferred if multiple hubs report the same reach-ability for a device.", + "format": "google-datetime", + "type": "string" + }, "traitRoutingHints": { "description": "For SHED devices, some traits can only be executed on 3P cloud, e.g. \"action.devices.traits.MediaInitiation\", \"action.devices.traits.Channel\" go/shed-per-trait-routing", "items": { @@ -20317,7 +20474,6 @@ "LTG_CANDIDATE", "NOSUBINDEX", "BASE", - "CSEINDEX", "CSEINDEX_EXTENDED", "DAILY", "TIMBIT_PROTECTED", @@ -20325,7 +20481,6 @@ "LANDFILL2", "LANDFILL3", "LANDFILL_BLOGSEARCH", - "LANDFILL_CSE", "LANDFILL_SOCIAL", "INSTANT", "UNIFIED_LANDFILL", @@ -20341,6 +20496,7 @@ "UNIFIED_ZEPPELIN_HIGH_QUALITY", "ASIANREGIONAL", "EMEAREGIONAL", + "CSEINDEX", "BASEREGIONAL", "BLACKHOLE", "XBASE", @@ -20359,13 +20515,13 @@ "ZEPPELIN_STAGING", "PULSAR", "TIMBIT", + "LANDFILL_CSE", "UNIFIED_ZEPPELIN" ], "enumDescriptions": [ "ltg-candidate is a label for docs whose selection decision is deferred to ltg by Alexandria. It does not correspond to any serving corpus.", "", "", - "Custom Search Engine special purpose corpus.", "Custom Search Engine extended corpus to catch all CSE urls not indexed in unified zeppelin or higher tiers.", "", "timbit_protected is a label for keeping docs from dropping out of base, i.e., all timbit protected docs belong to base/basextended.", @@ -20373,7 +20529,6 @@ "", "", "Blogsearch special purpose corpus for Oscar.", - "Customsearch special purpose corpus (for CookieBird).", "Social special purpose corpus for Oscar.", "", "One big landfill index for Union.", @@ -20407,6 +20562,8 @@ "", "", "", + "", + "", "" ], "type": "string" @@ -20819,7 +20976,7 @@ "type": "object" }, "CompositeDocQualitySignals": { - "description": "This field should hold all new quality online signals (after 02/05/10). Quality offline signals, which are loaded by Signal API, should be stored in doc_attachments.", + "description": "Note: This is a misleading name as of 2022/10/14. The field is still set and has meaningful data, but no longer holds quality signals. All the data are freshness-related and they're not particularly sensitive.", "id": "CompositeDocQualitySignals", "properties": { "lastSignificantUpdate": { @@ -26447,7 +26604,7 @@ "type": "integer" }, "parsedName": { - "description": "The parsed_name field contains one or more names of an address component. Its actual contents depends on where in the Geo/Google stack you are reading a feature: 1. When an address is initially parsed via a feed or other raw input and structured as an AddressProto, parsed_name should contain the set of names that corresponds to the (possibly normalized) raw text from the raw input. In MapFacts, the address component may be linked to an actual feature via feature_id. Any address formatting directly from MapFacts should follow links to retrieve names when possible. The parsed_name contents may be formatted directly if the address component is unlinked following the same rules as selecting and formatting the name of a feature. The cached parsed_name is regularly refreshed from the linked feature with the minimal set of names for address components (usually just a single, preferred name, in the local language). 2. In serving systems, the names of linked features may be denormalized into the parsed_name field to facilitate quicker address formatting or for simple data filtering (e.g. finding all geocodes in California by name). If reading a feature from such a system, the parsed_name field could contain multiple names in multiple languages that reflect a cached copy of the names associated with the linked features. Formatting of such names should follow the same rules as selecting and formatting the name of a feature itself.", + "description": "The parsed_name field contains one or more names of an address component. Its actual contents depends on where in the Geo/Google stack you are reading a feature: 1. When an address is initially parsed via a feed or other raw input and structured as an AddressProto, parsed_name should contain the set of names that corresponds to the (possibly normalized) raw text from the raw input. 2. In MapFacts, the address component may be linked to an actual feature via feature_id. Any address formatting directly from MapFacts should follow links to retrieve names when possible. The parsed_name contents may be formatted directly if the address component is unlinked following the same rules as selecting and formatting the name of a feature. The cached parsed_name is regularly refreshed from the linked feature with the minimal set of names for address components (usually just a single, preferred name, in the local language, plus a Latin-script name: go/story-of-ac-names). 3. In serving systems, the names of linked features may be denormalized into the parsed_name field to facilitate quicker address formatting or for simple data filtering (e.g. finding all geocodes in California by name). If reading a feature from such a system, the parsed_name field could contain multiple names in multiple languages that reflect a cached copy of the names associated with the linked features. Formatting of such names should follow the same rules as selecting and formatting the name of a feature itself.", "items": { "$ref": "GeostoreNameProto" }, @@ -27556,6 +27713,7 @@ "PROVIDER_GOOGLE_UGC_QUALITY_CHAINS", "PROVIDER_GOOGLE_ATTRIBUTES_DISCOVERY", "PROVIDER_GOOGLE_GEO_LDE", + "PROVIDER_GOOGLE_GEO_SIGNAL_TRACKING", "PROVIDER_GOOGLE_LOCALSEARCH", "PROVIDER_GOOGLE_TRANSIT", "PROVIDER_GOOGLE_GEOWIKI", @@ -28072,7 +28230,9 @@ "PROVIDER_GREEN_ACTION_STUDIO", "PROVIDER_EVINY", "PROVIDER_MASTERCARD", - "PROVIDER_VATTENFALL" + "PROVIDER_VATTENFALL", + "PROVIDER_VIETGIS", + "PROVIDER_UNITE" ], "enumDescriptions": [ "ABSTRACT The root of all provider types. This should never be present on an actual feature, but can be useful when calling InCategory.", @@ -28089,7 +28249,7 @@ "", "ABSTRACT", "", - "All new \"Google\" provider entries must be full ints. The next available ID is: 0x111730AC", + "All new \"Google\" provider entries must be full ints. The next available ID is: 0x111730AD", "ABSTRACT", "", "", @@ -28256,6 +28416,7 @@ "", "Shopping Attributes Discovery", "", + "", "The next new \"Google\" provider entries should be placed above.", "UMBRELLA", "", @@ -28772,7 +28933,9 @@ "", "", "", - "Note: Next available value is 0x126C." + "", + "", + "Note: Next available value is 0x126E." ], "type": "string" }, @@ -32348,6 +32511,7 @@ "PROVIDER_GOOGLE_UGC_QUALITY_CHAINS", "PROVIDER_GOOGLE_ATTRIBUTES_DISCOVERY", "PROVIDER_GOOGLE_GEO_LDE", + "PROVIDER_GOOGLE_GEO_SIGNAL_TRACKING", "PROVIDER_GOOGLE_LOCALSEARCH", "PROVIDER_GOOGLE_TRANSIT", "PROVIDER_GOOGLE_GEOWIKI", @@ -32864,7 +33028,9 @@ "PROVIDER_GREEN_ACTION_STUDIO", "PROVIDER_EVINY", "PROVIDER_MASTERCARD", - "PROVIDER_VATTENFALL" + "PROVIDER_VATTENFALL", + "PROVIDER_VIETGIS", + "PROVIDER_UNITE" ], "enumDescriptions": [ "ABSTRACT The root of all provider types. This should never be present on an actual feature, but can be useful when calling InCategory.", @@ -32881,7 +33047,7 @@ "", "ABSTRACT", "", - "All new \"Google\" provider entries must be full ints. The next available ID is: 0x111730AC", + "All new \"Google\" provider entries must be full ints. The next available ID is: 0x111730AD", "ABSTRACT", "", "", @@ -33048,6 +33214,7 @@ "", "Shopping Attributes Discovery", "", + "", "The next new \"Google\" provider entries should be placed above.", "UMBRELLA", "", @@ -33564,7 +33731,9 @@ "", "", "", - "Note: Next available value is 0x126C." + "", + "", + "Note: Next available value is 0x126E." ], "type": "string" } @@ -34475,6 +34644,7 @@ "PROVIDER_GOOGLE_UGC_QUALITY_CHAINS", "PROVIDER_GOOGLE_ATTRIBUTES_DISCOVERY", "PROVIDER_GOOGLE_GEO_LDE", + "PROVIDER_GOOGLE_GEO_SIGNAL_TRACKING", "PROVIDER_GOOGLE_LOCALSEARCH", "PROVIDER_GOOGLE_TRANSIT", "PROVIDER_GOOGLE_GEOWIKI", @@ -34991,7 +35161,9 @@ "PROVIDER_GREEN_ACTION_STUDIO", "PROVIDER_EVINY", "PROVIDER_MASTERCARD", - "PROVIDER_VATTENFALL" + "PROVIDER_VATTENFALL", + "PROVIDER_VIETGIS", + "PROVIDER_UNITE" ], "enumDescriptions": [ "ABSTRACT The root of all provider types. This should never be present on an actual feature, but can be useful when calling InCategory.", @@ -35008,7 +35180,7 @@ "", "ABSTRACT", "", - "All new \"Google\" provider entries must be full ints. The next available ID is: 0x111730AC", + "All new \"Google\" provider entries must be full ints. The next available ID is: 0x111730AD", "ABSTRACT", "", "", @@ -35175,6 +35347,7 @@ "", "Shopping Attributes Discovery", "", + "", "The next new \"Google\" provider entries should be placed above.", "UMBRELLA", "", @@ -35691,7 +35864,9 @@ "", "", "", - "Note: Next available value is 0x126C." + "", + "", + "Note: Next available value is 0x126E." ], "type": "string" }, @@ -36903,6 +37078,7 @@ "PROVIDER_GOOGLE_UGC_QUALITY_CHAINS", "PROVIDER_GOOGLE_ATTRIBUTES_DISCOVERY", "PROVIDER_GOOGLE_GEO_LDE", + "PROVIDER_GOOGLE_GEO_SIGNAL_TRACKING", "PROVIDER_GOOGLE_LOCALSEARCH", "PROVIDER_GOOGLE_TRANSIT", "PROVIDER_GOOGLE_GEOWIKI", @@ -37419,7 +37595,9 @@ "PROVIDER_GREEN_ACTION_STUDIO", "PROVIDER_EVINY", "PROVIDER_MASTERCARD", - "PROVIDER_VATTENFALL" + "PROVIDER_VATTENFALL", + "PROVIDER_VIETGIS", + "PROVIDER_UNITE" ], "enumDescriptions": [ "ABSTRACT The root of all provider types. This should never be present on an actual feature, but can be useful when calling InCategory.", @@ -37436,7 +37614,7 @@ "", "ABSTRACT", "", - "All new \"Google\" provider entries must be full ints. The next available ID is: 0x111730AC", + "All new \"Google\" provider entries must be full ints. The next available ID is: 0x111730AD", "ABSTRACT", "", "", @@ -37603,6 +37781,7 @@ "", "Shopping Attributes Discovery", "", + "", "The next new \"Google\" provider entries should be placed above.", "UMBRELLA", "", @@ -38119,7 +38298,9 @@ "", "", "", - "Note: Next available value is 0x126C." + "", + "", + "Note: Next available value is 0x126E." ], "type": "string" } @@ -43188,6 +43369,22 @@ "$ref": "GoogleCloudDocumentaiV1Document", "description": "Document AI format to save the structured content, including OCR." }, + "contentCategory": { + "description": "Indicates the category (image, audio, video etc.) of the original content.", + "enum": [ + "CONTENT_CATEGORY_UNSPECIFIED", + "CONTENT_CATEGORY_IMAGE", + "CONTENT_CATEGORY_AUDIO", + "CONTENT_CATEGORY_VIDEO" + ], + "enumDescriptions": [ + "No category is specified.", + "Content is of image type.", + "Content is of audio type.", + "Content is of video type." + ], + "type": "string" + }, "createTime": { "description": "Output only. The time when the document is created.", "format": "google-datetime", @@ -44355,6 +44552,20 @@ "requireTotalSize": { "description": "Optional. Controls if the search document request requires the return of a total size of matched documents. See SearchDocumentsResponse.total_size. Enabling this flag may adversely impact performance. Hint: If this is used with pagination, set this flag on the initial query but set this to false on subsequent page calls (keep the total count locally). Defaults to false.", "type": "boolean" + }, + "totalResultSize": { + "description": "Optional. Controls if the search document request requires the return of a total size of matched documents. See SearchDocumentsResponse.total_size.", + "enum": [ + "TOTAL_RESULT_SIZE_UNSPECIFIED", + "ESTIMATED_SIZE", + "ACTUAL_SIZE" + ], + "enumDescriptions": [ + "Total number calculation will be skipped.", + "Estimate total number.", + "It may adversely impact performance." + ], + "type": "string" } }, "type": "object" @@ -44646,7 +44857,7 @@ ], "enumDescriptions": [ "Defaults to full replace behavior, ie. FULL_REPLACE.", - "Fully replace all the fields. Any field masks will be ignored.", + "Fully replace all the fields (including previously linked raw document). Any field masks will be ignored.", "Merge the fields into the existing entities.", "Inserts the properties by names.", "Replace the properties by names.", @@ -46147,17 +46358,7 @@ "GoogleInternalAppsWaldoV1alphaInactive": { "description": "The status indicating that no other status applies.", "id": "GoogleInternalAppsWaldoV1alphaInactive", - "properties": { - "nextCommitmentStatus": { - "$ref": "GoogleInternalAppsWaldoV1alphaUserStatus", - "description": "The status type of the next change which is considered a commitment. The status will be an empty instance of the corresponding type, no additional data will be provided." - }, - "nextCommitmentTime": { - "description": "The time when the user will start having a status of InMeeting, DoNotDisturb or short OutOfOffice.", - "format": "google-datetime", - "type": "string" - } - }, + "properties": {}, "type": "object" }, "GoogleInternalAppsWaldoV1alphaLocalTimeContext": { @@ -46199,6 +46400,15 @@ "format": "google-datetime", "type": "string" }, + "committedUntil": { + "description": "The time when the user will stop being committed, i.e., when their status will be neither of InMeeting, DoNotDisturb or OutOfOffice \u003c Xh. Note that if this OOO block is large (\u003eXh), committed_until will be the end of this block, not including any meetings or focus time following it.", + "format": "google-datetime", + "type": "string" + }, + "committedUntilIsMixed": { + "description": "Whether the status of the user until committed_until has more than one status type (e.g. DoNotDisturb + InMeeting).", + "type": "boolean" + }, "eventSummary": { "description": "The summary of the corresponding OOO block in Calendar. This is entered by the user, so we return it \"as is\" - no i18n.", "type": "string" @@ -46235,6 +46445,21 @@ }, "type": "object" }, + "GoogleInternalAppsWaldoV1alphaUpcomingCommitmentContext": { + "id": "GoogleInternalAppsWaldoV1alphaUpcomingCommitmentContext", + "properties": { + "nextCommitmentStatus": { + "$ref": "GoogleInternalAppsWaldoV1alphaUserStatus", + "description": "The status type of the commitment above. The status will be an empty instance of the corresponding type, no additional data will be provided." + }, + "nextCommitmentTime": { + "description": "The most relevant upcoming commitment (InMeeting, DoNotDisturb or OutOfOffice). In most cases this will be the next closest commitment event, but if there is a large OOO in less than 24h it will take precedence over earlier events.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleInternalAppsWaldoV1alphaUpcomingOooContext": { "description": "The context indicating the user's upcoming Out of Office event.", "id": "GoogleInternalAppsWaldoV1alphaUpcomingOooContext", @@ -46296,6 +46521,10 @@ "$ref": "GoogleInternalAppsWaldoV1alphaLocalTimeContext", "description": "Helps to determine the user's local time by providing their current time zone." }, + "upcomingCommitmentContext": { + "$ref": "GoogleInternalAppsWaldoV1alphaUpcomingCommitmentContext", + "description": "Information about upcoming events." + }, "upcomingOoo": { "$ref": "GoogleInternalAppsWaldoV1alphaUpcomingOooContext", "description": "Set if user has upcoming OOO." @@ -48986,10 +49215,12 @@ "THUMBNAIL_TYPE_ORIGINAL", "THUMBNAIL_TYPE_ORIGINAL_HQ", "THUMBNAIL_TYPE_FAVICON_16", + "THUMBNAIL_TYPE_FAVICON_28", "THUMBNAIL_TYPE_FAVICON_32", "THUMBNAIL_TYPE_FAVICON_64", "THUMBNAIL_TYPE_FAVICON_ORIGINAL", "THUMBNAIL_TYPE_FAVICON_16_DARK", + "THUMBNAIL_TYPE_FAVICON_28_DARK", "THUMBNAIL_TYPE_FAVICON_32_DARK", "THUMBNAIL_TYPE_FAVICON_64_DARK", "THUMBNAIL_TYPE_FAVICON_ORIGINAL_DARK", @@ -49029,7 +49260,8 @@ "This refers to a thumbnail that fits in a 800x800 box.", "This refers to re-encoding original image to JPEG at the same size (up to 10000x10000). Output quality may be lower.", "Re-encode image at the same size as original (up to 10000x10000) but with high-quality (q=90). This was introduced by TYPHOON client and is expected only for very few images in our table (under 10k). If you plan to use this contact amarna-dev@ and/or crt@", - "These refer to favicon thumbnails of 16x16, 32x32 or 64x64. If the original image is an ico file containing multiple embedded images including 16x16, 32x32 or 64x64, these thumbnails are derived from the embedded image of the corresponding size. (If no such embedded image is found, prefer the closest size that's larger. If still no such size exists, prefer largest.) If no such size exists, these thumbnails are rescaled to an image whose maximum dimension is 16, 32 or 64.", + "These refer to favicon thumbnails of 16x16, 32x32 or 64x64. If the original image is an ico file containing multiple embedded images including 16x16, 32x32 or 64x64, these thumbnails are derived from the embedded image of the corresponding size. (If no such embedded image is found, prefer the closest size that's larger. If still no such size exists, prefer largest.) If no such size exists, these thumbnails are rescaled to an image whose maximum dimension is 16, 28, 32 or 64.", + "", "", "", "This type of favicon will preserve the size of the original image.", @@ -49037,6 +49269,7 @@ "", "", "", + "", "This refers to a thumbnail that fits in a 1080x1080 box.", "This refers to a thumbnail that fits in a 1600x1600 box and is encoded with high-quality (q=90). Contact amarna-dev@/crt@/bingwang@ for using it.", "This uses the same MaxAreaSizer as THUMBNAIL_TYPE_AREA_50K. The exact area is defined to be 307200 (= 640 x 480).", @@ -49342,7 +49575,7 @@ "type": "object" }, "ImageData": { - "description": "This defines the per-doc data which is extracted from thumbnails and propagated over to indexing. It contains all information that can be used for restricts. Next tag id: 127", + "description": "This defines the per-doc data which is extracted from thumbnails and propagated over to indexing. It contains all information that can be used for restricts. Next tag id: 128", "id": "ImageData", "properties": { "adaboostImageFeaturePorn": { @@ -49431,6 +49664,10 @@ "$ref": "DeepCropIndexing", "description": "DeepCrop based cropping information. See go/creatism/deepcrop for details." }, + "deepImageEngagingness": { + "$ref": "ImageRepositoryDeepImageEngagingnessOutput", + "description": "Productionized Deep Image Engagingness score." + }, "deepTags": { "$ref": "CommerceDatastoreImageDeepTags", "description": "VSS generated deep tags for shopping images." @@ -49890,10 +50127,12 @@ "THUMBNAIL_TYPE_ORIGINAL", "THUMBNAIL_TYPE_ORIGINAL_HQ", "THUMBNAIL_TYPE_FAVICON_16", + "THUMBNAIL_TYPE_FAVICON_28", "THUMBNAIL_TYPE_FAVICON_32", "THUMBNAIL_TYPE_FAVICON_64", "THUMBNAIL_TYPE_FAVICON_ORIGINAL", "THUMBNAIL_TYPE_FAVICON_16_DARK", + "THUMBNAIL_TYPE_FAVICON_28_DARK", "THUMBNAIL_TYPE_FAVICON_32_DARK", "THUMBNAIL_TYPE_FAVICON_64_DARK", "THUMBNAIL_TYPE_FAVICON_ORIGINAL_DARK", @@ -49933,7 +50172,8 @@ "This refers to a thumbnail that fits in a 800x800 box.", "This refers to re-encoding original image to JPEG at the same size (up to 10000x10000). Output quality may be lower.", "Re-encode image at the same size as original (up to 10000x10000) but with high-quality (q=90). This was introduced by TYPHOON client and is expected only for very few images in our table (under 10k). If you plan to use this contact amarna-dev@ and/or crt@", - "These refer to favicon thumbnails of 16x16, 32x32 or 64x64. If the original image is an ico file containing multiple embedded images including 16x16, 32x32 or 64x64, these thumbnails are derived from the embedded image of the corresponding size. (If no such embedded image is found, prefer the closest size that's larger. If still no such size exists, prefer largest.) If no such size exists, these thumbnails are rescaled to an image whose maximum dimension is 16, 32 or 64.", + "These refer to favicon thumbnails of 16x16, 32x32 or 64x64. If the original image is an ico file containing multiple embedded images including 16x16, 32x32 or 64x64, these thumbnails are derived from the embedded image of the corresponding size. (If no such embedded image is found, prefer the closest size that's larger. If still no such size exists, prefer largest.) If no such size exists, these thumbnails are rescaled to an image whose maximum dimension is 16, 28, 32 or 64.", + "", "", "", "This type of favicon will preserve the size of the original image.", @@ -49941,6 +50181,7 @@ "", "", "", + "", "This refers to a thumbnail that fits in a 1080x1080 box.", "This refers to a thumbnail that fits in a 1600x1600 box and is encoded with high-quality (q=90). Contact amarna-dev@/crt@/bingwang@ for using it.", "This uses the same MaxAreaSizer as THUMBNAIL_TYPE_AREA_50K. The exact area is defined to be 307200 (= 640 x 480).", @@ -51421,6 +51662,17 @@ }, "type": "object" }, + "ImageRepositoryDeepImageEngagingnessOutput": { + "id": "ImageRepositoryDeepImageEngagingnessOutput", + "properties": { + "score": { + "description": "DeepImageEngagingness score.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, "ImageRepositoryFileTruncationInfo": { "description": "Describes our knowledge about whether a stored file is truncated with respect to its original file online.", "id": "ImageRepositoryFileTruncationInfo", @@ -51802,7 +52054,7 @@ "type": "object" }, "ImageRepositoryUnwantedContent": { - "description": "To indicate whether the image is to be deleted from the repository due to legal reasons.", + "description": "To indicate whether the image or video is to be deleted from the repository due to legal reasons or hidden from search results.", "id": "ImageRepositoryUnwantedContent", "properties": { "deletionReason": { @@ -51815,6 +52067,17 @@ "abusive images involving children." ], "type": "string" + }, + "hideReason": { + "enum": [ + "UNKNOWN", + "NCEI" + ], + "enumDescriptions": [ + "", + "NCEI stands for 'non-consensual explicit imagery', aka 'revenge porn'. However in this case the name is misleading as it actually only applies for videos." + ], + "type": "string" } }, "type": "object" @@ -59079,7 +59342,7 @@ "type": "object" }, "KnowledgeAnswersIntentQueryParsingSignals": { - "description": "Parsing-related signals. Only horizontal signals should appear directly as fields on this message. Each domain should create their own extension for anything that they need to propagate down stream from AQUA. Note that this proto is not the same as the Superroot proto ParsingSignals (http://google3/knowledge/proto/scoring-signals.proto), which is a Superroot-specific signal used in Scoring. Next ID: 4", + "description": "Parsing-related signals. Only horizontal signals should appear directly as fields on this message. Each domain should create their own extension for anything that they need to propagate down stream from AQUA. Note that this proto is not the same as the Superroot proto ParsingSignals (http://google3/knowledge/proto/scoring-signals.proto), which is a Superroot-specific signal used in Scoring. Next ID: 5", "id": "KnowledgeAnswersIntentQueryParsingSignals", "properties": { "calibratedParsingScore": { @@ -59091,6 +59354,11 @@ "$ref": "NlpLoggingQRewriteClientCallPathInfo", "description": "This proto holds the complete call path info of the QRewrite client (e.g. the QUS's phase like \"RBT\",\"QBT\"; the QUS's candidate type like \"Identity\"; and the ACE's candidate type like \"FuzzyMatcher\")." }, + "qrewriteCallPathInfoFingerprint": { + "description": "This proto holds the fingerprint of the call path info of QRewrite client (e.g. the QUS's phase like \"RBT\",\"QBT\"; the QUS's candidate type like \"Identity\"; and the ACE's candidate type like \"FuzzyMatcher\").", + "format": "uint64", + "type": "string" + }, "source": { "description": "The parser that calibrated the parsing score below.", "enum": [ @@ -60494,7 +60762,7 @@ "type": "object" }, "KnowledgeAnswersValueType": { - "description": "Specifies the allowed type(s) that a value can have, e.g. for a Slot. For example, having both entity_type and string_type present in a ValueType field of a Slot means that the Slot can take _either_ an an EntityType _or_ StringType as a value, and nothing else. It may be helpful to think of this proto as being called something like AllAllowedValueTypes. Next tag id: 24 LINT.IfChange", + "description": "Specifies the allowed type(s) that a value can have, e.g. for a Slot. For example, having both entity_type and string_type present in a ValueType field of a Slot means that the Slot can take _either_ an an EntityType _or_ StringType as a value, and nothing else. It may be helpful to think of this proto as being called something like AllAllowedValueTypes. Next tag id: 25 LINT.IfChange", "id": "KnowledgeAnswersValueType", "properties": { "anyType": { @@ -60526,6 +60794,22 @@ "entityType": { "$ref": "KnowledgeAnswersEntityType" }, + "inputCompositionConfig": { + "description": "When specified on a slot's type, restricts composition based on the enum value. This does not mean anything when the value type is to be interpreted as an output_type.", + "enum": [ + "UNSPECIFIED_COMPOSITION", + "ALL_COMPOSITION", + "PRIMITIVES_ONLY_COMPOSITION", + "PRIMITIVES_AND_OPERATORS_OF_PRIMITIVES_COMPOSITION" + ], + "enumDescriptions": [ + "An unspecified value is required by enum best practices. It will not be used anywhere as the default is ALL_COMPOSITION.", + "", + "", + "To handle cases where we have a Group of entities" + ], + "type": "string" + }, "measurementType": { "$ref": "KnowledgeAnswersMeasurementType" }, @@ -60891,6 +61175,10 @@ "description": "The name to display. If specified it will override the formatted address of \"feature_id\".", "type": "string" }, + "mid": { + "description": "MID corresponding to the location from feature_id.", + "type": "string" + }, "timezone": { "description": "The timezone to display the current conditions observation time. Optional and will override the timezone of \"feature_id\".", "type": "string" @@ -62701,7 +62989,7 @@ "type": "object" }, "MapsQualitySpecialWordsFlags": { - "description": "Flags that describe the information about a special word. If you add another flag please add it to the special words implemenation in google3/maps/quality/internal/special_words.cc. -- Next available id: 20 --", + "description": "Flags that describe the information about a special word. If you add another flag please add it to the special words implemenation in google3/maps/quality/internal/special_words.cc. -- Next available id: 21 --", "id": "MapsQualitySpecialWordsFlags", "properties": { "isCommonWord": { @@ -62716,6 +63004,10 @@ "description": "Directional modifier. E.g.: north, south, etc.", "type": "boolean" }, + "isDistanceMarker": { + "description": "An affix that indicates distance marker on a route, e.g., 'km'.", + "type": "boolean" + }, "isForbiddenWord": { "description": "Whether geo paths are forbidden to contain this word.", "type": "boolean" @@ -63409,10 +63701,18 @@ }, "type": "array" }, + "displaySnippet": { + "$ref": "QualityPreviewRanklabSnippet", + "description": "Snippet features for the final chosen snippet. This field is firstly populated by Muppet, and then overwriten by Superroot if SnippetBrain is triggered." + }, "documentLanguage": { "description": "locale of the document.", "type": "string" }, + "originalQueryTermCoverages": { + "$ref": "QualityPreviewSnippetQueryTermCoverageFeatures", + "description": "Original query term coverage in titles and / or snippets." + }, "queryLanguage": { "description": "locale of the query,", "type": "string" @@ -63428,7 +63728,7 @@ "type": "number" }, "snippets": { - "description": "Snippet features for ranklab models, generated only by snippets scorer v2. In production, only the data for chosen snippet will be recorded.", + "description": "Snippet features for Muppet snippet candidates. In production, only the data for chosen snippet will be recorded.", "items": { "$ref": "QualityPreviewRanklabSnippet" }, @@ -69345,7 +69645,7 @@ "type": "object" }, "NlpSemanticParsingLocalLocation": { - "description": "There are a few types of locations: - Basic locations are sequences of location elements which can be either actual locations or modifiers. E.g., \"Mountain View CA 94040\" may be the sequence \"Mountain View\" (an actual location), \"CA\" (an actual location, and \"94040\" (a numeric modifier). - Compound locations: these are two locations combined by a joiner. E.g., \"Target in Mountain View CA 94040\" has the joiner \"in\" and two basic locations (\"Target\", and \"Mountain View CA 94040\"). Note that the definition is recursive, e.g., \"Parking garage near Target in Mountain View\". - Vicinity location: indicates an area around a certain location. The area can be defined by time or space. E.g., \"within 1 hour of Palo Alto\", \"10 blocks from Union Square\", \"a few miles from here\". Next ID: 14", + "description": "There are a few types of locations: - Basic locations are sequences of location elements which can be either actual locations or modifiers. E.g., \"Mountain View CA 94040\" may be the sequence \"Mountain View\" (an actual location), \"CA\" (an actual location, and \"94040\" (a numeric modifier). - Compound locations: these are two locations combined by a joiner. E.g., \"Target in Mountain View CA 94040\" has the joiner \"in\" and two basic locations (\"Target\", and \"Mountain View CA 94040\"). Note that the definition is recursive, e.g., \"Parking garage near Target in Mountain View\". - Vicinity location: indicates an area around a certain location. The area can be defined by time or space. E.g., \"within 1 hour of Palo Alto\", \"10 blocks from Union Square\", \"a few miles from here\". Next ID: 14 LINT.IfChange()", "id": "NlpSemanticParsingLocalLocation", "properties": { "basicLocation": { @@ -69509,7 +69809,7 @@ "type": "object" }, "NlpSemanticParsingLocalLocationElement": { - "description": "Next ID: 26", + "description": "Next ID: 26 LINT.IfChange", "id": "NlpSemanticParsingLocalLocationElement", "properties": { "aliasIcon": { @@ -76454,7 +76754,7 @@ "type": "object" }, "PerDocData": { - "description": "=========================================================================== # Make sure you read the comments in the bottom before you add any new field. NB: As noted in the comments, this protocol buffer is used in both indexing and serving. In mustang serving implementations we only decode perdocdata during the search phase, and so this protocol should only contain data used during search. See mustang/repos_www/attachments.proto:{MustangBasicInfo,MustangContentInfo} for protocols used during search and/or docinfo. Next available tag deprecated, use this (and look for commented out fields): blaze-bin/net/proto_compiler/protocol-compiler --freetags \\ indexer/perdocdata/perdocdata.proto Next tag: 217", + "description": "=========================================================================== # Make sure you read the comments in the bottom before you add any new field. NB: As noted in the comments, this protocol buffer is used in both indexing and serving. In mustang serving implementations we only decode perdocdata during the search phase, and so this protocol should only contain data used during search. See mustang/repos_www/attachments.proto:{MustangBasicInfo,MustangContentInfo} for protocols used during search and/or docinfo. Next available tag deprecated, use this (and look for commented out fields): blaze-bin/net/proto_compiler/protocol-compiler --freetags \\ indexer/perdocdata/perdocdata.proto Next tag: 218", "id": "PerDocData", "properties": { "BlogData": { @@ -76933,6 +77233,11 @@ "$ref": "SpamMuppetjoinsMuppetSignals", "description": "Contains hacked site signals which will be used in query time joins. As of Oct'19, the field is stored in a separate corpus. It'll only be populated for in-flight requests between retrieve and full-score in perdocdata. So no extra storage is needed on muppet side." }, + "spambrainTotalDocSpamScore": { + "description": "The document total spam score identified by spambrain, going from 0 to 1.", + "format": "float", + "type": "number" + }, "spamrank": { "description": "The spamrank measures the likelihood that this document links to known spammers. Its value is between 0 and 65535.", "format": "int32", @@ -79617,19 +79922,6 @@ "description": "A protocol buffer to store the url, referer and porn flag for a url. and an optional image score. Next available tag id: 51.", "id": "PornFlagData", "properties": { - "adaboostContentScore": { - "description": "Content score - computed on the image pixel data only. Additionally, we store a version and minor version number of the model which was used to compute this score. Note: these fields are copies of adaboost_image_feature_porn* in ImageData.", - "format": "float", - "type": "number" - }, - "adaboostContentScoreMinorVersion": { - "format": "int32", - "type": "integer" - }, - "adaboostContentScoreVersion": { - "format": "int32", - "type": "integer" - }, "coclickBrainScores": { "$ref": "ImageSafesearchContentBrainPornAnnotation", "description": "Aggregated brain_porn_scores for navboost co-clicked images. Historical: this signal is deprecated and no longer populated as of 2020-12-01. Refer to b/172897542 for more information." @@ -79660,26 +79952,10 @@ "description": "A string that indicates the version of SafeSearch classifier used to compute final_violence_score.", "type": "string" }, - "imageStats": { - "description": "PornStatsImage is repeated even though we use only a single version, to help with rolling out new versions with miminum risk. Multiple versions should exist only for a short window of time. Once the new version is rolled out, the data for older versions should no longer be generated.", - "items": { - "$ref": "PornStatsImage" - }, - "type": "array" - }, "internalSignals": { "$ref": "SafesearchInternalImageSignals", "description": "A proto that stores SafeSearch internal signals that are not exported to clients. SafeSearch team does not provide any guarantees about the presence or the semantics of these signals in the future." }, - "largestFaceFrac": { - "description": "largest face, scaled by 1000 This field is same as ImageData.largest_face_frac.", - "format": "float", - "type": "number" - }, - "largestFaceFraction": { - "format": "int32", - "type": "integer" - }, "numberFaces": { "description": "number of faces", "format": "int32", @@ -79698,11 +79974,6 @@ "$ref": "ImageSafesearchContentOffensiveSymbolDetection", "description": "QuimbyCongas-based detection of offensive symbols in the image (currently swastika and Nazi yellow badge)." }, - "overallPornScore": { - "description": "Overall porn score that determines the porn restricts used during image search retrieval.", - "format": "float", - "type": "number" - }, "photodnaHash": { "description": "Binary version of the PhotoDNA hash (144 bytes long). If not set (has_photodna_hash() == false) it means that it was not computed, if empty (has_photodna_hash() == true \u0026\u0026 photodna_hash() == \"\") it means that the computation failed (cannot be computed for images smaller than 50 x 50).", "format": "byte", @@ -79712,17 +79983,6 @@ "description": "This field is set to true when we are pretty confident that the image is porn (with higher precision than the img_porn_moderate restrict). In particular, it means that the image might be demoted for non-porn queries when SafeSearch is Off.", "type": "boolean" }, - "propAnyPornFlag": { - "description": "OR of the prop_porn_flag and prop_softporn_flag.", - "type": "boolean" - }, - "propPornFlag": { - "description": "Text classifier properties for the referrer page.", - "type": "boolean" - }, - "propSoftpornFlag": { - "type": "boolean" - }, "qbstOffensiveScore": { "description": "QBST-based image offensive score, Navboost based", "format": "float", @@ -79755,13 +80015,6 @@ "format": "float", "type": "number" }, - "textStats": { - "description": "PornStatsText is repeated even though we use only a single version, to help with rolling out new versions with miminum risk. Multiple versions should exist only for a short window of time. Once the new version is rolled out, the data for older versions should no longer be generated.", - "items": { - "$ref": "PornStatsText" - }, - "type": "array" - }, "url": { "description": "url of the image", "type": "string" @@ -79773,47 +80026,6 @@ }, "type": "object" }, - "PornStatsImage": { - "description": "Site aggregated image content signals are captured in this protocol buffer. This is versioned. Not all fields are present in each version. It is important to document all the fields that are used in each version here.", - "id": "PornStatsImage", - "properties": { - "imageCount": { - "description": "image content score data", - "format": "uint64", - "type": "string" - }, - "siteKey": { - "type": "string" - }, - "version": { - "format": "uint64", - "type": "string" - } - }, - "type": "object" - }, - "PornStatsText": { - "description": "Site aggregated text signals are captured in this protocol buffer. This is versioned. Not all fields are present in each version. It is important to document all the fields that are used in each version here.", - "id": "PornStatsText", - "properties": { - "anyPornPageCount": { - "format": "uint64", - "type": "string" - }, - "pageCount": { - "format": "uint64", - "type": "string" - }, - "siteKey": { - "type": "string" - }, - "version": { - "format": "uint64", - "type": "string" - } - }, - "type": "object" - }, "PostalAddress": { "description": "Next free ID: 32", "id": "PostalAddress", @@ -80550,7 +80762,7 @@ "type": "object" }, "QualityActionsReminder": { - "description": "Next id: 30", + "description": "Next id: 32", "id": "QualityActionsReminder", "properties": { "archived": { @@ -81423,6 +81635,12 @@ "description": "OPTIONAL. Full-length description of the reminder.", "type": "string" }, + "documentAssignmentSource": { + "$ref": "QualityActionsReminderDocument" + }, + "dynamiteGroupAssignmentSource": { + "$ref": "QualityActionsReminderDynamiteGroup" + }, "id": { "description": "DEPRECATED. Use `client_id` or `server_id` instead.", "type": "string" @@ -81486,6 +81704,18 @@ }, "type": "object" }, + "QualityActionsReminderDocument": { + "description": "Message representing a Document (i.e. Google Docs, Sheets, Slides) This is currently only used to indicate the existence of said document and can be later extended to include more document information as needed.", + "id": "QualityActionsReminderDocument", + "properties": {}, + "type": "object" + }, + "QualityActionsReminderDynamiteGroup": { + "description": "Message representing a Dynamite Group (AKA Google Chat space) This is currently only used to indicate the existence of said group and can be later extended to include more group information as needed.", + "id": "QualityActionsReminderDynamiteGroup", + "properties": {}, + "type": "object" + }, "QualityActionsReminderLocation": { "description": "A representation of reminder-triggering locations. They may be specific, resolved locations, non-specific location groups, or personal aliases. Next id: 12", "id": "QualityActionsReminderLocation", @@ -81833,6 +82063,154 @@ }, "type": "object" }, + "QualityCalypsoAppsUniversalAuLiveOpDetail": { + "description": "Contains the needed information for serving a single LiveOp/LiveEvent on AU. Next ID: 9", + "id": "QualityCalypsoAppsUniversalAuLiveOpDetail", + "properties": { + "countryLevelScheduleInformation": { + "additionalProperties": { + "$ref": "QualityCalypsoAppsUniversalAuLiveOpEvent" + }, + "description": "Key is country, and value is the schedule information in that country.", + "type": "object" + }, + "defaultFormatInformation": { + "$ref": "QualityCalypsoAppsUniversalAuLiveOpFormat", + "description": "Fallback option for the LiveOp format. We will try en-US -\u003e en -\u003e any locale and get the first one that is available." + }, + "defaultScheduleInformation": { + "$ref": "QualityCalypsoAppsUniversalAuLiveOpEvent", + "description": "Fallback option for the LiveOp event scheduling information. Will use earliest start time and last end time from PDC LiveOps data dump." + }, + "eventId": { + "description": "android", + "type": "string" + }, + "eventType": { + "description": "[REQUIRED] type of live op event.", + "enum": [ + "TYPE_UNKNOWN", + "MAJOR_UPDATE", + "SALE", + "EVENT", + "CROSSOVER", + "PRE_REG_UPDATE", + "LOYALTY", + "FIRST_PARTY_PROMOTION", + "AUTO_GENERATED_SALE", + "NEW_RELEASE", + "IAP_SKU_SALE", + "OFFER", + "IAP_SKU_DEALS" + ], + "enumDescriptions": [ + "", + "Major Update - An update which introduces major changes.", + "Sale - Time limited discount.", + "Event - A time limited event available in the game or app.", + "Crossover, also known as IP collaboration in JP - This is an event involving a collaboration IP.", + "Pre-registration update - announcement for pre-reg apps.", + "Loyalty LiveOps event. E.g. special points earn promotion etc.", + "First party promotions funded by Play.", + "Sale events auto-generated by Play for apps on sale, rather than a sale event as declared through PDC.", + "Events for major new app releases. Auto-generated by the recommendations backend.", + "Sale events generated by sku config, rather than a sale event as declared through PDC.", + "Offer - see offer types below for the types. go/liveops-config-deals", + "Out-of-app purchasable in-app promotions funded by Play." + ], + "type": "string" + }, + "eventUrl": { + "description": "ios", + "type": "string" + }, + "localeLevelFormatInformation": { + "additionalProperties": { + "$ref": "QualityCalypsoAppsUniversalAuLiveOpFormat" + }, + "description": "Key is locale, and value is the format information for that locale.", + "type": "object" + }, + "priority": { + "type": "string" + } + }, + "type": "object" + }, + "QualityCalypsoAppsUniversalAuLiveOpEvent": { + "description": "Contains the schedule for a single live-op event. Next ID: 4", + "id": "QualityCalypsoAppsUniversalAuLiveOpEvent", + "properties": { + "endTimestampMillis": { + "description": "[REQUIRED] End time in UTC for the live-op event.", + "format": "int64", + "type": "string" + }, + "previewTimestampMillis": { + "description": "If specified, a live-op event must be shown only after this preview-time (in UTC). Otherwise, the event can be shown at any time as long as its before the end time.", + "format": "int64", + "type": "string" + }, + "startTimestampMillis": { + "description": "[REQUIRED] Start time in UTC for the live-op event.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "QualityCalypsoAppsUniversalAuLiveOpFormat": { + "description": "Contains the format information for a single LiveOp/LiveEvent. Next ID: 10", + "id": "QualityCalypsoAppsUniversalAuLiveOpFormat", + "properties": { + "deeplink": { + "type": "string" + }, + "description": { + "type": "string" + }, + "eyebrow": { + "description": "iOS only, kind of event type", + "type": "string" + }, + "imageUrl": { + "type": "string" + }, + "squareImageUrl": { + "type": "string" + }, + "status": { + "description": "iOS only, sort of start schedule", + "type": "string" + }, + "title": { + "type": "string" + }, + "videoId": { + "type": "string" + }, + "videoUrl": { + "type": "string" + } + }, + "type": "object" + }, + "QualityCalypsoAppsUniversalAuLiveOpsDetailInfo": { + "description": "Stores all possible LiveOps/LiveEvents that are eligible to be shown for an app.", + "id": "QualityCalypsoAppsUniversalAuLiveOpsDetailInfo", + "properties": { + "liveOpEvents": { + "items": { + "$ref": "QualityCalypsoAppsUniversalAuLiveOpDetail" + }, + "type": "array" + }, + "packageName": { + "type": "string" + } + }, + "type": "object" + }, "QualityCopiaFireflySiteSignal": { "description": "Proto message containing site-level signal for search stack. Because firefly_stats.proto depends on \"//segindexer:compositedoc_proto\", we cannot make perdocdata contain it.", "id": "QualityCopiaFireflySiteSignal", @@ -83222,6 +83600,11 @@ "format": "double", "type": "number" }, + "unicornClicks": { + "description": "The subset of clicks that are associated with an event from a Unicorn user.", + "format": "double", + "type": "number" + }, "unsquashedClicks": { "description": "This is not being populated for the current format - instead two instances of CrapsClickSignals (squashed/unsquashed) are used. We are migrating to the new format where this field will be populated.", "format": "double", @@ -83545,7 +83928,7 @@ "type": "object" }, "QualityNsrNsrData": { - "description": "NOTE: When adding a new field to be propagated to Raffia check if NsrPatternSignalSpec needs to be updated. Next ID: 48", + "description": "NOTE: When adding a new field to be propagated to Raffia check if NsrPatternSignalSpec needs to be updated. Next ID: 50", "id": "QualityNsrNsrData", "properties": { "articleScore": { @@ -83557,10 +83940,10 @@ "format": "float", "type": "number" }, - "chard": { + "chardEncoded": { "description": "Site-level chard score: site quality predictor based on content.", - "format": "float", - "type": "number" + "format": "int32", + "type": "integer" }, "chardVariance": { "format": "float", @@ -83663,6 +84046,13 @@ "format": "float", "type": "number" }, + "priorAdjustedNsr": { + "description": "NSR - prior. Estimate of whether the site is above/below average NSR in its slice.", + "items": { + "$ref": "QualityNsrVersionedFloatSignal" + }, + "type": "array" + }, "secondarySiteChunk": { "description": "Secondary NSR sitechunk. When present, it provides more granular chunking than primary sitechunks (see quality/nsr/util/sitechunker.h for details).", "type": "string" @@ -84362,7 +84752,7 @@ "type": "object" }, "QualityPreviewChosenSnippetInfo": { - "description": "Information for chosen snippet. Next ID: 7", + "description": "Information for chosen snippet. Next ID: 8", "id": "QualityPreviewChosenSnippetInfo", "properties": { "isVulgar": { @@ -84372,6 +84762,10 @@ "leadingTextType": { "type": "string" }, + "snippetHtml": { + "description": "The rendered snippet html.", + "type": "string" + }, "snippetType": { "enum": [ "SNIPPET_TYPE_UNSPECIFIED", @@ -84406,7 +84800,7 @@ "type": "string" }, "source": { - "description": "Source of the chosen snippet, decided in PORC. String value of quality.porc.TextSnippetCandidate.TextSnippetSource defined at google3/quality/porc/proto/text_snippet.proto Note: This field is only populated and used in offline pipeline.", + "description": "Source of the chosen snippet, decided in PORC. String value of quality.porc.TextSnippetCandidate.TextSnippetSource defined at google3/quality/porc/proto/text_snippet.proto", "type": "string" }, "tidbits": { @@ -84451,7 +84845,7 @@ "type": "object" }, "QualityPreviewRanklabSnippet": { - "description": "Snippet candidate related information and signal scores.", + "description": "Snippet candidate related information and signal scores. Next ID: 11", "id": "QualityPreviewRanklabSnippet", "properties": { "brainFeatures": { @@ -84463,6 +84857,19 @@ "experimentalFeatures": { "$ref": "QualityPreviewSnippetExperimentalFeatures" }, + "finalScore": { + "description": "The final score of this candidate.", + "format": "float", + "type": "number" + }, + "isMuppetSelectedSnippet": { + "description": "Is this the candidate chosen by Muppet scorer.", + "type": "boolean" + }, + "originalQueryTermCoverageFeatures": { + "$ref": "QualityPreviewSnippetQueryTermCoverageFeatures", + "description": "Query term (original terms only) coverage features." + }, "qualityFeatures": { "$ref": "QualityPreviewSnippetQualityFeatures" }, @@ -84471,7 +84878,8 @@ "description": "Core set of snippet features." }, "queryTermCoverageFeatures": { - "$ref": "QualityPreviewSnippetQueryTermCoverageFeatures" + "$ref": "QualityPreviewSnippetQueryTermCoverageFeatures", + "description": "Query term (including synonyms) coverage features." }, "snippetInfo": { "$ref": "QualityPreviewChosenSnippetInfo", @@ -85593,7 +86001,7 @@ "type": "object" }, "QualityQrewritePersonalContactData": { - "description": "Contact metadata Next Id: 35", + "description": "Contact metadata Next Id: 36", "id": "QualityQrewritePersonalContactData", "properties": { "accountProvenance": { @@ -85662,6 +86070,17 @@ "description": "If the lookup was done using relationship which is visible to guests. This value will only be set if lookup was done using relationship. E.g. user has a guest relationship (doctor) -\u003e (John) And user says \"call doctor\", then this value will be true.", "type": "boolean" }, + "lookupNameSource": { + "enum": [ + "UNKNOWN", + "SPELLING" + ], + "enumDescriptions": [ + "", + "User spelled the name after contact no match." + ], + "type": "string" + }, "matchSignal": { "$ref": "AssistantVerticalsCommonContactMatchSignal", "description": "Populate only if AlternateSource is not NONE." @@ -86724,9 +87143,14 @@ "type": "object" }, "QualityShoppingShoppingAttachment": { - "description": "This proto is a lightweight version of ShoppingAnnotation in docjoin attachment. We're doing a deep copy of protos defined in ShoppingAnnotation so that we can control individual fields that will sit in Muppet. Data here will be used for scoring organic shopping web results and previews. Many shopping related signals, e.g., product review score, are also served from this attachment. Next ID: 20", + "description": "This proto is a lightweight version of ShoppingAnnotation in docjoin attachment. We're doing a deep copy of protos defined in ShoppingAnnotation so that we can control individual fields that will sit in Muppet. Data here will be used for scoring organic shopping web results and previews. Many shopping related signals, e.g., product review score, are also served from this attachment. Next ID: 21", "id": "QualityShoppingShoppingAttachment", "properties": { + "datasetModelArticleScore": { + "description": "Score from the blockbert article classifier model. go/article-understanding-project", + "format": "int32", + "type": "integer" + }, "datasetModelBuyingGuideScore": { "format": "int32", "type": "integer" @@ -88494,9 +88918,12 @@ "type": "object" }, "RepositoryAnnotationsRdfaRdfaRichSnippetsApplication": { - "description": "This structure holds data for application information for rich snippets Next ID: 48", + "description": "This structure holds data for application information for rich snippets Next ID: 51", "id": "RepositoryAnnotationsRdfaRdfaRichSnippetsApplication", "properties": { + "appTypeData": { + "$ref": "RepositoryAnnotationsRdfaRdfaRichSnippetsApplicationAppTypeData" + }, "applicationUrl": { "description": "Fields for internal use", "type": "string" @@ -88586,6 +89013,10 @@ "lastUpdated": { "type": "string" }, + "liveOpDetails": { + "$ref": "QualityCalypsoAppsUniversalAuLiveOpsDetailInfo", + "description": "Unified proto for android LiveOps and iOS LiveEvents." + }, "marketplace": { "description": "Market Android or itunes", "type": "string" @@ -88650,6 +89081,9 @@ "description": "Price", "type": "string" }, + "rankData": { + "$ref": "RepositoryAnnotationsRdfaRdfaRichSnippetsApplicationRankData" + }, "rating": { "description": "Ratings and reviews Either for this version only or for all versions to be displayed.", "type": "string" @@ -88728,6 +89162,16 @@ }, "type": "object" }, + "RepositoryAnnotationsRdfaRdfaRichSnippetsApplicationAppTypeData": { + "id": "RepositoryAnnotationsRdfaRdfaRichSnippetsApplicationAppTypeData", + "properties": { + "playStoreAppType": { + "description": "Top level app category type (GAME or APPLICATION). Copied from playwright.", + "type": "string" + } + }, + "type": "object" + }, "RepositoryAnnotationsRdfaRdfaRichSnippetsApplicationCountryPrice": { "id": "RepositoryAnnotationsRdfaRdfaRichSnippetsApplicationCountryPrice", "properties": { @@ -88745,6 +89189,47 @@ }, "type": "object" }, + "RepositoryAnnotationsRdfaRdfaRichSnippetsApplicationRank": { + "id": "RepositoryAnnotationsRdfaRdfaRichSnippetsApplicationRank", + "properties": { + "appStoreLink": { + "type": "string" + }, + "categoryId": { + "type": "string" + }, + "categoryName": { + "type": "string" + }, + "chartType": { + "type": "string" + }, + "rank": { + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "RepositoryAnnotationsRdfaRdfaRichSnippetsApplicationRankData": { + "id": "RepositoryAnnotationsRdfaRdfaRichSnippetsApplicationRankData", + "properties": { + "playwrightCategoryId": { + "description": "Copied from the category_id field from Playwright docs. It helps decide which category to show in app ranking info.", + "items": { + "type": "string" + }, + "type": "array" + }, + "rank": { + "items": { + "$ref": "RepositoryAnnotationsRdfaRdfaRichSnippetsApplicationRank" + }, + "type": "array" + } + }, + "type": "object" + }, "RepositoryWebrefAggregatedEntityNameScores": { "description": "Represents the aggregated score of the entities for a given name, aggregated over all sources. Next available tag: 3.", "id": "RepositoryWebrefAggregatedEntityNameScores", @@ -92699,7 +93184,7 @@ "type": "boolean" }, "isCompoundRetrievalKey": { - "description": "Indicates special compound retrieval keys, like \"Compound $mid1 $mid2\", see repository/webref/universal/util/compound-retrieval.h", + "description": "Indicates special compound retrieval keys, like \"Compound $mid1 $mid2\"", "type": "boolean" }, "isDictionaryTerm": { @@ -97086,13 +97571,6 @@ "format": "uint64", "type": "string" }, - "fieldOfStudyEntity": { - "description": "A set of entities from /collection/field_of_studies in knowledge graph schema (http://shortn/_ldBsa14lo8).", - "items": { - "$ref": "ResearchScienceSearchSourceUrlDocjoinInfoWebrefEntityInfo" - }, - "type": "array" - }, "indexTier": { "description": "Index tiers (BASE, UNIFIED_ZEPPELIN, etc) that the document belongs to. NOTE: Each document may belong to multiple tiers. NOTE: The original data type is an enum CompositeDoc::SubIndexType. However we don't want to depend on segindexer/compositedoc.proto because the proto is too large. Instead, we use CompositeDoc::SubIndexType_Name( subindexid) to convert into a string representation. To convert string back to CompositeDoc::SubIndexType, use CompositeDoc::SubIndexType_Parse.", "items": { @@ -97153,6 +97631,13 @@ "url": { "description": "The url of the document. ", "type": "string" + }, + "webrefEntity": { + "description": "A set of entities copied from WebRefEntities on cDoc.", + "items": { + "$ref": "ResearchScienceSearchSourceUrlDocjoinInfoWebrefEntityInfo" + }, + "type": "array" } }, "type": "object" @@ -97165,6 +97650,19 @@ "description": "The English description of the mid from the KG.", "type": "string" }, + "entityType": { + "enum": [ + "UNKNOWN", + "FIELD_OF_STUDY", + "GEO" + ], + "enumDescriptions": [ + "", + "/collection/field_of_studies in KG.", + "/collection/geo/* in KG." + ], + "type": "string" + }, "mid": { "description": "The KG identifier of the WebrefEntity.", "type": "string" @@ -99942,7 +100440,7 @@ "type": "object" }, "ShoppingWebentityShoppingAnnotationProductRating": { - "description": "Information about a rating provided for a product. This can represent an aggregated rating if count is set. Next Id: 4", + "description": "Information about a rating provided for a product. This can represent an aggregated rating if count is set. Next Id: 7", "id": "ShoppingWebentityShoppingAnnotationProductRating", "properties": { "count": { @@ -99950,6 +100448,15 @@ "format": "int64", "type": "string" }, + "maxValueMillis": { + "format": "int64", + "type": "string" + }, + "minValueMillis": { + "description": "The lower and upper bounds of the rating values that could be submitted for the product. (Note that it is not the min/max ratings submitted for the product, it is the min/max that can hypothetically be submitted.)", + "format": "int64", + "type": "string" + }, "source": { "enum": [ "PRODUCT_RATING_SOURCE_UNKNOWN", @@ -99965,6 +100472,11 @@ "description": "The value of this rating normalized between 0 and 5. This will not be set if count is set to 0.", "format": "double", "type": "number" + }, + "valueMillis": { + "description": "The non-normalized aggregated value of the ratings for this product.", + "format": "int64", + "type": "string" } }, "type": "object" @@ -100965,6 +101477,26 @@ }, "type": "object" }, + "SocialGraphApiProtoContactPromptSettings": { + "id": "SocialGraphApiProtoContactPromptSettings", + "properties": { + "contactActiveState": { + "description": "Indicates if any reminders are active for entire contact. This will affect both connection reminders and date reminders such as birthday reminders. This is required.", + "enum": [ + "UNKNOWN_ACTIVE_STATE", + "ACTIVE", + "DISABLED" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, "SocialGraphApiProtoContactState": { "description": "Contact state and related metadata. See go/fbs-contacts-trash.", "id": "SocialGraphApiProtoContactState", @@ -101315,6 +101847,20 @@ "description": "Used in PeopleAPI layers + FBS/ContactsService (not in ProfileService)", "id": "SocialGraphApiProtoPrompt", "properties": { + "activeState": { + "description": "Indicates if this prompt is active regardless of its reccurrence date, dismiss date or notification triggers. This is required.", + "enum": [ + "UNKNOWN_ACTIVE_STATE", + "ACTIVE", + "DISABLED" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, "content": { "$ref": "SocialGraphApiProtoPromptContent" }, @@ -101359,7 +101905,7 @@ "type": "object" }, "SocialGraphApiProtoPromptContent": { - "description": "Used in PeopleAPI layers + FBS/ContactsService (not in ProfileService)", + "description": "Used in PeopleAPI layers + FBS/ContactsService (not in ProfileService) and in Custard response to client apps that read Prompts.", "id": "SocialGraphApiProtoPromptContent", "properties": { "title": { @@ -102581,7 +103127,7 @@ "type": "object" }, "StorageGraphBfgPolicyMetadata": { - "description": "Metadata about data governance policies. For more context, see go/ke-triple-dg-policy-and-metadata. If any attribute is not set, then there's no specific restrictions associated with the missing attribute. For example, if `availability_start_timestamp` is not set, the data won't be embargoed automatically; if `availability_end_timestamp` is not set, they won't expire automatically. Next ID: 8 LINT.IfChange", + "description": "Metadata about data governance policies. For more context, see go/ke-triple-dg-policy-and-metadata. If any attribute is not set, then there's no specific restrictions associated with the missing attribute. For example, if `availability_start_timestamp` is not set, the data won't be embargoed automatically; if `availability_end_timestamp` is not set, they won't expire automatically. LINT.IfChange", "id": "StorageGraphBfgPolicyMetadata", "properties": { "availabilityEndTimestamp": { @@ -102608,6 +103154,28 @@ }, "type": "array" }, + "lmsIsEditorial": { + "description": "The following attributes with `lms_` prefix are for supporting LMS restrictions. See go/lms-online-restrictions for details.", + "type": "boolean" + }, + "lmsRegionsAllowed": { + "$ref": "KeGovernanceTypedRegions" + }, + "lmsRegionsDisallowed": { + "$ref": "KeGovernanceTypedRegions" + }, + "lmsRequiresAttribution": { + "type": "boolean" + }, + "lmsRequiresFirstPartyOnly": { + "type": "boolean" + }, + "lmsRequiresLink": { + "type": "boolean" + }, + "lmsRequiresShareAlike": { + "type": "boolean" + }, "policySourceType": { "description": "Policy metadata are VERTICAL by default. Vertical policy makers / providers does not need to set this field explicitly.", "enum": [ @@ -102883,7 +103451,7 @@ "WARNING! Sensitive data under strict contractual usage agreements. DO NOT use without permission and understanding of usage constraints. This is an access restriction to access provider provided popularity score to rank entities within a provider's catalog. go/ps-to-kg , b/154547652 YOU MUST CONTACT ke-media-actions@ before reading or writing this data.", "Data ingested by Carbon Index for internal processing and aggregation, not fit for display on any surface irrespective of attribution. YOU MUST CONTACT area120-carbonindex-eng@ before reading this data.", "Data fit for display on the Carbon Index frontend to trusted testers, with proper attribution and controls. YOU MUST CONTACT area120-carbonindex-eng@ before reading this data.", - "WARNING! Sensitive data under strict contractual usage agreements. DO NOT use without permission and understanding of usage constraints. YOU MUST CONTACT travel-activities-eng-team@ before reading or writing this data.", + "WARNING! Sensitive data under strict contractual usage agreements. DO NOT use without permission and understanding of usage constraints. YOU MUST CONTACT travel-ttd-ecosystem-team@ before reading or writing this data.", "WARNING! Sensitive data under strict contractual usage agreements. DO NOT use without permission and understanding of usage constraints. YOU MUST CONTACT fo-partner-eng@ before reading or writing this data.", "WARNING! Sensitive data under strict contractual usage agreements. DO NOT use without permission and understanding of usage constraints. This is an access restriction for accessing Yeti publisher image data in KG. For now it should be used ONLY for Yeti. YOU MUST CONTACT stadia-knowledge-eng@ before reading or writing this data.", "In order to test BBC metadata before serving code populates them to the public", @@ -103756,7 +104324,7 @@ "type": "object" }, "TravelFlightsAirlineConfig": { - "description": "Next ID: 26", + "description": "Next ID: 27", "id": "TravelFlightsAirlineConfig", "properties": { "adwordsCid": { @@ -103869,6 +104437,10 @@ "$ref": "TravelFlightsNameCatalogProto", "description": "EasyJet/イージージェット" }, + "passengerAssistanceUrls": { + "$ref": "TravelFlightsNameCatalogProto", + "description": "Default url for passenger assistance information." + }, "popularity": { "description": "Number of flights with this airline over the next 180 days.", "format": "int32", @@ -106332,9 +106904,16 @@ "DETAILS_PAGE_AQUALITY_UNKNOWN_EVENT_LEVEL", "DETAILS_PAGE_AQUALITY_FAILED_EVENT_LEVEL", "DETAILS_PAGE_AQUALITY_PASSED_EVENT_LEVEL", + "INLINE_DETAILS_CALLER_AQUALITY_CHECK_PASS", + "INLINE_DETAILS_CALLER_AQUALITY_CHECK_FAIL", "PTP_CLUSTER_SERP_P13N_RANKING_EVENT_LEVEL", "BROAD_INTENT_REWEIGHTING_EVENT_LEVEL", "QUERY_DEPENDENT_SNIPPET_EVENT_LEVEL", + "TRUSTED_ENTITY_L1_AND_ATTRIBUTE_SEARCH_QUERY_EVENT", + "TRUSTED_ENTITY_L2_L3_SEARCH_QUERY_EVENT", + "EXPANDED_DEV_SUCCESS_CLUSTER_EVENT_LEVEL", + "COLLAPSED_DEV_SUCCESS_CLUSTER_EVENT_LEVEL", + "BROAD_INTENT_GAMES_TIMESPENT_EVENT_LEVEL", "EVENT_LEVEL_TEST_CODE_LIMIT", "RESERVED_4", "RESERVED_5", @@ -106938,6 +107517,7 @@ "PLAY_STORE_IAP_SALES_APP_12", "PLAY_STORE_IAP_SALES_APP_13", "PLAY_STORE_IAP_SALES_MINI_DETAILS_PAGE", + "PLAY_STORE_IAP_SALES_MINI_DETAILS_PAGE_EAP_PARTNER_APPS", "CROSS_DEVICE_INSTALL_OPTIONS_FETCHED_IN_SESSION", "CROSS_DEVICE_INSTALL_OPTIONS_ITEM_FIELDS_TRIGGERED", "PAIRED_DEVICE_COMPATIBILITY_CHECKED_IN_SESSION", @@ -107025,6 +107605,7 @@ "PLAY_PASS_SPLASH_PAGE_FOR_PARENT_SESSION_LEVEL", "PLAY_PASS_SPLASH_PAGE_FOR_UNICORN_SESSION_LEVEL", "REVIEW_SUBMITTED_SESSION_LEVEL", + "REVIEW_TOPIC_FILTER_SELECTED_SESSION_LEVEL", "PLAY_SEARCH_GENERAL_QUERY_PAGINATION_SESSION_LEVEL", "IN_CART_EXCHANGE_OPTIONS_ELIGIBLE_SESSION_LEVEL", "PLAY_SEARCH_MULTINAV_PAGINATION_SESSION_LEVEL", @@ -107074,6 +107655,8 @@ "INLINE_DETAILS_TQUALITY_CHECK_FAIL_SESSION_LEVEL", "INLINE_DETAILS_AQUALITY_CHECK_PASS_SESSION_LEVEL", "INLINE_DETAILS_AQUALITY_CHECK_FAIL_SESSION_LEVEL", + "INLINE_DETAILS_CALLER_AQUALITY_CHECK_PASS_SESSION_LEVEL", + "INLINE_DETAILS_CALLER_AQUALITY_CHECK_FAIL_SESSION_LEVEL", "INLINE_DETAILS_IS_INLINE_URL_SESSION_LEVEL", "SENT_EMAIL_ENTER_GRACE_PERIOD_SESSION_LEVEL", "SENT_EMAIL_ENTER_SUSPENDED_PERIOD_SESSION_LEVEL", @@ -107162,9 +107745,67 @@ "SHOULD_SEE_NOW_CONTENT_LIVE_OPS_GH_K2", "SHOULD_SEE_NOW_CONTENT_LIVE_OPS_GH_K3_4", "SHOULD_SEE_NOW_CONTENT_LIVE_OPS_GH_GTE_K5", + "SHOULD_SEE_NOW_CONTENT_PRE_REGISTRATION_AH_K1", + "SHOULD_SEE_NOW_CONTENT_PRE_REGISTRATION_AH_K2", + "SHOULD_SEE_NOW_CONTENT_PRE_REGISTRATION_AH_K3_4", + "SHOULD_SEE_NOW_CONTENT_PRE_REGISTRATION_AH_GTE_K5", + "SHOULD_SEE_NOW_CONTENT_PRE_REGISTRATION_GH_K1", + "SHOULD_SEE_NOW_CONTENT_PRE_REGISTRATION_GH_K2", + "SHOULD_SEE_NOW_CONTENT_PRE_REGISTRATION_GH_K3_4", + "SHOULD_SEE_NOW_CONTENT_PRE_REGISTRATION_GH_GTE_K5", + "SHOULD_NOT_SEE_TOP_NOW_CONTENT_AH", + "SHOULD_SEE_TOP_NOW_CONTENT_AH_K1", + "SHOULD_SEE_TOP_NOW_CONTENT_AH_K2", + "SHOULD_SEE_TOP_NOW_CONTENT_AH_K3_4", + "SHOULD_SEE_TOP_NOW_CONTENT_AH_GTE_K5", + "SHOULD_NOT_SEE_TOP_NOW_CONTENT_GH", + "SHOULD_SEE_TOP_NOW_CONTENT_GH_K1", + "SHOULD_SEE_TOP_NOW_CONTENT_GH_K2", + "SHOULD_SEE_TOP_NOW_CONTENT_GH_K3_4", + "SHOULD_SEE_TOP_NOW_CONTENT_GH_GTE_K5", + "SHOULD_SEE_TOP_NOW_CONTENT_NEW_RELEASE_AH_K1", + "SHOULD_SEE_TOP_NOW_CONTENT_NEW_RELEASE_AH_K2", + "SHOULD_SEE_TOP_NOW_CONTENT_NEW_RELEASE_AH_K3_4", + "SHOULD_SEE_TOP_NOW_CONTENT_NEW_RELEASE_AH_GTE_K5", + "SHOULD_SEE_TOP_NOW_CONTENT_NEW_RELEASE_GH_K1", + "SHOULD_SEE_TOP_NOW_CONTENT_NEW_RELEASE_GH_K2", + "SHOULD_SEE_TOP_NOW_CONTENT_NEW_RELEASE_GH_K3_4", + "SHOULD_SEE_TOP_NOW_CONTENT_NEW_RELEASE_GH_GTE_K5", + "SHOULD_SEE_TOP_NOW_CONTENT_EDITORIAL_AH_K1", + "SHOULD_SEE_TOP_NOW_CONTENT_EDITORIAL_AH_K2", + "SHOULD_SEE_TOP_NOW_CONTENT_EDITORIAL_AH_K3_4", + "SHOULD_SEE_TOP_NOW_CONTENT_EDITORIAL_AH_GTE_K5", + "SHOULD_SEE_TOP_NOW_CONTENT_EDITORIAL_GH_K1", + "SHOULD_SEE_TOP_NOW_CONTENT_EDITORIAL_GH_K2", + "SHOULD_SEE_TOP_NOW_CONTENT_EDITORIAL_GH_K3_4", + "SHOULD_SEE_TOP_NOW_CONTENT_EDITORIAL_GH_GTE_K5", + "SHOULD_SEE_TOP_NOW_CONTENT_LIVE_OPS_AH_K1", + "SHOULD_SEE_TOP_NOW_CONTENT_LIVE_OPS_AH_K2", + "SHOULD_SEE_TOP_NOW_CONTENT_LIVE_OPS_AH_K3_4", + "SHOULD_SEE_TOP_NOW_CONTENT_LIVE_OPS_AH_GTE_K5", + "SHOULD_SEE_TOP_NOW_CONTENT_LIVE_OPS_GH_K1", + "SHOULD_SEE_TOP_NOW_CONTENT_LIVE_OPS_GH_K2", + "SHOULD_SEE_TOP_NOW_CONTENT_LIVE_OPS_GH_K3_4", + "SHOULD_SEE_TOP_NOW_CONTENT_LIVE_OPS_GH_GTE_K5", + "SHOULD_SEE_TOP_NOW_CONTENT_PRE_REGISTRATION_AH_K1", + "SHOULD_SEE_TOP_NOW_CONTENT_PRE_REGISTRATION_AH_K2", + "SHOULD_SEE_TOP_NOW_CONTENT_PRE_REGISTRATION_AH_K3_4", + "SHOULD_SEE_TOP_NOW_CONTENT_PRE_REGISTRATION_AH_GTE_K5", + "SHOULD_SEE_TOP_NOW_CONTENT_PRE_REGISTRATION_GH_K1", + "SHOULD_SEE_TOP_NOW_CONTENT_PRE_REGISTRATION_GH_K2", + "SHOULD_SEE_TOP_NOW_CONTENT_PRE_REGISTRATION_GH_K3_4", + "SHOULD_SEE_TOP_NOW_CONTENT_PRE_REGISTRATION_GH_GTE_K5", "LOYALTY_STAMP_CARD_IN_PURCHASE_FLOW_SESSION_LEVEL", "WALLET_WELLBEING_ALERT_SESSION_LEVEL", "BROAD_INTENT_REWEIGHTING_SESSION_LEVEL", + "DYNASTY_DEVICE_HANDOFF_SESSION_LEVEL", + "TRUSTED_ENTITY_L1_AND_ATTRIBUTE_SEARCH_QUERY_SESSION", + "TRUSTED_ENTITY_L2_L3_SEARCH_QUERY_SESSION", + "EXPANDED_DEV_SUCCESS_CLUSTER_SESSION_LEVEL", + "COLLAPSED_DEV_SUCCESS_CLUSTER_SESSION_LEVEL", + "DOWNLOAD_COUNT_ELIGIBLE", + "PLANOGRAM_MERCH_AMERICAS_GAMES_PAYPAL_SESSION_LEVEL", + "BROAD_INTENT_GAMES_TIMESPENT_SESSION_LEVEL", "SESSION_LEVEL_TEST_CODE_LIMIT", "SHOULD_SEE_LIVE_OP_CLUSTER_USER_LEVEL", "CART_ABANDONMENT_USER_LEVEL", @@ -107502,6 +108143,7 @@ "NOVEL_TOPIC_CLUSTER_ELIGIBLE_USER_LEVEL_V2", "NOVEL_TOPIC_CLUSTER_ELIGIBLE_USER_LEVEL_V3", "NOVEL_TOPIC_CLUSTER_IMPRESSED_AT_USER_LEVEL", + "NOVEL_TOPIC_CLUSTER_ELIGIBLE_USER_LEVEL_V4", "IPS_ITEM_LEVEL_RECS_REMOVED_USER_LEVEL", "ALLOWLIST_EXPANSION_FOR_P13N_LIVEOPS_USER_LEVEL", "SURVEY_RECS_LIST_AT_USER_LEVEL", @@ -107509,6 +108151,10 @@ "ALLOWLIST_EXPANSION_FOR_P13N_NOTIFICATIONS_USER_LEVEL", "GROWTH_COFFEE_CARD_IN_PURCHASE_FLOW_USER_LEVEL", "GROWTH_COFFEE_CARD_IN_PURCHASE_FLOW_SERVER_USER_LEVEL", + "GROWTH_CORPUS_WIDE_STAMP_CARD_PURCHASE_FLOW_CLIENT_USER_LEVEL", + "GROWTH_CORPUS_WIDE_STAMP_CARD_PURCHASE_FLOW_SERVER_USER_LEVEL", + "GROWTH_CORPUS_WIDE_STAMP_CARD_GAMES_HOME_USER_LEVEL", + "LOYALTY_PURCHASE_QUEST_GAMES_HOME_USER_LEVEL", "SUBS_HIGH_CHURN_FOP_OPTIONS_AVAILABLE_USER_LEVEL", "SUBS_HIGH_CHURN_FOP_OPTIONS_AVAILABLE_USER_LEVEL_V2", "SUBS_HIGH_CHURN_FOP_OPTIONS_AVAILABLE_WITH_EXISTING_FOP_USER_LEVEL", @@ -107529,6 +108175,67 @@ "LINK_BIOMETRICS_USER_LEVEL", "POST_SUCCESS_ADD_BACKUP_FLOW_USER_LEVEL", "SKIP_CHECK_MARK_SCREEN_WITH_BACKUP_FLOW_USER_LEVEL", + "IS_ELIGIBLE_FOR_ONE_CLICK_BACKUP_FOP_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_INVALID_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_0_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_1_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_2_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_3_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_4_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_5_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_6_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_7_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_8_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_9_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_10_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_11_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_12_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_13_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_14_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_15_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_16_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_17_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_18_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_19_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_20_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_21_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_22_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_23_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_24_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_25_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_26_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_27_USER_LEVEL", + "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_28_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_INVALID_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_0_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_1_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_2_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_3_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_4_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_5_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_6_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_7_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_8_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_9_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_10_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_11_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_12_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_13_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_14_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_15_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_16_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_17_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_18_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_19_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_20_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_21_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_22_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_23_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_24_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_25_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_26_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_27_USER_LEVEL", + "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_28_USER_LEVEL", "USER_LEVEL_TEST_CODE_LIMIT" ], "enumDescriptions": [ @@ -107814,9 +108521,16 @@ "", "", "", + "", + "", "Event level test code for cluster, p13n ranking.", "TestCode for Broad Intent Reweighting Event Level.", "Event level test code for query dependent snippet.", + "Event level test code for SERP L1 TG2 category \u0026 TG2 attribute queries.", + "Event level test code for SERP L2,L3 TG2 category queries.", + "Event level test code for dev success cluster.", + "", + "TestCode for Broad Intent Games TimeSpent Event Level.", "", "", "", @@ -108420,6 +109134,7 @@ "", "", "", + "", "Test codes for cross-device features. See go/play-cross-device.", "", "", @@ -108507,6 +109222,7 @@ "", "", "Test code for tracking sessions where a review is submitted.", + "", "Test code for tracking sessions where the page is paginated by general query pagination.", "Test code for tracking sessions where in cart exchange options are available.", "Test code fpr tracking sessions where the page is being paginated by multinav pagination.", @@ -108556,6 +109272,8 @@ "", "Session level test codes containing result of aQuality lookup during market details url matching. A failed aQuality result suppresses inline details.", "", + "", + "", "Session level test code indicating external details URL is an inline URL.", "Session level test code that indicates that decline email is sent when the subscription enters grace period.", "Session level test code that indicates that decline email is sent when the subscription enters suspended period.", @@ -108644,9 +109362,67 @@ "", "", "", + "Pre-registration now! content on Apps Home.", + "", + "", + "", + "Pre-registration now! content on Games Home.", + "", + "", + "", + "Session level test codes for top of page Now! content coverage metrics. Any Now! content on Top of Apps Home.", + "", + "", + "", + "", + "Any Now! content on Top of Games Home.", + "", + "", + "", + "", + "New release Now! content on Top of Apps Home.", + "", + "", + "", + "New release Now! content on Top of Games Home.", + "", + "", + "", + "Editorial Now! content on Top of Apps Home.", + "", + "", + "", + "Editorial Now! content on Top of Games Home.", + "", + "", + "", + "Live Ops Now! content on Top of Apps Home.", + "", + "", + "", + "Live Ops Now! content on Top of Games Home.", + "", + "", + "", + "Pre-registration now! content on Top of Apps Home.", + "", + "", + "", + "Pre-registration now! content on Top of Games Home.", + "", + "", + "", "Session level test code for Quest Platform Loyalty Stamp Card in Purchase flow.", "TestCode for slicing the users cohorts that should have received a budget Warning alert", "TestCode for Broad Intent Reweighting Session Level.", + "TestCode for Dynasty Device Handoff Session Level.", + "Session level test code for SERP L1 TG2 category \u0026 TG2 attribute queries.", + "Session level test code for SERP L2,L3 TG2 category queries.", + "Session level test code for dev success cluster.", + "", + "Session level test code for 1.5x ad format. See here for details: http://shortn/_04Q1LMyoTe.", + "Session level test code for merch run planogram experiment", + "TestCode for Broad Intent Games TimeSpent Session Level.", "", "User should see the live op cluster.", "Cart abandonment flow for purchase flow.", @@ -108984,6 +109760,7 @@ "", "", "", + "", "User level test code for tracking users who have IPS low appeal recommendations removed from their feed.", "User level test code for tracking users who have p13n LiveOps impressions.", "User-level test code logged when PRS returns a survey RecsList.", @@ -108991,6 +109768,10 @@ "User level test code for tracking users who have p13n Notifications candidates.", "User level test code for Growth Coffee Card Phase 1 launch, for tracking users who made eligible purchases and are eligible for the GCC in purchase flow.", "User level test code for Growth Coffee Card, for tracking users who made eligible purchases and are eligible for the GCC in purchase flow. This test code is logged on server side.", + "User level test code for Corpus Wide Growth Stamp Card, for tracking users who made eligible purchases and are eligible for the GSC in purchase flow. This test code is logged on client side.", + "User level test code for Corpus Wide Growth Stamp Card, for tracking users who made eligible purchases and are eligible for the GSC in purchase flow. This test code is logged on server side.", + "User level test code for Corpus Wide Growth Stamp Card, for tracking users who are eligible for the GSC in Games Home.", + "User level test code for Loyalty Purchase Quest, for tracking users who are eligible for the LPQ in Games Home.", "User level test code that indicates that at least one high churn fop options is available for user when visiting add fop page for subscription purchase. Deprecated, use 20361 instead.", "", "", @@ -109009,8 +109790,69 @@ "User level test code for users who have any purchase card abandon behavior in the last 28 day (controlled by LAST_28D_CART_ABANDONMENT_BACKEND), used for AH/GH monetization experiments.", "User level test code for users who have any purchase card abandon behavior in the last 7 day (controlled by LAST_7D_CART_ABANDONMENT_BACKEND), used for AH/GH monetization experiments.", "User level test code for link biometrics for free app acquisitions.", - "User level test code for post success add backup flow .", + "User level test code for post success add backup flow.", "User level test code for skipping ckechmark screen with backup flow.", + "User level test code for users who are eligible for one-click backup fop.", + "User level test codes for pre-period user page visit frequency in past 28 days.", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "User level test codes for post-period user page visit frequency in past 28 days.", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", "" ], "type": "string" @@ -109117,6 +109959,7 @@ "GAME_GRAPHIC_STYLE", "GAME_THEME_SETTING", "GAME_CONNECTIVITY", + "GAME_DIMENSIONAL_PLANES", "ACCESSIBLITY", "ASSISTANT", "CHROMEBOOK_COMPATIBILITY" @@ -109131,6 +109974,7 @@ "Game graphic stype. e.g. Anime", "Game theme setting. e.g. Fantasy", "Game connectivity. e.g. Offline", + "Game dimensional planes. e.g. 3D", "Accessiblity. e.g. Blind-Friendly", "Assistant tags, e.g. Assistant-Enabled", "Chrome OS compatibility tags. e.g. Optimized for Chromebooks" @@ -112451,7 +113295,8 @@ "GENERATIVE_ASR", "ASR_TRANSCRIPT", "COMMENT", - "GENERATIVE_ASR_V2" + "GENERATIVE_ASR_V2", + "SUMMARY_SEGMENT" ], "enumDescriptions": [ "", @@ -112477,7 +113322,8 @@ "Generative ASR anchors.", "Anchors where each timed anchor represents one sentence in the ASR transcript.", "Anchors extracted from a YouTube comment.", - "Generative ASR anchors V2." + "Generative ASR anchors V2.", + "Anchors pointing to the conclusion/summary part of the video. (go/vs-find-summary-segment)" ], "type": "string" }, @@ -112623,6 +113469,13 @@ "description": "Average score of description quality.", "format": "float", "type": "number" + }, + "furballUrl": { + "description": "Furball URL(s) of the rating score (may have been rated more than once)", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" @@ -112824,7 +113677,8 @@ "GENERATIVE_ASR", "ASR_TRANSCRIPT", "COMMENT", - "GENERATIVE_ASR_V2" + "GENERATIVE_ASR_V2", + "SUMMARY_SEGMENT" ], "enumDescriptions": [ "", @@ -112850,7 +113704,8 @@ "Generative ASR anchors.", "Anchors where each timed anchor represents one sentence in the ASR transcript.", "Anchors extracted from a YouTube comment.", - "Generative ASR anchors V2." + "Generative ASR anchors V2.", + "Anchors pointing to the conclusion/summary part of the video. (go/vs-find-summary-segment)" ], "type": "string" }, @@ -112937,7 +113792,8 @@ "GENERATIVE_ASR", "ASR_TRANSCRIPT", "COMMENT", - "GENERATIVE_ASR_V2" + "GENERATIVE_ASR_V2", + "SUMMARY_SEGMENT" ], "enumDescriptions": [ "", @@ -112963,7 +113819,8 @@ "Generative ASR anchors.", "Anchors where each timed anchor represents one sentence in the ASR transcript.", "Anchors extracted from a YouTube comment.", - "Generative ASR anchors V2." + "Generative ASR anchors V2.", + "Anchors pointing to the conclusion/summary part of the video. (go/vs-find-summary-segment)" ], "type": "string" }, @@ -123793,10 +124650,12 @@ "THUMBNAIL_TYPE_ORIGINAL", "THUMBNAIL_TYPE_ORIGINAL_HQ", "THUMBNAIL_TYPE_FAVICON_16", + "THUMBNAIL_TYPE_FAVICON_28", "THUMBNAIL_TYPE_FAVICON_32", "THUMBNAIL_TYPE_FAVICON_64", "THUMBNAIL_TYPE_FAVICON_ORIGINAL", "THUMBNAIL_TYPE_FAVICON_16_DARK", + "THUMBNAIL_TYPE_FAVICON_28_DARK", "THUMBNAIL_TYPE_FAVICON_32_DARK", "THUMBNAIL_TYPE_FAVICON_64_DARK", "THUMBNAIL_TYPE_FAVICON_ORIGINAL_DARK", @@ -123836,7 +124695,8 @@ "This refers to a thumbnail that fits in a 800x800 box.", "This refers to re-encoding original image to JPEG at the same size (up to 10000x10000). Output quality may be lower.", "Re-encode image at the same size as original (up to 10000x10000) but with high-quality (q=90). This was introduced by TYPHOON client and is expected only for very few images in our table (under 10k). If you plan to use this contact amarna-dev@ and/or crt@", - "These refer to favicon thumbnails of 16x16, 32x32 or 64x64. If the original image is an ico file containing multiple embedded images including 16x16, 32x32 or 64x64, these thumbnails are derived from the embedded image of the corresponding size. (If no such embedded image is found, prefer the closest size that's larger. If still no such size exists, prefer largest.) If no such size exists, these thumbnails are rescaled to an image whose maximum dimension is 16, 32 or 64.", + "These refer to favicon thumbnails of 16x16, 32x32 or 64x64. If the original image is an ico file containing multiple embedded images including 16x16, 32x32 or 64x64, these thumbnails are derived from the embedded image of the corresponding size. (If no such embedded image is found, prefer the closest size that's larger. If still no such size exists, prefer largest.) If no such size exists, these thumbnails are rescaled to an image whose maximum dimension is 16, 28, 32 or 64.", + "", "", "", "This type of favicon will preserve the size of the original image.", @@ -123844,6 +124704,7 @@ "", "", "", + "", "This refers to a thumbnail that fits in a 1080x1080 box.", "This refers to a thumbnail that fits in a 1600x1600 box and is encoded with high-quality (q=90). Contact amarna-dev@/crt@/bingwang@ for using it.", "This uses the same MaxAreaSizer as THUMBNAIL_TYPE_AREA_50K. The exact area is defined to be 307200 (= 640 x 480).", @@ -123939,10 +124800,12 @@ "THUMBNAIL_TYPE_ORIGINAL", "THUMBNAIL_TYPE_ORIGINAL_HQ", "THUMBNAIL_TYPE_FAVICON_16", + "THUMBNAIL_TYPE_FAVICON_28", "THUMBNAIL_TYPE_FAVICON_32", "THUMBNAIL_TYPE_FAVICON_64", "THUMBNAIL_TYPE_FAVICON_ORIGINAL", "THUMBNAIL_TYPE_FAVICON_16_DARK", + "THUMBNAIL_TYPE_FAVICON_28_DARK", "THUMBNAIL_TYPE_FAVICON_32_DARK", "THUMBNAIL_TYPE_FAVICON_64_DARK", "THUMBNAIL_TYPE_FAVICON_ORIGINAL_DARK", @@ -123982,7 +124845,8 @@ "This refers to a thumbnail that fits in a 800x800 box.", "This refers to re-encoding original image to JPEG at the same size (up to 10000x10000). Output quality may be lower.", "Re-encode image at the same size as original (up to 10000x10000) but with high-quality (q=90). This was introduced by TYPHOON client and is expected only for very few images in our table (under 10k). If you plan to use this contact amarna-dev@ and/or crt@", - "These refer to favicon thumbnails of 16x16, 32x32 or 64x64. If the original image is an ico file containing multiple embedded images including 16x16, 32x32 or 64x64, these thumbnails are derived from the embedded image of the corresponding size. (If no such embedded image is found, prefer the closest size that's larger. If still no such size exists, prefer largest.) If no such size exists, these thumbnails are rescaled to an image whose maximum dimension is 16, 32 or 64.", + "These refer to favicon thumbnails of 16x16, 32x32 or 64x64. If the original image is an ico file containing multiple embedded images including 16x16, 32x32 or 64x64, these thumbnails are derived from the embedded image of the corresponding size. (If no such embedded image is found, prefer the closest size that's larger. If still no such size exists, prefer largest.) If no such size exists, these thumbnails are rescaled to an image whose maximum dimension is 16, 28, 32 or 64.", + "", "", "", "This type of favicon will preserve the size of the original image.", @@ -123990,6 +124854,7 @@ "", "", "", + "", "This refers to a thumbnail that fits in a 1080x1080 box.", "This refers to a thumbnail that fits in a 1600x1600 box and is encoded with high-quality (q=90). Contact amarna-dev@/crt@/bingwang@ for using it.", "This uses the same MaxAreaSizer as THUMBNAIL_TYPE_AREA_50K. The exact area is defined to be 307200 (= 640 x 480).", @@ -124893,7 +125758,7 @@ "type": "object" }, "YoutubeCommentsClusteringMiniStanza": { - "description": "Intended to be simpler to work with than the ExportedStanza it's derived from See documentation: https://g3doc.corp.google.com/company/teams/youtube/community_intelligence/eng_resources/data_sources.md#ministanza Next available: 74", + "description": "Intended to be simpler to work with than the ExportedStanza it's derived from See documentation: https://g3doc.corp.google.com/company/teams/youtube/community_intelligence/eng_resources/data_sources.md#ministanza Next available: 75", "id": "YoutubeCommentsClusteringMiniStanza", "properties": { "ansibleScores": { @@ -125401,6 +126266,10 @@ "$ref": "YoutubeCommentsRankingYouTubeCommentTextQualityAnnotation", "description": "Predicted probability of the comment being flagged based on the text." }, + "textQualityScores2": { + "$ref": "YoutubeCommentsRankingYouTubeCommentTextQualityAnnotation", + "description": "Predicted probability of the comment being flagged based on the text. For testing the new annotation process only." + }, "videoId": { "description": "The video this comment belongs to.", "type": "string" diff --git a/contentwarehouse/v1/contentwarehouse-gen.go b/contentwarehouse/v1/contentwarehouse-gen.go index 0767490449b..65be59635e7 100644 --- a/contentwarehouse/v1/contentwarehouse-gen.go +++ b/contentwarehouse/v1/contentwarehouse-gen.go @@ -3108,6 +3108,7 @@ type AppsPeopleOzExternalMergedpeopleapiAffinity struct { // "VOICE_WEB_AFFINITY" // "SKILLSSTACK_AFFINITY" // "WHOSTORY_AFFINITY" + // "PHOTOS_PARTNER_SHARING_EMAIL_ONLY" AffinityType string `json:"affinityType,omitempty"` // ContainerId: The ID of the container @@ -3961,25 +3962,31 @@ func (s *AppsPeopleOzExternalMergedpeopleapiCommunicationEmail) MarshalJSON() ([ // people-prompts settings and contact-level connection reminders. Part // of go/people-prompts. type AppsPeopleOzExternalMergedpeopleapiConnectionReminder struct { + // ContactPromptSettings: Contains the Contact level settings that will + // affect all reminders. + ContactPromptSettings *SocialGraphApiProtoContactPromptSettings `json:"contactPromptSettings,omitempty"` + Metadata *AppsPeopleOzExternalMergedpeopleapiPersonFieldMetadata `json:"metadata,omitempty"` // Prompt: Contact-level "reminder to connect" prompts for this contact. Prompt []*SocialGraphApiProtoPrompt `json:"prompt,omitempty"` - // ForceSendFields is a list of field names (e.g. "Metadata") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "ContactPromptSettings") 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. "Metadata") 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 is a list of field names (e.g. "ContactPromptSettings") 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:"-"` } @@ -4629,11 +4636,11 @@ func (s *AppsPeopleOzExternalMergedpeopleapiEmail) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// AppsPeopleOzExternalMergedpeopleapiEmailCertificate: Under -// development. Represents a hosted S/MIME certificate config for use -// with Gmail. See //caribou/smime/proto/certificate_status.proto. There -// can be zero or more certificates associated with an email address, be -// it profile email or contact email. +// AppsPeopleOzExternalMergedpeopleapiEmailCertificate: Represents a +// hosted S/MIME certificate config for use with Gmail. See +// //caribou/smime/proto/certificate_status.proto. There can be zero or +// more certificates associated with an email address, be it profile +// email or contact email. type AppsPeopleOzExternalMergedpeopleapiEmailCertificate struct { // ConfigurationName: The name of this certificate configuration. // Examples could be "High security level" or "For domain emails only". @@ -10523,7 +10530,11 @@ func (s *AssistantApiAppCapabilitiesDelta) MarshalJSON() ([]byte, error) { } type AssistantApiAppControlSupport struct { - Enabled bool `json:"enabled,omitempty"` + // Possible values: + // "DEFAULT_DISABLED" - Disable all app control capabilities. + // "ENABLED_WITH_SMART_DICTATION" - Enable app control SD-dependent + // capabilities. + Enabled string `json:"enabled,omitempty"` // ForceSendFields is a list of field names (e.g. "Enabled") to // unconditionally include in API requests. By default, fields with @@ -11123,6 +11134,8 @@ type AssistantApiClientOpPropertiesDeviceModifySettingClientOpProperty struct { // "ACTIVE_EDGE_SENSITIVITY" // "ADAPTIVE_BATTERY" // "ADAPTIVE_BRIGHTNESS" + // "ADAPTIVE_CHARGING" + // "ADAPTIVE_CONNECTIVITY" // "ADD_BLUETOOTH_DEVICE" - Pair a bluetooth device. // "ADD_DEVICE" - Link a device to Assistant/Google Home. // "ADD_FINGERPRINT" @@ -11141,6 +11154,7 @@ type AssistantApiClientOpPropertiesDeviceModifySettingClientOpProperty struct { // "ASSISTANT_LANGUAGE" // "ASSISTANT_VOICE_MATCH" // "AUTO_ROTATE" + // "AUTO_ROTATE_FACE_DETECTION" // "BATTERY_LEVEL" // "BATTERY_LOW" // "BATTERY_PERCENTAGE" @@ -11150,10 +11164,13 @@ type AssistantApiClientOpPropertiesDeviceModifySettingClientOpProperty struct { // "BIOMETRIC" // "BLUETOOTH" // "BRIGHTNESS_LEVEL" + // "BUBBLES" // "CALL_VOLUME" // "CAMERA_DOUBLE_TWIST" // "CAST" // "COLOR_INVERSION" + // "CHARGING_SOUNDS_AND_VIBRATION" + // "CHARGING_STATE" // "CONTACTLESS_PAYMENTS" // "DATA_ROAMING" // "DATA_SAVER" @@ -11165,6 +11182,7 @@ type AssistantApiClientOpPropertiesDeviceModifySettingClientOpProperty struct { // "DISPLAY_SIZE" // "DO_NOT_DISTURB" // "DOUBLE_TAP_CHECK_PHONE" + // "EMERGENCY_ALERTS" // "EMERGENCY_INFORMATION" // "ETHERNET_TETHERING" // "FACTORY_RESET" @@ -11173,14 +11191,22 @@ type AssistantApiClientOpPropertiesDeviceModifySettingClientOpProperty struct { // "FONT_SIZE" // "FREE_UP_SPACE" // "GESTURES" + // "HAPTIC_FEEDBACK_VIBRATION" + // "HEADS_UP" // "HOT_SPOT" // "HOTSPOT_TETHERING" // "HOT_WORD" + // "IMPROVE_LOCATION_ACCURACY" // "JUMP_TO_CAMERA" // "KEYBOARD_SHORTCUTS" // "LIFT_CHECK_PHONE" // "LOCATION" + // "LOCATION_BLUETOOTH_SCANNING" + // "LOCATION_WIFI_SCANNING" // "LOCK_SCREEN" + // "LOCK_SCREEN_DEVICE_CONTROLS" + // "LOCK_SCREEN_WALLET" + // "MAGNIFICATION" // "MAGNIFY_BUTTON" // "MAGNIFY_TRIPLE_TAP" // "MANIFY_BUTTON" @@ -11200,16 +11226,24 @@ type AssistantApiClientOpPropertiesDeviceModifySettingClientOpProperty struct { // "NIGHT_LIGHT_SWITCH" // "NIGHT_MODE" // "NOTIFICATION_BADGE" + // "NOTIFICATION_ON_SCREEN" + // "NOTIFY_FOR_PUBLIC_NETWORKS" + // "ONEHANDED_MODE" // "PASSWORD" // "PERSONALIZATION" // "PICTURE_IN_PICTURE" + // "POINTER_SPEED" // "POWER_MENU" // "REMINDERS" // "REQUIRE_DEVICE_UNLOCK_FOR_NFC" // "RINGTONE" // "RING_VOLUME" + // "SCREEN_LOCKING_SOUND" + // "SCREEN_MAGNIFICATION" // "SCREEN_TIMEOUT" // "SELECT_TO_SPEAK" + // "SET_TIME_AUTOMATICALLY" + // "SET_TIME_ZONE_AUTOMATICALLY" // "SETTINGS" // "SIM" // "SPEECH_RATE" @@ -11217,9 +11251,12 @@ type AssistantApiClientOpPropertiesDeviceModifySettingClientOpProperty struct { // "SWIPE_FOR_NOTIFICATION" // "SWITCH_ACCESS" // "SYSTEM_UPDATE" + // "TALKBACK_PASSWORDS" // "TEXT_TO_SPEECH" // "USB_TETHERING" // "VERBOSE_TTS" + // "VIBRATE" - Corresponds to "Vibration & haptics" toggle in the + // settings app. Reference: http://shortn/_wE1WCid2aM // "VIBRATION_MODE" // "VOICE" // "VOLUME_LEVEL" @@ -11471,7 +11508,7 @@ func (s *AssistantApiContactLookupCapabilities) MarshalJSON() ([]byte, error) { } // AssistantApiCoreTypesAndroidAppInfo: The android app information of -// the provider. Like, Spotify. Next ID: 15 LINT.IfChange +// the provider. Like, Spotify. Next ID: 16 LINT.IfChange type AssistantApiCoreTypesAndroidAppInfo struct { AccountType string `json:"accountType,omitempty"` @@ -11556,6 +11593,10 @@ type AssistantApiCoreTypesAndroidAppInfo struct { // version from which the LauncherApps startShortcut API is available) ShortcutId string `json:"shortcutId,omitempty"` + // TargetClass: The fully qualified target class name of the provider, + // like "com.example.myapp.GetOrderService". + TargetClass string `json:"targetClass,omitempty"` + // VersionName: The android app version name, like "4.1.091.05.40d", // "11.2.7.21.alpha". Android Docs: // https://developer.android.com/reference/android/content/pm/PackageInfo#versionName @@ -13538,8 +13579,8 @@ type AssistantApiCoreTypesSurfaceIdentity struct { // "ASSISTANT_KIT" - AssistantKit (go/assistantkit) is a collection of // iOS libraries allowing first party apps to integrate Google Assistant // features. OWNERS: assistantkit-eng@ - // "ASSISTANT_SDK" - Standalone libassistant speakers, such as Bose - // and Sonos. OWNERS: assistant-speaker-leads@ + // "ASSISTANT_SDK" - Standalone gRPC based client. See go/easi. + // OWNERS: assistant-sdk-service-eng@ // "AUTO" - Automobile. OWNERS: surfaces-infra-core@ // "CAST_OS" - Cast OS (go/opal-castos-docs#what-is-castos). OWNERS: // surfaces-infra-core@ @@ -15036,13 +15077,19 @@ func (s *AssistantApiLocationCapabilities) MarshalJSON() ([]byte, error) { // AssistantApiLoggingOnlyData: Data which is produced for logging and // debugging. Servers MUST NOT use this for any other purposes, such as -// branching on it. +// branching on it. Next ID: 14 type AssistantApiLoggingOnlyData struct { // AcpVersion: A user-readable string describing the ACP version // (go/acp-version) of the client app used by the user to originate the // conversation. AcpVersion string `json:"acpVersion,omitempty"` + // AndroidId: Random identifier assigned to Android mobile devices. + // Older logs may have previously stored other kinds of android IDs in + // this field, but all current logs should use the GServices Id. See + // go/androidids. + AndroidId int64 `json:"androidId,omitempty,string"` + // AppVersion: A user-readable string describing the version of the // client app used by the user to originate the conversation. AppVersion string `json:"appVersion,omitempty"` @@ -19425,7 +19472,7 @@ type AssistantApiSupportedFeatures struct { SignInMethod *AssistantApiSignInMethod `json:"signInMethod,omitempty"` // SleepSensingSupported: Whether the client can monitor sleep. This - // allows us to show sleep CUJ realted information: go/TwilightDesign + // allows us to show sleep CUJ related information: go/TwilightDesign // Use for development only, see the same field in // DeviceCapabilities.SoftwareCapabilities.SelinaCapabilities. SleepSensingSupported bool `json:"sleepSensingSupported,omitempty"` @@ -21627,6 +21674,16 @@ type AssistantLogsAmbiguousTargetDeviceLog struct { // of a device if needed. AmbiguousDeviceIndex []int64 `json:"ambiguousDeviceIndex,omitempty"` + // DevicesAfterPromoters: DeviceInfo for devices after the filters and + // promoters. - When device targeting is only configured for single + // target, these are ambiguous devices that would have been the output + // of Lumos. Downstream may perform extra check before disambiguation + // dialog. For example, Media Initiation checks playability for devices. + // The output here is before the check. - When configured for + // multi-target, these are just the target devices. For privacy + // consideration, we may only log device id field inside. + DevicesAfterPromoters []*AssistantLogsDeviceInfoLog `json:"devicesAfterPromoters,omitempty"` + // FinalTargetDevice: the final targeted device selected by playability // filter or DeviceSelectionDialog FinalTargetDevice *AssistantLogsDeviceInfoLog `json:"finalTargetDevice,omitempty"` @@ -22355,6 +22412,7 @@ type AssistantLogsDeviceInfoLog struct { // "SAME_NAME_DEVICE_PROMOTER" // "PHONE_TARGETING_PROMOTER" // "TRAITS_PROMOTER" + // "DEVICE_TYPE_PROMOTER" EliminatingLumosProcessor string `json:"eliminatingLumosProcessor,omitempty"` IsRemote bool `json:"isRemote,omitempty"` @@ -23098,6 +23156,7 @@ type AssistantLogsLumosProcessorInfo struct { // "SAME_NAME_DEVICE_PROMOTER" // "PHONE_TARGETING_PROMOTER" // "TRAITS_PROMOTER" + // "DEVICE_TYPE_PROMOTER" ProcessorName string `json:"processorName,omitempty"` // ForceSendFields is a list of field names (e.g. "DevicesAfterRun") to @@ -23688,10 +23747,17 @@ func (s *AssistantLogsStructureAnnotationLog) MarshalJSON() ([]byte, error) { // AssistantLogsTargetDeviceLog: Represents the case where the library // successfully selects the target device. It could be one or multiple -// devices. Next ID: 3 +// devices. Next ID: 4 type AssistantLogsTargetDeviceLog struct { Devices []*AssistantLogsDeviceInfoLog `json:"devices,omitempty"` + // Possible values: + // "UNKNOWN_REASON" + // "LOCAL_FALLBACK" + // "STOP_PLAYBACK_ON_PAUSED_PHONE" + // "SINGLE_NEARBY_DEVICE" + LowConfidenceReason string `json:"lowConfidenceReason,omitempty"` + // Possible values: // "UNKNOWN" // "LOW_CONFIDENCE" @@ -23724,7 +23790,7 @@ func (s *AssistantLogsTargetDeviceLog) MarshalJSON() ([]byte, error) { // AssistantPrefulfillmentRankerPrefulfillmentSignals: Signals to be // used by the Prefulfillment Ranker. Derived from the ParsingSignals // and GroundingSignals carried by the FunctionCall. LINT.IfChange Next -// ID: 30 +// ID: 33 type AssistantPrefulfillmentRankerPrefulfillmentSignals struct { // BindingSetAuis: Assistant User Interaction Score for binding set. BindingSetAuis float64 `json:"bindingSetAuis,omitempty"` @@ -23772,6 +23838,12 @@ type AssistantPrefulfillmentRankerPrefulfillmentSignals struct { // aggregated using intent name from exp laelaps. IntentNameAuisScoreExp float64 `json:"intentNameAuisScoreExp,omitempty"` + // KscorerRank: The rank order of the interpretation as determined by + // kscorer. The kscorer-determined dominant interpretation, if any, gets + // a rank of 0. The remaining N interpretations get a rank of 1 through + // N. + KscorerRank int64 `json:"kscorerRank,omitempty"` + // MaskCandidateLevelFeatures: This feature is always false / no-op in // serving time. In training time, this feature may be set true on // specific examples for weighted training where when this signal is @@ -23822,6 +23894,28 @@ type AssistantPrefulfillmentRankerPrefulfillmentSignals struct { // used as a backoff to pq2t_vs_qibst_cosine if it is missing. Pq2tVsIbstCosine float64 `json:"pq2tVsIbstCosine,omitempty"` + // PredictedIntentConfidence: Intent confidence predicted by the + // AssistantVerticalClassifier QRewrite servlet. + PredictedIntentConfidence float64 `json:"predictedIntentConfidence,omitempty"` + + // SearchDispatch: The determination made by the SearchDispatchingConfig + // as to whether and how this interpretation should be dispatched to + // Search. + // + // Possible values: + // "UNKNOWN" + // "NONE" + // "BRIDGE_API" + // "FULFILL_INTENT" + // "EMIT_ONLY" + // "COUNTERFACTUAL_LOG_ONLY" - These rules are no-ops wrt. + // dispatching. The only effect they produce is the logging of the + // associated |counterfactual_events|. + // "CAPACITY_ACCOUNTING" - These rules only consume capacity + // constraints, but are not dispatched. This way the rules can be used + // for the suppression for intents lower in the list. + SearchDispatch string `json:"searchDispatch,omitempty"` + // TopHypothesisConfidence: Average of per-word confidence for top // speech recognition hypothesis. The value is from // RecognizerHypothesisLog: @@ -23875,6 +23969,7 @@ func (s *AssistantPrefulfillmentRankerPrefulfillmentSignals) UnmarshalJSON(data NumVariablesGrounded gensupport.JSONFloat64 `json:"numVariablesGrounded"` Pq2tVsAssistantIbstCosine gensupport.JSONFloat64 `json:"pq2tVsAssistantIbstCosine"` Pq2tVsIbstCosine gensupport.JSONFloat64 `json:"pq2tVsIbstCosine"` + PredictedIntentConfidence gensupport.JSONFloat64 `json:"predictedIntentConfidence"` TopHypothesisConfidence gensupport.JSONFloat64 `json:"topHypothesisConfidence"` VerticalConfidenceScore gensupport.JSONFloat64 `json:"verticalConfidenceScore"` *NoMethod @@ -23899,6 +23994,7 @@ func (s *AssistantPrefulfillmentRankerPrefulfillmentSignals) UnmarshalJSON(data s.NumVariablesGrounded = float64(s1.NumVariablesGrounded) s.Pq2tVsAssistantIbstCosine = float64(s1.Pq2tVsAssistantIbstCosine) s.Pq2tVsIbstCosine = float64(s1.Pq2tVsIbstCosine) + s.PredictedIntentConfidence = float64(s1.PredictedIntentConfidence) s.TopHypothesisConfidence = float64(s1.TopHypothesisConfidence) s.VerticalConfidenceScore = float64(s1.VerticalConfidenceScore) return nil @@ -24763,7 +24859,7 @@ func (s *AssistantVerticalsHomeautomationProtoHomeAutomationDeviceItem) MarshalJ } // AssistantVerticalsHomeautomationProtoHomeAutomationMetaData: Next ID: -// 40 +// 42 type AssistantVerticalsHomeautomationProtoHomeAutomationMetaData struct { // ActionProjectConfigs: Custom actions that this item supports. ActionProjectConfigs []*AssistantVerticalsHomeautomationProtoActionProjectConfig `json:"actionProjectConfigs,omitempty"` @@ -24850,6 +24946,27 @@ type AssistantVerticalsHomeautomationProtoHomeAutomationMetaData struct { // different sync flows (e.g. Newman with a Nest camera). OtherDeviceIds []*AssistantVerticalsHomeautomationProtoAgentDeviceId `json:"otherDeviceIds,omitempty"` + // OtherDeviceSources: Additional device sources. This can be the result + // of the device being merged with other devices with a different + // source. + // + // Possible values: + // "UNKNOWN" + // "CLOUD_SYNC" - Device is created through HA2 SyncDevices flow, are + // HA2 cloud agent devices. ultravox is a cloud agent as well as surface + // device and it's using Sync flow. + // "ASSISTANT_SETTING_OOBE" - Device created through Assistant Setting + // at OOBE time, they're things that are mastered within google + // internally. + // "LOCAL_SYNC" - Device is created through the local device platform + // to HGS sync flow. These devices are not necessarily mastered in a 3P + // cloud - they are locally detected by an assistant device and then + // synced to HGS directly. See go/aogh-dd. + // "CHIP_SYNC" - Device created through local CHIP provision and sync + // up. Chip synced devices can be the same devices as the devices synced + // from cloud, and the sync and de-dup logic can be very complicated. + OtherDeviceSources []string `json:"otherDeviceSources,omitempty"` + // ParentNode: LINT.IfChange(home_graph_single_parent) At the moment, we // just have a single string. In future this will expand with additional // metadata from client or cloud execution data store. In today's 'tree' @@ -24947,6 +25064,12 @@ type AssistantVerticalsHomeautomationProtoHomeAutomationMetaData struct { // device. TargetDeviceSignalStrengths map[string]string `json:"targetDeviceSignalStrengths,omitempty"` + // TdssUpdateTimestamp: The timestamp at which the TDSS map was last + // updated. This information is used to help determine which hub would + // be preferred if multiple hubs report the same reach-ability for a + // device. + TdssUpdateTimestamp string `json:"tdssUpdateTimestamp,omitempty"` + // TraitRoutingHints: For SHED devices, some traits can only be executed // on 3P cloud, e.g. "action.devices.traits.MediaInitiation", // "action.devices.traits.Channel" go/shed-per-trait-routing @@ -27016,7 +27139,6 @@ type CompositeDoc struct { // any serving corpus. // "NOSUBINDEX" // "BASE" - // "CSEINDEX" - Custom Search Engine special purpose corpus. // "CSEINDEX_EXTENDED" - Custom Search Engine extended corpus to catch // all CSE urls not indexed in unified zeppelin or higher tiers. // "DAILY" @@ -27028,8 +27150,6 @@ type CompositeDoc struct { // "LANDFILL3" // "LANDFILL_BLOGSEARCH" - Blogsearch special purpose corpus for // Oscar. - // "LANDFILL_CSE" - Customsearch special purpose corpus (for - // CookieBird). // "LANDFILL_SOCIAL" - Social special purpose corpus for Oscar. // "INSTANT" // "UNIFIED_LANDFILL" - One big landfill index for Union. @@ -27052,6 +27172,7 @@ type CompositeDoc struct { // zeppelin // "ASIANREGIONAL" - Deprecated corpora. // "EMEAREGIONAL" + // "CSEINDEX" // "BASEREGIONAL" // "BLACKHOLE" // "XBASE" @@ -27070,6 +27191,7 @@ type CompositeDoc struct { // "ZEPPELIN_STAGING" // "PULSAR" // "TIMBIT" + // "LANDFILL_CSE" // "UNIFIED_ZEPPELIN" Subindexid []string `json:"subindexid,omitempty"` @@ -27717,9 +27839,10 @@ func (s *CompositeDocPartialUpdateInfoLastFullIndexingInfo) MarshalJSON() ([]byt return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// CompositeDocQualitySignals: This field should hold all new quality -// online signals (after 02/05/10). Quality offline signals, which are -// loaded by Signal API, should be stored in doc_attachments. +// CompositeDocQualitySignals: Note: This is a misleading name as of +// 2022/10/14. The field is still set and has meaningful data, but no +// longer holds quality signals. All the data are freshness-related and +// they're not particularly sensitive. type CompositeDocQualitySignals struct { // LastSignificantUpdate: Contains a date used for the "Date Last // Modified" toolbelt restrict mode. Note: this date is a combined date @@ -34537,22 +34660,23 @@ type GeostoreAddressComponentProto struct { // initially parsed via a feed or other raw input and structured as an // AddressProto, parsed_name should contain the set of names that // corresponds to the (possibly normalized) raw text from the raw input. - // In MapFacts, the address component may be linked to an actual feature - // via feature_id. Any address formatting directly from MapFacts should - // follow links to retrieve names when possible. The parsed_name + // 2. In MapFacts, the address component may be linked to an actual + // feature via feature_id. Any address formatting directly from MapFacts + // should follow links to retrieve names when possible. The parsed_name // contents may be formatted directly if the address component is // unlinked following the same rules as selecting and formatting the // name of a feature. The cached parsed_name is regularly refreshed from // the linked feature with the minimal set of names for address // components (usually just a single, preferred name, in the local - // language). 2. In serving systems, the names of linked features may be - // denormalized into the parsed_name field to facilitate quicker address - // formatting or for simple data filtering (e.g. finding all geocodes in - // California by name). If reading a feature from such a system, the - // parsed_name field could contain multiple names in multiple languages - // that reflect a cached copy of the names associated with the linked - // features. Formatting of such names should follow the same rules as - // selecting and formatting the name of a feature itself. + // language, plus a Latin-script name: go/story-of-ac-names). 3. In + // serving systems, the names of linked features may be denormalized + // into the parsed_name field to facilitate quicker address formatting + // or for simple data filtering (e.g. finding all geocodes in California + // by name). If reading a feature from such a system, the parsed_name + // field could contain multiple names in multiple languages that reflect + // a cached copy of the names associated with the linked features. + // Formatting of such names should follow the same rules as selecting + // and formatting the name of a feature itself. ParsedName []*GeostoreNameProto `json:"parsedName,omitempty"` // Range: Any numerical address component may optionally be specified as @@ -36111,7 +36235,7 @@ type GeostoreDataSourceProto struct { // "PROVIDER_GOOGLE" - ABSTRACT // "PROVIDER_GOOGLE_HAND_EDIT" // "PROVIDER_GOOGLE_BORDERS" - All new "Google" provider entries must - // be full ints. The next available ID is: 0x111730AC + // be full ints. The next available ID is: 0x111730AD // "PROVIDER_GOOGLE_SUBRANGE" - ABSTRACT // "PROVIDER_GOOGLE_GT_FUSION" // "PROVIDER_GOOGLE_ZAGAT_CMS" @@ -36283,6 +36407,7 @@ type GeostoreDataSourceProto struct { // "PROVIDER_GOOGLE_ATTRIBUTES_DISCOVERY" - Shopping Attributes // Discovery // "PROVIDER_GOOGLE_GEO_LDE" + // "PROVIDER_GOOGLE_GEO_SIGNAL_TRACKING" // "PROVIDER_GOOGLE_LOCALSEARCH" - The next new "Google" provider // entries should be placed above. // "PROVIDER_GOOGLE_TRANSIT" - UMBRELLA @@ -36825,7 +36950,9 @@ type GeostoreDataSourceProto struct { // "PROVIDER_GREEN_ACTION_STUDIO" // "PROVIDER_EVINY" // "PROVIDER_MASTERCARD" - // "PROVIDER_VATTENFALL" - Note: Next available value is 0x126C. + // "PROVIDER_VATTENFALL" + // "PROVIDER_VIETGIS" + // "PROVIDER_UNITE" - Note: Next available value is 0x126E. Provider string `json:"provider,omitempty"` // RawMetadata: For every key that is used in raw_data from this source, @@ -40498,7 +40625,7 @@ type GeostoreInternalSourceSummaryProto struct { // "PROVIDER_GOOGLE" - ABSTRACT // "PROVIDER_GOOGLE_HAND_EDIT" // "PROVIDER_GOOGLE_BORDERS" - All new "Google" provider entries must - // be full ints. The next available ID is: 0x111730AC + // be full ints. The next available ID is: 0x111730AD // "PROVIDER_GOOGLE_SUBRANGE" - ABSTRACT // "PROVIDER_GOOGLE_GT_FUSION" // "PROVIDER_GOOGLE_ZAGAT_CMS" @@ -40670,6 +40797,7 @@ type GeostoreInternalSourceSummaryProto struct { // "PROVIDER_GOOGLE_ATTRIBUTES_DISCOVERY" - Shopping Attributes // Discovery // "PROVIDER_GOOGLE_GEO_LDE" + // "PROVIDER_GOOGLE_GEO_SIGNAL_TRACKING" // "PROVIDER_GOOGLE_LOCALSEARCH" - The next new "Google" provider // entries should be placed above. // "PROVIDER_GOOGLE_TRANSIT" - UMBRELLA @@ -41212,7 +41340,9 @@ type GeostoreInternalSourceSummaryProto struct { // "PROVIDER_GREEN_ACTION_STUDIO" // "PROVIDER_EVINY" // "PROVIDER_MASTERCARD" - // "PROVIDER_VATTENFALL" - Note: Next available value is 0x126C. + // "PROVIDER_VATTENFALL" + // "PROVIDER_VIETGIS" + // "PROVIDER_UNITE" - Note: Next available value is 0x126E. Provider string `json:"provider,omitempty"` // ForceSendFields is a list of field names (e.g. "Dataset") to @@ -42657,7 +42787,7 @@ type GeostoreOntologyRawGConceptInstanceProto struct { // "PROVIDER_GOOGLE" - ABSTRACT // "PROVIDER_GOOGLE_HAND_EDIT" // "PROVIDER_GOOGLE_BORDERS" - All new "Google" provider entries must - // be full ints. The next available ID is: 0x111730AC + // be full ints. The next available ID is: 0x111730AD // "PROVIDER_GOOGLE_SUBRANGE" - ABSTRACT // "PROVIDER_GOOGLE_GT_FUSION" // "PROVIDER_GOOGLE_ZAGAT_CMS" @@ -42829,6 +42959,7 @@ type GeostoreOntologyRawGConceptInstanceProto struct { // "PROVIDER_GOOGLE_ATTRIBUTES_DISCOVERY" - Shopping Attributes // Discovery // "PROVIDER_GOOGLE_GEO_LDE" + // "PROVIDER_GOOGLE_GEO_SIGNAL_TRACKING" // "PROVIDER_GOOGLE_LOCALSEARCH" - The next new "Google" provider // entries should be placed above. // "PROVIDER_GOOGLE_TRANSIT" - UMBRELLA @@ -43371,7 +43502,9 @@ type GeostoreOntologyRawGConceptInstanceProto struct { // "PROVIDER_GREEN_ACTION_STUDIO" // "PROVIDER_EVINY" // "PROVIDER_MASTERCARD" - // "PROVIDER_VATTENFALL" - Note: Next available value is 0x126C. + // "PROVIDER_VATTENFALL" + // "PROVIDER_VIETGIS" + // "PROVIDER_UNITE" - Note: Next available value is 0x126E. Provider string `json:"provider,omitempty"` SourceDataset string `json:"sourceDataset,omitempty"` @@ -45112,7 +45245,7 @@ type GeostoreProvenanceProto struct { // "PROVIDER_GOOGLE" - ABSTRACT // "PROVIDER_GOOGLE_HAND_EDIT" // "PROVIDER_GOOGLE_BORDERS" - All new "Google" provider entries must - // be full ints. The next available ID is: 0x111730AC + // be full ints. The next available ID is: 0x111730AD // "PROVIDER_GOOGLE_SUBRANGE" - ABSTRACT // "PROVIDER_GOOGLE_GT_FUSION" // "PROVIDER_GOOGLE_ZAGAT_CMS" @@ -45284,6 +45417,7 @@ type GeostoreProvenanceProto struct { // "PROVIDER_GOOGLE_ATTRIBUTES_DISCOVERY" - Shopping Attributes // Discovery // "PROVIDER_GOOGLE_GEO_LDE" + // "PROVIDER_GOOGLE_GEO_SIGNAL_TRACKING" // "PROVIDER_GOOGLE_LOCALSEARCH" - The next new "Google" provider // entries should be placed above. // "PROVIDER_GOOGLE_TRANSIT" - UMBRELLA @@ -45826,7 +45960,9 @@ type GeostoreProvenanceProto struct { // "PROVIDER_GREEN_ACTION_STUDIO" // "PROVIDER_EVINY" // "PROVIDER_MASTERCARD" - // "PROVIDER_VATTENFALL" - Note: Next available value is 0x126C. + // "PROVIDER_VATTENFALL" + // "PROVIDER_VIETGIS" + // "PROVIDER_UNITE" - Note: Next available value is 0x126E. Provider string `json:"provider,omitempty"` // ForceSendFields is a list of field names (e.g. "Dataset") to @@ -53390,6 +53526,16 @@ type GoogleCloudContentwarehouseV1Document struct { // including OCR. CloudAiDocument *GoogleCloudDocumentaiV1Document `json:"cloudAiDocument,omitempty"` + // ContentCategory: Indicates the category (image, audio, video etc.) of + // the original content. + // + // Possible values: + // "CONTENT_CATEGORY_UNSPECIFIED" - No category is specified. + // "CONTENT_CATEGORY_IMAGE" - Content is of image type. + // "CONTENT_CATEGORY_AUDIO" - Content is of audio type. + // "CONTENT_CATEGORY_VIDEO" - Content is of video type. + ContentCategory string `json:"contentCategory,omitempty"` + // CreateTime: Output only. The time when the document is created. CreateTime string `json:"createTime,omitempty"` @@ -55410,6 +55556,17 @@ type GoogleCloudContentwarehouseV1SearchDocumentsRequest struct { // calls (keep the total count locally). Defaults to false. RequireTotalSize bool `json:"requireTotalSize,omitempty"` + // TotalResultSize: Optional. Controls if the search document request + // requires the return of a total size of matched documents. See + // SearchDocumentsResponse.total_size. + // + // Possible values: + // "TOTAL_RESULT_SIZE_UNSPECIFIED" - Total number calculation will be + // skipped. + // "ESTIMATED_SIZE" - Estimate total number. + // "ACTUAL_SIZE" - It may adversely impact performance. + TotalResultSize string `json:"totalResultSize,omitempty"` + // ForceSendFields is a list of field names (e.g. "DocumentQuery") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -55958,8 +56115,8 @@ type GoogleCloudContentwarehouseV1UpdateOptions struct { // Possible values: // "UPDATE_TYPE_UNSPECIFIED" - Defaults to full replace behavior, ie. // FULL_REPLACE. - // "UPDATE_TYPE_REPLACE" - Fully replace all the fields. Any field - // masks will be ignored. + // "UPDATE_TYPE_REPLACE" - Fully replace all the fields (including + // previously linked raw document). Any field masks will be ignored. // "UPDATE_TYPE_MERGE" - Merge the fields into the existing entities. // "UPDATE_TYPE_INSERT_PROPERTIES_BY_NAMES" - Inserts the properties // by names. @@ -58523,38 +58680,6 @@ func (s *GoogleInternalAppsWaldoV1alphaInMeeting) MarshalJSON() ([]byte, error) // GoogleInternalAppsWaldoV1alphaInactive: The status indicating that no // other status applies. type GoogleInternalAppsWaldoV1alphaInactive struct { - // NextCommitmentStatus: The status type of the next change which is - // considered a commitment. The status will be an empty instance of the - // corresponding type, no additional data will be provided. - NextCommitmentStatus *GoogleInternalAppsWaldoV1alphaUserStatus `json:"nextCommitmentStatus,omitempty"` - - // NextCommitmentTime: The time when the user will start having a status - // of InMeeting, DoNotDisturb or short OutOfOffice. - NextCommitmentTime string `json:"nextCommitmentTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "NextCommitmentStatus") 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. "NextCommitmentStatus") 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 *GoogleInternalAppsWaldoV1alphaInactive) MarshalJSON() ([]byte, error) { - type NoMethod GoogleInternalAppsWaldoV1alphaInactive - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // GoogleInternalAppsWaldoV1alphaLocalTimeContext: Context which helps @@ -58638,6 +58763,18 @@ type GoogleInternalAppsWaldoV1alphaOutOfOffice struct { // then the user is outside working hours. ComeBackTime string `json:"comeBackTime,omitempty"` + // CommittedUntil: The time when the user will stop being committed, + // i.e., when their status will be neither of InMeeting, DoNotDisturb or + // OutOfOffice < Xh. Note that if this OOO block is large (>Xh), + // committed_until will be the end of this block, not including any + // meetings or focus time following it. + CommittedUntil string `json:"committedUntil,omitempty"` + + // CommittedUntilIsMixed: Whether the status of the user until + // committed_until has more than one status type (e.g. DoNotDisturb + + // InMeeting). + CommittedUntilIsMixed bool `json:"committedUntilIsMixed,omitempty"` + // EventSummary: The summary of the corresponding OOO block in Calendar. // This is entered by the user, so we return it "as is" - no i18n. EventSummary string `json:"eventSummary,omitempty"` @@ -58729,6 +58866,43 @@ func (s *GoogleInternalAppsWaldoV1alphaTimeRange) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type GoogleInternalAppsWaldoV1alphaUpcomingCommitmentContext struct { + // NextCommitmentStatus: The status type of the commitment above. The + // status will be an empty instance of the corresponding type, no + // additional data will be provided. + NextCommitmentStatus *GoogleInternalAppsWaldoV1alphaUserStatus `json:"nextCommitmentStatus,omitempty"` + + // NextCommitmentTime: The most relevant upcoming commitment (InMeeting, + // DoNotDisturb or OutOfOffice). In most cases this will be the next + // closest commitment event, but if there is a large OOO in less than + // 24h it will take precedence over earlier events. + NextCommitmentTime string `json:"nextCommitmentTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "NextCommitmentStatus") 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. "NextCommitmentStatus") 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 *GoogleInternalAppsWaldoV1alphaUpcomingCommitmentContext) MarshalJSON() ([]byte, error) { + type NoMethod GoogleInternalAppsWaldoV1alphaUpcomingCommitmentContext + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleInternalAppsWaldoV1alphaUpcomingOooContext: The context // indicating the user's upcoming Out of Office event. type GoogleInternalAppsWaldoV1alphaUpcomingOooContext struct { @@ -58884,6 +59058,9 @@ type GoogleInternalAppsWaldoV1alphaUserContext struct { // their current time zone. LocalTime *GoogleInternalAppsWaldoV1alphaLocalTimeContext `json:"localTime,omitempty"` + // UpcomingCommitmentContext: Information about upcoming events. + UpcomingCommitmentContext *GoogleInternalAppsWaldoV1alphaUpcomingCommitmentContext `json:"upcomingCommitmentContext,omitempty"` + // UpcomingOoo: Set if user has upcoming OOO. UpcomingOoo *GoogleInternalAppsWaldoV1alphaUpcomingOooContext `json:"upcomingOoo,omitempty"` @@ -62431,7 +62608,8 @@ type ImageBaseThumbnailMetadata struct { // corresponding size. (If no such embedded image is found, prefer the // closest size that's larger. If still no such size exists, prefer // largest.) If no such size exists, these thumbnails are rescaled to an - // image whose maximum dimension is 16, 32 or 64. + // image whose maximum dimension is 16, 28, 32 or 64. + // "THUMBNAIL_TYPE_FAVICON_28" // "THUMBNAIL_TYPE_FAVICON_32" // "THUMBNAIL_TYPE_FAVICON_64" // "THUMBNAIL_TYPE_FAVICON_ORIGINAL" - This type of favicon will @@ -62439,6 +62617,7 @@ type ImageBaseThumbnailMetadata struct { // "THUMBNAIL_TYPE_FAVICON_16_DARK" - These refer to favicon // thumbnails for dark mode. This triggers dark mode on the SVG decoding // (and otherwise, the same as the above favicon types) + // "THUMBNAIL_TYPE_FAVICON_28_DARK" // "THUMBNAIL_TYPE_FAVICON_32_DARK" // "THUMBNAIL_TYPE_FAVICON_64_DARK" // "THUMBNAIL_TYPE_FAVICON_ORIGINAL_DARK" @@ -62867,7 +63046,7 @@ func (s *ImageContentStarburstVersionGroup) MarshalJSON() ([]byte, error) { // ImageData: This defines the per-doc data which is extracted from // thumbnails and propagated over to indexing. It contains all -// information that can be used for restricts. Next tag id: 127 +// information that can be used for restricts. Next tag id: 128 type ImageData struct { // AdaboostImageFeaturePorn: Warning: adaboost_image_feature_porn* and // imageFeaturePorn fields are DEPRECATED in favor of brain_porn_scores. @@ -62948,6 +63127,9 @@ type ImageData struct { // go/creatism/deepcrop for details. DeepCrop *DeepCropIndexing `json:"deepCrop,omitempty"` + // DeepImageEngagingness: Productionized Deep Image Engagingness score. + DeepImageEngagingness *ImageRepositoryDeepImageEngagingnessOutput `json:"deepImageEngagingness,omitempty"` + // DeepTags: VSS generated deep tags for shopping images. DeepTags *CommerceDatastoreImageDeepTags `json:"deepTags,omitempty"` @@ -63458,7 +63640,8 @@ type ImageDataThumbnail struct { // corresponding size. (If no such embedded image is found, prefer the // closest size that's larger. If still no such size exists, prefer // largest.) If no such size exists, these thumbnails are rescaled to an - // image whose maximum dimension is 16, 32 or 64. + // image whose maximum dimension is 16, 28, 32 or 64. + // "THUMBNAIL_TYPE_FAVICON_28" // "THUMBNAIL_TYPE_FAVICON_32" // "THUMBNAIL_TYPE_FAVICON_64" // "THUMBNAIL_TYPE_FAVICON_ORIGINAL" - This type of favicon will @@ -63466,6 +63649,7 @@ type ImageDataThumbnail struct { // "THUMBNAIL_TYPE_FAVICON_16_DARK" - These refer to favicon // thumbnails for dark mode. This triggers dark mode on the SVG decoding // (and otherwise, the same as the above favicon types) + // "THUMBNAIL_TYPE_FAVICON_28_DARK" // "THUMBNAIL_TYPE_FAVICON_32_DARK" // "THUMBNAIL_TYPE_FAVICON_64_DARK" // "THUMBNAIL_TYPE_FAVICON_ORIGINAL_DARK" @@ -65318,6 +65502,47 @@ func (s *ImageRepositoryCrawlStatusInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type ImageRepositoryDeepImageEngagingnessOutput struct { + // Score: DeepImageEngagingness score. + Score float64 `json:"score,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Score") 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. "Score") 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 *ImageRepositoryDeepImageEngagingnessOutput) MarshalJSON() ([]byte, error) { + type NoMethod ImageRepositoryDeepImageEngagingnessOutput + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *ImageRepositoryDeepImageEngagingnessOutput) UnmarshalJSON(data []byte) error { + type NoMethod ImageRepositoryDeepImageEngagingnessOutput + 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 +} + // ImageRepositoryFileTruncationInfo: Describes our knowledge about // whether a stored file is truncated with respect to its original file // online. @@ -66007,14 +66232,22 @@ func (s *ImageRepositorySpeechRecognitionResult) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ImageRepositoryUnwantedContent: To indicate whether the image is to -// be deleted from the repository due to legal reasons. +// ImageRepositoryUnwantedContent: To indicate whether the image or +// video is to be deleted from the repository due to legal reasons or +// hidden from search results. type ImageRepositoryUnwantedContent struct { // Possible values: // "OTHER" // "CP" - abusive images involving children. DeletionReason string `json:"deletionReason,omitempty"` + // Possible values: + // "UNKNOWN" + // "NCEI" - NCEI stands for 'non-consensual explicit imagery', aka + // 'revenge porn'. However in this case the name is misleading as it + // actually only applies for videos. + HideReason string `json:"hideReason,omitempty"` + // ForceSendFields is a list of field names (e.g. "DeletionReason") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -75299,7 +75532,7 @@ func (s *KnowledgeAnswersIntentQueryOnDeviceAnnotationSignals) MarshalJSON() ([] // that they need to propagate down stream from AQUA. Note that this // proto is not the same as the Superroot proto ParsingSignals // (http://google3/knowledge/proto/scoring-signals.proto), which is a -// Superroot-specific signal used in Scoring. Next ID: 4 +// Superroot-specific signal used in Scoring. Next ID: 5 type KnowledgeAnswersIntentQueryParsingSignals struct { // CalibratedParsingScore: A parsing score that is independently // calibrated by each parser/IG, used by pre-fulfillment ranker, see @@ -75312,6 +75545,12 @@ type KnowledgeAnswersIntentQueryParsingSignals struct { // "FuzzyMatcher"). QrewriteCallPathInfo *NlpLoggingQRewriteClientCallPathInfo `json:"qrewriteCallPathInfo,omitempty"` + // QrewriteCallPathInfoFingerprint: This proto holds the fingerprint of + // the call path info of QRewrite client (e.g. the QUS's phase like + // "RBT","QBT"; the QUS's candidate type like "Identity"; and the ACE's + // candidate type like "FuzzyMatcher"). + QrewriteCallPathInfoFingerprint uint64 `json:"qrewriteCallPathInfoFingerprint,omitempty,string"` + // Source: The parser that calibrated the parsing score below. // // Possible values: @@ -77718,7 +77957,7 @@ func (s *KnowledgeAnswersUnionType) MarshalJSON() ([]byte, error) { // string_type present in a ValueType field of a Slot means that the // Slot can take _either_ an an EntityType _or_ StringType as a value, // and nothing else. It may be helpful to think of this proto as being -// called something like AllAllowedValueTypes. Next tag id: 24 +// called something like AllAllowedValueTypes. Next tag id: 25 // LINT.IfChange type KnowledgeAnswersValueType struct { // AnyType: This type is meant to accept "any" type and allow any and @@ -77750,6 +77989,20 @@ type KnowledgeAnswersValueType struct { EntityType *KnowledgeAnswersEntityType `json:"entityType,omitempty"` + // InputCompositionConfig: When specified on a slot's type, restricts + // composition based on the enum value. This does not mean anything when + // the value type is to be interpreted as an output_type. + // + // Possible values: + // "UNSPECIFIED_COMPOSITION" - An unspecified value is required by + // enum best practices. It will not be used anywhere as the default is + // ALL_COMPOSITION. + // "ALL_COMPOSITION" + // "PRIMITIVES_ONLY_COMPOSITION" + // "PRIMITIVES_AND_OPERATORS_OF_PRIMITIVES_COMPOSITION" - To handle + // cases where we have a Group of entities + InputCompositionConfig string `json:"inputCompositionConfig,omitempty"` + MeasurementType *KnowledgeAnswersMeasurementType `json:"measurementType,omitempty"` // NormalizedStringType: Note that normalized_string_type is NOT @@ -78271,6 +78524,9 @@ type KnowledgeVerticalsWeatherProtoUserSpecifiedLocation struct { // formatted address of "feature_id". LocationName string `json:"locationName,omitempty"` + // Mid: MID corresponding to the location from feature_id. + Mid string `json:"mid,omitempty"` + // Timezone: The timezone to display the current conditions observation // time. Optional and will override the timezone of "feature_id". Timezone string `json:"timezone,omitempty"` @@ -80557,7 +80813,7 @@ func (s *MajelContactInformationShortcutInformation) MarshalJSON() ([]byte, erro // about a special word. If you add another flag please add it to the // special words implemenation in // google3/maps/quality/internal/special_words.cc. -- Next available id: -// 20 -- +// 21 -- type MapsQualitySpecialWordsFlags struct { // IsCommonWord: Common words E.g.: center, park, etc. IsCommonWord bool `json:"isCommonWord,omitempty"` @@ -80569,6 +80825,10 @@ type MapsQualitySpecialWordsFlags struct { // IsDirectionalModifier: Directional modifier. E.g.: north, south, etc. IsDirectionalModifier bool `json:"isDirectionalModifier,omitempty"` + // IsDistanceMarker: An affix that indicates distance marker on a route, + // e.g., 'km'. + IsDistanceMarker bool `json:"isDistanceMarker,omitempty"` + // IsForbiddenWord: Whether geo paths are forbidden to contain this // word. IsForbiddenWord bool `json:"isForbiddenWord,omitempty"` @@ -81597,9 +81857,18 @@ type MustangReposWwwSnippetsSnippetsRanklabFeatures struct { // generated. Candidates []*MustangReposWwwSnippetsSnippetCandidate `json:"candidates,omitempty"` + // DisplaySnippet: Snippet features for the final chosen snippet. This + // field is firstly populated by Muppet, and then overwriten by + // Superroot if SnippetBrain is triggered. + DisplaySnippet *QualityPreviewRanklabSnippet `json:"displaySnippet,omitempty"` + // DocumentLanguage: locale of the document. DocumentLanguage string `json:"documentLanguage,omitempty"` + // OriginalQueryTermCoverages: Original query term coverage in titles + // and / or snippets. + OriginalQueryTermCoverages *QualityPreviewSnippetQueryTermCoverageFeatures `json:"originalQueryTermCoverages,omitempty"` + // QueryLanguage: locale of the query, QueryLanguage string `json:"queryLanguage,omitempty"` @@ -81609,9 +81878,8 @@ type MustangReposWwwSnippetsSnippetsRanklabFeatures struct { // SnippetQueryTermCoverage: Query term coverage in snippets. SnippetQueryTermCoverage float64 `json:"snippetQueryTermCoverage,omitempty"` - // Snippets: Snippet features for ranklab models, generated only by - // snippets scorer v2. In production, only the data for chosen snippet - // will be recorded. + // Snippets: Snippet features for Muppet snippet candidates. In + // production, only the data for chosen snippet will be recorded. Snippets []*QualityPreviewRanklabSnippet `json:"snippets,omitempty"` // TitleDataSourceType: Title data source. @@ -88231,7 +88499,7 @@ func (s *NlpSemanticParsingLocalLocalResultId) MarshalJSON() ([]byte, error) { // Mountain View". - Vicinity location: indicates an area around a // certain location. The area can be defined by time or space. E.g., // "within 1 hour of Palo Alto", "10 blocks from Union Square", "a few -// miles from here". Next ID: 14 +// miles from here". Next ID: 14 LINT.IfChange() type NlpSemanticParsingLocalLocation struct { // BasicLocation: Exactly one of the location types should be populated. BasicLocation *NlpSemanticParsingLocalBasicLocation `json:"basicLocation,omitempty"` @@ -88414,7 +88682,7 @@ func (s *NlpSemanticParsingLocalLocationConstraint) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NlpSemanticParsingLocalLocationElement: Next ID: 26 +// NlpSemanticParsingLocalLocationElement: Next ID: 26 LINT.IfChange type NlpSemanticParsingLocalLocationElement struct { // AliasIcon: For elements with a NICKNAME alias location, this field // will hold all matching alias icons, which are used in search to @@ -97792,7 +98060,7 @@ func (s *PeoplestackFlexorgsProtoInternalExternalStateStatus) MarshalJSON() ([]b // fo} for protocols used during search and/or docinfo. Next available // tag deprecated, use this (and look for commented out fields): // blaze-bin/net/proto_compiler/protocol-compiler --freetags \ -// indexer/perdocdata/perdocdata.proto Next tag: 217 +// indexer/perdocdata/perdocdata.proto Next tag: 218 type PerDocData struct { BlogData *BlogPerDocData `json:"BlogData,omitempty"` @@ -98236,6 +98504,10 @@ type PerDocData struct { // on muppet side. SpamMuppetSignals *SpamMuppetjoinsMuppetSignals `json:"spamMuppetSignals,omitempty"` + // SpambrainTotalDocSpamScore: The document total spam score identified + // by spambrain, going from 0 to 1. + SpambrainTotalDocSpamScore float64 `json:"spambrainTotalDocSpamScore,omitempty"` + // Spamrank: The spamrank measures the likelihood that this document // links to known spammers. Its value is between 0 and 65535. Spamrank int64 `json:"spamrank,omitempty"` @@ -98369,6 +98641,7 @@ func (s *PerDocData) UnmarshalJSON(data []byte) error { Pagerank0 gensupport.JSONFloat64 `json:"pagerank0"` Pagerank1 gensupport.JSONFloat64 `json:"pagerank1"` Pagerank2 gensupport.JSONFloat64 `json:"pagerank2"` + SpambrainTotalDocSpamScore gensupport.JSONFloat64 `json:"spambrainTotalDocSpamScore"` SpamtokensContentScore gensupport.JSONFloat64 `json:"spamtokensContentScore"` TopPetacatWeight gensupport.JSONFloat64 `json:"topPetacatWeight"` *NoMethod @@ -98385,6 +98658,7 @@ func (s *PerDocData) UnmarshalJSON(data []byte) error { s.Pagerank0 = float64(s1.Pagerank0) s.Pagerank1 = float64(s1.Pagerank1) s.Pagerank2 = float64(s1.Pagerank2) + s.SpambrainTotalDocSpamScore = float64(s1.SpambrainTotalDocSpamScore) s.SpamtokensContentScore = float64(s1.SpamtokensContentScore) s.TopPetacatWeight = float64(s1.TopPetacatWeight) return nil @@ -100905,16 +101179,6 @@ func (s *PhotosVisionObjectrecROI) MarshalJSON() ([]byte, error) { // flag for a url. and an optional image score. Next available tag id: // 51. type PornFlagData struct { - // AdaboostContentScore: Content score - computed on the image pixel - // data only. Additionally, we store a version and minor version number - // of the model which was used to compute this score. Note: these fields - // are copies of adaboost_image_feature_porn* in ImageData. - AdaboostContentScore float64 `json:"adaboostContentScore,omitempty"` - - AdaboostContentScoreMinorVersion int64 `json:"adaboostContentScoreMinorVersion,omitempty"` - - AdaboostContentScoreVersion int64 `json:"adaboostContentScoreVersion,omitempty"` - // CoclickBrainScores: Aggregated brain_porn_scores for navboost // co-clicked images. Historical: this signal is deprecated and no // longer populated as of 2020-12-01. Refer to b/172897542 for more @@ -100943,25 +101207,12 @@ type PornFlagData struct { // SafeSearch classifier used to compute final_violence_score. FinalViolenceScoreVersion string `json:"finalViolenceScoreVersion,omitempty"` - // ImageStats: PornStatsImage is repeated even though we use only a - // single version, to help with rolling out new versions with miminum - // risk. Multiple versions should exist only for a short window of time. - // Once the new version is rolled out, the data for older versions - // should no longer be generated. - ImageStats []*PornStatsImage `json:"imageStats,omitempty"` - // InternalSignals: A proto that stores SafeSearch internal signals that // are not exported to clients. SafeSearch team does not provide any // guarantees about the presence or the semantics of these signals in // the future. InternalSignals *SafesearchInternalImageSignals `json:"internalSignals,omitempty"` - // LargestFaceFrac: largest face, scaled by 1000 This field is same as - // ImageData.largest_face_frac. - LargestFaceFrac float64 `json:"largestFaceFrac,omitempty"` - - LargestFaceFraction int64 `json:"largestFaceFraction,omitempty"` - // NumberFaces: number of faces NumberFaces int64 `json:"numberFaces,omitempty"` @@ -100976,10 +101227,6 @@ type PornFlagData struct { // symbols in the image (currently swastika and Nazi yellow badge). OffensiveSymbolDetection *ImageSafesearchContentOffensiveSymbolDetection `json:"offensiveSymbolDetection,omitempty"` - // OverallPornScore: Overall porn score that determines the porn - // restricts used during image search retrieval. - OverallPornScore float64 `json:"overallPornScore,omitempty"` - // PhotodnaHash: Binary version of the PhotoDNA hash (144 bytes long). // If not set (has_photodna_hash() == false) it means that it was not // computed, if empty (has_photodna_hash() == true && photodna_hash() == @@ -100993,14 +101240,6 @@ type PornFlagData struct { // might be demoted for non-porn queries when SafeSearch is Off. PornWithHighConfidence bool `json:"pornWithHighConfidence,omitempty"` - // PropAnyPornFlag: OR of the prop_porn_flag and prop_softporn_flag. - PropAnyPornFlag bool `json:"propAnyPornFlag,omitempty"` - - // PropPornFlag: Text classifier properties for the referrer page. - PropPornFlag bool `json:"propPornFlag,omitempty"` - - PropSoftpornFlag bool `json:"propSoftpornFlag,omitempty"` - // QbstOffensiveScore: QBST-based image offensive score, Navboost based QbstOffensiveScore float64 `json:"qbstOffensiveScore,omitempty"` @@ -101027,13 +101266,6 @@ type PornFlagData struct { // sexualization level of the image. SemanticSexualizationScore float64 `json:"semanticSexualizationScore,omitempty"` - // TextStats: PornStatsText is repeated even though we use only a single - // version, to help with rolling out new versions with miminum risk. - // Multiple versions should exist only for a short window of time. Once - // the new version is rolled out, the data for older versions should no - // longer be generated. - TextStats []*PornStatsText `json:"textStats,omitempty"` - // Url: url of the image Url string `json:"url,omitempty"` @@ -101041,16 +101273,15 @@ type PornFlagData struct { // associated with this image. UrlPornScores *ClassifierPornAggregatedUrlPornScores `json:"urlPornScores,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "AdaboostContentScore") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields is a list of field names (e.g. "CoclickBrainScores") + // 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. "AdaboostContentScore") to + // NullFields is a list of field names (e.g. "CoclickBrainScores") 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 @@ -101069,13 +101300,10 @@ func (s *PornFlagData) MarshalJSON() ([]byte, error) { func (s *PornFlagData) UnmarshalJSON(data []byte) error { type NoMethod PornFlagData var s1 struct { - AdaboostContentScore gensupport.JSONFloat64 `json:"adaboostContentScore"` CsaiScore gensupport.JSONFloat64 `json:"csaiScore"` FinalOffensiveScore gensupport.JSONFloat64 `json:"finalOffensiveScore"` FinalViolenceScore gensupport.JSONFloat64 `json:"finalViolenceScore"` - LargestFaceFrac gensupport.JSONFloat64 `json:"largestFaceFrac"` OcrVulgarScore gensupport.JSONFloat64 `json:"ocrVulgarScore"` - OverallPornScore gensupport.JSONFloat64 `json:"overallPornScore"` QbstOffensiveScore gensupport.JSONFloat64 `json:"qbstOffensiveScore"` QbstSpoofScore gensupport.JSONFloat64 `json:"qbstSpoofScore"` QueryTextViolenceScore gensupport.JSONFloat64 `json:"queryTextViolenceScore"` @@ -101086,13 +101314,10 @@ func (s *PornFlagData) UnmarshalJSON(data []byte) error { if err := json.Unmarshal(data, &s1); err != nil { return err } - s.AdaboostContentScore = float64(s1.AdaboostContentScore) s.CsaiScore = float64(s1.CsaiScore) s.FinalOffensiveScore = float64(s1.FinalOffensiveScore) s.FinalViolenceScore = float64(s1.FinalViolenceScore) - s.LargestFaceFrac = float64(s1.LargestFaceFrac) s.OcrVulgarScore = float64(s1.OcrVulgarScore) - s.OverallPornScore = float64(s1.OverallPornScore) s.QbstOffensiveScore = float64(s1.QbstOffensiveScore) s.QbstSpoofScore = float64(s1.QbstSpoofScore) s.QueryTextViolenceScore = float64(s1.QueryTextViolenceScore) @@ -101100,78 +101325,6 @@ func (s *PornFlagData) UnmarshalJSON(data []byte) error { return nil } -// PornStatsImage: Site aggregated image content signals are captured in -// this protocol buffer. This is versioned. Not all fields are present -// in each version. It is important to document all the fields that are -// used in each version here. -type PornStatsImage struct { - // ImageCount: image content score data - ImageCount uint64 `json:"imageCount,omitempty,string"` - - SiteKey string `json:"siteKey,omitempty"` - - Version uint64 `json:"version,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ImageCount") 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. "ImageCount") 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 *PornStatsImage) MarshalJSON() ([]byte, error) { - type NoMethod PornStatsImage - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PornStatsText: Site aggregated text signals are captured in this -// protocol buffer. This is versioned. Not all fields are present in -// each version. It is important to document all the fields that are -// used in each version here. -type PornStatsText struct { - AnyPornPageCount uint64 `json:"anyPornPageCount,omitempty,string"` - - PageCount uint64 `json:"pageCount,omitempty,string"` - - SiteKey string `json:"siteKey,omitempty"` - - Version uint64 `json:"version,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "AnyPornPageCount") 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. "AnyPornPageCount") 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 *PornStatsText) MarshalJSON() ([]byte, error) { - type NoMethod PornStatsText - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // PostalAddress: Next free ID: 32 type PostalAddress struct { // AddressLine: These correspond to the "AddressLine" elements in xAL, @@ -102165,7 +102318,7 @@ func (s *QualityActionsNewsProviderAnnotationDataProvider) UnmarshalJSON(data [] return nil } -// QualityActionsReminder: Next id: 30 +// QualityActionsReminder: Next id: 32 type QualityActionsReminder struct { // Archived: OPTIONAL. True if the reminder is archived. Not present // implies false. @@ -102743,6 +102896,10 @@ type QualityActionsReminder struct { // Description: OPTIONAL. Full-length description of the reminder. Description string `json:"description,omitempty"` + DocumentAssignmentSource *QualityActionsReminderDocument `json:"documentAssignmentSource,omitempty"` + + DynamiteGroupAssignmentSource *QualityActionsReminderDynamiteGroup `json:"dynamiteGroupAssignmentSource,omitempty"` + // Id: DEPRECATED. Use `client_id` or `server_id` instead. Id string `json:"id,omitempty"` @@ -102821,6 +102978,20 @@ func (s *QualityActionsReminder) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// QualityActionsReminderDocument: Message representing a Document (i.e. +// Google Docs, Sheets, Slides) This is currently only used to indicate +// the existence of said document and can be later extended to include +// more document information as needed. +type QualityActionsReminderDocument struct { +} + +// QualityActionsReminderDynamiteGroup: Message representing a Dynamite +// Group (AKA Google Chat space) This is currently only used to indicate +// the existence of said group and can be later extended to include more +// group information as needed. +type QualityActionsReminderDynamiteGroup struct { +} + // QualityActionsReminderLocation: A representation of // reminder-triggering locations. They may be specific, resolved // locations, non-specific location groups, or personal aliases. Next @@ -103344,6 +103515,203 @@ func (s *QualityCalypsoAppsLink) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// QualityCalypsoAppsUniversalAuLiveOpDetail: Contains the needed +// information for serving a single LiveOp/LiveEvent on AU. Next ID: 9 +type QualityCalypsoAppsUniversalAuLiveOpDetail struct { + // CountryLevelScheduleInformation: Key is country, and value is the + // schedule information in that country. + CountryLevelScheduleInformation map[string]QualityCalypsoAppsUniversalAuLiveOpEvent `json:"countryLevelScheduleInformation,omitempty"` + + // DefaultFormatInformation: Fallback option for the LiveOp format. We + // will try en-US -> en -> any locale and get the first one that is + // available. + DefaultFormatInformation *QualityCalypsoAppsUniversalAuLiveOpFormat `json:"defaultFormatInformation,omitempty"` + + // DefaultScheduleInformation: Fallback option for the LiveOp event + // scheduling information. Will use earliest start time and last end + // time from PDC LiveOps data dump. + DefaultScheduleInformation *QualityCalypsoAppsUniversalAuLiveOpEvent `json:"defaultScheduleInformation,omitempty"` + + // EventId: android + EventId string `json:"eventId,omitempty"` + + // EventType: [REQUIRED] type of live op event. + // + // Possible values: + // "TYPE_UNKNOWN" + // "MAJOR_UPDATE" - Major Update - An update which introduces major + // changes. + // "SALE" - Sale - Time limited discount. + // "EVENT" - Event - A time limited event available in the game or + // app. + // "CROSSOVER" - Crossover, also known as IP collaboration in JP - + // This is an event involving a collaboration IP. + // "PRE_REG_UPDATE" - Pre-registration update - announcement for + // pre-reg apps. + // "LOYALTY" - Loyalty LiveOps event. E.g. special points earn + // promotion etc. + // "FIRST_PARTY_PROMOTION" - First party promotions funded by Play. + // "AUTO_GENERATED_SALE" - Sale events auto-generated by Play for apps + // on sale, rather than a sale event as declared through PDC. + // "NEW_RELEASE" - Events for major new app releases. Auto-generated + // by the recommendations backend. + // "IAP_SKU_SALE" - Sale events generated by sku config, rather than a + // sale event as declared through PDC. + // "OFFER" - Offer - see offer types below for the types. + // go/liveops-config-deals + // "IAP_SKU_DEALS" - Out-of-app purchasable in-app promotions funded + // by Play. + EventType string `json:"eventType,omitempty"` + + // EventUrl: ios + EventUrl string `json:"eventUrl,omitempty"` + + // LocaleLevelFormatInformation: Key is locale, and value is the format + // information for that locale. + LocaleLevelFormatInformation map[string]QualityCalypsoAppsUniversalAuLiveOpFormat `json:"localeLevelFormatInformation,omitempty"` + + Priority string `json:"priority,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "CountryLevelScheduleInformation") 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. + // "CountryLevelScheduleInformation") 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 *QualityCalypsoAppsUniversalAuLiveOpDetail) MarshalJSON() ([]byte, error) { + type NoMethod QualityCalypsoAppsUniversalAuLiveOpDetail + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// QualityCalypsoAppsUniversalAuLiveOpEvent: Contains the schedule for a +// single live-op event. Next ID: 4 +type QualityCalypsoAppsUniversalAuLiveOpEvent struct { + // EndTimestampMillis: [REQUIRED] End time in UTC for the live-op event. + EndTimestampMillis int64 `json:"endTimestampMillis,omitempty,string"` + + // PreviewTimestampMillis: If specified, a live-op event must be shown + // only after this preview-time (in UTC). Otherwise, the event can be + // shown at any time as long as its before the end time. + PreviewTimestampMillis int64 `json:"previewTimestampMillis,omitempty,string"` + + // StartTimestampMillis: [REQUIRED] Start time in UTC for the live-op + // event. + StartTimestampMillis int64 `json:"startTimestampMillis,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "EndTimestampMillis") + // 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. "EndTimestampMillis") 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 *QualityCalypsoAppsUniversalAuLiveOpEvent) MarshalJSON() ([]byte, error) { + type NoMethod QualityCalypsoAppsUniversalAuLiveOpEvent + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// QualityCalypsoAppsUniversalAuLiveOpFormat: Contains the format +// information for a single LiveOp/LiveEvent. Next ID: 10 +type QualityCalypsoAppsUniversalAuLiveOpFormat struct { + Deeplink string `json:"deeplink,omitempty"` + + Description string `json:"description,omitempty"` + + // Eyebrow: iOS only, kind of event type + Eyebrow string `json:"eyebrow,omitempty"` + + ImageUrl string `json:"imageUrl,omitempty"` + + SquareImageUrl string `json:"squareImageUrl,omitempty"` + + // Status: iOS only, sort of start schedule + Status string `json:"status,omitempty"` + + Title string `json:"title,omitempty"` + + VideoId string `json:"videoId,omitempty"` + + VideoUrl string `json:"videoUrl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Deeplink") 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. "Deeplink") 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 *QualityCalypsoAppsUniversalAuLiveOpFormat) MarshalJSON() ([]byte, error) { + type NoMethod QualityCalypsoAppsUniversalAuLiveOpFormat + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// QualityCalypsoAppsUniversalAuLiveOpsDetailInfo: Stores all possible +// LiveOps/LiveEvents that are eligible to be shown for an app. +type QualityCalypsoAppsUniversalAuLiveOpsDetailInfo struct { + LiveOpEvents []*QualityCalypsoAppsUniversalAuLiveOpDetail `json:"liveOpEvents,omitempty"` + + PackageName string `json:"packageName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LiveOpEvents") 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. "LiveOpEvents") 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 *QualityCalypsoAppsUniversalAuLiveOpsDetailInfo) MarshalJSON() ([]byte, error) { + type NoMethod QualityCalypsoAppsUniversalAuLiveOpsDetailInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // QualityCopiaFireflySiteSignal: Proto message containing site-level // signal for search stack. Because firefly_stats.proto depends on // "//segindexer:compositedoc_proto", we cannot make perdocdata contain @@ -104668,6 +105036,10 @@ type QualityNavboostCrapsCrapsClickSignals struct { LastLongestClicks float64 `json:"lastLongestClicks,omitempty"` + // UnicornClicks: The subset of clicks that are associated with an event + // from a Unicorn user. + UnicornClicks float64 `json:"unicornClicks,omitempty"` + // UnsquashedClicks: This is not being populated for the current format // - instead two instances of CrapsClickSignals (squashed/unsquashed) // are used. We are migrating to the new format where this field will be @@ -104715,6 +105087,7 @@ func (s *QualityNavboostCrapsCrapsClickSignals) UnmarshalJSON(data []byte) error GoodClicks gensupport.JSONFloat64 `json:"goodClicks"` Impressions gensupport.JSONFloat64 `json:"impressions"` LastLongestClicks gensupport.JSONFloat64 `json:"lastLongestClicks"` + UnicornClicks gensupport.JSONFloat64 `json:"unicornClicks"` UnsquashedClicks gensupport.JSONFloat64 `json:"unsquashedClicks"` UnsquashedImpressions gensupport.JSONFloat64 `json:"unsquashedImpressions"` UnsquashedLastLongestClicks gensupport.JSONFloat64 `json:"unsquashedLastLongestClicks"` @@ -104730,6 +105103,7 @@ func (s *QualityNavboostCrapsCrapsClickSignals) UnmarshalJSON(data []byte) error s.GoodClicks = float64(s1.GoodClicks) s.Impressions = float64(s1.Impressions) s.LastLongestClicks = float64(s1.LastLongestClicks) + s.UnicornClicks = float64(s1.UnicornClicks) s.UnsquashedClicks = float64(s1.UnsquashedClicks) s.UnsquashedImpressions = float64(s1.UnsquashedImpressions) s.UnsquashedLastLongestClicks = float64(s1.UnsquashedLastLongestClicks) @@ -105227,16 +105601,16 @@ func (s *QualityNsrNSRVersionedData) UnmarshalJSON(data []byte) error { } // QualityNsrNsrData: NOTE: When adding a new field to be propagated to -// Raffia check if NsrPatternSignalSpec needs to be updated. Next ID: 48 +// Raffia check if NsrPatternSignalSpec needs to be updated. Next ID: 50 type QualityNsrNsrData struct { // ArticleScore: Score from article classification of the site. ArticleScore float64 `json:"articleScore,omitempty"` ArticleScoreV2 float64 `json:"articleScoreV2,omitempty"` - // Chard: Site-level chard score: site quality predictor based on + // ChardEncoded: Site-level chard score: site quality predictor based on // content. - Chard float64 `json:"chard,omitempty"` + ChardEncoded int64 `json:"chardEncoded,omitempty"` ChardVariance float64 `json:"chardVariance,omitempty"` @@ -105313,6 +105687,10 @@ type QualityNsrNsrData struct { // Pnav: Fractional signals. Pnav float64 `json:"pnav,omitempty"` + // PriorAdjustedNsr: NSR - prior. Estimate of whether the site is + // above/below average NSR in its slice. + PriorAdjustedNsr []*QualityNsrVersionedFloatSignal `json:"priorAdjustedNsr,omitempty"` + // SecondarySiteChunk: Secondary NSR sitechunk. When present, it // provides more granular chunking than primary sitechunks (see // quality/nsr/util/sitechunker.h for details). @@ -105414,7 +105792,6 @@ func (s *QualityNsrNsrData) UnmarshalJSON(data []byte) error { var s1 struct { ArticleScore gensupport.JSONFloat64 `json:"articleScore"` ArticleScoreV2 gensupport.JSONFloat64 `json:"articleScoreV2"` - Chard gensupport.JSONFloat64 `json:"chard"` ChardVariance gensupport.JSONFloat64 `json:"chardVariance"` ClutterScore gensupport.JSONFloat64 `json:"clutterScore"` DirectFrac gensupport.JSONFloat64 `json:"directFrac"` @@ -105447,7 +105824,6 @@ func (s *QualityNsrNsrData) UnmarshalJSON(data []byte) error { } s.ArticleScore = float64(s1.ArticleScore) s.ArticleScoreV2 = float64(s1.ArticleScoreV2) - s.Chard = float64(s1.Chard) s.ChardVariance = float64(s1.ChardVariance) s.ClutterScore = float64(s1.ClutterScore) s.DirectFrac = float64(s1.DirectFrac) @@ -106054,13 +106430,16 @@ func (s *QualityOrbitAsteroidBeltImageIntentScores) MarshalJSON() ([]byte, error } // QualityPreviewChosenSnippetInfo: Information for chosen snippet. Next -// ID: 7 +// ID: 8 type QualityPreviewChosenSnippetInfo struct { // IsVulgar: Whether this snippet is a vulgar candidate. IsVulgar bool `json:"isVulgar,omitempty"` LeadingTextType string `json:"leadingTextType,omitempty"` + // SnippetHtml: The rendered snippet html. + SnippetHtml string `json:"snippetHtml,omitempty"` + // Possible values: // "SNIPPET_TYPE_UNSPECIFIED" - For historical reason, this // `SNIPPET_TYPE_UNSPECIFIED` type is defined as value 15 instead of 0. @@ -106089,8 +106468,7 @@ type QualityPreviewChosenSnippetInfo struct { // Source: Source of the chosen snippet, decided in PORC. String value // of quality.porc.TextSnippetCandidate.TextSnippetSource defined at - // google3/quality/porc/proto/text_snippet.proto Note: This field is - // only populated and used in offline pipeline. + // google3/quality/porc/proto/text_snippet.proto Source string `json:"source,omitempty"` Tidbits []*QualityPreviewChosenSnippetInfoTidbitInfo `json:"tidbits,omitempty"` @@ -106162,7 +106540,7 @@ func (s *QualityPreviewChosenSnippetInfoTidbitInfo) MarshalJSON() ([]byte, error } // QualityPreviewRanklabSnippet: Snippet candidate related information -// and signal scores. +// and signal scores. Next ID: 11 type QualityPreviewRanklabSnippet struct { BrainFeatures *QualityPreviewSnippetBrainFeatures `json:"brainFeatures,omitempty"` @@ -106170,11 +106548,24 @@ type QualityPreviewRanklabSnippet struct { ExperimentalFeatures *QualityPreviewSnippetExperimentalFeatures `json:"experimentalFeatures,omitempty"` + // FinalScore: The final score of this candidate. + FinalScore float64 `json:"finalScore,omitempty"` + + // IsMuppetSelectedSnippet: Is this the candidate chosen by Muppet + // scorer. + IsMuppetSelectedSnippet bool `json:"isMuppetSelectedSnippet,omitempty"` + + // OriginalQueryTermCoverageFeatures: Query term (original terms only) + // coverage features. + OriginalQueryTermCoverageFeatures *QualityPreviewSnippetQueryTermCoverageFeatures `json:"originalQueryTermCoverageFeatures,omitempty"` + QualityFeatures *QualityPreviewSnippetQualityFeatures `json:"qualityFeatures,omitempty"` // QueryFeatures: Core set of snippet features. QueryFeatures *QualityPreviewSnippetQueryFeatures `json:"queryFeatures,omitempty"` + // QueryTermCoverageFeatures: Query term (including synonyms) coverage + // features. QueryTermCoverageFeatures *QualityPreviewSnippetQueryTermCoverageFeatures `json:"queryTermCoverageFeatures,omitempty"` // SnippetInfo: Information to identify current chosen snippet. @@ -106203,6 +106594,20 @@ func (s *QualityPreviewRanklabSnippet) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +func (s *QualityPreviewRanklabSnippet) UnmarshalJSON(data []byte) error { + type NoMethod QualityPreviewRanklabSnippet + var s1 struct { + FinalScore gensupport.JSONFloat64 `json:"finalScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.FinalScore = float64(s1.FinalScore) + return nil +} + // QualityPreviewRanklabTitle: A collection of data corresponding to a // single title candidate. This will be used as: - a collection of // signals to score and select titles in production - an input for @@ -107582,7 +107987,7 @@ func (s *QualityQrewriteFamilyCalendarAlias) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// QualityQrewritePersonalContactData: Contact metadata Next Id: 35 +// QualityQrewritePersonalContactData: Contact metadata Next Id: 36 type QualityQrewritePersonalContactData struct { // AccountProvenance: Tracks the account owner of this contact. See // go/cross-account-understanding. @@ -107654,6 +108059,11 @@ type QualityQrewritePersonalContactData struct { // this value will be true. IsVisibleToGuestsRelationship bool `json:"isVisibleToGuestsRelationship,omitempty"` + // Possible values: + // "UNKNOWN" + // "SPELLING" - User spelled the name after contact no match. + LookupNameSource string `json:"lookupNameSource,omitempty"` + // MatchSignal: Populate only if AlternateSource is not NONE. MatchSignal *AssistantVerticalsCommonContactMatchSignal `json:"matchSignal,omitempty"` @@ -108921,8 +109331,12 @@ func (s *QualitySherlockKnexAnnotationItem) UnmarshalJSON(data []byte) error { // control individual fields that will sit in Muppet. Data here will be // used for scoring organic shopping web results and previews. Many // shopping related signals, e.g., product review score, are also served -// from this attachment. Next ID: 20 +// from this attachment. Next ID: 21 type QualityShoppingShoppingAttachment struct { + // DatasetModelArticleScore: Score from the blockbert article classifier + // model. go/article-understanding-project + DatasetModelArticleScore int64 `json:"datasetModelArticleScore,omitempty"` + DatasetModelBuyingGuideScore int64 `json:"datasetModelBuyingGuideScore,omitempty"` // DatasetModelForumListScore: From forum and qna confidence score * @@ -108975,7 +109389,7 @@ type QualityShoppingShoppingAttachment struct { SingleProductScore int64 `json:"singleProductScore,omitempty"` // ForceSendFields is a list of field names (e.g. - // "DatasetModelBuyingGuideScore") to unconditionally include in API + // "DatasetModelArticleScore") 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 @@ -108983,13 +109397,13 @@ type QualityShoppingShoppingAttachment struct { // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "DatasetModelBuyingGuideScore") 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 is a list of field names (e.g. "DatasetModelArticleScore") + // 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:"-"` } @@ -111189,8 +111603,10 @@ func (s *RepositoryAnnotationsRdfaCrumb) MarshalJSON() ([]byte, error) { } // RepositoryAnnotationsRdfaRdfaRichSnippetsApplication: This structure -// holds data for application information for rich snippets Next ID: 48 +// holds data for application information for rich snippets Next ID: 51 type RepositoryAnnotationsRdfaRdfaRichSnippetsApplication struct { + AppTypeData *RepositoryAnnotationsRdfaRdfaRichSnippetsApplicationAppTypeData `json:"appTypeData,omitempty"` + // ApplicationUrl: Fields for internal use ApplicationUrl string `json:"applicationUrl,omitempty"` @@ -111250,6 +111666,9 @@ type RepositoryAnnotationsRdfaRdfaRichSnippetsApplication struct { LastUpdated string `json:"lastUpdated,omitempty"` + // LiveOpDetails: Unified proto for android LiveOps and iOS LiveEvents. + LiveOpDetails *QualityCalypsoAppsUniversalAuLiveOpsDetailInfo `json:"liveOpDetails,omitempty"` + // Marketplace: Market Android or itunes Marketplace string `json:"marketplace,omitempty"` @@ -111284,6 +111703,8 @@ type RepositoryAnnotationsRdfaRdfaRichSnippetsApplication struct { // Price: Price Price string `json:"price,omitempty"` + RankData *RepositoryAnnotationsRdfaRdfaRichSnippetsApplicationRankData `json:"rankData,omitempty"` + // Rating: Ratings and reviews Either for this version only or for all // versions to be displayed. Rating string `json:"rating,omitempty"` @@ -111332,7 +111753,7 @@ type RepositoryAnnotationsRdfaRdfaRichSnippetsApplication struct { Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "ApplicationUrl") to + // ForceSendFields is a list of field names (e.g. "AppTypeData") 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 @@ -111340,13 +111761,12 @@ type RepositoryAnnotationsRdfaRdfaRichSnippetsApplication struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ApplicationUrl") 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 is a list of field names (e.g. "AppTypeData") 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:"-"` } @@ -111372,6 +111792,35 @@ func (s *RepositoryAnnotationsRdfaRdfaRichSnippetsApplication) UnmarshalJSON(dat return nil } +type RepositoryAnnotationsRdfaRdfaRichSnippetsApplicationAppTypeData struct { + // PlayStoreAppType: Top level app category type (GAME or APPLICATION). + // Copied from playwright. + PlayStoreAppType string `json:"playStoreAppType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PlayStoreAppType") 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. "PlayStoreAppType") 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 *RepositoryAnnotationsRdfaRdfaRichSnippetsApplicationAppTypeData) MarshalJSON() ([]byte, error) { + type NoMethod RepositoryAnnotationsRdfaRdfaRichSnippetsApplicationAppTypeData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type RepositoryAnnotationsRdfaRdfaRichSnippetsApplicationCountryPrice struct { CountryCode string `json:"countryCode,omitempty"` @@ -111405,6 +111854,73 @@ func (s *RepositoryAnnotationsRdfaRdfaRichSnippetsApplicationCountryPrice) Marsh return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type RepositoryAnnotationsRdfaRdfaRichSnippetsApplicationRank struct { + AppStoreLink string `json:"appStoreLink,omitempty"` + + CategoryId string `json:"categoryId,omitempty"` + + CategoryName string `json:"categoryName,omitempty"` + + ChartType string `json:"chartType,omitempty"` + + Rank int64 `json:"rank,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "AppStoreLink") 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. "AppStoreLink") 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 *RepositoryAnnotationsRdfaRdfaRichSnippetsApplicationRank) MarshalJSON() ([]byte, error) { + type NoMethod RepositoryAnnotationsRdfaRdfaRichSnippetsApplicationRank + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type RepositoryAnnotationsRdfaRdfaRichSnippetsApplicationRankData struct { + // PlaywrightCategoryId: Copied from the category_id field from + // Playwright docs. It helps decide which category to show in app + // ranking info. + PlaywrightCategoryId []string `json:"playwrightCategoryId,omitempty"` + + Rank []*RepositoryAnnotationsRdfaRdfaRichSnippetsApplicationRank `json:"rank,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "PlaywrightCategoryId") 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. "PlaywrightCategoryId") 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 *RepositoryAnnotationsRdfaRdfaRichSnippetsApplicationRankData) MarshalJSON() ([]byte, error) { + type NoMethod RepositoryAnnotationsRdfaRdfaRichSnippetsApplicationRankData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RepositoryWebrefAggregatedEntityNameScores: Represents the aggregated // score of the entities for a given name, aggregated over all sources. // Next available tag: 3. @@ -117155,8 +117671,7 @@ type RepositoryWebrefPreprocessingNameEntityMetadata struct { IsCompoundName bool `json:"isCompoundName,omitempty"` // IsCompoundRetrievalKey: Indicates special compound retrieval keys, - // like "Compound $mid1 $mid2", see - // repository/webref/universal/util/compound-retrieval.h + // like "Compound $mid1 $mid2" IsCompoundRetrievalKey bool `json:"isCompoundRetrievalKey,omitempty"` // IsDictionaryTerm: This is set to true if the entity corresponds to a @@ -123017,11 +123532,6 @@ type ResearchScienceSearchSourceUrlDocjoinInfo struct { // Docid: The docid of the document. Docid uint64 `json:"docid,omitempty,string"` - // FieldOfStudyEntity: A set of entities from - // /collection/field_of_studies in knowledge graph schema - // (http://shortn/_ldBsa14lo8). - FieldOfStudyEntity []*ResearchScienceSearchSourceUrlDocjoinInfoWebrefEntityInfo `json:"fieldOfStudyEntity,omitempty"` - // IndexTier: Index tiers (BASE, UNIFIED_ZEPPELIN, etc) that the // document belongs to. NOTE: Each document may belong to multiple // tiers. NOTE: The original data type is an enum @@ -123079,6 +123589,9 @@ type ResearchScienceSearchSourceUrlDocjoinInfo struct { // Url: The url of the document. Url string `json:"url,omitempty"` + // WebrefEntity: A set of entities copied from WebRefEntities on cDoc. + WebrefEntity []*ResearchScienceSearchSourceUrlDocjoinInfoWebrefEntityInfo `json:"webrefEntity,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataSource") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -123108,6 +123621,12 @@ type ResearchScienceSearchSourceUrlDocjoinInfoWebrefEntityInfo struct { // Description: The English description of the mid from the KG. Description string `json:"description,omitempty"` + // Possible values: + // "UNKNOWN" + // "FIELD_OF_STUDY" - /collection/field_of_studies in KG. + // "GEO" - /collection/geo/* in KG. + EntityType string `json:"entityType,omitempty"` + // Mid: The KG identifier of the WebrefEntity. Mid string `json:"mid,omitempty"` @@ -126792,7 +127311,7 @@ func (s *ShoppingWebentityShoppingAnnotationInferredImage) MarshalJSON() ([]byte // ShoppingWebentityShoppingAnnotationProductRating: Information about a // rating provided for a product. This can represent an aggregated -// rating if count is set. Next Id: 4 +// rating if count is set. Next Id: 7 type ShoppingWebentityShoppingAnnotationProductRating struct { // Count: Number of ratings/reviews aggregated to create this product // rating. If there are no ratings yet, this field will be explicitly @@ -126800,6 +127319,14 @@ type ShoppingWebentityShoppingAnnotationProductRating struct { // has_count. Count int64 `json:"count,omitempty,string"` + MaxValueMillis int64 `json:"maxValueMillis,omitempty,string"` + + // MinValueMillis: The lower and upper bounds of the rating values that + // could be submitted for the product. (Note that it is not the min/max + // ratings submitted for the product, it is the min/max that can + // hypothetically be submitted.) + MinValueMillis int64 `json:"minValueMillis,omitempty,string"` + // Possible values: // "PRODUCT_RATING_SOURCE_UNKNOWN" // "PRODUCT_RATING_SOURCE_CRAWLED_DATA" @@ -126809,6 +127336,10 @@ type ShoppingWebentityShoppingAnnotationProductRating struct { // not be set if count is set to 0. Value float64 `json:"value,omitempty"` + // ValueMillis: The non-normalized aggregated value of the ratings for + // this product. + ValueMillis int64 `json:"valueMillis,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "Count") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -128506,6 +129037,41 @@ func (s *SocialGraphApiProtoContactMutationContext) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type SocialGraphApiProtoContactPromptSettings struct { + // ContactActiveState: Indicates if any reminders are active for entire + // contact. This will affect both connection reminders and date + // reminders such as birthday reminders. This is required. + // + // Possible values: + // "UNKNOWN_ACTIVE_STATE" + // "ACTIVE" + // "DISABLED" + ContactActiveState string `json:"contactActiveState,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ContactActiveState") + // 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. "ContactActiveState") 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 *SocialGraphApiProtoContactPromptSettings) MarshalJSON() ([]byte, error) { + type NoMethod SocialGraphApiProtoContactPromptSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SocialGraphApiProtoContactState: Contact state and related metadata. // See go/fbs-contacts-trash. type SocialGraphApiProtoContactState struct { @@ -129182,6 +129748,16 @@ func (s *SocialGraphApiProtoPartialNameOptionsTwoPartNameSpec) MarshalJSON() ([] // SocialGraphApiProtoPrompt: Used in PeopleAPI layers + // FBS/ContactsService (not in ProfileService) type SocialGraphApiProtoPrompt struct { + // ActiveState: Indicates if this prompt is active regardless of its + // reccurrence date, dismiss date or notification triggers. This is + // required. + // + // Possible values: + // "UNKNOWN_ACTIVE_STATE" + // "ACTIVE" + // "DISABLED" + ActiveState string `json:"activeState,omitempty"` + Content *SocialGraphApiProtoPromptContent `json:"content,omitempty"` // LastDismissDate: The most recent day the user dismissed this prompt. @@ -129211,7 +129787,7 @@ type SocialGraphApiProtoPrompt struct { // UniquePromptId: Prompt ID is generated by server on initial mutate. UniquePromptId string `json:"uniquePromptId,omitempty"` - // ForceSendFields is a list of field names (e.g. "Content") to + // ForceSendFields is a list of field names (e.g. "ActiveState") 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 @@ -129219,10 +129795,10 @@ type SocialGraphApiProtoPrompt struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ActiveState") 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:"-"` @@ -129235,7 +129811,8 @@ func (s *SocialGraphApiProtoPrompt) MarshalJSON() ([]byte, error) { } // SocialGraphApiProtoPromptContent: Used in PeopleAPI layers + -// FBS/ContactsService (not in ProfileService) +// FBS/ContactsService (not in ProfileService) and in Custard response +// to client apps that read Prompts. type SocialGraphApiProtoPromptContent struct { // Title: Title of prompt/spark being sent. Title string `json:"title,omitempty"` @@ -131203,7 +131780,7 @@ func (s *StorageGraphBfgLivegraphProvenanceMetadata) MarshalJSON() ([]byte, erro // associated with the missing attribute. For example, if // `availability_start_timestamp` is not set, the data won't be // embargoed automatically; if `availability_end_timestamp` is not set, -// they won't expire automatically. Next ID: 8 LINT.IfChange +// they won't expire automatically. LINT.IfChange type StorageGraphBfgPolicyMetadata struct { // AvailabilityEndTimestamp: Timestamp after which data with this policy // cannot be used. This value must be strictly larger/later than @@ -131239,6 +131816,23 @@ type StorageGraphBfgPolicyMetadata struct { // consulting ke-data-governance@. LegalRemovalRegions []*KeGovernanceTypedRegions `json:"legalRemovalRegions,omitempty"` + // LmsIsEditorial: The following attributes with `lms_` prefix are for + // supporting LMS restrictions. See go/lms-online-restrictions for + // details. + LmsIsEditorial bool `json:"lmsIsEditorial,omitempty"` + + LmsRegionsAllowed *KeGovernanceTypedRegions `json:"lmsRegionsAllowed,omitempty"` + + LmsRegionsDisallowed *KeGovernanceTypedRegions `json:"lmsRegionsDisallowed,omitempty"` + + LmsRequiresAttribution bool `json:"lmsRequiresAttribution,omitempty"` + + LmsRequiresFirstPartyOnly bool `json:"lmsRequiresFirstPartyOnly,omitempty"` + + LmsRequiresLink bool `json:"lmsRequiresLink,omitempty"` + + LmsRequiresShareAlike bool `json:"lmsRequiresShareAlike,omitempty"` + // PolicySourceType: Policy metadata are VERTICAL by default. Vertical // policy makers / providers does not need to set this field explicitly. // @@ -131558,7 +132152,7 @@ type StorageGraphBfgTripleProvenance struct { // "TRAVEL_ACTIVITY_DATA" - WARNING! Sensitive data under strict // contractual usage agreements. DO NOT use without permission and // understanding of usage constraints. YOU MUST CONTACT - // travel-activities-eng-team@ before reading or writing this data. + // travel-ttd-ecosystem-team@ before reading or writing this data. // "CONTRACTUAL_AOG_FOOD_ORDERING_DATA" - WARNING! Sensitive data // under strict contractual usage agreements. DO NOT use without // permission and understanding of usage constraints. YOU MUST CONTACT @@ -132843,7 +133437,7 @@ func (s *ToolBarPerDocData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TravelFlightsAirlineConfig: Next ID: 26 +// TravelFlightsAirlineConfig: Next ID: 27 type TravelFlightsAirlineConfig struct { // AdwordsCid: Populated using airlines_company_ids.csv for AdWords // company map @@ -132922,6 +133516,10 @@ type TravelFlightsAirlineConfig struct { // Names: EasyJet/イージージェット Names *TravelFlightsNameCatalogProto `json:"names,omitempty"` + // PassengerAssistanceUrls: Default url for passenger assistance + // information. + PassengerAssistanceUrls *TravelFlightsNameCatalogProto `json:"passengerAssistanceUrls,omitempty"` + // Popularity: Number of flights with this airline over the next 180 // days. Popularity int64 `json:"popularity,omitempty"` @@ -136016,12 +136614,23 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // "DETAILS_PAGE_AQUALITY_UNKNOWN_EVENT_LEVEL" // "DETAILS_PAGE_AQUALITY_FAILED_EVENT_LEVEL" // "DETAILS_PAGE_AQUALITY_PASSED_EVENT_LEVEL" + // "INLINE_DETAILS_CALLER_AQUALITY_CHECK_PASS" + // "INLINE_DETAILS_CALLER_AQUALITY_CHECK_FAIL" // "PTP_CLUSTER_SERP_P13N_RANKING_EVENT_LEVEL" - Event level test code // for cluster, p13n ranking. // "BROAD_INTENT_REWEIGHTING_EVENT_LEVEL" - TestCode for Broad Intent // Reweighting Event Level. // "QUERY_DEPENDENT_SNIPPET_EVENT_LEVEL" - Event level test code for // query dependent snippet. + // "TRUSTED_ENTITY_L1_AND_ATTRIBUTE_SEARCH_QUERY_EVENT" - Event level + // test code for SERP L1 TG2 category & TG2 attribute queries. + // "TRUSTED_ENTITY_L2_L3_SEARCH_QUERY_EVENT" - Event level test code + // for SERP L2,L3 TG2 category queries. + // "EXPANDED_DEV_SUCCESS_CLUSTER_EVENT_LEVEL" - Event level test code + // for dev success cluster. + // "COLLAPSED_DEV_SUCCESS_CLUSTER_EVENT_LEVEL" + // "BROAD_INTENT_GAMES_TIMESPENT_EVENT_LEVEL" - TestCode for Broad + // Intent Games TimeSpent Event Level. // "EVENT_LEVEL_TEST_CODE_LIMIT" // "RESERVED_4" // "RESERVED_5" @@ -136709,6 +137318,7 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // "PLAY_STORE_IAP_SALES_APP_12" // "PLAY_STORE_IAP_SALES_APP_13" // "PLAY_STORE_IAP_SALES_MINI_DETAILS_PAGE" + // "PLAY_STORE_IAP_SALES_MINI_DETAILS_PAGE_EAP_PARTNER_APPS" // "CROSS_DEVICE_INSTALL_OPTIONS_FETCHED_IN_SESSION" - Test codes for // cross-device features. See go/play-cross-device. // "CROSS_DEVICE_INSTALL_OPTIONS_ITEM_FIELDS_TRIGGERED" @@ -136840,6 +137450,7 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // "PLAY_PASS_SPLASH_PAGE_FOR_UNICORN_SESSION_LEVEL" // "REVIEW_SUBMITTED_SESSION_LEVEL" - Test code for tracking sessions // where a review is submitted. + // "REVIEW_TOPIC_FILTER_SELECTED_SESSION_LEVEL" // "PLAY_SEARCH_GENERAL_QUERY_PAGINATION_SESSION_LEVEL" - Test code // for tracking sessions where the page is paginated by general query // pagination. @@ -136951,6 +137562,8 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // test codes containing result of aQuality lookup during market details // url matching. A failed aQuality result suppresses inline details. // "INLINE_DETAILS_AQUALITY_CHECK_FAIL_SESSION_LEVEL" + // "INLINE_DETAILS_CALLER_AQUALITY_CHECK_PASS_SESSION_LEVEL" + // "INLINE_DETAILS_CALLER_AQUALITY_CHECK_FAIL_SESSION_LEVEL" // "INLINE_DETAILS_IS_INLINE_URL_SESSION_LEVEL" - Session level test // code indicating external details URL is an inline URL. // "SENT_EMAIL_ENTER_GRACE_PERIOD_SESSION_LEVEL" - Session level test @@ -137123,12 +137736,90 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // "SHOULD_SEE_NOW_CONTENT_LIVE_OPS_GH_K2" // "SHOULD_SEE_NOW_CONTENT_LIVE_OPS_GH_K3_4" // "SHOULD_SEE_NOW_CONTENT_LIVE_OPS_GH_GTE_K5" + // "SHOULD_SEE_NOW_CONTENT_PRE_REGISTRATION_AH_K1" - Pre-registration + // now! content on Apps Home. + // "SHOULD_SEE_NOW_CONTENT_PRE_REGISTRATION_AH_K2" + // "SHOULD_SEE_NOW_CONTENT_PRE_REGISTRATION_AH_K3_4" + // "SHOULD_SEE_NOW_CONTENT_PRE_REGISTRATION_AH_GTE_K5" + // "SHOULD_SEE_NOW_CONTENT_PRE_REGISTRATION_GH_K1" - Pre-registration + // now! content on Games Home. + // "SHOULD_SEE_NOW_CONTENT_PRE_REGISTRATION_GH_K2" + // "SHOULD_SEE_NOW_CONTENT_PRE_REGISTRATION_GH_K3_4" + // "SHOULD_SEE_NOW_CONTENT_PRE_REGISTRATION_GH_GTE_K5" + // "SHOULD_NOT_SEE_TOP_NOW_CONTENT_AH" - Session level test codes for + // top of page Now! content coverage metrics. Any Now! content on Top of + // Apps Home. + // "SHOULD_SEE_TOP_NOW_CONTENT_AH_K1" + // "SHOULD_SEE_TOP_NOW_CONTENT_AH_K2" + // "SHOULD_SEE_TOP_NOW_CONTENT_AH_K3_4" + // "SHOULD_SEE_TOP_NOW_CONTENT_AH_GTE_K5" + // "SHOULD_NOT_SEE_TOP_NOW_CONTENT_GH" - Any Now! content on Top of + // Games Home. + // "SHOULD_SEE_TOP_NOW_CONTENT_GH_K1" + // "SHOULD_SEE_TOP_NOW_CONTENT_GH_K2" + // "SHOULD_SEE_TOP_NOW_CONTENT_GH_K3_4" + // "SHOULD_SEE_TOP_NOW_CONTENT_GH_GTE_K5" + // "SHOULD_SEE_TOP_NOW_CONTENT_NEW_RELEASE_AH_K1" - New release Now! + // content on Top of Apps Home. + // "SHOULD_SEE_TOP_NOW_CONTENT_NEW_RELEASE_AH_K2" + // "SHOULD_SEE_TOP_NOW_CONTENT_NEW_RELEASE_AH_K3_4" + // "SHOULD_SEE_TOP_NOW_CONTENT_NEW_RELEASE_AH_GTE_K5" + // "SHOULD_SEE_TOP_NOW_CONTENT_NEW_RELEASE_GH_K1" - New release Now! + // content on Top of Games Home. + // "SHOULD_SEE_TOP_NOW_CONTENT_NEW_RELEASE_GH_K2" + // "SHOULD_SEE_TOP_NOW_CONTENT_NEW_RELEASE_GH_K3_4" + // "SHOULD_SEE_TOP_NOW_CONTENT_NEW_RELEASE_GH_GTE_K5" + // "SHOULD_SEE_TOP_NOW_CONTENT_EDITORIAL_AH_K1" - Editorial Now! + // content on Top of Apps Home. + // "SHOULD_SEE_TOP_NOW_CONTENT_EDITORIAL_AH_K2" + // "SHOULD_SEE_TOP_NOW_CONTENT_EDITORIAL_AH_K3_4" + // "SHOULD_SEE_TOP_NOW_CONTENT_EDITORIAL_AH_GTE_K5" + // "SHOULD_SEE_TOP_NOW_CONTENT_EDITORIAL_GH_K1" - Editorial Now! + // content on Top of Games Home. + // "SHOULD_SEE_TOP_NOW_CONTENT_EDITORIAL_GH_K2" + // "SHOULD_SEE_TOP_NOW_CONTENT_EDITORIAL_GH_K3_4" + // "SHOULD_SEE_TOP_NOW_CONTENT_EDITORIAL_GH_GTE_K5" + // "SHOULD_SEE_TOP_NOW_CONTENT_LIVE_OPS_AH_K1" - Live Ops Now! content + // on Top of Apps Home. + // "SHOULD_SEE_TOP_NOW_CONTENT_LIVE_OPS_AH_K2" + // "SHOULD_SEE_TOP_NOW_CONTENT_LIVE_OPS_AH_K3_4" + // "SHOULD_SEE_TOP_NOW_CONTENT_LIVE_OPS_AH_GTE_K5" + // "SHOULD_SEE_TOP_NOW_CONTENT_LIVE_OPS_GH_K1" - Live Ops Now! content + // on Top of Games Home. + // "SHOULD_SEE_TOP_NOW_CONTENT_LIVE_OPS_GH_K2" + // "SHOULD_SEE_TOP_NOW_CONTENT_LIVE_OPS_GH_K3_4" + // "SHOULD_SEE_TOP_NOW_CONTENT_LIVE_OPS_GH_GTE_K5" + // "SHOULD_SEE_TOP_NOW_CONTENT_PRE_REGISTRATION_AH_K1" - + // Pre-registration now! content on Top of Apps Home. + // "SHOULD_SEE_TOP_NOW_CONTENT_PRE_REGISTRATION_AH_K2" + // "SHOULD_SEE_TOP_NOW_CONTENT_PRE_REGISTRATION_AH_K3_4" + // "SHOULD_SEE_TOP_NOW_CONTENT_PRE_REGISTRATION_AH_GTE_K5" + // "SHOULD_SEE_TOP_NOW_CONTENT_PRE_REGISTRATION_GH_K1" - + // Pre-registration now! content on Top of Games Home. + // "SHOULD_SEE_TOP_NOW_CONTENT_PRE_REGISTRATION_GH_K2" + // "SHOULD_SEE_TOP_NOW_CONTENT_PRE_REGISTRATION_GH_K3_4" + // "SHOULD_SEE_TOP_NOW_CONTENT_PRE_REGISTRATION_GH_GTE_K5" // "LOYALTY_STAMP_CARD_IN_PURCHASE_FLOW_SESSION_LEVEL" - Session level // test code for Quest Platform Loyalty Stamp Card in Purchase flow. // "WALLET_WELLBEING_ALERT_SESSION_LEVEL" - TestCode for slicing the // users cohorts that should have received a budget Warning alert // "BROAD_INTENT_REWEIGHTING_SESSION_LEVEL" - TestCode for Broad // Intent Reweighting Session Level. + // "DYNASTY_DEVICE_HANDOFF_SESSION_LEVEL" - TestCode for Dynasty + // Device Handoff Session Level. + // "TRUSTED_ENTITY_L1_AND_ATTRIBUTE_SEARCH_QUERY_SESSION" - Session + // level test code for SERP L1 TG2 category & TG2 attribute queries. + // "TRUSTED_ENTITY_L2_L3_SEARCH_QUERY_SESSION" - Session level test + // code for SERP L2,L3 TG2 category queries. + // "EXPANDED_DEV_SUCCESS_CLUSTER_SESSION_LEVEL" - Session level test + // code for dev success cluster. + // "COLLAPSED_DEV_SUCCESS_CLUSTER_SESSION_LEVEL" + // "DOWNLOAD_COUNT_ELIGIBLE" - Session level test code for 1.5x ad + // format. See here for details: http://shortn/_04Q1LMyoTe. + // "PLANOGRAM_MERCH_AMERICAS_GAMES_PAYPAL_SESSION_LEVEL" - Session + // level test code for merch run planogram experiment + // "BROAD_INTENT_GAMES_TIMESPENT_SESSION_LEVEL" - TestCode for Broad + // Intent Games TimeSpent Session Level. // "SESSION_LEVEL_TEST_CODE_LIMIT" // "SHOULD_SEE_LIVE_OP_CLUSTER_USER_LEVEL" - User should see the live // op cluster. @@ -137598,6 +138289,7 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // "NOVEL_TOPIC_CLUSTER_ELIGIBLE_USER_LEVEL_V2" // "NOVEL_TOPIC_CLUSTER_ELIGIBLE_USER_LEVEL_V3" // "NOVEL_TOPIC_CLUSTER_IMPRESSED_AT_USER_LEVEL" + // "NOVEL_TOPIC_CLUSTER_ELIGIBLE_USER_LEVEL_V4" // "IPS_ITEM_LEVEL_RECS_REMOVED_USER_LEVEL" - User level test code for // tracking users who have IPS low appeal recommendations removed from // their feed. @@ -137618,6 +138310,20 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // level test code for Growth Coffee Card, for tracking users who made // eligible purchases and are eligible for the GCC in purchase flow. // This test code is logged on server side. + // "GROWTH_CORPUS_WIDE_STAMP_CARD_PURCHASE_FLOW_CLIENT_USER_LEVEL" - + // User level test code for Corpus Wide Growth Stamp Card, for tracking + // users who made eligible purchases and are eligible for the GSC in + // purchase flow. This test code is logged on client side. + // "GROWTH_CORPUS_WIDE_STAMP_CARD_PURCHASE_FLOW_SERVER_USER_LEVEL" - + // User level test code for Corpus Wide Growth Stamp Card, for tracking + // users who made eligible purchases and are eligible for the GSC in + // purchase flow. This test code is logged on server side. + // "GROWTH_CORPUS_WIDE_STAMP_CARD_GAMES_HOME_USER_LEVEL" - User level + // test code for Corpus Wide Growth Stamp Card, for tracking users who + // are eligible for the GSC in Games Home. + // "LOYALTY_PURCHASE_QUEST_GAMES_HOME_USER_LEVEL" - User level test + // code for Loyalty Purchase Quest, for tracking users who are eligible + // for the LPQ in Games Home. // "SUBS_HIGH_CHURN_FOP_OPTIONS_AVAILABLE_USER_LEVEL" - User level // test code that indicates that at least one high churn fop options is // available for user when visiting add fop page for subscription @@ -137673,9 +138379,75 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // "LINK_BIOMETRICS_USER_LEVEL" - User level test code for link // biometrics for free app acquisitions. // "POST_SUCCESS_ADD_BACKUP_FLOW_USER_LEVEL" - User level test code - // for post success add backup flow . + // for post success add backup flow. // "SKIP_CHECK_MARK_SCREEN_WITH_BACKUP_FLOW_USER_LEVEL" - User level // test code for skipping ckechmark screen with backup flow. + // "IS_ELIGIBLE_FOR_ONE_CLICK_BACKUP_FOP_USER_LEVEL" - User level test + // code for users who are eligible for one-click backup fop. + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_INVALID_USER_LEVEL" - User + // level test codes for pre-period user page visit frequency in past 28 + // days. + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_0_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_1_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_2_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_3_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_4_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_5_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_6_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_7_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_8_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_9_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_10_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_11_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_12_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_13_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_14_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_15_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_16_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_17_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_18_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_19_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_20_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_21_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_22_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_23_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_24_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_25_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_26_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_27_USER_LEVEL" + // "PREPERIOD_PAGE_VISIT_28D_FREQUENCY_28_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_INVALID_USER_LEVEL" - User + // level test codes for post-period user page visit frequency in past 28 + // days. + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_0_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_1_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_2_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_3_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_4_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_5_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_6_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_7_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_8_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_9_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_10_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_11_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_12_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_13_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_14_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_15_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_16_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_17_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_18_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_19_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_20_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_21_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_22_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_23_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_24_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_25_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_26_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_27_USER_LEVEL" + // "POSTPERIOD_PAGE_VISIT_28D_FREQUENCY_28_USER_LEVEL" // "USER_LEVEL_TEST_CODE_LIMIT" TestCode []string `json:"testCode,omitempty"` @@ -137834,6 +138606,7 @@ type VendingConsumerProtoTrustedGenomeHierarchy struct { // "GAME_GRAPHIC_STYLE" - Game graphic stype. e.g. Anime // "GAME_THEME_SETTING" - Game theme setting. e.g. Fantasy // "GAME_CONNECTIVITY" - Game connectivity. e.g. Offline + // "GAME_DIMENSIONAL_PLANES" - Game dimensional planes. e.g. 3D // "ACCESSIBLITY" - Accessiblity. e.g. Blind-Friendly // "ASSISTANT" - Assistant tags, e.g. Assistant-Enabled // "CHROMEBOOK_COMPATIBILITY" - Chrome OS compatibility tags. e.g. @@ -142867,6 +143640,8 @@ type VideoContentSearchVideoAnchor struct { // sentence in the ASR transcript. // "COMMENT" - Anchors extracted from a YouTube comment. // "GENERATIVE_ASR_V2" - Generative ASR anchors V2. + // "SUMMARY_SEGMENT" - Anchors pointing to the conclusion/summary part + // of the video. (go/vs-find-summary-segment) AnchorType string `json:"anchorType,omitempty"` // ContextText: Context text from ASR of long duration, used for longT5 @@ -143023,6 +143798,10 @@ type VideoContentSearchVideoAnchorRatingScore struct { // AverageDescriptionQuality: Average score of description quality. AverageDescriptionQuality float64 `json:"averageDescriptionQuality,omitempty"` + // FurballUrl: Furball URL(s) of the rating score (may have been rated + // more than once) + FurballUrl []string `json:"furballUrl,omitempty"` + // ForceSendFields is a list of field names (e.g. // "AverageBookmarkUsefulness") to unconditionally include in API // requests. By default, fields with empty or default values are omitted @@ -143343,6 +144122,8 @@ type VideoContentSearchVideoAnchors struct { // sentence in the ASR transcript. // "COMMENT" - Anchors extracted from a YouTube comment. // "GENERATIVE_ASR_V2" - Generative ASR anchors V2. + // "SUMMARY_SEGMENT" - Anchors pointing to the conclusion/summary part + // of the video. (go/vs-find-summary-segment) AnchorType string `json:"anchorType,omitempty"` // EntityGroupInfo: The list of entity groups derived from the caption @@ -143441,6 +144222,8 @@ type VideoContentSearchVideoAnchors struct { // sentence in the ASR transcript. // "COMMENT" - Anchors extracted from a YouTube comment. // "GENERATIVE_ASR_V2" - Generative ASR anchors V2. + // "SUMMARY_SEGMENT" - Anchors pointing to the conclusion/summary part + // of the video. (go/vs-find-summary-segment) MergedAnchorsSources []string `json:"mergedAnchorsSources,omitempty"` // PredictedQuerylessTocUsefulness: The score that predicts the @@ -151495,7 +152278,8 @@ type WWWDocInfoRelatedImages struct { // corresponding size. (If no such embedded image is found, prefer the // closest size that's larger. If still no such size exists, prefer // largest.) If no such size exists, these thumbnails are rescaled to an - // image whose maximum dimension is 16, 32 or 64. + // image whose maximum dimension is 16, 28, 32 or 64. + // "THUMBNAIL_TYPE_FAVICON_28" // "THUMBNAIL_TYPE_FAVICON_32" // "THUMBNAIL_TYPE_FAVICON_64" // "THUMBNAIL_TYPE_FAVICON_ORIGINAL" - This type of favicon will @@ -151503,6 +152287,7 @@ type WWWDocInfoRelatedImages struct { // "THUMBNAIL_TYPE_FAVICON_16_DARK" - These refer to favicon // thumbnails for dark mode. This triggers dark mode on the SVG decoding // (and otherwise, the same as the above favicon types) + // "THUMBNAIL_TYPE_FAVICON_28_DARK" // "THUMBNAIL_TYPE_FAVICON_32_DARK" // "THUMBNAIL_TYPE_FAVICON_64_DARK" // "THUMBNAIL_TYPE_FAVICON_ORIGINAL_DARK" @@ -151706,7 +152491,8 @@ type WWWResultInfoSubImageDocInfo struct { // corresponding size. (If no such embedded image is found, prefer the // closest size that's larger. If still no such size exists, prefer // largest.) If no such size exists, these thumbnails are rescaled to an - // image whose maximum dimension is 16, 32 or 64. + // image whose maximum dimension is 16, 28, 32 or 64. + // "THUMBNAIL_TYPE_FAVICON_28" // "THUMBNAIL_TYPE_FAVICON_32" // "THUMBNAIL_TYPE_FAVICON_64" // "THUMBNAIL_TYPE_FAVICON_ORIGINAL" - This type of favicon will @@ -151714,6 +152500,7 @@ type WWWResultInfoSubImageDocInfo struct { // "THUMBNAIL_TYPE_FAVICON_16_DARK" - These refer to favicon // thumbnails for dark mode. This triggers dark mode on the SVG decoding // (and otherwise, the same as the above favicon types) + // "THUMBNAIL_TYPE_FAVICON_28_DARK" // "THUMBNAIL_TYPE_FAVICON_32_DARK" // "THUMBNAIL_TYPE_FAVICON_64_DARK" // "THUMBNAIL_TYPE_FAVICON_ORIGINAL_DARK" @@ -152767,7 +153554,7 @@ func (s *YoutubeBackstageSuperVodCommentInfo) MarshalJSON() ([]byte, error) { // YoutubeCommentsClusteringMiniStanza: Intended to be simpler to work // with than the ExportedStanza it's derived from See documentation: // https://g3doc.corp.google.com/company/teams/youtube/community_intelligence/eng_resources/data_sources.md#ministanza -// Next available: 74 +// Next available: 75 type YoutubeCommentsClusteringMiniStanza struct { // AnsibleScores: TnS Ansible scores map. Keyed by various model names. AnsibleScores map[string]float64 `json:"ansibleScores,omitempty"` @@ -153125,6 +153912,11 @@ type YoutubeCommentsClusteringMiniStanza struct { // based on the text. TextQualityScores *YoutubeCommentsRankingYouTubeCommentTextQualityAnnotation `json:"textQualityScores,omitempty"` + // TextQualityScores2: Predicted probability of the comment being + // flagged based on the text. For testing the new annotation process + // only. + TextQualityScores2 *YoutubeCommentsRankingYouTubeCommentTextQualityAnnotation `json:"textQualityScores2,omitempty"` + // VideoId: The video this comment belongs to. VideoId string `json:"videoId,omitempty"` diff --git a/discoveryengine/v1alpha/discoveryengine-api.json b/discoveryengine/v1alpha/discoveryengine-api.json new file mode 100644 index 00000000000..bfd03adcc25 --- /dev/null +++ b/discoveryengine/v1alpha/discoveryengine-api.json @@ -0,0 +1,1732 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://discoveryengine.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Discovery Engine", + "description": "Discovery Engine API.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/discovery-engine/docs", + "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": "discoveryengine:v1alpha", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://discoveryengine.mtls.googleapis.com/", + "name": "discoveryengine", + "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": { + "projects": { + "resources": { + "locations": { + "resources": { + "dataStores": { + "resources": { + "branches": { + "resources": { + "documents": { + "methods": { + "create": { + "description": "Creates a Document.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.branches.documents.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "documentId": { + "description": "Required. The ID to use for the Document, which will become the final component of the Document.name. If the caller does not have permission to create the Document, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This field must be unique among all Documents with the same parent. Otherwise, an ALREADY_EXISTS error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/documents", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Document.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + "httpMethod": "DELETE", + "id": "discoveryengine.projects.locations.dataStores.branches.documents.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to delete the Document, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Document to delete does not exist, a NOT_FOUND error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Document.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.branches.documents.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to access the Document, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested Document does not exist, a NOT_FOUND error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "import": { + "description": "Bulk import of multiple Documents. Request processing may be synchronous. Non-existing items will be created. Note: It is possible for a subset of the Documents to be successfully updated.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:import", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.branches.documents.import", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}`. Requires create/update permission.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/documents:import", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Gets a list of Documents.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.branches.documents.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of Documents to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token ListDocumentsResponse.next_page_token, received from a previous DocumentService.ListDocuments call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DocumentService.ListDocuments must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, to list documents under the default branch. If the caller does not have permission to list Documentss under this branch, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/documents", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaListDocumentsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Document.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.dataStores.branches.documents.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "If set to true, and the Document is not found, a new Document will be created.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "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/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.branches.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.branches.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}/operations", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "models": { + "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/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/models/{modelsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.models.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/models/{modelsId}/operations", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.models.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}/operations", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "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/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/operations", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}/operations", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "servingConfigs": { + "methods": { + "recommend": { + "description": "Makes a recommendation, which requires a contextual user event.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.servingConfigs.recommend", + "parameterOrder": [ + "servingConfig" + ], + "parameters": { + "servingConfig": { + "description": "Required. Full resource name of the format: projects/*/locations/global/dataStores/*/servingConfigs/* Before you can request recommendations from your model, you must create at least one serving config for it.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+servingConfig}:recommend", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "userEvents": { + "methods": { + "collect": { + "description": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/userEvents:collect", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.userEvents.collect", + "parameterOrder": [ + "parent" + ], + "parameters": { + "ets": { + "description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", + "format": "int64", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/dataStores/{data_store}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + }, + "uri": { + "description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for 3rd party requests.", + "location": "query", + "type": "string" + }, + "userEvent": { + "description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+parent}/userEvents:collect", + "response": { + "$ref": "GoogleApiHttpBody" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "import": { + "description": "Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/userEvents:import", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.userEvents.import", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Parent DataStore resource name, of the form `projects/{project}/locations/{location}/dataStores/{data_store}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/userEvents:import", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest" + }, + "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", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.userEvents.write", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/dataStores/{data_store}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/userEvents:write", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaUserEvent" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaUserEvent" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "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/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}/operations", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "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/projects/{projectsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1alpha/projects/{projectsId}/operations", + "httpMethod": "GET", + "id": "discoveryengine.projects.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}/operations", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + }, + "revision": "20221106", + "rootUrl": "https://discoveryengine.googleapis.com/", + "schemas": { + "GoogleApiHttpBody": { + "description": "Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.", + "id": "GoogleApiHttpBody", + "properties": { + "contentType": { + "description": "The HTTP Content-Type header value specifying the content type of the body.", + "type": "string" + }, + "data": { + "description": "The HTTP request/response body as raw binary.", + "format": "byte", + "type": "string" + }, + "extensions": { + "description": "Application specific response metadata. Must be set in the first response for streaming APIs.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaBigQuerySource": { + "description": "BigQuery source import data from.", + "id": "GoogleCloudDiscoveryengineV1alphaBigQuerySource", + "properties": { + "dataSchema": { + "description": "The schema to use when parsing the data from the source. Supported values for imports: * `user_event` (default): One JSON UserEvent per line. * `document` (default): One JSON Document per line. Each document must have a valid document.id.", + "type": "string" + }, + "datasetId": { + "description": "Required. The BigQuery data set to copy the data from with a length limit of 1,024 characters.", + "type": "string" + }, + "gcsStagingDir": { + "description": "Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the BigQuery export to a specific Cloud Storage directory.", + "type": "string" + }, + "partitionDate": { + "$ref": "GoogleTypeDate", + "description": "BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format." + }, + "projectId": { + "description": "The project ID (can be project # or ID) that the BigQuery source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "type": "string" + }, + "tableId": { + "description": "Required. The BigQuery table to copy the data from with a length limit of 1,024 characters.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaCompletionInfo": { + "description": "Detailed completion information including completion attribution token and clicked completion info.", + "id": "GoogleCloudDiscoveryengineV1alphaCompletionInfo", + "properties": { + "selectedPosition": { + "description": "End user selected CompleteQueryResponse.CompletionResult.suggestion position, starting from 0.", + "format": "int32", + "type": "integer" + }, + "selectedSuggestion": { + "description": "End user selected CompleteQueryResponse.CompletionResult.suggestion.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaCustomAttribute": { + "description": "A custom attribute that is not explicitly modeled in a resource, e.g. UserEvent.", + "id": "GoogleCloudDiscoveryengineV1alphaCustomAttribute", + "properties": { + "numbers": { + "description": "The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is \"lengths_cm\". Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.", + "items": { + "format": "double", + "type": "number" + }, + "type": "array" + }, + "text": { + "description": "The textual values of this custom attribute. For example, `[\"yellow\", \"green\"]` when the key is \"color\". Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaDocument": { + "description": "Document captures all raw metadata information of items to be recommended or searched.", + "id": "GoogleCloudDiscoveryengineV1alphaDocument", + "properties": { + "id": { + "description": "Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.", + "type": "string" + }, + "jsonData": { + "description": "The JSON string representation of the document. It should conform to the registered schema or an INVALID_ARGUMENT error is thrown.", + "type": "string" + }, + "name": { + "description": "Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" + }, + "parentDocumentId": { + "description": "The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.", + "type": "string" + }, + "schemaId": { + "description": "Required. The identifier of the schema located in the same data store.", + "type": "string" + }, + "structData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The structured JSON data for the document. It should conform to the registered schema or an INVALID_ARGUMENT error is thrown.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaDocumentInfo": { + "description": "Detailed document information associated with a user event.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentInfo", + "properties": { + "id": { + "description": "Required. The Document resource ID.", + "type": "string" + }, + "name": { + "description": "Required. The Document resource full name, of the form: projects//locations//dataStores//branches//documents/", + "type": "string" + }, + "promotionIds": { + "description": "The promotion IDs associated with this Document. Currently, this field is restricted to at most one ID.", + "items": { + "type": "string" + }, + "type": "array" + }, + "quantity": { + "description": "Quantity of the Document associated with the user event. Defaults to 1. For example, this field will be 2 if two quantities of the same Document are involved in a `add-to-cart` event. Required for events of the following event types: * `add-to-cart` * `purchase`", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaGcsSource": { + "description": "Google Cloud Storage location for input content. format.", + "id": "GoogleCloudDiscoveryengineV1alphaGcsSource", + "properties": { + "dataSchema": { + "description": "The schema to use when parsing the data from the source. Supported values for imports: * `user_event` (default): One JSON UserEvent per line. * `document` (default): One JSON Document per line. Each document must have a valid Document.id.", + "type": "string" + }, + "inputUris": { + "description": "Required. Google Cloud Storage URIs to input files. URI can be up to 2000 characters long. URIs can match the full object path (for example, `gs://bucket/directory/object.json`) or a pattern matching one or more files, such as `gs://bucket/directory/*.json`. A request can contain at most 100 files, and each file can be up to 2 GB.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata": { + "description": "Metadata related to the progress of the ImportDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata", + "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 processed 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" + }, + "GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest": { + "description": "Request message for Import methods.", + "id": "GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest", + "properties": { + "bigquerySource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaBigQuerySource", + "description": "BigQuery input source." + }, + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "description": "The desired location of errors incurred during the Import." + }, + "gcsSource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaGcsSource", + "description": "Google Cloud Storage location for the input content." + }, + "inlineSource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource", + "description": "The Inline source for the input content for documents." + }, + "reconciliationMode": { + "description": "The mode of reconciliation between existing documents and the documents to be imported. Defaults to ReconciliationMode.INCREMENTAL.", + "enum": [ + "RECONCILIATION_MODE_UNSPECIFIED", + "INCREMENTAL", + "FULL" + ], + "enumDescriptions": [ + "Defaults to INCREMENTAL.", + "Inserts new documents or updates existing documents.", + "Calculates diff and replaces the entire document dataset. Existing documents may be deleted if they are not present in the source location." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource": { + "description": "The inline source for the input config for ImportDocuments method.", + "id": "GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource", + "properties": { + "documents": { + "description": "Required. A list of documents to update/create. Each document must have a valid Document.id. Recommended max of 100 items.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse": { + "description": "Response of the ImportDocumentsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse", + "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "description": "Echoes the destination for the complete errors in the request if set." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaImportErrorConfig": { + "description": "Configuration of destination for Import related errors.", + "id": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "properties": { + "gcsPrefix": { + "description": "Google Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors will be written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata": { + "description": "Metadata related to the progress of the Import operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata", + "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 processed 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" + }, + "GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest": { + "description": "Request message for the ImportUserEvents request.", + "id": "GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest", + "properties": { + "bigquerySource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaBigQuerySource", + "description": "Required. BigQuery input source." + }, + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "description": "The desired location of errors incurred during the Import. Cannot be set for inline user event imports." + }, + "gcsSource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaGcsSource", + "description": "Required. Google Cloud Storage location for the input content." + }, + "inlineSource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource", + "description": "Required. The Inline source for the input content for UserEvents." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource": { + "description": "The inline source for the input config for ImportUserEvents method.", + "id": "GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource", + "properties": { + "userEvents": { + "description": "Required. A list of user events to import. Recommended max of 10k items.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaUserEvent" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse": { + "description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse", + "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "description": "Echoes the destination for the complete errors if this field was set in the request." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "joinedEventsCount": { + "description": "Count of user events imported with complete existing Documents.", + "format": "int64", + "type": "string" + }, + "unjoinedEventsCount": { + "description": "Count of user events imported, but with Document information not found in the existing Branch.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaListDocumentsResponse": { + "description": "Response message for DocumentService.ListDocuments method.", + "id": "GoogleCloudDiscoveryengineV1alphaListDocumentsResponse", + "properties": { + "documents": { + "description": "The Documents.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token that can be sent as ListDocumentsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaMediaInfo": { + "description": "Media-specific user event information.", + "id": "GoogleCloudDiscoveryengineV1alphaMediaInfo", + "properties": { + "mediaProgressDuration": { + "description": "The media progress time in seconds, if applicable. For example, if the end user has finished 90 seconds of a playback video, then MediaInfo.media_progress_duration.seconds should be set to 90.", + "format": "google-duration", + "type": "string" + }, + "mediaProgressPercentage": { + "description": "Media progress should be computed using only the media_progress_duration relative to the media total length. This value must be between [0, 1.0] inclusive. If this is not a playback or the progress cannot be computed (e.g. ongoing livestream), this field should be unset.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaPageInfo": { + "description": "Detailed page information.", + "id": "GoogleCloudDiscoveryengineV1alphaPageInfo", + "properties": { + "pageCategory": { + "description": "The most specific category associated with a category page. To represent full path of category, use '\u003e' sign to separate different hierarchies. If '\u003e' is part of the category name, please replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: \"pageCategory\" : \"Sales \u003e 2017 Black Friday Deals\". Required for `view-category-page` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.", + "type": "string" + }, + "pageviewId": { + "description": "A unique ID of a web page view. This should be kept the same for all user events triggered from the same pageview. For example, an item detail page view could trigger multiple events as the user is browsing the page. The `pageViewId` property should be kept the same for all these events so that they can be grouped together properly. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically.", + "type": "string" + }, + "referrerUri": { + "description": "The referrer URL of the current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. However, some browser privacy restrictions may cause this field to be empty.", + "type": "string" + }, + "uri": { + "description": "Complete URL (window.location.href) of the user's current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. Maximum length 5,000 characters.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaPanelInfo": { + "description": "Detailed panel information associated with a user event.", + "id": "GoogleCloudDiscoveryengineV1alphaPanelInfo", + "properties": { + "displayName": { + "description": "The display name of the panel.", + "type": "string" + }, + "panelId": { + "description": "Required. The panel ID.", + "type": "string" + }, + "panelPosition": { + "description": "The ordered position of the panel, if shown to the user with other panels. If set, then total_panels must also be set.", + "format": "int32", + "type": "integer" + }, + "totalPanels": { + "description": "The total number of panels, including this one, shown to the user. Must be set if panel_position is set.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaRecommendRequest": { + "description": "Request message for Recommend method.", + "id": "GoogleCloudDiscoveryengineV1alphaRecommendRequest", + "properties": { + "filter": { + "description": "Filter for restricting recommendation results with a length limit of 5,000 characters. Currently, only filter expressions on the `filter_tags` attribute is supported. Examples: * (filter_tags: ANY(\"Red\", \"Blue\") OR filter_tags: ANY(\"Hot\", \"Cold\")) * (filter_tags: ANY(\"Red\", \"Blue\")) AND NOT (filter_tags: ANY(\"Green\")) If your filter blocks all results, the API will return generic (unfiltered) popular Documents. If you only want results strictly matching the filters, set `strictFiltering` to True in RecommendRequest.params to receive empty results instead. Note that the API will never return Documents with storageStatus of \"EXPIRED\" or \"DELETED\" regardless of filter choices.", + "type": "string" + }, + "pageSize": { + "description": "Maximum number of results to return. Set this property to the number of recommendation results needed. If zero, the service will choose a reasonable default. The maximum allowed value is 100. Values above 100 will be coerced to 100.", + "format": "int32", + "type": "integer" + }, + "params": { + "additionalProperties": { + "type": "any" + }, + "description": "Additional domain specific parameters for the recommendations. Allowed values: * `returnDocument`: Boolean. If set to true, the associated Document object will be returned in RecommendResponse.results.document. * `returnScore`: Boolean. If set to true, the recommendation 'score' corresponding to each returned Document will be set in RecommendResponse.results.metadata. The given 'score' indicates the probability of a Document conversion given the user's context and history. * `strictFiltering`: Boolean. True by default. If set to false, the service will return generic (unfiltered) popular Documents instead of empty if your filter blocks all recommendation results. * `diversityLevel`: String. Default empty. If set to be non-empty, then it needs to be one of: * 'no-diversity' * 'low-diversity' * 'medium-diversity' * 'high-diversity' * 'auto-diversity' This gives request-level control and adjusts recommendation results based on Document category.", + "type": "object" + }, + "userEvent": { + "$ref": "GoogleCloudDiscoveryengineV1alphaUserEvent", + "description": "Required. Context about the user, what they are looking at and what action they took to trigger the Recommend request. Note that this user event detail won't be ingested to userEvent logs. Thus, a separate userEvent write request is required for event logging. Don't set UserEvent.user_pseudo_id or UserEvent.user_info.user_id to the same fixed ID for different users. If you are trying to receive non-personalized recommendations (not recommended; this can negatively impact model performance), instead set UserEvent.user_pseudo_id to a random unique ID and leave UserEvent.user_info.user_id unset." + }, + "userLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", + "type": "object" + }, + "validateOnly": { + "description": "Use validate only mode for this recommendation query. If set to true, a fake model will be used that returns arbitrary Document IDs. Note that the validate only mode should only be used for testing the API, or if the model is not ready.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaRecommendResponse": { + "description": "Response message for Recommend method.", + "id": "GoogleCloudDiscoveryengineV1alphaRecommendResponse", + "properties": { + "attributionToken": { + "description": "A unique attribution token. This should be included in the UserEvent logs resulting from this recommendation, which enables accurate attribution of recommendation model performance.", + "type": "string" + }, + "missingIds": { + "description": "IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.", + "items": { + "type": "string" + }, + "type": "array" + }, + "results": { + "description": "A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least).", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult" + }, + "type": "array" + }, + "validateOnly": { + "description": "True if RecommendRequest.validate_only was set.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult": { + "description": "RecommendationResult represents a generic recommendation result with associated metadata.", + "id": "GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult", + "properties": { + "document": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocument", + "description": "Set if `returnDocument` is set to true in RecommendRequest.params." + }, + "id": { + "description": "Resource ID of the recommended Document.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "any" + }, + "description": "Additional Document metadata / annotations. Possible values: * `score`: Recommendation score in double value. Is set if `returnScore` is set to true in RecommendRequest.params.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSearchInfo": { + "description": "Detailed search information.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchInfo", + "properties": { + "offset": { + "description": "An integer that specifies the current offset for pagination (the 0-indexed starting location, amongst the products deemed by the API as relevant). See SearchRequest.offset for definition. If this field is negative, an INVALID_ARGUMENT is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.", + "format": "int32", + "type": "integer" + }, + "orderBy": { + "description": "The order in which products are returned, if applicable. See SearchRequest.order_by for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.", + "type": "string" + }, + "searchQuery": { + "description": "The user's search query. See SearchRequest.query for definition. The value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. At least one of search_query or page_categories is required for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaTransactionInfo": { + "description": "A transaction represents the entire purchase transaction.", + "id": "GoogleCloudDiscoveryengineV1alphaTransactionInfo", + "properties": { + "cost": { + "description": "All the costs associated with the products. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs, such that: * Profit = value - tax - cost", + "format": "float", + "type": "number" + }, + "currency": { + "description": "Required. Currency code. Use three-character ISO-4217 code.", + "type": "string" + }, + "discountValue": { + "description": "The total discount(s) value applied to this transaction. This figure should be excluded from TransactionInfo.value For example, if a user paid TransactionInfo.value amount, then nominal (pre-discount) value of the transaction is the sum of TransactionInfo.value and TransactionInfo.discount_value This means that profit is calculated the same way, regardless of the discount value, and that TransactionInfo.discount_value can be larger than TransactionInfo.value: * Profit = value - tax - cost", + "format": "float", + "type": "number" + }, + "tax": { + "description": "All the taxes associated with the transaction.", + "format": "float", + "type": "number" + }, + "transactionId": { + "description": "The transaction ID with a length limit of 128 characters.", + "type": "string" + }, + "value": { + "description": "Required. Total non-zero value associated with the transaction. This value may include shipping, tax, or other adjustments to the total value that you want to include.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaUserEvent": { + "description": "UserEvent captures all metadata information DiscoveryEngine API needs to know about how end users interact with customers' website.", + "id": "GoogleCloudDiscoveryengineV1alphaUserEvent", + "properties": { + "attributes": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCustomAttribute" + }, + "description": "Extra user event features to include in the recommendation model. These attributes must NOT contain data that needs to be parsed or processed further, e.g. JSON or other encodings. If you provide custom attributes for ingested user events, also include them in the user events that you associate with prediction requests. Custom attribute formatting must be consistent between imported events and events provided with prediction requests. This lets the DiscoveryEngine API use those custom attributes when training models and serving predictions, which helps improve recommendation quality. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * The key must be a UTF-8 encoded string with a length limit of 5,000 characters. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed. For product recommendations, an example of extra user information is traffic_channel, which is how a user arrives at the site. Users can arrive at the site by coming to the site directly, coming through Google search, or in other ways.", + "type": "object" + }, + "attributionToken": { + "description": "Token to attribute an API response to user action(s) to trigger the event. Highly recommended for user events that are the result of PredictionService.Predict. This field enables accurate attribution of recommendation model performance. The value must be one of: * PredictResponse.attribution_token for events that are the result of PredictionService.Predict. * SearchResponse.attribution_token for events that are the result of SearchService.Search. * CompleteQueryResponse.attribution_token for events that are the result of SearchService.CompleteQuery. This token enables us to accurately attribute page view or conversion completion back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass PredictResponse.attribution_token as a URL parameter to product K's page. When recording events on product K's page, log the PredictResponse.attribution_token to this field.", + "type": "string" + }, + "completionInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCompletionInfo", + "description": "CompleteQuery API details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search." + }, + "directUserRequest": { + "description": "Should set to true if the request is made directly from the end user, in which case the UserEvent.user_info.user_agent can be populated from the HTTP request. This flag should be set only if the API request is made directly from the end user such as a mobile app (and not if a gateway or a server is processing and pushing the user events). This should not be set when using the JavaScript tag in UserEventService.CollectUserEvent.", + "type": "boolean" + }, + "documents": { + "description": "List of Documents associated with this user event. This field is optional except for the following event types: * `view-item` * `add-to-cart` * `purchase` * `media-play` * `media-complete` In a `search` event, this field represents the documents returned to the end user on the current page (the end user may have not finished browsing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new `search` event with different UserEvent.documents is desired.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentInfo" + }, + "type": "array" + }, + "eventTime": { + "description": "Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened.", + "format": "google-datetime", + "type": "string" + }, + "eventType": { + "description": "Required. User event type. Allowed values are: Generic values: * `search`: Search for Documents. * `view-item`: Detailed page view of a Document. * `view-item-list`: View of a panel or ordered list of Documents. * `view-home-page`: View of the home page. * `view-category-page`: View of a category page, e.g. Home \u003e Men \u003e Jeans Retail-related values: * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping * `purchase`: Purchase an item(s) Media-related values: * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc.", + "type": "string" + }, + "filter": { + "description": "The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. One example is for `search` events, the associated SearchService.SearchRequest may contain a filter expression in SearchService.SearchRequest.filter conforming to https://google.aip.dev/160#filtering. Similarly, for `view-item-list` events that are generated from a PredictionService.PredictRequest, this field may be populated directly from PredictionService.PredictRequest.filter conforming to https://google.aip.dev/160#filtering. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "type": "string" + }, + "mediaInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaMediaInfo", + "description": "Media-specific info." + }, + "pageInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaPageInfo", + "description": "Page metadata such as categories and other critical information for certain event types such as `view-category-page`." + }, + "panel": { + "$ref": "GoogleCloudDiscoveryengineV1alphaPanelInfo", + "description": "Panel metadata associated with this user event." + }, + "promotionIds": { + "description": "The promotion IDs if this is an event associated with promotions. Currently, this field is restricted to at most one ID.", + "items": { + "type": "string" + }, + "type": "array" + }, + "searchInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchInfo", + "description": "Search API details related to the event. This field should be set for `search` event." + }, + "sessionId": { + "description": "A unique identifier for tracking a visitor session with a length limit of 128 bytes. A session is an aggregation of an end user behavior in a time span. A general guideline to populate the sesion_id: 1. If user has no activity for 30 min, a new session_id should be assigned. 2. The session_id should be unique across users, suggest use uuid or add UserEvent.user_pseudo_id as prefix.", + "type": "string" + }, + "tagIds": { + "description": "A list of identifiers for the independent experiment groups this user event belongs to. This is used to distinguish between user events associated with different experiment setups on the customer end.", + "items": { + "type": "string" + }, + "type": "array" + }, + "transactionInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaTransactionInfo", + "description": "The transaction metadata (if any) associated with this user event." + }, + "userInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaUserInfo", + "description": "Information about the end user." + }, + "userPseudoId": { + "description": "Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor log in/out of the website. Do not set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. The field should not contain PII or user-data. We recommend to use Google Analytics [Client ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) for this field.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaUserInfo": { + "description": "Information of an end user.", + "id": "GoogleCloudDiscoveryengineV1alphaUserInfo", + "properties": { + "userAgent": { + "description": "User agent as included in the HTTP header. Required for getting SearchResponse.sponsored_results. The field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if direct_user_request is set.", + "type": "string" + }, + "userId": { + "description": "Highly recommended for logged-in users. Unique identifier for logged-in user, such as a user name. Don't set for anonymous users. Always use a hashed value for this ID. Don't set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata": { + "description": "Metadata related to the progress of the ImportDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata", + "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 processed 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" + }, + "GoogleCloudDiscoveryengineV1betaImportDocumentsResponse": { + "description": "Response of the ImportDocumentsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudDiscoveryengineV1betaImportDocumentsResponse", + "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", + "description": "Echoes the destination for the complete errors in the request if set." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaImportErrorConfig": { + "description": "Configuration of destination for Import related errors.", + "id": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", + "properties": { + "gcsPrefix": { + "description": "Google Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors will be written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata": { + "description": "Metadata related to the progress of the Import operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata", + "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 processed 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" + }, + "GoogleCloudDiscoveryengineV1betaImportUserEventsResponse": { + "description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudDiscoveryengineV1betaImportUserEventsResponse", + "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", + "description": "Echoes the destination for the complete errors if this field was set in the request." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "joinedEventsCount": { + "description": "Count of user events imported with complete existing Documents.", + "format": "int64", + "type": "string" + }, + "unjoinedEventsCount": { + "description": "Count of user events imported, but with Document information not found in the existing Branch.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleLongrunningListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "GoogleLongrunningListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "GoogleLongrunningOperation" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleLongrunningOperation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "GoogleLongrunningOperation", + "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": "GoogleRpcStatus", + "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" + }, + "GoogleProtobufEmpty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "GoogleProtobufEmpty", + "properties": {}, + "type": "object" + }, + "GoogleRpcStatus": { + "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": "GoogleRpcStatus", + "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" + }, + "GoogleTypeDate": { + "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": "GoogleTypeDate", + "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" + } + }, + "servicePath": "", + "title": "Discovery Engine API", + "version": "v1alpha", + "version_module": true +} \ No newline at end of file diff --git a/discoveryengine/v1alpha/discoveryengine-gen.go b/discoveryengine/v1alpha/discoveryengine-gen.go new file mode 100644 index 00000000000..91dda0cb016 --- /dev/null +++ b/discoveryengine/v1alpha/discoveryengine-gen.go @@ -0,0 +1,5499 @@ +// Copyright 2022 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 discoveryengine provides access to the Discovery Engine API. +// +// For product documentation, see: https://cloud.google.com/discovery-engine/docs +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/discoveryengine/v1alpha" +// ... +// ctx := context.Background() +// discoveryengineService, err := discoveryengine.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: +// +// discoveryengineService, err := discoveryengine.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, ...) +// discoveryengineService, err := discoveryengine.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. +package discoveryengine // import "google.golang.org/api/discoveryengine/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 + +const apiId = "discoveryengine:v1alpha" +const apiName = "discoveryengine" +const apiVersion = "v1alpha" +const basePath = "https://discoveryengine.googleapis.com/" +const mtlsBasePath = "https://discoveryengine.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the + // email address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + rs.Operations = NewProjectsOperationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService + + Operations *ProjectsOperationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.DataStores = NewProjectsLocationsDataStoresService(s) + rs.Operations = NewProjectsLocationsOperationsService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + DataStores *ProjectsLocationsDataStoresService + + Operations *ProjectsLocationsOperationsService +} + +func NewProjectsLocationsDataStoresService(s *Service) *ProjectsLocationsDataStoresService { + rs := &ProjectsLocationsDataStoresService{s: s} + rs.Branches = NewProjectsLocationsDataStoresBranchesService(s) + rs.Models = NewProjectsLocationsDataStoresModelsService(s) + rs.Operations = NewProjectsLocationsDataStoresOperationsService(s) + rs.ServingConfigs = NewProjectsLocationsDataStoresServingConfigsService(s) + rs.UserEvents = NewProjectsLocationsDataStoresUserEventsService(s) + return rs +} + +type ProjectsLocationsDataStoresService struct { + s *Service + + Branches *ProjectsLocationsDataStoresBranchesService + + Models *ProjectsLocationsDataStoresModelsService + + Operations *ProjectsLocationsDataStoresOperationsService + + ServingConfigs *ProjectsLocationsDataStoresServingConfigsService + + UserEvents *ProjectsLocationsDataStoresUserEventsService +} + +func NewProjectsLocationsDataStoresBranchesService(s *Service) *ProjectsLocationsDataStoresBranchesService { + rs := &ProjectsLocationsDataStoresBranchesService{s: s} + rs.Documents = NewProjectsLocationsDataStoresBranchesDocumentsService(s) + rs.Operations = NewProjectsLocationsDataStoresBranchesOperationsService(s) + return rs +} + +type ProjectsLocationsDataStoresBranchesService struct { + s *Service + + Documents *ProjectsLocationsDataStoresBranchesDocumentsService + + Operations *ProjectsLocationsDataStoresBranchesOperationsService +} + +func NewProjectsLocationsDataStoresBranchesDocumentsService(s *Service) *ProjectsLocationsDataStoresBranchesDocumentsService { + rs := &ProjectsLocationsDataStoresBranchesDocumentsService{s: s} + return rs +} + +type ProjectsLocationsDataStoresBranchesDocumentsService struct { + s *Service +} + +func NewProjectsLocationsDataStoresBranchesOperationsService(s *Service) *ProjectsLocationsDataStoresBranchesOperationsService { + rs := &ProjectsLocationsDataStoresBranchesOperationsService{s: s} + return rs +} + +type ProjectsLocationsDataStoresBranchesOperationsService struct { + s *Service +} + +func NewProjectsLocationsDataStoresModelsService(s *Service) *ProjectsLocationsDataStoresModelsService { + rs := &ProjectsLocationsDataStoresModelsService{s: s} + rs.Operations = NewProjectsLocationsDataStoresModelsOperationsService(s) + return rs +} + +type ProjectsLocationsDataStoresModelsService struct { + s *Service + + Operations *ProjectsLocationsDataStoresModelsOperationsService +} + +func NewProjectsLocationsDataStoresModelsOperationsService(s *Service) *ProjectsLocationsDataStoresModelsOperationsService { + rs := &ProjectsLocationsDataStoresModelsOperationsService{s: s} + return rs +} + +type ProjectsLocationsDataStoresModelsOperationsService struct { + s *Service +} + +func NewProjectsLocationsDataStoresOperationsService(s *Service) *ProjectsLocationsDataStoresOperationsService { + rs := &ProjectsLocationsDataStoresOperationsService{s: s} + return rs +} + +type ProjectsLocationsDataStoresOperationsService struct { + s *Service +} + +func NewProjectsLocationsDataStoresServingConfigsService(s *Service) *ProjectsLocationsDataStoresServingConfigsService { + rs := &ProjectsLocationsDataStoresServingConfigsService{s: s} + return rs +} + +type ProjectsLocationsDataStoresServingConfigsService struct { + s *Service +} + +func NewProjectsLocationsDataStoresUserEventsService(s *Service) *ProjectsLocationsDataStoresUserEventsService { + rs := &ProjectsLocationsDataStoresUserEventsService{s: s} + return rs +} + +type ProjectsLocationsDataStoresUserEventsService struct { + s *Service +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +func NewProjectsOperationsService(s *Service) *ProjectsOperationsService { + rs := &ProjectsOperationsService{s: s} + return rs +} + +type ProjectsOperationsService struct { + s *Service +} + +// GoogleApiHttpBody: Message that represents an arbitrary HTTP body. It +// should only be used for payload formats that can't be represented as +// JSON, such as raw binary or an HTML page. This message can be used +// both in streaming and non-streaming API methods in the request as +// well as the response. It can be used as a top-level request field, +// which is convenient if one wants to extract parameters from either +// the URL or HTTP template into the request fields and also want access +// to the raw HTTP body. Example: message GetResourceRequest { // A +// unique request id. string request_id = 1; // The raw HTTP body is +// bound to this field. google.api.HttpBody http_body = 2; } service +// ResourceService { rpc GetResource(GetResourceRequest) returns +// (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) +// returns (google.protobuf.Empty); } Example with streaming methods: +// service CaldavService { rpc GetCalendar(stream google.api.HttpBody) +// returns (stream google.api.HttpBody); rpc UpdateCalendar(stream +// google.api.HttpBody) returns (stream google.api.HttpBody); } Use of +// this type only changes how the request and response bodies are +// handled, all other features will continue to work unchanged. +type GoogleApiHttpBody struct { + // ContentType: The HTTP Content-Type header value specifying the + // content type of the body. + ContentType string `json:"contentType,omitempty"` + + // Data: The HTTP request/response body as raw binary. + Data string `json:"data,omitempty"` + + // Extensions: Application specific response metadata. Must be set in + // the first response for streaming APIs. + Extensions []googleapi.RawMessage `json:"extensions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ContentType") 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. "ContentType") 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 *GoogleApiHttpBody) MarshalJSON() ([]byte, error) { + type NoMethod GoogleApiHttpBody + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaBigQuerySource: BigQuery source +// import data from. +type GoogleCloudDiscoveryengineV1alphaBigQuerySource struct { + // DataSchema: The schema to use when parsing the data from the source. + // Supported values for imports: * `user_event` (default): One JSON + // UserEvent per line. * `document` (default): One JSON Document per + // line. Each document must have a valid document.id. + DataSchema string `json:"dataSchema,omitempty"` + + // DatasetId: Required. The BigQuery data set to copy the data from with + // a length limit of 1,024 characters. + DatasetId string `json:"datasetId,omitempty"` + + // GcsStagingDir: Intermediate Cloud Storage directory used for the + // import with a length limit of 2,000 characters. Can be specified if + // one wants to have the BigQuery export to a specific Cloud Storage + // directory. + GcsStagingDir string `json:"gcsStagingDir,omitempty"` + + // PartitionDate: BigQuery time partitioned table's _PARTITIONDATE in + // YYYY-MM-DD format. + PartitionDate *GoogleTypeDate `json:"partitionDate,omitempty"` + + // ProjectId: The project ID (can be project # or ID) that the BigQuery + // source is in with a length limit of 128 characters. If not specified, + // inherits the project ID from the parent request. + ProjectId string `json:"projectId,omitempty"` + + // TableId: Required. The BigQuery table to copy the data from with a + // length limit of 1,024 characters. + TableId string `json:"tableId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataSchema") 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. "DataSchema") 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 *GoogleCloudDiscoveryengineV1alphaBigQuerySource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaBigQuerySource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaCompletionInfo: Detailed completion +// information including completion attribution token and clicked +// completion info. +type GoogleCloudDiscoveryengineV1alphaCompletionInfo struct { + // SelectedPosition: End user selected + // CompleteQueryResponse.CompletionResult.suggestion position, starting + // from 0. + SelectedPosition int64 `json:"selectedPosition,omitempty"` + + // SelectedSuggestion: End user selected + // CompleteQueryResponse.CompletionResult.suggestion. + SelectedSuggestion string `json:"selectedSuggestion,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SelectedPosition") 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. "SelectedPosition") 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 *GoogleCloudDiscoveryengineV1alphaCompletionInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCompletionInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaCustomAttribute: A custom attribute +// that is not explicitly modeled in a resource, e.g. UserEvent. +type GoogleCloudDiscoveryengineV1alphaCustomAttribute struct { + // Numbers: The numerical values of this custom attribute. For example, + // `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of text or + // numbers should be set. Otherwise, an INVALID_ARGUMENT error is + // returned. + Numbers []float64 `json:"numbers,omitempty"` + + // Text: The textual values of this custom attribute. For example, + // `["yellow", "green"]` when the key is "color". Empty string is not + // allowed. Otherwise, an INVALID_ARGUMENT error is returned. Exactly + // one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT + // error is returned. + Text []string `json:"text,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Numbers") 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. "Numbers") 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 *GoogleCloudDiscoveryengineV1alphaCustomAttribute) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCustomAttribute + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaDocument: Document captures all raw +// metadata information of items to be recommended or searched. +type GoogleCloudDiscoveryengineV1alphaDocument struct { + // Id: Immutable. The identifier of the document. Id should conform to + // RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with a length + // limit of 63 characters. + Id string `json:"id,omitempty"` + + // JsonData: The JSON string representation of the document. It should + // conform to the registered schema or an INVALID_ARGUMENT error is + // thrown. + JsonData string `json:"jsonData,omitempty"` + + // Name: Immutable. The full resource name of the document. Format: + // `projects/{project}/locations/{location}/dataStores/{data_store}/branc + // hes/{branch}/documents/{document_id}`. This field must be a UTF-8 + // encoded string with a length limit of 1024 characters. + Name string `json:"name,omitempty"` + + // ParentDocumentId: The identifier of the parent document. Currently + // supports at most two level document hierarchy. Id should conform to + // RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with a length + // limit of 63 characters. + ParentDocumentId string `json:"parentDocumentId,omitempty"` + + // SchemaId: Required. The identifier of the schema located in the same + // data store. + SchemaId string `json:"schemaId,omitempty"` + + // StructData: The structured JSON data for the document. It should + // conform to the registered schema or an INVALID_ARGUMENT error is + // thrown. + StructData googleapi.RawMessage `json:"structData,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. 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. "Id") 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 *GoogleCloudDiscoveryengineV1alphaDocument) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDocument + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaDocumentInfo: Detailed document +// information associated with a user event. +type GoogleCloudDiscoveryengineV1alphaDocumentInfo struct { + // Id: Required. The Document resource ID. + Id string `json:"id,omitempty"` + + // Name: Required. The Document resource full name, of the form: + // projects//locations//dataStores//branches//documents/ + Name string `json:"name,omitempty"` + + // PromotionIds: The promotion IDs associated with this Document. + // Currently, this field is restricted to at most one ID. + PromotionIds []string `json:"promotionIds,omitempty"` + + // Quantity: Quantity of the Document associated with the user event. + // Defaults to 1. For example, this field will be 2 if two quantities of + // the same Document are involved in a `add-to-cart` event. Required for + // events of the following event types: * `add-to-cart` * `purchase` + Quantity int64 `json:"quantity,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. 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. "Id") 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 *GoogleCloudDiscoveryengineV1alphaDocumentInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDocumentInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaGcsSource: Google Cloud Storage +// location for input content. format. +type GoogleCloudDiscoveryengineV1alphaGcsSource struct { + // DataSchema: The schema to use when parsing the data from the source. + // Supported values for imports: * `user_event` (default): One JSON + // UserEvent per line. * `document` (default): One JSON Document per + // line. Each document must have a valid Document.id. + DataSchema string `json:"dataSchema,omitempty"` + + // InputUris: Required. Google Cloud Storage URIs to input files. URI + // can be up to 2000 characters long. URIs can match the full object + // path (for example, `gs://bucket/directory/object.json`) or a pattern + // matching one or more files, such as `gs://bucket/directory/*.json`. A + // request can contain at most 100 files, and each file can be up to 2 + // GB. + InputUris []string `json:"inputUris,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataSchema") 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. "DataSchema") 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 *GoogleCloudDiscoveryengineV1alphaGcsSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaGcsSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata: Metadata +// related to the progress of the ImportDocuments operation. This will +// be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata 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 processed 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 *GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest: Request +// message for Import methods. +type GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest struct { + // BigquerySource: BigQuery input source. + BigquerySource *GoogleCloudDiscoveryengineV1alphaBigQuerySource `json:"bigquerySource,omitempty"` + + // ErrorConfig: The desired location of errors incurred during the + // Import. + ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` + + // GcsSource: Google Cloud Storage location for the input content. + GcsSource *GoogleCloudDiscoveryengineV1alphaGcsSource `json:"gcsSource,omitempty"` + + // InlineSource: The Inline source for the input content for documents. + InlineSource *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource `json:"inlineSource,omitempty"` + + // ReconciliationMode: The mode of reconciliation between existing + // documents and the documents to be imported. Defaults to + // ReconciliationMode.INCREMENTAL. + // + // Possible values: + // "RECONCILIATION_MODE_UNSPECIFIED" - Defaults to INCREMENTAL. + // "INCREMENTAL" - Inserts new documents or updates existing + // documents. + // "FULL" - Calculates diff and replaces the entire document dataset. + // Existing documents may be deleted if they are not present in the + // source location. + ReconciliationMode string `json:"reconciliationMode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BigquerySource") 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. "BigquerySource") 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 *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource: +// The inline source for the input config for ImportDocuments method. +type GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource struct { + // Documents: Required. A list of documents to update/create. Each + // document must have a valid Document.id. Recommended max of 100 items. + Documents []*GoogleCloudDiscoveryengineV1alphaDocument `json:"documents,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Documents") 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. "Documents") 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 *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse: Response of +// the ImportDocumentsRequest. If the long running operation is done, +// then this message is returned by the +// google.longrunning.Operations.response field if the operation was +// successful. +type GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse struct { + // ErrorConfig: Echoes the destination for the complete errors in the + // request if set. + ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` + + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorConfig") 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. "ErrorConfig") 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 *GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaImportErrorConfig: Configuration of +// destination for Import related errors. +type GoogleCloudDiscoveryengineV1alphaImportErrorConfig struct { + // GcsPrefix: Google Cloud Storage prefix for import errors. This must + // be an empty, existing Cloud Storage directory. Import errors will be + // written to sharded files in this directory, one per line, as a + // JSON-encoded `google.rpc.Status` message. + GcsPrefix string `json:"gcsPrefix,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GcsPrefix") 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. "GcsPrefix") 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 *GoogleCloudDiscoveryengineV1alphaImportErrorConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportErrorConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata: Metadata +// related to the progress of the Import operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata 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 processed 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 *GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest: Request +// message for the ImportUserEvents request. +type GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest struct { + // BigquerySource: Required. 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. Google Cloud Storage location for the input + // content. + GcsSource *GoogleCloudDiscoveryengineV1alphaGcsSource `json:"gcsSource,omitempty"` + + // InlineSource: Required. 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 + // 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. "BigquerySource") 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 *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource: +// The inline source for the input config for ImportUserEvents method. +type GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource struct { + // UserEvents: Required. A list of user events to import. Recommended + // max of 10k items. + UserEvents []*GoogleCloudDiscoveryengineV1alphaUserEvent `json:"userEvents,omitempty"` + + // ForceSendFields is a list of field names (e.g. "UserEvents") 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. "UserEvents") 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 *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse: Response +// of the ImportUserEventsRequest. If the long running operation was +// successful, then this message is returned by the +// google.longrunning.Operations.response field if the operation was +// successful. +type GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse struct { + // ErrorConfig: Echoes the destination for the complete errors if this + // field was set in the request. + ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` + + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + + // JoinedEventsCount: Count of user events imported with complete + // existing Documents. + JoinedEventsCount int64 `json:"joinedEventsCount,omitempty,string"` + + // UnjoinedEventsCount: Count of user events imported, but with Document + // information not found in the existing Branch. + UnjoinedEventsCount int64 `json:"unjoinedEventsCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "ErrorConfig") 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. "ErrorConfig") 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 *GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaListDocumentsResponse: Response +// message for DocumentService.ListDocuments method. +type GoogleCloudDiscoveryengineV1alphaListDocumentsResponse struct { + // Documents: The Documents. + Documents []*GoogleCloudDiscoveryengineV1alphaDocument `json:"documents,omitempty"` + + // NextPageToken: A token that can be sent as + // ListDocumentsRequest.page_token to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Documents") 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. "Documents") 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 *GoogleCloudDiscoveryengineV1alphaListDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListDocumentsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaMediaInfo: Media-specific user event +// information. +type GoogleCloudDiscoveryengineV1alphaMediaInfo struct { + // MediaProgressDuration: The media progress time in seconds, if + // applicable. For example, if the end user has finished 90 seconds of a + // playback video, then MediaInfo.media_progress_duration.seconds should + // be set to 90. + MediaProgressDuration string `json:"mediaProgressDuration,omitempty"` + + // MediaProgressPercentage: Media progress should be computed using only + // the media_progress_duration relative to the media total length. This + // value must be between [0, 1.0] inclusive. If this is not a playback + // or the progress cannot be computed (e.g. ongoing livestream), this + // field should be unset. + MediaProgressPercentage float64 `json:"mediaProgressPercentage,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "MediaProgressDuration") 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. "MediaProgressDuration") 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 *GoogleCloudDiscoveryengineV1alphaMediaInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaMediaInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaMediaInfo) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaMediaInfo + var s1 struct { + MediaProgressPercentage gensupport.JSONFloat64 `json:"mediaProgressPercentage"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.MediaProgressPercentage = float64(s1.MediaProgressPercentage) + return nil +} + +// GoogleCloudDiscoveryengineV1alphaPageInfo: Detailed page information. +type GoogleCloudDiscoveryengineV1alphaPageInfo struct { + // PageCategory: The most specific category associated with a category + // page. To represent full path of category, use '>' sign to separate + // different hierarchies. If '>' is part of the category name, please + // replace it with other character(s). Category pages include special + // pages such as sales or promotions. For instance, a special sale page + // may have the category hierarchy: "pageCategory" : "Sales > 2017 Black + // Friday Deals". Required for `view-category-page` events. Other event + // types should not set this field. Otherwise, an INVALID_ARGUMENT error + // is returned. + PageCategory string `json:"pageCategory,omitempty"` + + // PageviewId: A unique ID of a web page view. This should be kept the + // same for all user events triggered from the same pageview. For + // example, an item detail page view could trigger multiple events as + // the user is browsing the page. The `pageViewId` property should be + // kept the same for all these events so that they can be grouped + // together properly. When using the client side event reporting with + // JavaScript pixel and Google Tag Manager, this value is filled in + // automatically. + PageviewId string `json:"pageviewId,omitempty"` + + // ReferrerUri: The referrer URL of the current page. When using the + // client side event reporting with JavaScript pixel and Google Tag + // Manager, this value is filled in automatically. However, some browser + // privacy restrictions may cause this field to be empty. + ReferrerUri string `json:"referrerUri,omitempty"` + + // Uri: Complete URL (window.location.href) of the user's current page. + // When using the client side event reporting with JavaScript pixel and + // Google Tag Manager, this value is filled in automatically. Maximum + // length 5,000 characters. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PageCategory") 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. "PageCategory") 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 *GoogleCloudDiscoveryengineV1alphaPageInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPageInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaPanelInfo: Detailed panel +// information associated with a user event. +type GoogleCloudDiscoveryengineV1alphaPanelInfo struct { + // DisplayName: The display name of the panel. + DisplayName string `json:"displayName,omitempty"` + + // PanelId: Required. The panel ID. + PanelId string `json:"panelId,omitempty"` + + // PanelPosition: The ordered position of the panel, if shown to the + // user with other panels. If set, then total_panels must also be set. + PanelPosition int64 `json:"panelPosition,omitempty"` + + // TotalPanels: The total number of panels, including this one, shown to + // the user. Must be set if panel_position is set. + TotalPanels int64 `json:"totalPanels,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") 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. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaPanelInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPanelInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaRecommendRequest: Request message +// for Recommend method. +type GoogleCloudDiscoveryengineV1alphaRecommendRequest struct { + // Filter: Filter for restricting recommendation results with a length + // limit of 5,000 characters. Currently, only filter expressions on the + // `filter_tags` attribute is supported. Examples: * (filter_tags: + // ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold")) * + // (filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green")) + // If your filter blocks all results, the API will return generic + // (unfiltered) popular Documents. If you only want results strictly + // matching the filters, set `strictFiltering` to True in + // RecommendRequest.params to receive empty results instead. Note that + // the API will never return Documents with storageStatus of "EXPIRED" + // or "DELETED" regardless of filter choices. + Filter string `json:"filter,omitempty"` + + // PageSize: Maximum number of results to return. Set this property to + // the number of recommendation results needed. If zero, the service + // will choose a reasonable default. The maximum allowed value is 100. + // Values above 100 will be coerced to 100. + PageSize int64 `json:"pageSize,omitempty"` + + // Params: Additional domain specific parameters for the + // recommendations. Allowed values: * `returnDocument`: Boolean. If set + // to true, the associated Document object will be returned in + // RecommendResponse.results.document. * `returnScore`: Boolean. If set + // to true, the recommendation 'score' corresponding to each returned + // Document will be set in RecommendResponse.results.metadata. The given + // 'score' indicates the probability of a Document conversion given the + // user's context and history. * `strictFiltering`: Boolean. True by + // default. If set to false, the service will return generic + // (unfiltered) popular Documents instead of empty if your filter blocks + // all recommendation results. * `diversityLevel`: String. Default + // empty. If set to be non-empty, then it needs to be one of: * + // 'no-diversity' * 'low-diversity' * 'medium-diversity' * + // 'high-diversity' * 'auto-diversity' This gives request-level control + // and adjusts recommendation results based on Document category. + Params googleapi.RawMessage `json:"params,omitempty"` + + // UserEvent: Required. Context about the user, what they are looking at + // and what action they took to trigger the Recommend request. Note that + // this user event detail won't be ingested to userEvent logs. Thus, a + // separate userEvent write request is required for event logging. Don't + // set UserEvent.user_pseudo_id or UserEvent.user_info.user_id to the + // same fixed ID for different users. If you are trying to receive + // non-personalized recommendations (not recommended; this can + // negatively impact model performance), instead set + // UserEvent.user_pseudo_id to a random unique ID and leave + // UserEvent.user_info.user_id unset. + UserEvent *GoogleCloudDiscoveryengineV1alphaUserEvent `json:"userEvent,omitempty"` + + // UserLabels: The user labels applied to a resource must meet the + // following requirements: * Each resource can have multiple labels, up + // to a maximum of 64. * Each label must be a key-value pair. * Keys + // have a minimum length of 1 character and a maximum length of 63 + // characters and cannot be empty. Values can be empty and have a + // maximum length of 63 characters. * Keys and values can contain only + // lowercase letters, numeric characters, underscores, and dashes. All + // characters must use UTF-8 encoding, and international characters are + // allowed. * The key portion of a label must be unique. However, you + // can use the same key with multiple resources. * Keys must start with + // a lowercase letter or international character. See Google Cloud + // Document + // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // for more details. + UserLabels map[string]string `json:"userLabels,omitempty"` + + // ValidateOnly: Use validate only mode for this recommendation query. + // If set to true, a fake model will be used that returns arbitrary + // Document IDs. Note that the validate only mode should only be used + // for testing the API, or if the model is not ready. + ValidateOnly bool `json:"validateOnly,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 *GoogleCloudDiscoveryengineV1alphaRecommendRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRecommendRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaRecommendResponse: Response message +// for Recommend method. +type GoogleCloudDiscoveryengineV1alphaRecommendResponse struct { + // AttributionToken: A unique attribution token. This should be included + // in the UserEvent logs resulting from this recommendation, which + // enables accurate attribution of recommendation model performance. + AttributionToken string `json:"attributionToken,omitempty"` + + // MissingIds: IDs of documents in the request that were missing from + // the default Branch associated with the requested ServingConfig. + MissingIds []string `json:"missingIds,omitempty"` + + // Results: A list of recommended Documents. The order represents the + // ranking (from the most relevant Document to the least). + Results []*GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult `json:"results,omitempty"` + + // ValidateOnly: True if RecommendRequest.validate_only was set. + ValidateOnly bool `json:"validateOnly,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AttributionToken") 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. "AttributionToken") 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 *GoogleCloudDiscoveryengineV1alphaRecommendResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRecommendResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult +// : RecommendationResult represents a generic recommendation result +// with associated metadata. +type GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult struct { + // Document: Set if `returnDocument` is set to true in + // RecommendRequest.params. + Document *GoogleCloudDiscoveryengineV1alphaDocument `json:"document,omitempty"` + + // Id: Resource ID of the recommended Document. + Id string `json:"id,omitempty"` + + // Metadata: Additional Document metadata / annotations. Possible + // values: * `score`: Recommendation score in double value. Is set if + // `returnScore` is set to true in RecommendRequest.params. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Document") 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. "Document") 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 *GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaSearchInfo: Detailed search +// information. +type GoogleCloudDiscoveryengineV1alphaSearchInfo struct { + // Offset: An integer that specifies the current offset for pagination + // (the 0-indexed starting location, amongst the products deemed by the + // API as relevant). See SearchRequest.offset for definition. If this + // field is negative, an INVALID_ARGUMENT is returned. This can only be + // set for `search` events. Other event types should not set this field. + // Otherwise, an INVALID_ARGUMENT error is returned. + Offset int64 `json:"offset,omitempty"` + + // OrderBy: The order in which products are returned, if applicable. See + // SearchRequest.order_by for definition and syntax. The value must be a + // UTF-8 encoded string with a length limit of 1,000 characters. + // Otherwise, an INVALID_ARGUMENT error is returned. This can only be + // set for `search` events. Other event types should not set this field. + // Otherwise, an INVALID_ARGUMENT error is returned. + OrderBy string `json:"orderBy,omitempty"` + + // SearchQuery: The user's search query. See SearchRequest.query for + // definition. The value must be a UTF-8 encoded string with a length + // limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is + // returned. At least one of search_query or page_categories is required + // for `search` events. Other event types should not set this field. + // Otherwise, an INVALID_ARGUMENT error is returned. + SearchQuery string `json:"searchQuery,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Offset") 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. "Offset") 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 *GoogleCloudDiscoveryengineV1alphaSearchInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaTransactionInfo: A transaction +// represents the entire purchase transaction. +type GoogleCloudDiscoveryengineV1alphaTransactionInfo struct { + // Cost: All the costs associated with the products. These can be + // manufacturing costs, shipping expenses not borne by the end user, or + // any other costs, such that: * Profit = value - tax - cost + Cost float64 `json:"cost,omitempty"` + + // Currency: Required. Currency code. Use three-character ISO-4217 code. + Currency string `json:"currency,omitempty"` + + // DiscountValue: The total discount(s) value applied to this + // transaction. This figure should be excluded from + // TransactionInfo.value For example, if a user paid + // TransactionInfo.value amount, then nominal (pre-discount) value of + // the transaction is the sum of TransactionInfo.value and + // TransactionInfo.discount_value This means that profit is calculated + // the same way, regardless of the discount value, and that + // TransactionInfo.discount_value can be larger than + // TransactionInfo.value: * Profit = value - tax - cost + DiscountValue float64 `json:"discountValue,omitempty"` + + // Tax: All the taxes associated with the transaction. + Tax float64 `json:"tax,omitempty"` + + // TransactionId: The transaction ID with a length limit of 128 + // characters. + TransactionId string `json:"transactionId,omitempty"` + + // Value: Required. Total non-zero value associated with the + // transaction. This value may include shipping, tax, or other + // adjustments to the total value that you want to include. + Value float64 `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Cost") 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. "Cost") 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 *GoogleCloudDiscoveryengineV1alphaTransactionInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTransactionInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaTransactionInfo) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaTransactionInfo + var s1 struct { + Cost gensupport.JSONFloat64 `json:"cost"` + DiscountValue gensupport.JSONFloat64 `json:"discountValue"` + Tax gensupport.JSONFloat64 `json:"tax"` + Value gensupport.JSONFloat64 `json:"value"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Cost = float64(s1.Cost) + s.DiscountValue = float64(s1.DiscountValue) + s.Tax = float64(s1.Tax) + s.Value = float64(s1.Value) + return nil +} + +// GoogleCloudDiscoveryengineV1alphaUserEvent: UserEvent captures all +// metadata information DiscoveryEngine API needs to know about how end +// users interact with customers' website. +type GoogleCloudDiscoveryengineV1alphaUserEvent struct { + // Attributes: Extra user event features to include in the + // recommendation model. These attributes must NOT contain data that + // needs to be parsed or processed further, e.g. JSON or other + // encodings. If you provide custom attributes for ingested user events, + // also include them in the user events that you associate with + // prediction requests. Custom attribute formatting must be consistent + // between imported events and events provided with prediction requests. + // This lets the DiscoveryEngine API use those custom attributes when + // training models and serving predictions, which helps improve + // recommendation quality. This field needs to pass all below criteria, + // otherwise an INVALID_ARGUMENT error is returned: * The key must be a + // UTF-8 encoded string with a length limit of 5,000 characters. * For + // text attributes, at most 400 values are allowed. Empty values are not + // allowed. Each value must be a UTF-8 encoded string with a length + // limit of 256 characters. * For number attributes, at most 400 values + // are allowed. For product recommendations, an example of extra user + // information is traffic_channel, which is how a user arrives at the + // site. Users can arrive at the site by coming to the site directly, + // coming through Google search, or in other ways. + Attributes map[string]GoogleCloudDiscoveryengineV1alphaCustomAttribute `json:"attributes,omitempty"` + + // AttributionToken: Token to attribute an API response to user + // action(s) to trigger the event. Highly recommended for user events + // that are the result of PredictionService.Predict. This field enables + // accurate attribution of recommendation model performance. The value + // must be one of: * PredictResponse.attribution_token for events that + // are the result of PredictionService.Predict. * + // SearchResponse.attribution_token for events that are the result of + // SearchService.Search. * CompleteQueryResponse.attribution_token for + // events that are the result of SearchService.CompleteQuery. This token + // enables us to accurately attribute page view or conversion completion + // back to the event and the particular predict response containing this + // clicked/purchased product. If user clicks on product K in the + // recommendation results, pass PredictResponse.attribution_token as a + // URL parameter to product K's page. When recording events on product + // K's page, log the PredictResponse.attribution_token to this field. + AttributionToken string `json:"attributionToken,omitempty"` + + // CompletionInfo: CompleteQuery API details related to the event. This + // field should be set for `search` event when autocomplete function is + // enabled and the user clicks a suggestion for search. + CompletionInfo *GoogleCloudDiscoveryengineV1alphaCompletionInfo `json:"completionInfo,omitempty"` + + // DirectUserRequest: Should set to true if the request is made directly + // from the end user, in which case the UserEvent.user_info.user_agent + // can be populated from the HTTP request. This flag should be set only + // if the API request is made directly from the end user such as a + // mobile app (and not if a gateway or a server is processing and + // pushing the user events). This should not be set when using the + // JavaScript tag in UserEventService.CollectUserEvent. + DirectUserRequest bool `json:"directUserRequest,omitempty"` + + // Documents: List of Documents associated with this user event. This + // field is optional except for the following event types: * `view-item` + // * `add-to-cart` * `purchase` * `media-play` * `media-complete` In a + // `search` event, this field represents the documents returned to the + // end user on the current page (the end user may have not finished + // browsing the whole page yet). When a new page is returned to the end + // user, after pagination/filtering/ordering even for the same query, a + // new `search` event with different UserEvent.documents is desired. + Documents []*GoogleCloudDiscoveryengineV1alphaDocumentInfo `json:"documents,omitempty"` + + // EventTime: Only required for UserEventService.ImportUserEvents + // method. Timestamp of when the user event happened. + EventTime string `json:"eventTime,omitempty"` + + // EventType: Required. User event type. Allowed values are: Generic + // values: * `search`: Search for Documents. * `view-item`: Detailed + // page view of a Document. * `view-item-list`: View of a panel or + // ordered list of Documents. * `view-home-page`: View of the home page. + // * `view-category-page`: View of a category page, e.g. Home > Men > + // Jeans Retail-related values: * `add-to-cart`: Add an item(s) to cart, + // e.g. in Retail online shopping * `purchase`: Purchase an item(s) + // Media-related values: * `media-play`: Start/resume watching a video, + // playing a song, etc. * `media-complete`: Finished or stopped midway + // through a video, song, etc. + EventType string `json:"eventType,omitempty"` + + // Filter: The filter syntax consists of an expression language for + // constructing a predicate from one or more fields of the documents + // being filtered. One example is for `search` events, the associated + // SearchService.SearchRequest may contain a filter expression in + // SearchService.SearchRequest.filter conforming to + // https://google.aip.dev/160#filtering. Similarly, for `view-item-list` + // events that are generated from a PredictionService.PredictRequest, + // this field may be populated directly from + // PredictionService.PredictRequest.filter conforming to + // https://google.aip.dev/160#filtering. The value must be a UTF-8 + // encoded string with a length limit of 1,000 characters. Otherwise, an + // INVALID_ARGUMENT error is returned. + Filter string `json:"filter,omitempty"` + + // MediaInfo: Media-specific info. + MediaInfo *GoogleCloudDiscoveryengineV1alphaMediaInfo `json:"mediaInfo,omitempty"` + + // PageInfo: Page metadata such as categories and other critical + // information for certain event types such as `view-category-page`. + PageInfo *GoogleCloudDiscoveryengineV1alphaPageInfo `json:"pageInfo,omitempty"` + + // Panel: Panel metadata associated with this user event. + Panel *GoogleCloudDiscoveryengineV1alphaPanelInfo `json:"panel,omitempty"` + + // PromotionIds: The promotion IDs if this is an event associated with + // promotions. Currently, this field is restricted to at most one ID. + PromotionIds []string `json:"promotionIds,omitempty"` + + // SearchInfo: Search API details related to the event. This field + // should be set for `search` event. + SearchInfo *GoogleCloudDiscoveryengineV1alphaSearchInfo `json:"searchInfo,omitempty"` + + // SessionId: A unique identifier for tracking a visitor session with a + // length limit of 128 bytes. A session is an aggregation of an end user + // behavior in a time span. A general guideline to populate the + // sesion_id: 1. If user has no activity for 30 min, a new session_id + // should be assigned. 2. The session_id should be unique across users, + // suggest use uuid or add UserEvent.user_pseudo_id as prefix. + SessionId string `json:"sessionId,omitempty"` + + // TagIds: A list of identifiers for the independent experiment groups + // this user event belongs to. This is used to distinguish between user + // events associated with different experiment setups on the customer + // end. + TagIds []string `json:"tagIds,omitempty"` + + // TransactionInfo: The transaction metadata (if any) associated with + // this user event. + TransactionInfo *GoogleCloudDiscoveryengineV1alphaTransactionInfo `json:"transactionInfo,omitempty"` + + // UserInfo: Information about the end user. + UserInfo *GoogleCloudDiscoveryengineV1alphaUserInfo `json:"userInfo,omitempty"` + + // UserPseudoId: Required. A unique identifier for tracking visitors. + // For example, this could be implemented with an HTTP cookie, which + // should be able to uniquely identify a visitor on a single device. + // This unique identifier should not change if the visitor log in/out of + // the website. Do not set the field to the same fixed ID for different + // users. This mixes the event history of those users together, which + // results in degraded model quality. The field must be a UTF-8 encoded + // string with a length limit of 128 characters. Otherwise, an + // INVALID_ARGUMENT error is returned. The field should not contain PII + // or user-data. We recommend to use Google Analytics Client ID + // (https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) + // for this field. + UserPseudoId string `json:"userPseudoId,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Attributes") 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. "Attributes") 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 *GoogleCloudDiscoveryengineV1alphaUserEvent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaUserEvent + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaUserInfo: Information of an end +// user. +type GoogleCloudDiscoveryengineV1alphaUserInfo struct { + // UserAgent: User agent as included in the HTTP header. Required for + // getting SearchResponse.sponsored_results. The field must be a UTF-8 + // encoded string with a length limit of 1,000 characters. Otherwise, an + // INVALID_ARGUMENT error is returned. This should not be set when using + // the client side event reporting with GTM or JavaScript tag in + // UserEventService.CollectUserEvent or if direct_user_request is set. + UserAgent string `json:"userAgent,omitempty"` + + // UserId: Highly recommended for logged-in users. Unique identifier for + // logged-in user, such as a user name. Don't set for anonymous users. + // Always use a hashed value for this ID. Don't set the field to the + // same fixed ID for different users. This mixes the event history of + // those users together, which results in degraded model quality. The + // field must be a UTF-8 encoded string with a length limit of 128 + // characters. Otherwise, an INVALID_ARGUMENT error is returned. + UserId string `json:"userId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "UserAgent") 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. "UserAgent") 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 *GoogleCloudDiscoveryengineV1alphaUserInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaUserInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata: Metadata +// related to the progress of the ImportDocuments operation. This will +// be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata 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 processed 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 *GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportDocumentsResponse: Response of +// the ImportDocumentsRequest. If the long running operation is done, +// then this message is returned by the +// google.longrunning.Operations.response field if the operation was +// successful. +type GoogleCloudDiscoveryengineV1betaImportDocumentsResponse struct { + // ErrorConfig: Echoes the destination for the complete errors in the + // request if set. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorConfig") 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. "ErrorConfig") 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 *GoogleCloudDiscoveryengineV1betaImportDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportErrorConfig: Configuration of +// destination for Import related errors. +type GoogleCloudDiscoveryengineV1betaImportErrorConfig struct { + // GcsPrefix: Google Cloud Storage prefix for import errors. This must + // be an empty, existing Cloud Storage directory. Import errors will be + // written to sharded files in this directory, one per line, as a + // JSON-encoded `google.rpc.Status` message. + GcsPrefix string `json:"gcsPrefix,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GcsPrefix") 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. "GcsPrefix") 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 *GoogleCloudDiscoveryengineV1betaImportErrorConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportErrorConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata: Metadata +// related to the progress of the Import operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata 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 processed 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 *GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportUserEventsResponse: Response of +// the ImportUserEventsRequest. If the long running operation was +// successful, then this message is returned by the +// google.longrunning.Operations.response field if the operation was +// successful. +type GoogleCloudDiscoveryengineV1betaImportUserEventsResponse struct { + // ErrorConfig: Echoes the destination for the complete errors if this + // field was set in the request. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + + // JoinedEventsCount: Count of user events imported with complete + // existing Documents. + JoinedEventsCount int64 `json:"joinedEventsCount,omitempty,string"` + + // UnjoinedEventsCount: Count of user events imported, but with Document + // information not found in the existing Branch. + UnjoinedEventsCount int64 `json:"unjoinedEventsCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "ErrorConfig") 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. "ErrorConfig") 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 *GoogleCloudDiscoveryengineV1betaImportUserEventsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningListOperationsResponse: The response message for +// Operations.ListOperations. +type GoogleLongrunningListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") 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. "NextPageToken") 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 *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningOperation: This resource represents a long-running +// operation that is the result of a network API call. +type GoogleLongrunningOperation 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 *GoogleRpcStatus `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 *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningOperation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleProtobufEmpty: A generic empty message that you can re-use to +// avoid defining duplicated empty messages in your APIs. A typical +// example is to use it as the request or the response type of an API +// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) +// returns (google.protobuf.Empty); } +type GoogleProtobufEmpty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// GoogleRpcStatus: 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 GoogleRpcStatus 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 *GoogleRpcStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleRpcStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeDate: 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 GoogleTypeDate 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 *GoogleTypeDate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeDate + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "discoveryengine.projects.locations.dataStores.branches.documents.create": + +type ProjectsLocationsDataStoresBranchesDocumentsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Document. +// +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/dataStores/{data_store}/bra +// nches/{branch}`. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Create(parent string, googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphadocument = googleclouddiscoveryenginev1alphadocument + return c +} + +// DocumentId sets the optional parameter "documentId": Required. The ID +// to use for the Document, which will become the final component of the +// Document.name. If the caller does not have permission to create the +// Document, regardless of whether or not it exists, a PERMISSION_DENIED +// error is returned. This field must be unique among all Documents with +// the same parent. Otherwise, an ALREADY_EXISTS error is returned. This +// field must conform to RFC-1034 (https://tools.ietf.org/html/rfc1034) +// standard with a length limit of 63 characters. Otherwise, an +// INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { + c.urlParams_.Set("documentId", documentId) + 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 *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) 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.googleclouddiscoveryenginev1alphadocument) + 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}/documents") + 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.branches.documents.create" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaDocument or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaDocument.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 *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, 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 := &GoogleCloudDiscoveryengineV1alphaDocument{ + 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": "Creates a Document.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "documentId": { + // "description": "Required. The ID to use for the Document, which will become the final component of the Document.name. If the caller does not have permission to create the Document, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This field must be unique among all Documents with the same parent. Otherwise, an ALREADY_EXISTS error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/documents", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.branches.documents.delete": + +type ProjectsLocationsDataStoresBranchesDocumentsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Document. +// +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/dataStores/{data_store}/bra +// nches/{branch}/documents/{document}`. If the caller does not have +// permission to delete the Document, regardless of whether or not it +// exists, a PERMISSION_DENIED error is returned. If the Document to +// delete does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsDeleteCall{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 *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) 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 + 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("DELETE", 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 "discoveryengine.projects.locations.dataStores.branches.documents.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.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 *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ + 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 a Document.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to delete the Document, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Document to delete does not exist, a NOT_FOUND error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.branches.documents.get": + +type ProjectsLocationsDataStoresBranchesDocumentsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Document. +// +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/dataStores/{data_store}/bra +// nches/{branch}/documents/{document}`. If the caller does not have +// permission to access the Document, regardless of whether or not it +// exists, a PERMISSION_DENIED error is returned. If the requested +// Document does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Get(name string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsGetCall{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 *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) 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 "discoveryengine.projects.locations.dataStores.branches.documents.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaDocument or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaDocument.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 *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, 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 := &GoogleCloudDiscoveryengineV1alphaDocument{ + 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 a Document.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to access the Document, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested Document does not exist, a NOT_FOUND error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.branches.documents.import": + +type ProjectsLocationsDataStoresBranchesDocumentsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaimportdocumentsrequest *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Import: Bulk import of multiple Documents. Request processing may be +// synchronous. Non-existing items will be created. Note: It is possible +// for a subset of the Documents to be successfully updated. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/dataStores/{data_store}/bra +// nches/{branch}`. Requires create/update permission. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1alphaimportdocumentsrequest *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaimportdocumentsrequest = googleclouddiscoveryenginev1alphaimportdocumentsrequest + 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 *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) 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.googleclouddiscoveryenginev1alphaimportdocumentsrequest) + 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}/documents:import") + 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.branches.documents.import" 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 *ProjectsLocationsDataStoresBranchesDocumentsImportCall) 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": "Bulk import of multiple Documents. Request processing may be synchronous. Non-existing items will be created. Note: It is possible for a subset of the Documents to be successfully updated.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:import", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.import", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}`. Requires create/update permission.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/documents:import", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.branches.documents.list": + +type ProjectsLocationsDataStoresBranchesDocumentsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Gets a list of Documents. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/dataStores/{data_store}/bra +// nches/{branch}`. Use `default_branch` as the branch ID, to list +// documents under the default branch. If the caller does not have +// permission to list Documentss under this branch, regardless of +// whether or not this branch exists, a PERMISSION_DENIED error is +// returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// Documents to return. If unspecified, defaults to 100. The maximum +// allowed value is 1000. Values above 1000 will be coerced to 1000. If +// this field is negative, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListDocumentsResponse.next_page_token, received from a previous +// DocumentService.ListDocuments call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// DocumentService.ListDocuments must match the call that provided the +// page token. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) 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/{+parent}/documents") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaListDocumentsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1alphaListDocumentsResponse.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 *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListDocumentsResponse, 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 := &GoogleCloudDiscoveryengineV1alphaListDocumentsResponse{ + 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 a list of Documents.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of Documents to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token ListDocumentsResponse.next_page_token, received from a previous DocumentService.ListDocuments call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DocumentService.ListDocuments must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, to list documents under the default branch. If the caller does not have permission to list Documentss under this branch, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/documents", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaListDocumentsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListDocumentsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "discoveryengine.projects.locations.dataStores.branches.documents.patch": + +type ProjectsLocationsDataStoresBranchesDocumentsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Document. +// +// - name: Immutable. The full resource name of the document. Format: +// `projects/{project}/locations/{location}/dataStores/{data_store}/bra +// nches/{branch}/documents/{document_id}`. This field must be a UTF-8 +// encoded string with a length limit of 1024 characters. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphadocument = googleclouddiscoveryenginev1alphadocument + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to +// true, and the Document is not found, a new Document will be created. +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + 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 *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) 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.googleclouddiscoveryenginev1alphadocument) + 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/{+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 "discoveryengine.projects.locations.dataStores.branches.documents.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaDocument or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaDocument.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 *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, 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 := &GoogleCloudDiscoveryengineV1alphaDocument{ + 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": "Updates a Document.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "If set to true, and the Document is not found, a new Document will be created.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.branches.operations.get": + +type ProjectsLocationsDataStoresBranchesOperationsGetCall 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 *ProjectsLocationsDataStoresBranchesOperationsService) Get(name string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { + c := &ProjectsLocationsDataStoresBranchesOperationsGetCall{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 *ProjectsLocationsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsGetCall { + 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 *ProjectsLocationsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { + 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 *ProjectsLocationsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsGetCall { + 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 *ProjectsLocationsDataStoresBranchesOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) 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 "discoveryengine.projects.locations.dataStores.branches.operations.get" 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 *ProjectsLocationsDataStoresBranchesOperationsGetCall) 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": "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/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.branches.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.branches.operations.list": + +type ProjectsLocationsDataStoresBranchesOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsDataStoresBranchesOperationsService) List(name string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c := &ProjectsLocationsDataStoresBranchesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsListCall { + 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 *ProjectsLocationsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + 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 *ProjectsLocationsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsListCall { + 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 *ProjectsLocationsDataStoresBranchesOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) 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}/operations") + 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 "discoveryengine.projects.locations.dataStores.branches.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.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 *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, 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 := &GoogleLongrunningListOperationsResponse{ + 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": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.branches.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}/operations", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "discoveryengine.projects.locations.dataStores.models.operations.get": + +type ProjectsLocationsDataStoresModelsOperationsGetCall 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 *ProjectsLocationsDataStoresModelsOperationsService) Get(name string) *ProjectsLocationsDataStoresModelsOperationsGetCall { + c := &ProjectsLocationsDataStoresModelsOperationsGetCall{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 *ProjectsLocationsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsGetCall { + 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 *ProjectsLocationsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsGetCall { + 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 *ProjectsLocationsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsGetCall { + 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 *ProjectsLocationsDataStoresModelsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) 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 "discoveryengine.projects.locations.dataStores.models.operations.get" 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 *ProjectsLocationsDataStoresModelsOperationsGetCall) 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": "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/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/models/{modelsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.models.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.models.operations.list": + +type ProjectsLocationsDataStoresModelsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsDataStoresModelsOperationsService) List(name string) *ProjectsLocationsDataStoresModelsOperationsListCall { + c := &ProjectsLocationsDataStoresModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresModelsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresModelsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresModelsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsListCall { + 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 *ProjectsLocationsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsListCall { + 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 *ProjectsLocationsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsListCall { + 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 *ProjectsLocationsDataStoresModelsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) 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}/operations") + 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 "discoveryengine.projects.locations.dataStores.models.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.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 *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, 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 := &GoogleLongrunningListOperationsResponse{ + 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": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/models/{modelsId}/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.models.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}/operations", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "discoveryengine.projects.locations.dataStores.operations.get": + +type ProjectsLocationsDataStoresOperationsGetCall 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 *ProjectsLocationsDataStoresOperationsService) Get(name string) *ProjectsLocationsDataStoresOperationsGetCall { + c := &ProjectsLocationsDataStoresOperationsGetCall{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 *ProjectsLocationsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsGetCall { + 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 *ProjectsLocationsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsGetCall { + 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 *ProjectsLocationsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsGetCall { + 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 *ProjectsLocationsDataStoresOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresOperationsGetCall) 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 "discoveryengine.projects.locations.dataStores.operations.get" 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 *ProjectsLocationsDataStoresOperationsGetCall) 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": "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/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.operations.list": + +type ProjectsLocationsDataStoresOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsDataStoresOperationsService) List(name string) *ProjectsLocationsDataStoresOperationsListCall { + c := &ProjectsLocationsDataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsDataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsDataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsDataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsListCall { + 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 *ProjectsLocationsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsListCall { + 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 *ProjectsLocationsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsListCall { + 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 *ProjectsLocationsDataStoresOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresOperationsListCall) 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}/operations") + 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 "discoveryengine.projects.locations.dataStores.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.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 *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, 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 := &GoogleLongrunningListOperationsResponse{ + 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": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}/operations", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "discoveryengine.projects.locations.dataStores.servingConfigs.recommend": + +type ProjectsLocationsDataStoresServingConfigsRecommendCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Recommend: Makes a recommendation, which requires a contextual user +// event. +// +// - servingConfig: Full resource name of the format: +// projects/*/locations/global/dataStores/*/servingConfigs/* Before +// you can request recommendations from your model, you must create at +// least one serving config for it. +func (r *ProjectsLocationsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest) *ProjectsLocationsDataStoresServingConfigsRecommendCall { + c := &ProjectsLocationsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alpharecommendrequest = googleclouddiscoveryenginev1alpharecommendrequest + 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 *ProjectsLocationsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsRecommendCall { + 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 *ProjectsLocationsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsRecommendCall { + 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 *ProjectsLocationsDataStoresServingConfigsRecommendCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) 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.googleclouddiscoveryenginev1alpharecommendrequest) + 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/{+servingConfig}:recommend") + 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{ + "servingConfig": c.servingConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.recommend" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaRecommendResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaRecommendResponse.ServerResponse.Hea +// der 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 *ProjectsLocationsDataStoresServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaRecommendResponse, 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 := &GoogleCloudDiscoveryengineV1alphaRecommendResponse{ + 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": "Makes a recommendation, which requires a contextual user event.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.recommend", + // "parameterOrder": [ + // "servingConfig" + // ], + // "parameters": { + // "servingConfig": { + // "description": "Required. Full resource name of the format: projects/*/locations/global/dataStores/*/servingConfigs/* Before you can request recommendations from your model, you must create at least one serving config for it.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+servingConfig}:recommend", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.userEvents.collect": + +type ProjectsLocationsDataStoresUserEventsCollectCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Collect: Writes a single user event from the browser. This uses a GET +// request to due to browser restriction of POST-ing to a 3rd party +// domain. This method is used only by the Discovery Engine API +// JavaScript pixel and Google Tag Manager. Users should not call this +// method directly. +// +// - parent: The parent DataStore resource name, such as +// `projects/{project}/locations/{location}/dataStores/{data_store}`. +func (r *ProjectsLocationsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsDataStoresUserEventsCollectCall { + c := &ProjectsLocationsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Ets sets the optional parameter "ets": The event timestamp in +// milliseconds. This prevents browser caching of otherwise identical +// get requests. The name is abbreviated to reduce the payload bytes. +func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsDataStoresUserEventsCollectCall { + c.urlParams_.Set("ets", fmt.Sprint(ets)) + return c +} + +// Uri sets the optional parameter "uri": The URL including +// cgi-parameters but excluding the hash fragment with a length limit of +// 5,000 characters. This is often more useful than the referer URL, +// because many browsers only send the domain for 3rd party requests. +func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Uri(uri string) *ProjectsLocationsDataStoresUserEventsCollectCall { + c.urlParams_.Set("uri", uri) + return c +} + +// UserEvent sets the optional parameter "userEvent": Required. URL +// encoded UserEvent proto with a length limit of 2,000,000 characters. +func (c *ProjectsLocationsDataStoresUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsDataStoresUserEventsCollectCall { + c.urlParams_.Set("userEvent", userEvent) + 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 *ProjectsLocationsDataStoresUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresUserEventsCollectCall { + 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 *ProjectsLocationsDataStoresUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresUserEventsCollectCall { + 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 *ProjectsLocationsDataStoresUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsDataStoresUserEventsCollectCall { + 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 *ProjectsLocationsDataStoresUserEventsCollectCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresUserEventsCollectCall) 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/{+parent}/userEvents:collect") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.userEvents.collect" call. +// Exactly one of *GoogleApiHttpBody or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleApiHttpBody.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 *ProjectsLocationsDataStoresUserEventsCollectCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, 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 := &GoogleApiHttpBody{ + 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": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/userEvents:collect", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.userEvents.collect", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "ets": { + // "description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", + // "format": "int64", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/dataStores/{data_store}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "uri": { + // "description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for 3rd party requests.", + // "location": "query", + // "type": "string" + // }, + // "userEvent": { + // "description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/userEvents:collect", + // "response": { + // "$ref": "GoogleApiHttpBody" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.userEvents.import": + +type ProjectsLocationsDataStoresUserEventsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaimportusereventsrequest *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Import: Bulk import of User events. Request processing might be +// synchronous. Events that already exist are skipped. Use this method +// for backfilling historical user events. Operation.response is of type +// ImportResponse. Note that it is possible for a subset of the items to +// be successfully inserted. Operation.metadata is of type +// ImportMetadata. +// +// - parent: Parent DataStore resource name, of the form +// `projects/{project}/locations/{location}/dataStores/{data_store}`. +func (r *ProjectsLocationsDataStoresUserEventsService) Import(parent string, googleclouddiscoveryenginev1alphaimportusereventsrequest *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest) *ProjectsLocationsDataStoresUserEventsImportCall { + c := &ProjectsLocationsDataStoresUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaimportusereventsrequest = googleclouddiscoveryenginev1alphaimportusereventsrequest + 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 *ProjectsLocationsDataStoresUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresUserEventsImportCall { + 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 *ProjectsLocationsDataStoresUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresUserEventsImportCall { + 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 *ProjectsLocationsDataStoresUserEventsImportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresUserEventsImportCall) 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.googleclouddiscoveryenginev1alphaimportusereventsrequest) + 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:import") + 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.import" 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 *ProjectsLocationsDataStoresUserEventsImportCall) 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": "Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/userEvents:import", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.userEvents.import", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Parent DataStore resource name, of the form `projects/{project}/locations/{location}/dataStores/{data_store}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/userEvents:import", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.userEvents.write": + +type ProjectsLocationsDataStoresUserEventsWriteCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphauserevent *GoogleCloudDiscoveryengineV1alphaUserEvent + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Write: Writes a single user event. +// +// - parent: The parent DataStore resource name, such as +// `projects/{project}/locations/{location}/dataStores/{data_store}`. +func (r *ProjectsLocationsDataStoresUserEventsService) Write(parent string, googleclouddiscoveryenginev1alphauserevent *GoogleCloudDiscoveryengineV1alphaUserEvent) *ProjectsLocationsDataStoresUserEventsWriteCall { + c := &ProjectsLocationsDataStoresUserEventsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphauserevent = googleclouddiscoveryenginev1alphauserevent + 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 *ProjectsLocationsDataStoresUserEventsWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresUserEventsWriteCall { + 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 *ProjectsLocationsDataStoresUserEventsWriteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresUserEventsWriteCall { + 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 *ProjectsLocationsDataStoresUserEventsWriteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresUserEventsWriteCall) 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.googleclouddiscoveryenginev1alphauserevent) + 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:write") + 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.write" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaUserEvent or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaUserEvent.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 *ProjectsLocationsDataStoresUserEventsWriteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaUserEvent, 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 := &GoogleCloudDiscoveryengineV1alphaUserEvent{ + 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": "Writes a single user event.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/userEvents:write", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.userEvents.write", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/dataStores/{data_store}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/userEvents:write", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaUserEvent" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaUserEvent" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.operations.get": + +type ProjectsLocationsOperationsGetCall 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 *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{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 *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) 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 "discoveryengine.projects.locations.operations.get" 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 *ProjectsLocationsOperationsGetCall) 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": "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/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.operations.list": + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) 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}/operations") + 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 "discoveryengine.projects.locations.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.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 *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, 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 := &GoogleLongrunningListOperationsResponse{ + 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": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}/operations", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "discoveryengine.projects.operations.get": + +type ProjectsOperationsGetCall 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 *ProjectsOperationsService) Get(name string) *ProjectsOperationsGetCall { + c := &ProjectsOperationsGetCall{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 *ProjectsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsOperationsGetCall { + 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 *ProjectsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsOperationsGetCall { + 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 *ProjectsOperationsGetCall) Context(ctx context.Context) *ProjectsOperationsGetCall { + 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 *ProjectsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsOperationsGetCall) 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 "discoveryengine.projects.operations.get" 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 *ProjectsOperationsGetCall) 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": "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/projects/{projectsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.operations.list": + +type ProjectsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsOperationsService) List(name string) *ProjectsOperationsListCall { + c := &ProjectsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsOperationsListCall) Filter(filter string) *ProjectsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsOperationsListCall) PageSize(pageSize int64) *ProjectsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsOperationsListCall) PageToken(pageToken string) *ProjectsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsOperationsListCall { + 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 *ProjectsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsOperationsListCall { + 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 *ProjectsOperationsListCall) Context(ctx context.Context) *ProjectsOperationsListCall { + 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 *ProjectsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsOperationsListCall) 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}/operations") + 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 "discoveryengine.projects.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.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 *ProjectsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, 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 := &GoogleLongrunningListOperationsResponse{ + 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": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1alpha/projects/{projectsId}/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}/operations", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} diff --git a/discoveryengine/v1beta/discoveryengine-api.json b/discoveryengine/v1beta/discoveryengine-api.json new file mode 100644 index 00000000000..b91a33f0f1b --- /dev/null +++ b/discoveryengine/v1beta/discoveryengine-api.json @@ -0,0 +1,1732 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://discoveryengine.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Discovery Engine", + "description": "Discovery Engine API.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/discovery-engine/docs", + "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": "discoveryengine:v1beta", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://discoveryengine.mtls.googleapis.com/", + "name": "discoveryengine", + "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": { + "projects": { + "resources": { + "locations": { + "resources": { + "dataStores": { + "resources": { + "branches": { + "resources": { + "documents": { + "methods": { + "create": { + "description": "Creates a Document.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.branches.documents.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "documentId": { + "description": "Required. The ID to use for the Document, which will become the final component of the Document.name. If the caller does not have permission to create the Document, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This field must be unique among all Documents with the same parent. Otherwise, an ALREADY_EXISTS error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/documents", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocument" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocument" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Document.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + "httpMethod": "DELETE", + "id": "discoveryengine.projects.locations.dataStores.branches.documents.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to delete the Document, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Document to delete does not exist, a NOT_FOUND error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Document.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.branches.documents.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to access the Document, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested Document does not exist, a NOT_FOUND error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocument" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "import": { + "description": "Bulk import of multiple Documents. Request processing may be synchronous. Non-existing items will be created. Note: It is possible for a subset of the Documents to be successfully updated.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:import", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.branches.documents.import", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}`. Requires create/update permission.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/documents:import", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaImportDocumentsRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Gets a list of Documents.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.branches.documents.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of Documents to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token ListDocumentsResponse.next_page_token, received from a previous DocumentService.ListDocuments call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DocumentService.ListDocuments must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, to list documents under the default branch. If the caller does not have permission to list Documentss under this branch, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/documents", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaListDocumentsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Document.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.dataStores.branches.documents.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "If set to true, and the Document is not found, a new Document will be created.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocument" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocument" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "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": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.branches.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.branches.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}/operations", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "models": { + "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": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/models/{modelsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.models.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/models/{modelsId}/operations", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.models.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}/operations", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "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": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/operations", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}/operations", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "servingConfigs": { + "methods": { + "recommend": { + "description": "Makes a recommendation, which requires a contextual user event.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.servingConfigs.recommend", + "parameterOrder": [ + "servingConfig" + ], + "parameters": { + "servingConfig": { + "description": "Required. Full resource name of the format: projects/*/locations/global/dataStores/*/servingConfigs/* Before you can request recommendations from your model, you must create at least one serving config for it.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+servingConfig}:recommend", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaRecommendRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaRecommendResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "userEvents": { + "methods": { + "collect": { + "description": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/userEvents:collect", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.userEvents.collect", + "parameterOrder": [ + "parent" + ], + "parameters": { + "ets": { + "description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", + "format": "int64", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/dataStores/{data_store}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + }, + "uri": { + "description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for 3rd party requests.", + "location": "query", + "type": "string" + }, + "userEvent": { + "description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+parent}/userEvents:collect", + "response": { + "$ref": "GoogleApiHttpBody" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "import": { + "description": "Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/userEvents:import", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.userEvents.import", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Parent DataStore resource name, of the form `projects/{project}/locations/{location}/dataStores/{data_store}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/userEvents:import", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaImportUserEventsRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "write": { + "description": "Writes a single user event.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/userEvents:write", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.userEvents.write", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/dataStores/{data_store}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/userEvents:write", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaUserEvent" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaUserEvent" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "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": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}/operations", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "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": "v1beta/projects/{projectsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1beta/projects/{projectsId}/operations", + "httpMethod": "GET", + "id": "discoveryengine.projects.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}/operations", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + }, + "revision": "20221106", + "rootUrl": "https://discoveryengine.googleapis.com/", + "schemas": { + "GoogleApiHttpBody": { + "description": "Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.", + "id": "GoogleApiHttpBody", + "properties": { + "contentType": { + "description": "The HTTP Content-Type header value specifying the content type of the body.", + "type": "string" + }, + "data": { + "description": "The HTTP request/response body as raw binary.", + "format": "byte", + "type": "string" + }, + "extensions": { + "description": "Application specific response metadata. Must be set in the first response for streaming APIs.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata": { + "description": "Metadata related to the progress of the ImportDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata", + "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 processed 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" + }, + "GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse": { + "description": "Response of the ImportDocumentsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse", + "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "description": "Echoes the destination for the complete errors in the request if set." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaImportErrorConfig": { + "description": "Configuration of destination for Import related errors.", + "id": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "properties": { + "gcsPrefix": { + "description": "Google Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors will be written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata": { + "description": "Metadata related to the progress of the Import operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata", + "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 processed 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" + }, + "GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse": { + "description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse", + "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "description": "Echoes the destination for the complete errors if this field was set in the request." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "joinedEventsCount": { + "description": "Count of user events imported with complete existing Documents.", + "format": "int64", + "type": "string" + }, + "unjoinedEventsCount": { + "description": "Count of user events imported, but with Document information not found in the existing Branch.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaBigQuerySource": { + "description": "BigQuery source import data from.", + "id": "GoogleCloudDiscoveryengineV1betaBigQuerySource", + "properties": { + "dataSchema": { + "description": "The schema to use when parsing the data from the source. Supported values for imports: * `user_event` (default): One JSON UserEvent per line. * `document` (default): One JSON Document per line. Each document must have a valid document.id.", + "type": "string" + }, + "datasetId": { + "description": "Required. The BigQuery data set to copy the data from with a length limit of 1,024 characters.", + "type": "string" + }, + "gcsStagingDir": { + "description": "Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the BigQuery export to a specific Cloud Storage directory.", + "type": "string" + }, + "partitionDate": { + "$ref": "GoogleTypeDate", + "description": "BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format." + }, + "projectId": { + "description": "The project ID (can be project # or ID) that the BigQuery source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "type": "string" + }, + "tableId": { + "description": "Required. The BigQuery table to copy the data from with a length limit of 1,024 characters.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaCompletionInfo": { + "description": "Detailed completion information including completion attribution token and clicked completion info.", + "id": "GoogleCloudDiscoveryengineV1betaCompletionInfo", + "properties": { + "selectedPosition": { + "description": "End user selected CompleteQueryResponse.CompletionResult.suggestion position, starting from 0.", + "format": "int32", + "type": "integer" + }, + "selectedSuggestion": { + "description": "End user selected CompleteQueryResponse.CompletionResult.suggestion.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaCustomAttribute": { + "description": "A custom attribute that is not explicitly modeled in a resource, e.g. UserEvent.", + "id": "GoogleCloudDiscoveryengineV1betaCustomAttribute", + "properties": { + "numbers": { + "description": "The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is \"lengths_cm\". Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.", + "items": { + "format": "double", + "type": "number" + }, + "type": "array" + }, + "text": { + "description": "The textual values of this custom attribute. For example, `[\"yellow\", \"green\"]` when the key is \"color\". Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaDocument": { + "description": "Document captures all raw metadata information of items to be recommended or searched.", + "id": "GoogleCloudDiscoveryengineV1betaDocument", + "properties": { + "id": { + "description": "Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.", + "type": "string" + }, + "jsonData": { + "description": "The JSON string representation of the document. It should conform to the registered schema or an INVALID_ARGUMENT error is thrown.", + "type": "string" + }, + "name": { + "description": "Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" + }, + "parentDocumentId": { + "description": "The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.", + "type": "string" + }, + "schemaId": { + "description": "Required. The identifier of the schema located in the same data store.", + "type": "string" + }, + "structData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The structured JSON data for the document. It should conform to the registered schema or an INVALID_ARGUMENT error is thrown.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaDocumentInfo": { + "description": "Detailed document information associated with a user event.", + "id": "GoogleCloudDiscoveryengineV1betaDocumentInfo", + "properties": { + "id": { + "description": "Required. The Document resource ID.", + "type": "string" + }, + "name": { + "description": "Required. The Document resource full name, of the form: projects//locations//dataStores//branches//documents/", + "type": "string" + }, + "promotionIds": { + "description": "The promotion IDs associated with this Document. Currently, this field is restricted to at most one ID.", + "items": { + "type": "string" + }, + "type": "array" + }, + "quantity": { + "description": "Quantity of the Document associated with the user event. Defaults to 1. For example, this field will be 2 if two quantities of the same Document are involved in a `add-to-cart` event. Required for events of the following event types: * `add-to-cart` * `purchase`", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaGcsSource": { + "description": "Google Cloud Storage location for input content. format.", + "id": "GoogleCloudDiscoveryengineV1betaGcsSource", + "properties": { + "dataSchema": { + "description": "The schema to use when parsing the data from the source. Supported values for imports: * `user_event` (default): One JSON UserEvent per line. * `document` (default): One JSON Document per line. Each document must have a valid Document.id.", + "type": "string" + }, + "inputUris": { + "description": "Required. Google Cloud Storage URIs to input files. URI can be up to 2000 characters long. URIs can match the full object path (for example, `gs://bucket/directory/object.json`) or a pattern matching one or more files, such as `gs://bucket/directory/*.json`. A request can contain at most 100 files, and each file can be up to 2 GB.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata": { + "description": "Metadata related to the progress of the ImportDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata", + "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 processed 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" + }, + "GoogleCloudDiscoveryengineV1betaImportDocumentsRequest": { + "description": "Request message for Import methods.", + "id": "GoogleCloudDiscoveryengineV1betaImportDocumentsRequest", + "properties": { + "bigquerySource": { + "$ref": "GoogleCloudDiscoveryengineV1betaBigQuerySource", + "description": "BigQuery input source." + }, + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", + "description": "The desired location of errors incurred during the Import." + }, + "gcsSource": { + "$ref": "GoogleCloudDiscoveryengineV1betaGcsSource", + "description": "Google Cloud Storage location for the input content." + }, + "inlineSource": { + "$ref": "GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource", + "description": "The Inline source for the input content for documents." + }, + "reconciliationMode": { + "description": "The mode of reconciliation between existing documents and the documents to be imported. Defaults to ReconciliationMode.INCREMENTAL.", + "enum": [ + "RECONCILIATION_MODE_UNSPECIFIED", + "INCREMENTAL", + "FULL" + ], + "enumDescriptions": [ + "Defaults to INCREMENTAL.", + "Inserts new documents or updates existing documents.", + "Calculates diff and replaces the entire document dataset. Existing documents may be deleted if they are not present in the source location." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource": { + "description": "The inline source for the input config for ImportDocuments method.", + "id": "GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource", + "properties": { + "documents": { + "description": "Required. A list of documents to update/create. Each document must have a valid Document.id. Recommended max of 100 items.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocument" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaImportDocumentsResponse": { + "description": "Response of the ImportDocumentsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudDiscoveryengineV1betaImportDocumentsResponse", + "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", + "description": "Echoes the destination for the complete errors in the request if set." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaImportErrorConfig": { + "description": "Configuration of destination for Import related errors.", + "id": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", + "properties": { + "gcsPrefix": { + "description": "Google Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors will be written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata": { + "description": "Metadata related to the progress of the Import operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata", + "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 processed 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" + }, + "GoogleCloudDiscoveryengineV1betaImportUserEventsRequest": { + "description": "Request message for the ImportUserEvents request.", + "id": "GoogleCloudDiscoveryengineV1betaImportUserEventsRequest", + "properties": { + "bigquerySource": { + "$ref": "GoogleCloudDiscoveryengineV1betaBigQuerySource", + "description": "Required. BigQuery input source." + }, + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", + "description": "The desired location of errors incurred during the Import. Cannot be set for inline user event imports." + }, + "gcsSource": { + "$ref": "GoogleCloudDiscoveryengineV1betaGcsSource", + "description": "Required. Google Cloud Storage location for the input content." + }, + "inlineSource": { + "$ref": "GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource", + "description": "Required. The Inline source for the input content for UserEvents." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource": { + "description": "The inline source for the input config for ImportUserEvents method.", + "id": "GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource", + "properties": { + "userEvents": { + "description": "Required. A list of user events to import. Recommended max of 10k items.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaUserEvent" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaImportUserEventsResponse": { + "description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudDiscoveryengineV1betaImportUserEventsResponse", + "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", + "description": "Echoes the destination for the complete errors if this field was set in the request." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "joinedEventsCount": { + "description": "Count of user events imported with complete existing Documents.", + "format": "int64", + "type": "string" + }, + "unjoinedEventsCount": { + "description": "Count of user events imported, but with Document information not found in the existing Branch.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaListDocumentsResponse": { + "description": "Response message for DocumentService.ListDocuments method.", + "id": "GoogleCloudDiscoveryengineV1betaListDocumentsResponse", + "properties": { + "documents": { + "description": "The Documents.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocument" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token that can be sent as ListDocumentsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaMediaInfo": { + "description": "Media-specific user event information.", + "id": "GoogleCloudDiscoveryengineV1betaMediaInfo", + "properties": { + "mediaProgressDuration": { + "description": "The media progress time in seconds, if applicable. For example, if the end user has finished 90 seconds of a playback video, then MediaInfo.media_progress_duration.seconds should be set to 90.", + "format": "google-duration", + "type": "string" + }, + "mediaProgressPercentage": { + "description": "Media progress should be computed using only the media_progress_duration relative to the media total length. This value must be between [0, 1.0] inclusive. If this is not a playback or the progress cannot be computed (e.g. ongoing livestream), this field should be unset.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaPageInfo": { + "description": "Detailed page information.", + "id": "GoogleCloudDiscoveryengineV1betaPageInfo", + "properties": { + "pageCategory": { + "description": "The most specific category associated with a category page. To represent full path of category, use '\u003e' sign to separate different hierarchies. If '\u003e' is part of the category name, please replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: \"pageCategory\" : \"Sales \u003e 2017 Black Friday Deals\". Required for `view-category-page` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.", + "type": "string" + }, + "pageviewId": { + "description": "A unique ID of a web page view. This should be kept the same for all user events triggered from the same pageview. For example, an item detail page view could trigger multiple events as the user is browsing the page. The `pageViewId` property should be kept the same for all these events so that they can be grouped together properly. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically.", + "type": "string" + }, + "referrerUri": { + "description": "The referrer URL of the current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. However, some browser privacy restrictions may cause this field to be empty.", + "type": "string" + }, + "uri": { + "description": "Complete URL (window.location.href) of the user's current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. Maximum length 5,000 characters.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaPanelInfo": { + "description": "Detailed panel information associated with a user event.", + "id": "GoogleCloudDiscoveryengineV1betaPanelInfo", + "properties": { + "displayName": { + "description": "The display name of the panel.", + "type": "string" + }, + "panelId": { + "description": "Required. The panel ID.", + "type": "string" + }, + "panelPosition": { + "description": "The ordered position of the panel, if shown to the user with other panels. If set, then total_panels must also be set.", + "format": "int32", + "type": "integer" + }, + "totalPanels": { + "description": "The total number of panels, including this one, shown to the user. Must be set if panel_position is set.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaRecommendRequest": { + "description": "Request message for Recommend method.", + "id": "GoogleCloudDiscoveryengineV1betaRecommendRequest", + "properties": { + "filter": { + "description": "Filter for restricting recommendation results with a length limit of 5,000 characters. Currently, only filter expressions on the `filter_tags` attribute is supported. Examples: * (filter_tags: ANY(\"Red\", \"Blue\") OR filter_tags: ANY(\"Hot\", \"Cold\")) * (filter_tags: ANY(\"Red\", \"Blue\")) AND NOT (filter_tags: ANY(\"Green\")) If your filter blocks all results, the API will return generic (unfiltered) popular Documents. If you only want results strictly matching the filters, set `strictFiltering` to True in RecommendRequest.params to receive empty results instead. Note that the API will never return Documents with storageStatus of \"EXPIRED\" or \"DELETED\" regardless of filter choices.", + "type": "string" + }, + "pageSize": { + "description": "Maximum number of results to return. Set this property to the number of recommendation results needed. If zero, the service will choose a reasonable default. The maximum allowed value is 100. Values above 100 will be coerced to 100.", + "format": "int32", + "type": "integer" + }, + "params": { + "additionalProperties": { + "type": "any" + }, + "description": "Additional domain specific parameters for the recommendations. Allowed values: * `returnDocument`: Boolean. If set to true, the associated Document object will be returned in RecommendResponse.results.document. * `returnScore`: Boolean. If set to true, the recommendation 'score' corresponding to each returned Document will be set in RecommendResponse.results.metadata. The given 'score' indicates the probability of a Document conversion given the user's context and history. * `strictFiltering`: Boolean. True by default. If set to false, the service will return generic (unfiltered) popular Documents instead of empty if your filter blocks all recommendation results. * `diversityLevel`: String. Default empty. If set to be non-empty, then it needs to be one of: * 'no-diversity' * 'low-diversity' * 'medium-diversity' * 'high-diversity' * 'auto-diversity' This gives request-level control and adjusts recommendation results based on Document category.", + "type": "object" + }, + "userEvent": { + "$ref": "GoogleCloudDiscoveryengineV1betaUserEvent", + "description": "Required. Context about the user, what they are looking at and what action they took to trigger the Recommend request. Note that this user event detail won't be ingested to userEvent logs. Thus, a separate userEvent write request is required for event logging. Don't set UserEvent.user_pseudo_id or UserEvent.user_info.user_id to the same fixed ID for different users. If you are trying to receive non-personalized recommendations (not recommended; this can negatively impact model performance), instead set UserEvent.user_pseudo_id to a random unique ID and leave UserEvent.user_info.user_id unset." + }, + "userLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", + "type": "object" + }, + "validateOnly": { + "description": "Use validate only mode for this recommendation query. If set to true, a fake model will be used that returns arbitrary Document IDs. Note that the validate only mode should only be used for testing the API, or if the model is not ready.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaRecommendResponse": { + "description": "Response message for Recommend method.", + "id": "GoogleCloudDiscoveryengineV1betaRecommendResponse", + "properties": { + "attributionToken": { + "description": "A unique attribution token. This should be included in the UserEvent logs resulting from this recommendation, which enables accurate attribution of recommendation model performance.", + "type": "string" + }, + "missingIds": { + "description": "IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.", + "items": { + "type": "string" + }, + "type": "array" + }, + "results": { + "description": "A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least).", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult" + }, + "type": "array" + }, + "validateOnly": { + "description": "True if RecommendRequest.validate_only was set.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult": { + "description": "RecommendationResult represents a generic recommendation result with associated metadata.", + "id": "GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult", + "properties": { + "document": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocument", + "description": "Set if `returnDocument` is set to true in RecommendRequest.params." + }, + "id": { + "description": "Resource ID of the recommended Document.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "any" + }, + "description": "Additional Document metadata / annotations. Possible values: * `score`: Recommendation score in double value. Is set if `returnScore` is set to true in RecommendRequest.params.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSearchInfo": { + "description": "Detailed search information.", + "id": "GoogleCloudDiscoveryengineV1betaSearchInfo", + "properties": { + "offset": { + "description": "An integer that specifies the current offset for pagination (the 0-indexed starting location, amongst the products deemed by the API as relevant). See SearchRequest.offset for definition. If this field is negative, an INVALID_ARGUMENT is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.", + "format": "int32", + "type": "integer" + }, + "orderBy": { + "description": "The order in which products are returned, if applicable. See SearchRequest.order_by for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.", + "type": "string" + }, + "searchQuery": { + "description": "The user's search query. See SearchRequest.query for definition. The value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. At least one of search_query or page_categories is required for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaTransactionInfo": { + "description": "A transaction represents the entire purchase transaction.", + "id": "GoogleCloudDiscoveryengineV1betaTransactionInfo", + "properties": { + "cost": { + "description": "All the costs associated with the products. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs, such that: * Profit = value - tax - cost", + "format": "float", + "type": "number" + }, + "currency": { + "description": "Required. Currency code. Use three-character ISO-4217 code.", + "type": "string" + }, + "discountValue": { + "description": "The total discount(s) value applied to this transaction. This figure should be excluded from TransactionInfo.value For example, if a user paid TransactionInfo.value amount, then nominal (pre-discount) value of the transaction is the sum of TransactionInfo.value and TransactionInfo.discount_value This means that profit is calculated the same way, regardless of the discount value, and that TransactionInfo.discount_value can be larger than TransactionInfo.value: * Profit = value - tax - cost", + "format": "float", + "type": "number" + }, + "tax": { + "description": "All the taxes associated with the transaction.", + "format": "float", + "type": "number" + }, + "transactionId": { + "description": "The transaction ID with a length limit of 128 characters.", + "type": "string" + }, + "value": { + "description": "Required. Total non-zero value associated with the transaction. This value may include shipping, tax, or other adjustments to the total value that you want to include.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaUserEvent": { + "description": "UserEvent captures all metadata information DiscoveryEngine API needs to know about how end users interact with customers' website.", + "id": "GoogleCloudDiscoveryengineV1betaUserEvent", + "properties": { + "attributes": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1betaCustomAttribute" + }, + "description": "Extra user event features to include in the recommendation model. These attributes must NOT contain data that needs to be parsed or processed further, e.g. JSON or other encodings. If you provide custom attributes for ingested user events, also include them in the user events that you associate with prediction requests. Custom attribute formatting must be consistent between imported events and events provided with prediction requests. This lets the DiscoveryEngine API use those custom attributes when training models and serving predictions, which helps improve recommendation quality. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * The key must be a UTF-8 encoded string with a length limit of 5,000 characters. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed. For product recommendations, an example of extra user information is traffic_channel, which is how a user arrives at the site. Users can arrive at the site by coming to the site directly, coming through Google search, or in other ways.", + "type": "object" + }, + "attributionToken": { + "description": "Token to attribute an API response to user action(s) to trigger the event. Highly recommended for user events that are the result of PredictionService.Predict. This field enables accurate attribution of recommendation model performance. The value must be one of: * PredictResponse.attribution_token for events that are the result of PredictionService.Predict. * SearchResponse.attribution_token for events that are the result of SearchService.Search. * CompleteQueryResponse.attribution_token for events that are the result of SearchService.CompleteQuery. This token enables us to accurately attribute page view or conversion completion back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass PredictResponse.attribution_token as a URL parameter to product K's page. When recording events on product K's page, log the PredictResponse.attribution_token to this field.", + "type": "string" + }, + "completionInfo": { + "$ref": "GoogleCloudDiscoveryengineV1betaCompletionInfo", + "description": "CompleteQuery API details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search." + }, + "directUserRequest": { + "description": "Should set to true if the request is made directly from the end user, in which case the UserEvent.user_info.user_agent can be populated from the HTTP request. This flag should be set only if the API request is made directly from the end user such as a mobile app (and not if a gateway or a server is processing and pushing the user events). This should not be set when using the JavaScript tag in UserEventService.CollectUserEvent.", + "type": "boolean" + }, + "documents": { + "description": "List of Documents associated with this user event. This field is optional except for the following event types: * `view-item` * `add-to-cart` * `purchase` * `media-play` * `media-complete` In a `search` event, this field represents the documents returned to the end user on the current page (the end user may have not finished browsing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new `search` event with different UserEvent.documents is desired.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocumentInfo" + }, + "type": "array" + }, + "eventTime": { + "description": "Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened.", + "format": "google-datetime", + "type": "string" + }, + "eventType": { + "description": "Required. User event type. Allowed values are: Generic values: * `search`: Search for Documents. * `view-item`: Detailed page view of a Document. * `view-item-list`: View of a panel or ordered list of Documents. * `view-home-page`: View of the home page. * `view-category-page`: View of a category page, e.g. Home \u003e Men \u003e Jeans Retail-related values: * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping * `purchase`: Purchase an item(s) Media-related values: * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc.", + "type": "string" + }, + "filter": { + "description": "The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. One example is for `search` events, the associated SearchService.SearchRequest may contain a filter expression in SearchService.SearchRequest.filter conforming to https://google.aip.dev/160#filtering. Similarly, for `view-item-list` events that are generated from a PredictionService.PredictRequest, this field may be populated directly from PredictionService.PredictRequest.filter conforming to https://google.aip.dev/160#filtering. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "type": "string" + }, + "mediaInfo": { + "$ref": "GoogleCloudDiscoveryengineV1betaMediaInfo", + "description": "Media-specific info." + }, + "pageInfo": { + "$ref": "GoogleCloudDiscoveryengineV1betaPageInfo", + "description": "Page metadata such as categories and other critical information for certain event types such as `view-category-page`." + }, + "panel": { + "$ref": "GoogleCloudDiscoveryengineV1betaPanelInfo", + "description": "Panel metadata associated with this user event." + }, + "promotionIds": { + "description": "The promotion IDs if this is an event associated with promotions. Currently, this field is restricted to at most one ID.", + "items": { + "type": "string" + }, + "type": "array" + }, + "searchInfo": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchInfo", + "description": "Search API details related to the event. This field should be set for `search` event." + }, + "sessionId": { + "description": "A unique identifier for tracking a visitor session with a length limit of 128 bytes. A session is an aggregation of an end user behavior in a time span. A general guideline to populate the sesion_id: 1. If user has no activity for 30 min, a new session_id should be assigned. 2. The session_id should be unique across users, suggest use uuid or add UserEvent.user_pseudo_id as prefix.", + "type": "string" + }, + "tagIds": { + "description": "A list of identifiers for the independent experiment groups this user event belongs to. This is used to distinguish between user events associated with different experiment setups on the customer end.", + "items": { + "type": "string" + }, + "type": "array" + }, + "transactionInfo": { + "$ref": "GoogleCloudDiscoveryengineV1betaTransactionInfo", + "description": "The transaction metadata (if any) associated with this user event." + }, + "userInfo": { + "$ref": "GoogleCloudDiscoveryengineV1betaUserInfo", + "description": "Information about the end user." + }, + "userPseudoId": { + "description": "Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor log in/out of the website. Do not set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. The field should not contain PII or user-data. We recommend to use Google Analytics [Client ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) for this field.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaUserInfo": { + "description": "Information of an end user.", + "id": "GoogleCloudDiscoveryengineV1betaUserInfo", + "properties": { + "userAgent": { + "description": "User agent as included in the HTTP header. Required for getting SearchResponse.sponsored_results. The field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if direct_user_request is set.", + "type": "string" + }, + "userId": { + "description": "Highly recommended for logged-in users. Unique identifier for logged-in user, such as a user name. Don't set for anonymous users. Always use a hashed value for this ID. Don't set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleLongrunningListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "GoogleLongrunningListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "GoogleLongrunningOperation" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleLongrunningOperation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "GoogleLongrunningOperation", + "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": "GoogleRpcStatus", + "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" + }, + "GoogleProtobufEmpty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "GoogleProtobufEmpty", + "properties": {}, + "type": "object" + }, + "GoogleRpcStatus": { + "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": "GoogleRpcStatus", + "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" + }, + "GoogleTypeDate": { + "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": "GoogleTypeDate", + "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" + } + }, + "servicePath": "", + "title": "Discovery Engine API", + "version": "v1beta", + "version_module": true +} \ No newline at end of file diff --git a/discoveryengine/v1beta/discoveryengine-gen.go b/discoveryengine/v1beta/discoveryengine-gen.go new file mode 100644 index 00000000000..2fcb24219de --- /dev/null +++ b/discoveryengine/v1beta/discoveryengine-gen.go @@ -0,0 +1,5499 @@ +// Copyright 2022 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 discoveryengine provides access to the Discovery Engine API. +// +// For product documentation, see: https://cloud.google.com/discovery-engine/docs +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/discoveryengine/v1beta" +// ... +// ctx := context.Background() +// discoveryengineService, err := discoveryengine.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: +// +// discoveryengineService, err := discoveryengine.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, ...) +// discoveryengineService, err := discoveryengine.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. +package discoveryengine // import "google.golang.org/api/discoveryengine/v1beta" + +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 + +const apiId = "discoveryengine:v1beta" +const apiName = "discoveryengine" +const apiVersion = "v1beta" +const basePath = "https://discoveryengine.googleapis.com/" +const mtlsBasePath = "https://discoveryengine.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the + // email address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + rs.Operations = NewProjectsOperationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService + + Operations *ProjectsOperationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.DataStores = NewProjectsLocationsDataStoresService(s) + rs.Operations = NewProjectsLocationsOperationsService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + DataStores *ProjectsLocationsDataStoresService + + Operations *ProjectsLocationsOperationsService +} + +func NewProjectsLocationsDataStoresService(s *Service) *ProjectsLocationsDataStoresService { + rs := &ProjectsLocationsDataStoresService{s: s} + rs.Branches = NewProjectsLocationsDataStoresBranchesService(s) + rs.Models = NewProjectsLocationsDataStoresModelsService(s) + rs.Operations = NewProjectsLocationsDataStoresOperationsService(s) + rs.ServingConfigs = NewProjectsLocationsDataStoresServingConfigsService(s) + rs.UserEvents = NewProjectsLocationsDataStoresUserEventsService(s) + return rs +} + +type ProjectsLocationsDataStoresService struct { + s *Service + + Branches *ProjectsLocationsDataStoresBranchesService + + Models *ProjectsLocationsDataStoresModelsService + + Operations *ProjectsLocationsDataStoresOperationsService + + ServingConfigs *ProjectsLocationsDataStoresServingConfigsService + + UserEvents *ProjectsLocationsDataStoresUserEventsService +} + +func NewProjectsLocationsDataStoresBranchesService(s *Service) *ProjectsLocationsDataStoresBranchesService { + rs := &ProjectsLocationsDataStoresBranchesService{s: s} + rs.Documents = NewProjectsLocationsDataStoresBranchesDocumentsService(s) + rs.Operations = NewProjectsLocationsDataStoresBranchesOperationsService(s) + return rs +} + +type ProjectsLocationsDataStoresBranchesService struct { + s *Service + + Documents *ProjectsLocationsDataStoresBranchesDocumentsService + + Operations *ProjectsLocationsDataStoresBranchesOperationsService +} + +func NewProjectsLocationsDataStoresBranchesDocumentsService(s *Service) *ProjectsLocationsDataStoresBranchesDocumentsService { + rs := &ProjectsLocationsDataStoresBranchesDocumentsService{s: s} + return rs +} + +type ProjectsLocationsDataStoresBranchesDocumentsService struct { + s *Service +} + +func NewProjectsLocationsDataStoresBranchesOperationsService(s *Service) *ProjectsLocationsDataStoresBranchesOperationsService { + rs := &ProjectsLocationsDataStoresBranchesOperationsService{s: s} + return rs +} + +type ProjectsLocationsDataStoresBranchesOperationsService struct { + s *Service +} + +func NewProjectsLocationsDataStoresModelsService(s *Service) *ProjectsLocationsDataStoresModelsService { + rs := &ProjectsLocationsDataStoresModelsService{s: s} + rs.Operations = NewProjectsLocationsDataStoresModelsOperationsService(s) + return rs +} + +type ProjectsLocationsDataStoresModelsService struct { + s *Service + + Operations *ProjectsLocationsDataStoresModelsOperationsService +} + +func NewProjectsLocationsDataStoresModelsOperationsService(s *Service) *ProjectsLocationsDataStoresModelsOperationsService { + rs := &ProjectsLocationsDataStoresModelsOperationsService{s: s} + return rs +} + +type ProjectsLocationsDataStoresModelsOperationsService struct { + s *Service +} + +func NewProjectsLocationsDataStoresOperationsService(s *Service) *ProjectsLocationsDataStoresOperationsService { + rs := &ProjectsLocationsDataStoresOperationsService{s: s} + return rs +} + +type ProjectsLocationsDataStoresOperationsService struct { + s *Service +} + +func NewProjectsLocationsDataStoresServingConfigsService(s *Service) *ProjectsLocationsDataStoresServingConfigsService { + rs := &ProjectsLocationsDataStoresServingConfigsService{s: s} + return rs +} + +type ProjectsLocationsDataStoresServingConfigsService struct { + s *Service +} + +func NewProjectsLocationsDataStoresUserEventsService(s *Service) *ProjectsLocationsDataStoresUserEventsService { + rs := &ProjectsLocationsDataStoresUserEventsService{s: s} + return rs +} + +type ProjectsLocationsDataStoresUserEventsService struct { + s *Service +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +func NewProjectsOperationsService(s *Service) *ProjectsOperationsService { + rs := &ProjectsOperationsService{s: s} + return rs +} + +type ProjectsOperationsService struct { + s *Service +} + +// GoogleApiHttpBody: Message that represents an arbitrary HTTP body. It +// should only be used for payload formats that can't be represented as +// JSON, such as raw binary or an HTML page. This message can be used +// both in streaming and non-streaming API methods in the request as +// well as the response. It can be used as a top-level request field, +// which is convenient if one wants to extract parameters from either +// the URL or HTTP template into the request fields and also want access +// to the raw HTTP body. Example: message GetResourceRequest { // A +// unique request id. string request_id = 1; // The raw HTTP body is +// bound to this field. google.api.HttpBody http_body = 2; } service +// ResourceService { rpc GetResource(GetResourceRequest) returns +// (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) +// returns (google.protobuf.Empty); } Example with streaming methods: +// service CaldavService { rpc GetCalendar(stream google.api.HttpBody) +// returns (stream google.api.HttpBody); rpc UpdateCalendar(stream +// google.api.HttpBody) returns (stream google.api.HttpBody); } Use of +// this type only changes how the request and response bodies are +// handled, all other features will continue to work unchanged. +type GoogleApiHttpBody struct { + // ContentType: The HTTP Content-Type header value specifying the + // content type of the body. + ContentType string `json:"contentType,omitempty"` + + // Data: The HTTP request/response body as raw binary. + Data string `json:"data,omitempty"` + + // Extensions: Application specific response metadata. Must be set in + // the first response for streaming APIs. + Extensions []googleapi.RawMessage `json:"extensions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ContentType") 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. "ContentType") 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 *GoogleApiHttpBody) MarshalJSON() ([]byte, error) { + type NoMethod GoogleApiHttpBody + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata: Metadata +// related to the progress of the ImportDocuments operation. This will +// be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata 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 processed 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 *GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse: Response of +// the ImportDocumentsRequest. If the long running operation is done, +// then this message is returned by the +// google.longrunning.Operations.response field if the operation was +// successful. +type GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse struct { + // ErrorConfig: Echoes the destination for the complete errors in the + // request if set. + ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` + + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorConfig") 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. "ErrorConfig") 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 *GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaImportErrorConfig: Configuration of +// destination for Import related errors. +type GoogleCloudDiscoveryengineV1alphaImportErrorConfig struct { + // GcsPrefix: Google Cloud Storage prefix for import errors. This must + // be an empty, existing Cloud Storage directory. Import errors will be + // written to sharded files in this directory, one per line, as a + // JSON-encoded `google.rpc.Status` message. + GcsPrefix string `json:"gcsPrefix,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GcsPrefix") 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. "GcsPrefix") 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 *GoogleCloudDiscoveryengineV1alphaImportErrorConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportErrorConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata: Metadata +// related to the progress of the Import operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata 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 processed 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 *GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse: Response +// of the ImportUserEventsRequest. If the long running operation was +// successful, then this message is returned by the +// google.longrunning.Operations.response field if the operation was +// successful. +type GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse struct { + // ErrorConfig: Echoes the destination for the complete errors if this + // field was set in the request. + ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` + + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + + // JoinedEventsCount: Count of user events imported with complete + // existing Documents. + JoinedEventsCount int64 `json:"joinedEventsCount,omitempty,string"` + + // UnjoinedEventsCount: Count of user events imported, but with Document + // information not found in the existing Branch. + UnjoinedEventsCount int64 `json:"unjoinedEventsCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "ErrorConfig") 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. "ErrorConfig") 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 *GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaBigQuerySource: BigQuery source +// import data from. +type GoogleCloudDiscoveryengineV1betaBigQuerySource struct { + // DataSchema: The schema to use when parsing the data from the source. + // Supported values for imports: * `user_event` (default): One JSON + // UserEvent per line. * `document` (default): One JSON Document per + // line. Each document must have a valid document.id. + DataSchema string `json:"dataSchema,omitempty"` + + // DatasetId: Required. The BigQuery data set to copy the data from with + // a length limit of 1,024 characters. + DatasetId string `json:"datasetId,omitempty"` + + // GcsStagingDir: Intermediate Cloud Storage directory used for the + // import with a length limit of 2,000 characters. Can be specified if + // one wants to have the BigQuery export to a specific Cloud Storage + // directory. + GcsStagingDir string `json:"gcsStagingDir,omitempty"` + + // PartitionDate: BigQuery time partitioned table's _PARTITIONDATE in + // YYYY-MM-DD format. + PartitionDate *GoogleTypeDate `json:"partitionDate,omitempty"` + + // ProjectId: The project ID (can be project # or ID) that the BigQuery + // source is in with a length limit of 128 characters. If not specified, + // inherits the project ID from the parent request. + ProjectId string `json:"projectId,omitempty"` + + // TableId: Required. The BigQuery table to copy the data from with a + // length limit of 1,024 characters. + TableId string `json:"tableId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataSchema") 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. "DataSchema") 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 *GoogleCloudDiscoveryengineV1betaBigQuerySource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaBigQuerySource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaCompletionInfo: Detailed completion +// information including completion attribution token and clicked +// completion info. +type GoogleCloudDiscoveryengineV1betaCompletionInfo struct { + // SelectedPosition: End user selected + // CompleteQueryResponse.CompletionResult.suggestion position, starting + // from 0. + SelectedPosition int64 `json:"selectedPosition,omitempty"` + + // SelectedSuggestion: End user selected + // CompleteQueryResponse.CompletionResult.suggestion. + SelectedSuggestion string `json:"selectedSuggestion,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SelectedPosition") 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. "SelectedPosition") 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 *GoogleCloudDiscoveryengineV1betaCompletionInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCompletionInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaCustomAttribute: A custom attribute +// that is not explicitly modeled in a resource, e.g. UserEvent. +type GoogleCloudDiscoveryengineV1betaCustomAttribute struct { + // Numbers: The numerical values of this custom attribute. For example, + // `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of text or + // numbers should be set. Otherwise, an INVALID_ARGUMENT error is + // returned. + Numbers []float64 `json:"numbers,omitempty"` + + // Text: The textual values of this custom attribute. For example, + // `["yellow", "green"]` when the key is "color". Empty string is not + // allowed. Otherwise, an INVALID_ARGUMENT error is returned. Exactly + // one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT + // error is returned. + Text []string `json:"text,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Numbers") 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. "Numbers") 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 *GoogleCloudDiscoveryengineV1betaCustomAttribute) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCustomAttribute + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaDocument: Document captures all raw +// metadata information of items to be recommended or searched. +type GoogleCloudDiscoveryengineV1betaDocument struct { + // Id: Immutable. The identifier of the document. Id should conform to + // RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with a length + // limit of 63 characters. + Id string `json:"id,omitempty"` + + // JsonData: The JSON string representation of the document. It should + // conform to the registered schema or an INVALID_ARGUMENT error is + // thrown. + JsonData string `json:"jsonData,omitempty"` + + // Name: Immutable. The full resource name of the document. Format: + // `projects/{project}/locations/{location}/dataStores/{data_store}/branc + // hes/{branch}/documents/{document_id}`. This field must be a UTF-8 + // encoded string with a length limit of 1024 characters. + Name string `json:"name,omitempty"` + + // ParentDocumentId: The identifier of the parent document. Currently + // supports at most two level document hierarchy. Id should conform to + // RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with a length + // limit of 63 characters. + ParentDocumentId string `json:"parentDocumentId,omitempty"` + + // SchemaId: Required. The identifier of the schema located in the same + // data store. + SchemaId string `json:"schemaId,omitempty"` + + // StructData: The structured JSON data for the document. It should + // conform to the registered schema or an INVALID_ARGUMENT error is + // thrown. + StructData googleapi.RawMessage `json:"structData,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. 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. "Id") 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 *GoogleCloudDiscoveryengineV1betaDocument) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocument + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaDocumentInfo: Detailed document +// information associated with a user event. +type GoogleCloudDiscoveryengineV1betaDocumentInfo struct { + // Id: Required. The Document resource ID. + Id string `json:"id,omitempty"` + + // Name: Required. The Document resource full name, of the form: + // projects//locations//dataStores//branches//documents/ + Name string `json:"name,omitempty"` + + // PromotionIds: The promotion IDs associated with this Document. + // Currently, this field is restricted to at most one ID. + PromotionIds []string `json:"promotionIds,omitempty"` + + // Quantity: Quantity of the Document associated with the user event. + // Defaults to 1. For example, this field will be 2 if two quantities of + // the same Document are involved in a `add-to-cart` event. Required for + // events of the following event types: * `add-to-cart` * `purchase` + Quantity int64 `json:"quantity,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. 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. "Id") 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 *GoogleCloudDiscoveryengineV1betaDocumentInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocumentInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaGcsSource: Google Cloud Storage +// location for input content. format. +type GoogleCloudDiscoveryengineV1betaGcsSource struct { + // DataSchema: The schema to use when parsing the data from the source. + // Supported values for imports: * `user_event` (default): One JSON + // UserEvent per line. * `document` (default): One JSON Document per + // line. Each document must have a valid Document.id. + DataSchema string `json:"dataSchema,omitempty"` + + // InputUris: Required. Google Cloud Storage URIs to input files. URI + // can be up to 2000 characters long. URIs can match the full object + // path (for example, `gs://bucket/directory/object.json`) or a pattern + // matching one or more files, such as `gs://bucket/directory/*.json`. A + // request can contain at most 100 files, and each file can be up to 2 + // GB. + InputUris []string `json:"inputUris,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataSchema") 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. "DataSchema") 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 *GoogleCloudDiscoveryengineV1betaGcsSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaGcsSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata: Metadata +// related to the progress of the ImportDocuments operation. This will +// be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata 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 processed 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 *GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportDocumentsRequest: Request +// message for Import methods. +type GoogleCloudDiscoveryengineV1betaImportDocumentsRequest struct { + // BigquerySource: BigQuery input source. + BigquerySource *GoogleCloudDiscoveryengineV1betaBigQuerySource `json:"bigquerySource,omitempty"` + + // ErrorConfig: The desired location of errors incurred during the + // Import. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + + // GcsSource: Google Cloud Storage location for the input content. + GcsSource *GoogleCloudDiscoveryengineV1betaGcsSource `json:"gcsSource,omitempty"` + + // InlineSource: The Inline source for the input content for documents. + InlineSource *GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource `json:"inlineSource,omitempty"` + + // ReconciliationMode: The mode of reconciliation between existing + // documents and the documents to be imported. Defaults to + // ReconciliationMode.INCREMENTAL. + // + // Possible values: + // "RECONCILIATION_MODE_UNSPECIFIED" - Defaults to INCREMENTAL. + // "INCREMENTAL" - Inserts new documents or updates existing + // documents. + // "FULL" - Calculates diff and replaces the entire document dataset. + // Existing documents may be deleted if they are not present in the + // source location. + ReconciliationMode string `json:"reconciliationMode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BigquerySource") 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. "BigquerySource") 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 *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource: +// The inline source for the input config for ImportDocuments method. +type GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource struct { + // Documents: Required. A list of documents to update/create. Each + // document must have a valid Document.id. Recommended max of 100 items. + Documents []*GoogleCloudDiscoveryengineV1betaDocument `json:"documents,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Documents") 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. "Documents") 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 *GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportDocumentsResponse: Response of +// the ImportDocumentsRequest. If the long running operation is done, +// then this message is returned by the +// google.longrunning.Operations.response field if the operation was +// successful. +type GoogleCloudDiscoveryengineV1betaImportDocumentsResponse struct { + // ErrorConfig: Echoes the destination for the complete errors in the + // request if set. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorConfig") 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. "ErrorConfig") 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 *GoogleCloudDiscoveryengineV1betaImportDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportErrorConfig: Configuration of +// destination for Import related errors. +type GoogleCloudDiscoveryengineV1betaImportErrorConfig struct { + // GcsPrefix: Google Cloud Storage prefix for import errors. This must + // be an empty, existing Cloud Storage directory. Import errors will be + // written to sharded files in this directory, one per line, as a + // JSON-encoded `google.rpc.Status` message. + GcsPrefix string `json:"gcsPrefix,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GcsPrefix") 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. "GcsPrefix") 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 *GoogleCloudDiscoveryengineV1betaImportErrorConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportErrorConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata: Metadata +// related to the progress of the Import operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata 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 processed 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 *GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportUserEventsRequest: Request +// message for the ImportUserEvents request. +type GoogleCloudDiscoveryengineV1betaImportUserEventsRequest struct { + // BigquerySource: Required. 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. Google Cloud Storage location for the input + // content. + GcsSource *GoogleCloudDiscoveryengineV1betaGcsSource `json:"gcsSource,omitempty"` + + // InlineSource: Required. 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 + // 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. "BigquerySource") 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 *GoogleCloudDiscoveryengineV1betaImportUserEventsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource: +// The inline source for the input config for ImportUserEvents method. +type GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource struct { + // UserEvents: Required. A list of user events to import. Recommended + // max of 10k items. + UserEvents []*GoogleCloudDiscoveryengineV1betaUserEvent `json:"userEvents,omitempty"` + + // ForceSendFields is a list of field names (e.g. "UserEvents") 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. "UserEvents") 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 *GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportUserEventsResponse: Response of +// the ImportUserEventsRequest. If the long running operation was +// successful, then this message is returned by the +// google.longrunning.Operations.response field if the operation was +// successful. +type GoogleCloudDiscoveryengineV1betaImportUserEventsResponse struct { + // ErrorConfig: Echoes the destination for the complete errors if this + // field was set in the request. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + + // JoinedEventsCount: Count of user events imported with complete + // existing Documents. + JoinedEventsCount int64 `json:"joinedEventsCount,omitempty,string"` + + // UnjoinedEventsCount: Count of user events imported, but with Document + // information not found in the existing Branch. + UnjoinedEventsCount int64 `json:"unjoinedEventsCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "ErrorConfig") 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. "ErrorConfig") 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 *GoogleCloudDiscoveryengineV1betaImportUserEventsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaListDocumentsResponse: Response +// message for DocumentService.ListDocuments method. +type GoogleCloudDiscoveryengineV1betaListDocumentsResponse struct { + // Documents: The Documents. + Documents []*GoogleCloudDiscoveryengineV1betaDocument `json:"documents,omitempty"` + + // NextPageToken: A token that can be sent as + // ListDocumentsRequest.page_token to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Documents") 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. "Documents") 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 *GoogleCloudDiscoveryengineV1betaListDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListDocumentsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaMediaInfo: Media-specific user event +// information. +type GoogleCloudDiscoveryengineV1betaMediaInfo struct { + // MediaProgressDuration: The media progress time in seconds, if + // applicable. For example, if the end user has finished 90 seconds of a + // playback video, then MediaInfo.media_progress_duration.seconds should + // be set to 90. + MediaProgressDuration string `json:"mediaProgressDuration,omitempty"` + + // MediaProgressPercentage: Media progress should be computed using only + // the media_progress_duration relative to the media total length. This + // value must be between [0, 1.0] inclusive. If this is not a playback + // or the progress cannot be computed (e.g. ongoing livestream), this + // field should be unset. + MediaProgressPercentage float64 `json:"mediaProgressPercentage,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "MediaProgressDuration") 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. "MediaProgressDuration") 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 *GoogleCloudDiscoveryengineV1betaMediaInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaMediaInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1betaMediaInfo) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaMediaInfo + var s1 struct { + MediaProgressPercentage gensupport.JSONFloat64 `json:"mediaProgressPercentage"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.MediaProgressPercentage = float64(s1.MediaProgressPercentage) + return nil +} + +// GoogleCloudDiscoveryengineV1betaPageInfo: Detailed page information. +type GoogleCloudDiscoveryengineV1betaPageInfo struct { + // PageCategory: The most specific category associated with a category + // page. To represent full path of category, use '>' sign to separate + // different hierarchies. If '>' is part of the category name, please + // replace it with other character(s). Category pages include special + // pages such as sales or promotions. For instance, a special sale page + // may have the category hierarchy: "pageCategory" : "Sales > 2017 Black + // Friday Deals". Required for `view-category-page` events. Other event + // types should not set this field. Otherwise, an INVALID_ARGUMENT error + // is returned. + PageCategory string `json:"pageCategory,omitempty"` + + // PageviewId: A unique ID of a web page view. This should be kept the + // same for all user events triggered from the same pageview. For + // example, an item detail page view could trigger multiple events as + // the user is browsing the page. The `pageViewId` property should be + // kept the same for all these events so that they can be grouped + // together properly. When using the client side event reporting with + // JavaScript pixel and Google Tag Manager, this value is filled in + // automatically. + PageviewId string `json:"pageviewId,omitempty"` + + // ReferrerUri: The referrer URL of the current page. When using the + // client side event reporting with JavaScript pixel and Google Tag + // Manager, this value is filled in automatically. However, some browser + // privacy restrictions may cause this field to be empty. + ReferrerUri string `json:"referrerUri,omitempty"` + + // Uri: Complete URL (window.location.href) of the user's current page. + // When using the client side event reporting with JavaScript pixel and + // Google Tag Manager, this value is filled in automatically. Maximum + // length 5,000 characters. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PageCategory") 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. "PageCategory") 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 *GoogleCloudDiscoveryengineV1betaPageInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPageInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaPanelInfo: Detailed panel information +// associated with a user event. +type GoogleCloudDiscoveryengineV1betaPanelInfo struct { + // DisplayName: The display name of the panel. + DisplayName string `json:"displayName,omitempty"` + + // PanelId: Required. The panel ID. + PanelId string `json:"panelId,omitempty"` + + // PanelPosition: The ordered position of the panel, if shown to the + // user with other panels. If set, then total_panels must also be set. + PanelPosition int64 `json:"panelPosition,omitempty"` + + // TotalPanels: The total number of panels, including this one, shown to + // the user. Must be set if panel_position is set. + TotalPanels int64 `json:"totalPanels,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") 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. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaPanelInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPanelInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaRecommendRequest: Request message for +// Recommend method. +type GoogleCloudDiscoveryengineV1betaRecommendRequest struct { + // Filter: Filter for restricting recommendation results with a length + // limit of 5,000 characters. Currently, only filter expressions on the + // `filter_tags` attribute is supported. Examples: * (filter_tags: + // ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold")) * + // (filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green")) + // If your filter blocks all results, the API will return generic + // (unfiltered) popular Documents. If you only want results strictly + // matching the filters, set `strictFiltering` to True in + // RecommendRequest.params to receive empty results instead. Note that + // the API will never return Documents with storageStatus of "EXPIRED" + // or "DELETED" regardless of filter choices. + Filter string `json:"filter,omitempty"` + + // PageSize: Maximum number of results to return. Set this property to + // the number of recommendation results needed. If zero, the service + // will choose a reasonable default. The maximum allowed value is 100. + // Values above 100 will be coerced to 100. + PageSize int64 `json:"pageSize,omitempty"` + + // Params: Additional domain specific parameters for the + // recommendations. Allowed values: * `returnDocument`: Boolean. If set + // to true, the associated Document object will be returned in + // RecommendResponse.results.document. * `returnScore`: Boolean. If set + // to true, the recommendation 'score' corresponding to each returned + // Document will be set in RecommendResponse.results.metadata. The given + // 'score' indicates the probability of a Document conversion given the + // user's context and history. * `strictFiltering`: Boolean. True by + // default. If set to false, the service will return generic + // (unfiltered) popular Documents instead of empty if your filter blocks + // all recommendation results. * `diversityLevel`: String. Default + // empty. If set to be non-empty, then it needs to be one of: * + // 'no-diversity' * 'low-diversity' * 'medium-diversity' * + // 'high-diversity' * 'auto-diversity' This gives request-level control + // and adjusts recommendation results based on Document category. + Params googleapi.RawMessage `json:"params,omitempty"` + + // UserEvent: Required. Context about the user, what they are looking at + // and what action they took to trigger the Recommend request. Note that + // this user event detail won't be ingested to userEvent logs. Thus, a + // separate userEvent write request is required for event logging. Don't + // set UserEvent.user_pseudo_id or UserEvent.user_info.user_id to the + // same fixed ID for different users. If you are trying to receive + // non-personalized recommendations (not recommended; this can + // negatively impact model performance), instead set + // UserEvent.user_pseudo_id to a random unique ID and leave + // UserEvent.user_info.user_id unset. + UserEvent *GoogleCloudDiscoveryengineV1betaUserEvent `json:"userEvent,omitempty"` + + // UserLabels: The user labels applied to a resource must meet the + // following requirements: * Each resource can have multiple labels, up + // to a maximum of 64. * Each label must be a key-value pair. * Keys + // have a minimum length of 1 character and a maximum length of 63 + // characters and cannot be empty. Values can be empty and have a + // maximum length of 63 characters. * Keys and values can contain only + // lowercase letters, numeric characters, underscores, and dashes. All + // characters must use UTF-8 encoding, and international characters are + // allowed. * The key portion of a label must be unique. However, you + // can use the same key with multiple resources. * Keys must start with + // a lowercase letter or international character. See Google Cloud + // Document + // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // for more details. + UserLabels map[string]string `json:"userLabels,omitempty"` + + // ValidateOnly: Use validate only mode for this recommendation query. + // If set to true, a fake model will be used that returns arbitrary + // Document IDs. Note that the validate only mode should only be used + // for testing the API, or if the model is not ready. + ValidateOnly bool `json:"validateOnly,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 *GoogleCloudDiscoveryengineV1betaRecommendRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaRecommendRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaRecommendResponse: Response message +// for Recommend method. +type GoogleCloudDiscoveryengineV1betaRecommendResponse struct { + // AttributionToken: A unique attribution token. This should be included + // in the UserEvent logs resulting from this recommendation, which + // enables accurate attribution of recommendation model performance. + AttributionToken string `json:"attributionToken,omitempty"` + + // MissingIds: IDs of documents in the request that were missing from + // the default Branch associated with the requested ServingConfig. + MissingIds []string `json:"missingIds,omitempty"` + + // Results: A list of recommended Documents. The order represents the + // ranking (from the most relevant Document to the least). + Results []*GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult `json:"results,omitempty"` + + // ValidateOnly: True if RecommendRequest.validate_only was set. + ValidateOnly bool `json:"validateOnly,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AttributionToken") 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. "AttributionToken") 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 *GoogleCloudDiscoveryengineV1betaRecommendResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaRecommendResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult: +// +// RecommendationResult represents a generic recommendation result with +// +// associated metadata. +type GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult struct { + // Document: Set if `returnDocument` is set to true in + // RecommendRequest.params. + Document *GoogleCloudDiscoveryengineV1betaDocument `json:"document,omitempty"` + + // Id: Resource ID of the recommended Document. + Id string `json:"id,omitempty"` + + // Metadata: Additional Document metadata / annotations. Possible + // values: * `score`: Recommendation score in double value. Is set if + // `returnScore` is set to true in RecommendRequest.params. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Document") 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. "Document") 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 *GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchInfo: Detailed search +// information. +type GoogleCloudDiscoveryengineV1betaSearchInfo struct { + // Offset: An integer that specifies the current offset for pagination + // (the 0-indexed starting location, amongst the products deemed by the + // API as relevant). See SearchRequest.offset for definition. If this + // field is negative, an INVALID_ARGUMENT is returned. This can only be + // set for `search` events. Other event types should not set this field. + // Otherwise, an INVALID_ARGUMENT error is returned. + Offset int64 `json:"offset,omitempty"` + + // OrderBy: The order in which products are returned, if applicable. See + // SearchRequest.order_by for definition and syntax. The value must be a + // UTF-8 encoded string with a length limit of 1,000 characters. + // Otherwise, an INVALID_ARGUMENT error is returned. This can only be + // set for `search` events. Other event types should not set this field. + // Otherwise, an INVALID_ARGUMENT error is returned. + OrderBy string `json:"orderBy,omitempty"` + + // SearchQuery: The user's search query. See SearchRequest.query for + // definition. The value must be a UTF-8 encoded string with a length + // limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is + // returned. At least one of search_query or page_categories is required + // for `search` events. Other event types should not set this field. + // Otherwise, an INVALID_ARGUMENT error is returned. + SearchQuery string `json:"searchQuery,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Offset") 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. "Offset") 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 *GoogleCloudDiscoveryengineV1betaSearchInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTransactionInfo: A transaction +// represents the entire purchase transaction. +type GoogleCloudDiscoveryengineV1betaTransactionInfo struct { + // Cost: All the costs associated with the products. These can be + // manufacturing costs, shipping expenses not borne by the end user, or + // any other costs, such that: * Profit = value - tax - cost + Cost float64 `json:"cost,omitempty"` + + // Currency: Required. Currency code. Use three-character ISO-4217 code. + Currency string `json:"currency,omitempty"` + + // DiscountValue: The total discount(s) value applied to this + // transaction. This figure should be excluded from + // TransactionInfo.value For example, if a user paid + // TransactionInfo.value amount, then nominal (pre-discount) value of + // the transaction is the sum of TransactionInfo.value and + // TransactionInfo.discount_value This means that profit is calculated + // the same way, regardless of the discount value, and that + // TransactionInfo.discount_value can be larger than + // TransactionInfo.value: * Profit = value - tax - cost + DiscountValue float64 `json:"discountValue,omitempty"` + + // Tax: All the taxes associated with the transaction. + Tax float64 `json:"tax,omitempty"` + + // TransactionId: The transaction ID with a length limit of 128 + // characters. + TransactionId string `json:"transactionId,omitempty"` + + // Value: Required. Total non-zero value associated with the + // transaction. This value may include shipping, tax, or other + // adjustments to the total value that you want to include. + Value float64 `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Cost") 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. "Cost") 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 *GoogleCloudDiscoveryengineV1betaTransactionInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTransactionInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1betaTransactionInfo) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaTransactionInfo + var s1 struct { + Cost gensupport.JSONFloat64 `json:"cost"` + DiscountValue gensupport.JSONFloat64 `json:"discountValue"` + Tax gensupport.JSONFloat64 `json:"tax"` + Value gensupport.JSONFloat64 `json:"value"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Cost = float64(s1.Cost) + s.DiscountValue = float64(s1.DiscountValue) + s.Tax = float64(s1.Tax) + s.Value = float64(s1.Value) + return nil +} + +// GoogleCloudDiscoveryengineV1betaUserEvent: UserEvent captures all +// metadata information DiscoveryEngine API needs to know about how end +// users interact with customers' website. +type GoogleCloudDiscoveryengineV1betaUserEvent struct { + // Attributes: Extra user event features to include in the + // recommendation model. These attributes must NOT contain data that + // needs to be parsed or processed further, e.g. JSON or other + // encodings. If you provide custom attributes for ingested user events, + // also include them in the user events that you associate with + // prediction requests. Custom attribute formatting must be consistent + // between imported events and events provided with prediction requests. + // This lets the DiscoveryEngine API use those custom attributes when + // training models and serving predictions, which helps improve + // recommendation quality. This field needs to pass all below criteria, + // otherwise an INVALID_ARGUMENT error is returned: * The key must be a + // UTF-8 encoded string with a length limit of 5,000 characters. * For + // text attributes, at most 400 values are allowed. Empty values are not + // allowed. Each value must be a UTF-8 encoded string with a length + // limit of 256 characters. * For number attributes, at most 400 values + // are allowed. For product recommendations, an example of extra user + // information is traffic_channel, which is how a user arrives at the + // site. Users can arrive at the site by coming to the site directly, + // coming through Google search, or in other ways. + Attributes map[string]GoogleCloudDiscoveryengineV1betaCustomAttribute `json:"attributes,omitempty"` + + // AttributionToken: Token to attribute an API response to user + // action(s) to trigger the event. Highly recommended for user events + // that are the result of PredictionService.Predict. This field enables + // accurate attribution of recommendation model performance. The value + // must be one of: * PredictResponse.attribution_token for events that + // are the result of PredictionService.Predict. * + // SearchResponse.attribution_token for events that are the result of + // SearchService.Search. * CompleteQueryResponse.attribution_token for + // events that are the result of SearchService.CompleteQuery. This token + // enables us to accurately attribute page view or conversion completion + // back to the event and the particular predict response containing this + // clicked/purchased product. If user clicks on product K in the + // recommendation results, pass PredictResponse.attribution_token as a + // URL parameter to product K's page. When recording events on product + // K's page, log the PredictResponse.attribution_token to this field. + AttributionToken string `json:"attributionToken,omitempty"` + + // CompletionInfo: CompleteQuery API details related to the event. This + // field should be set for `search` event when autocomplete function is + // enabled and the user clicks a suggestion for search. + CompletionInfo *GoogleCloudDiscoveryengineV1betaCompletionInfo `json:"completionInfo,omitempty"` + + // DirectUserRequest: Should set to true if the request is made directly + // from the end user, in which case the UserEvent.user_info.user_agent + // can be populated from the HTTP request. This flag should be set only + // if the API request is made directly from the end user such as a + // mobile app (and not if a gateway or a server is processing and + // pushing the user events). This should not be set when using the + // JavaScript tag in UserEventService.CollectUserEvent. + DirectUserRequest bool `json:"directUserRequest,omitempty"` + + // Documents: List of Documents associated with this user event. This + // field is optional except for the following event types: * `view-item` + // * `add-to-cart` * `purchase` * `media-play` * `media-complete` In a + // `search` event, this field represents the documents returned to the + // end user on the current page (the end user may have not finished + // browsing the whole page yet). When a new page is returned to the end + // user, after pagination/filtering/ordering even for the same query, a + // new `search` event with different UserEvent.documents is desired. + Documents []*GoogleCloudDiscoveryengineV1betaDocumentInfo `json:"documents,omitempty"` + + // EventTime: Only required for UserEventService.ImportUserEvents + // method. Timestamp of when the user event happened. + EventTime string `json:"eventTime,omitempty"` + + // EventType: Required. User event type. Allowed values are: Generic + // values: * `search`: Search for Documents. * `view-item`: Detailed + // page view of a Document. * `view-item-list`: View of a panel or + // ordered list of Documents. * `view-home-page`: View of the home page. + // * `view-category-page`: View of a category page, e.g. Home > Men > + // Jeans Retail-related values: * `add-to-cart`: Add an item(s) to cart, + // e.g. in Retail online shopping * `purchase`: Purchase an item(s) + // Media-related values: * `media-play`: Start/resume watching a video, + // playing a song, etc. * `media-complete`: Finished or stopped midway + // through a video, song, etc. + EventType string `json:"eventType,omitempty"` + + // Filter: The filter syntax consists of an expression language for + // constructing a predicate from one or more fields of the documents + // being filtered. One example is for `search` events, the associated + // SearchService.SearchRequest may contain a filter expression in + // SearchService.SearchRequest.filter conforming to + // https://google.aip.dev/160#filtering. Similarly, for `view-item-list` + // events that are generated from a PredictionService.PredictRequest, + // this field may be populated directly from + // PredictionService.PredictRequest.filter conforming to + // https://google.aip.dev/160#filtering. The value must be a UTF-8 + // encoded string with a length limit of 1,000 characters. Otherwise, an + // INVALID_ARGUMENT error is returned. + Filter string `json:"filter,omitempty"` + + // MediaInfo: Media-specific info. + MediaInfo *GoogleCloudDiscoveryengineV1betaMediaInfo `json:"mediaInfo,omitempty"` + + // PageInfo: Page metadata such as categories and other critical + // information for certain event types such as `view-category-page`. + PageInfo *GoogleCloudDiscoveryengineV1betaPageInfo `json:"pageInfo,omitempty"` + + // Panel: Panel metadata associated with this user event. + Panel *GoogleCloudDiscoveryengineV1betaPanelInfo `json:"panel,omitempty"` + + // PromotionIds: The promotion IDs if this is an event associated with + // promotions. Currently, this field is restricted to at most one ID. + PromotionIds []string `json:"promotionIds,omitempty"` + + // SearchInfo: Search API details related to the event. This field + // should be set for `search` event. + SearchInfo *GoogleCloudDiscoveryengineV1betaSearchInfo `json:"searchInfo,omitempty"` + + // SessionId: A unique identifier for tracking a visitor session with a + // length limit of 128 bytes. A session is an aggregation of an end user + // behavior in a time span. A general guideline to populate the + // sesion_id: 1. If user has no activity for 30 min, a new session_id + // should be assigned. 2. The session_id should be unique across users, + // suggest use uuid or add UserEvent.user_pseudo_id as prefix. + SessionId string `json:"sessionId,omitempty"` + + // TagIds: A list of identifiers for the independent experiment groups + // this user event belongs to. This is used to distinguish between user + // events associated with different experiment setups on the customer + // end. + TagIds []string `json:"tagIds,omitempty"` + + // TransactionInfo: The transaction metadata (if any) associated with + // this user event. + TransactionInfo *GoogleCloudDiscoveryengineV1betaTransactionInfo `json:"transactionInfo,omitempty"` + + // UserInfo: Information about the end user. + UserInfo *GoogleCloudDiscoveryengineV1betaUserInfo `json:"userInfo,omitempty"` + + // UserPseudoId: Required. A unique identifier for tracking visitors. + // For example, this could be implemented with an HTTP cookie, which + // should be able to uniquely identify a visitor on a single device. + // This unique identifier should not change if the visitor log in/out of + // the website. Do not set the field to the same fixed ID for different + // users. This mixes the event history of those users together, which + // results in degraded model quality. The field must be a UTF-8 encoded + // string with a length limit of 128 characters. Otherwise, an + // INVALID_ARGUMENT error is returned. The field should not contain PII + // or user-data. We recommend to use Google Analytics Client ID + // (https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) + // for this field. + UserPseudoId string `json:"userPseudoId,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Attributes") 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. "Attributes") 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 *GoogleCloudDiscoveryengineV1betaUserEvent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaUserEvent + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaUserInfo: Information of an end user. +type GoogleCloudDiscoveryengineV1betaUserInfo struct { + // UserAgent: User agent as included in the HTTP header. Required for + // getting SearchResponse.sponsored_results. The field must be a UTF-8 + // encoded string with a length limit of 1,000 characters. Otherwise, an + // INVALID_ARGUMENT error is returned. This should not be set when using + // the client side event reporting with GTM or JavaScript tag in + // UserEventService.CollectUserEvent or if direct_user_request is set. + UserAgent string `json:"userAgent,omitempty"` + + // UserId: Highly recommended for logged-in users. Unique identifier for + // logged-in user, such as a user name. Don't set for anonymous users. + // Always use a hashed value for this ID. Don't set the field to the + // same fixed ID for different users. This mixes the event history of + // those users together, which results in degraded model quality. The + // field must be a UTF-8 encoded string with a length limit of 128 + // characters. Otherwise, an INVALID_ARGUMENT error is returned. + UserId string `json:"userId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "UserAgent") 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. "UserAgent") 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 *GoogleCloudDiscoveryengineV1betaUserInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaUserInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningListOperationsResponse: The response message for +// Operations.ListOperations. +type GoogleLongrunningListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") 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. "NextPageToken") 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 *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningOperation: This resource represents a long-running +// operation that is the result of a network API call. +type GoogleLongrunningOperation 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 *GoogleRpcStatus `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 *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningOperation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleProtobufEmpty: A generic empty message that you can re-use to +// avoid defining duplicated empty messages in your APIs. A typical +// example is to use it as the request or the response type of an API +// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) +// returns (google.protobuf.Empty); } +type GoogleProtobufEmpty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// GoogleRpcStatus: 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 GoogleRpcStatus 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 *GoogleRpcStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleRpcStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeDate: 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 GoogleTypeDate 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 *GoogleTypeDate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeDate + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "discoveryengine.projects.locations.dataStores.branches.documents.create": + +type ProjectsLocationsDataStoresBranchesDocumentsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Document. +// +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/dataStores/{data_store}/bra +// nches/{branch}`. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Create(parent string, googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betadocument = googleclouddiscoveryenginev1betadocument + return c +} + +// DocumentId sets the optional parameter "documentId": Required. The ID +// to use for the Document, which will become the final component of the +// Document.name. If the caller does not have permission to create the +// Document, regardless of whether or not it exists, a PERMISSION_DENIED +// error is returned. This field must be unique among all Documents with +// the same parent. Otherwise, an ALREADY_EXISTS error is returned. This +// field must conform to RFC-1034 (https://tools.ietf.org/html/rfc1034) +// standard with a length limit of 63 characters. Otherwise, an +// INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { + c.urlParams_.Set("documentId", documentId) + 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 *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) 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.googleclouddiscoveryenginev1betadocument) + 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, "v1beta/{+parent}/documents") + 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.branches.documents.create" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaDocument or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaDocument.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 *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, 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 := &GoogleCloudDiscoveryengineV1betaDocument{ + 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": "Creates a Document.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "documentId": { + // "description": "Required. The ID to use for the Document, which will become the final component of the Document.name. If the caller does not have permission to create the Document, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This field must be unique among all Documents with the same parent. Otherwise, an ALREADY_EXISTS error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/documents", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.branches.documents.delete": + +type ProjectsLocationsDataStoresBranchesDocumentsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Document. +// +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/dataStores/{data_store}/bra +// nches/{branch}/documents/{document}`. If the caller does not have +// permission to delete the Document, regardless of whether or not it +// exists, a PERMISSION_DENIED error is returned. If the Document to +// delete does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsDeleteCall{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 *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) 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 + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", 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 "discoveryengine.projects.locations.dataStores.branches.documents.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.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 *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ + 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 a Document.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to delete the Document, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Document to delete does not exist, a NOT_FOUND error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.branches.documents.get": + +type ProjectsLocationsDataStoresBranchesDocumentsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Document. +// +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/dataStores/{data_store}/bra +// nches/{branch}/documents/{document}`. If the caller does not have +// permission to access the Document, regardless of whether or not it +// exists, a PERMISSION_DENIED error is returned. If the requested +// Document does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Get(name string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsGetCall{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 *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) 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, "v1beta/{+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 "discoveryengine.projects.locations.dataStores.branches.documents.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaDocument or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaDocument.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 *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, 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 := &GoogleCloudDiscoveryengineV1betaDocument{ + 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 a Document.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to access the Document, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested Document does not exist, a NOT_FOUND error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.branches.documents.import": + +type ProjectsLocationsDataStoresBranchesDocumentsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaimportdocumentsrequest *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Import: Bulk import of multiple Documents. Request processing may be +// synchronous. Non-existing items will be created. Note: It is possible +// for a subset of the Documents to be successfully updated. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/dataStores/{data_store}/bra +// nches/{branch}`. Requires create/update permission. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1betaimportdocumentsrequest *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaimportdocumentsrequest = googleclouddiscoveryenginev1betaimportdocumentsrequest + 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 *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) 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.googleclouddiscoveryenginev1betaimportdocumentsrequest) + 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, "v1beta/{+parent}/documents:import") + 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.branches.documents.import" 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 *ProjectsLocationsDataStoresBranchesDocumentsImportCall) 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": "Bulk import of multiple Documents. Request processing may be synchronous. Non-existing items will be created. Note: It is possible for a subset of the Documents to be successfully updated.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:import", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.import", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}`. Requires create/update permission.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/documents:import", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaImportDocumentsRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.branches.documents.list": + +type ProjectsLocationsDataStoresBranchesDocumentsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Gets a list of Documents. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/dataStores/{data_store}/bra +// nches/{branch}`. Use `default_branch` as the branch ID, to list +// documents under the default branch. If the caller does not have +// permission to list Documentss under this branch, regardless of +// whether or not this branch exists, a PERMISSION_DENIED error is +// returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// Documents to return. If unspecified, defaults to 100. The maximum +// allowed value is 1000. Values above 1000 will be coerced to 1000. If +// this field is negative, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListDocumentsResponse.next_page_token, received from a previous +// DocumentService.ListDocuments call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// DocumentService.ListDocuments must match the call that provided the +// page token. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) 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, "v1beta/{+parent}/documents") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.list" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaListDocumentsResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1betaListDocumentsResponse.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 *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListDocumentsResponse, 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 := &GoogleCloudDiscoveryengineV1betaListDocumentsResponse{ + 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 a list of Documents.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of Documents to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token ListDocumentsResponse.next_page_token, received from a previous DocumentService.ListDocuments call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DocumentService.ListDocuments must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, to list documents under the default branch. If the caller does not have permission to list Documentss under this branch, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/documents", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1betaListDocumentsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListDocumentsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "discoveryengine.projects.locations.dataStores.branches.documents.patch": + +type ProjectsLocationsDataStoresBranchesDocumentsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Document. +// +// - name: Immutable. The full resource name of the document. Format: +// `projects/{project}/locations/{location}/dataStores/{data_store}/bra +// nches/{branch}/documents/{document_id}`. This field must be a UTF-8 +// encoded string with a length limit of 1024 characters. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betadocument = googleclouddiscoveryenginev1betadocument + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to +// true, and the Document is not found, a new Document will be created. +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + 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 *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) 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.googleclouddiscoveryenginev1betadocument) + 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, "v1beta/{+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 "discoveryengine.projects.locations.dataStores.branches.documents.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaDocument or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaDocument.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 *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, 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 := &GoogleCloudDiscoveryengineV1betaDocument{ + 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": "Updates a Document.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "If set to true, and the Document is not found, a new Document will be created.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.branches.operations.get": + +type ProjectsLocationsDataStoresBranchesOperationsGetCall 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 *ProjectsLocationsDataStoresBranchesOperationsService) Get(name string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { + c := &ProjectsLocationsDataStoresBranchesOperationsGetCall{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 *ProjectsLocationsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsGetCall { + 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 *ProjectsLocationsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { + 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 *ProjectsLocationsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsGetCall { + 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 *ProjectsLocationsDataStoresBranchesOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) 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, "v1beta/{+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 "discoveryengine.projects.locations.dataStores.branches.operations.get" 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 *ProjectsLocationsDataStoresBranchesOperationsGetCall) 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": "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": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.branches.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.branches.operations.list": + +type ProjectsLocationsDataStoresBranchesOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsDataStoresBranchesOperationsService) List(name string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c := &ProjectsLocationsDataStoresBranchesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsListCall { + 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 *ProjectsLocationsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + 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 *ProjectsLocationsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsListCall { + 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 *ProjectsLocationsDataStoresBranchesOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) 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, "v1beta/{+name}/operations") + 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 "discoveryengine.projects.locations.dataStores.branches.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.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 *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, 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 := &GoogleLongrunningListOperationsResponse{ + 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": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.branches.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}/operations", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "discoveryengine.projects.locations.dataStores.models.operations.get": + +type ProjectsLocationsDataStoresModelsOperationsGetCall 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 *ProjectsLocationsDataStoresModelsOperationsService) Get(name string) *ProjectsLocationsDataStoresModelsOperationsGetCall { + c := &ProjectsLocationsDataStoresModelsOperationsGetCall{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 *ProjectsLocationsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsGetCall { + 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 *ProjectsLocationsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsGetCall { + 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 *ProjectsLocationsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsGetCall { + 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 *ProjectsLocationsDataStoresModelsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) 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, "v1beta/{+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 "discoveryengine.projects.locations.dataStores.models.operations.get" 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 *ProjectsLocationsDataStoresModelsOperationsGetCall) 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": "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": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/models/{modelsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.models.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.models.operations.list": + +type ProjectsLocationsDataStoresModelsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsDataStoresModelsOperationsService) List(name string) *ProjectsLocationsDataStoresModelsOperationsListCall { + c := &ProjectsLocationsDataStoresModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresModelsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresModelsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresModelsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsListCall { + 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 *ProjectsLocationsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsListCall { + 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 *ProjectsLocationsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsListCall { + 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 *ProjectsLocationsDataStoresModelsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) 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, "v1beta/{+name}/operations") + 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 "discoveryengine.projects.locations.dataStores.models.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.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 *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, 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 := &GoogleLongrunningListOperationsResponse{ + 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": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/models/{modelsId}/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.models.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}/operations", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "discoveryengine.projects.locations.dataStores.operations.get": + +type ProjectsLocationsDataStoresOperationsGetCall 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 *ProjectsLocationsDataStoresOperationsService) Get(name string) *ProjectsLocationsDataStoresOperationsGetCall { + c := &ProjectsLocationsDataStoresOperationsGetCall{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 *ProjectsLocationsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsGetCall { + 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 *ProjectsLocationsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsGetCall { + 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 *ProjectsLocationsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsGetCall { + 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 *ProjectsLocationsDataStoresOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresOperationsGetCall) 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, "v1beta/{+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 "discoveryengine.projects.locations.dataStores.operations.get" 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 *ProjectsLocationsDataStoresOperationsGetCall) 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": "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": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.operations.list": + +type ProjectsLocationsDataStoresOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsDataStoresOperationsService) List(name string) *ProjectsLocationsDataStoresOperationsListCall { + c := &ProjectsLocationsDataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsDataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsDataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsDataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsListCall { + 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 *ProjectsLocationsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsListCall { + 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 *ProjectsLocationsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsListCall { + 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 *ProjectsLocationsDataStoresOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresOperationsListCall) 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, "v1beta/{+name}/operations") + 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 "discoveryengine.projects.locations.dataStores.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.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 *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, 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 := &GoogleLongrunningListOperationsResponse{ + 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": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}/operations", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "discoveryengine.projects.locations.dataStores.servingConfigs.recommend": + +type ProjectsLocationsDataStoresServingConfigsRecommendCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Recommend: Makes a recommendation, which requires a contextual user +// event. +// +// - servingConfig: Full resource name of the format: +// projects/*/locations/global/dataStores/*/servingConfigs/* Before +// you can request recommendations from your model, you must create at +// least one serving config for it. +func (r *ProjectsLocationsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest) *ProjectsLocationsDataStoresServingConfigsRecommendCall { + c := &ProjectsLocationsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betarecommendrequest = googleclouddiscoveryenginev1betarecommendrequest + 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 *ProjectsLocationsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsRecommendCall { + 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 *ProjectsLocationsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsRecommendCall { + 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 *ProjectsLocationsDataStoresServingConfigsRecommendCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) 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.googleclouddiscoveryenginev1betarecommendrequest) + 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, "v1beta/{+servingConfig}:recommend") + 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{ + "servingConfig": c.servingConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.recommend" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaRecommendResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaRecommendResponse.ServerResponse.Head +// er 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 *ProjectsLocationsDataStoresServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaRecommendResponse, 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 := &GoogleCloudDiscoveryengineV1betaRecommendResponse{ + 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": "Makes a recommendation, which requires a contextual user event.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.recommend", + // "parameterOrder": [ + // "servingConfig" + // ], + // "parameters": { + // "servingConfig": { + // "description": "Required. Full resource name of the format: projects/*/locations/global/dataStores/*/servingConfigs/* Before you can request recommendations from your model, you must create at least one serving config for it.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+servingConfig}:recommend", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaRecommendRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1betaRecommendResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.userEvents.collect": + +type ProjectsLocationsDataStoresUserEventsCollectCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Collect: Writes a single user event from the browser. This uses a GET +// request to due to browser restriction of POST-ing to a 3rd party +// domain. This method is used only by the Discovery Engine API +// JavaScript pixel and Google Tag Manager. Users should not call this +// method directly. +// +// - parent: The parent DataStore resource name, such as +// `projects/{project}/locations/{location}/dataStores/{data_store}`. +func (r *ProjectsLocationsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsDataStoresUserEventsCollectCall { + c := &ProjectsLocationsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Ets sets the optional parameter "ets": The event timestamp in +// milliseconds. This prevents browser caching of otherwise identical +// get requests. The name is abbreviated to reduce the payload bytes. +func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsDataStoresUserEventsCollectCall { + c.urlParams_.Set("ets", fmt.Sprint(ets)) + return c +} + +// Uri sets the optional parameter "uri": The URL including +// cgi-parameters but excluding the hash fragment with a length limit of +// 5,000 characters. This is often more useful than the referer URL, +// because many browsers only send the domain for 3rd party requests. +func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Uri(uri string) *ProjectsLocationsDataStoresUserEventsCollectCall { + c.urlParams_.Set("uri", uri) + return c +} + +// UserEvent sets the optional parameter "userEvent": Required. URL +// encoded UserEvent proto with a length limit of 2,000,000 characters. +func (c *ProjectsLocationsDataStoresUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsDataStoresUserEventsCollectCall { + c.urlParams_.Set("userEvent", userEvent) + 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 *ProjectsLocationsDataStoresUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresUserEventsCollectCall { + 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 *ProjectsLocationsDataStoresUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresUserEventsCollectCall { + 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 *ProjectsLocationsDataStoresUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsDataStoresUserEventsCollectCall { + 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 *ProjectsLocationsDataStoresUserEventsCollectCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresUserEventsCollectCall) 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, "v1beta/{+parent}/userEvents:collect") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.userEvents.collect" call. +// Exactly one of *GoogleApiHttpBody or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleApiHttpBody.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 *ProjectsLocationsDataStoresUserEventsCollectCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, 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 := &GoogleApiHttpBody{ + 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": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/userEvents:collect", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.userEvents.collect", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "ets": { + // "description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", + // "format": "int64", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/dataStores/{data_store}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "uri": { + // "description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for 3rd party requests.", + // "location": "query", + // "type": "string" + // }, + // "userEvent": { + // "description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/userEvents:collect", + // "response": { + // "$ref": "GoogleApiHttpBody" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.userEvents.import": + +type ProjectsLocationsDataStoresUserEventsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaimportusereventsrequest *GoogleCloudDiscoveryengineV1betaImportUserEventsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Import: Bulk import of User events. Request processing might be +// synchronous. Events that already exist are skipped. Use this method +// for backfilling historical user events. Operation.response is of type +// ImportResponse. Note that it is possible for a subset of the items to +// be successfully inserted. Operation.metadata is of type +// ImportMetadata. +// +// - parent: Parent DataStore resource name, of the form +// `projects/{project}/locations/{location}/dataStores/{data_store}`. +func (r *ProjectsLocationsDataStoresUserEventsService) Import(parent string, googleclouddiscoveryenginev1betaimportusereventsrequest *GoogleCloudDiscoveryengineV1betaImportUserEventsRequest) *ProjectsLocationsDataStoresUserEventsImportCall { + c := &ProjectsLocationsDataStoresUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaimportusereventsrequest = googleclouddiscoveryenginev1betaimportusereventsrequest + 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 *ProjectsLocationsDataStoresUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresUserEventsImportCall { + 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 *ProjectsLocationsDataStoresUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresUserEventsImportCall { + 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 *ProjectsLocationsDataStoresUserEventsImportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresUserEventsImportCall) 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.googleclouddiscoveryenginev1betaimportusereventsrequest) + 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, "v1beta/{+parent}/userEvents:import") + 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.import" 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 *ProjectsLocationsDataStoresUserEventsImportCall) 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": "Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/userEvents:import", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.userEvents.import", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Parent DataStore resource name, of the form `projects/{project}/locations/{location}/dataStores/{data_store}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/userEvents:import", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaImportUserEventsRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.userEvents.write": + +type ProjectsLocationsDataStoresUserEventsWriteCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betauserevent *GoogleCloudDiscoveryengineV1betaUserEvent + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Write: Writes a single user event. +// +// - parent: The parent DataStore resource name, such as +// `projects/{project}/locations/{location}/dataStores/{data_store}`. +func (r *ProjectsLocationsDataStoresUserEventsService) Write(parent string, googleclouddiscoveryenginev1betauserevent *GoogleCloudDiscoveryengineV1betaUserEvent) *ProjectsLocationsDataStoresUserEventsWriteCall { + c := &ProjectsLocationsDataStoresUserEventsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betauserevent = googleclouddiscoveryenginev1betauserevent + 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 *ProjectsLocationsDataStoresUserEventsWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresUserEventsWriteCall { + 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 *ProjectsLocationsDataStoresUserEventsWriteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresUserEventsWriteCall { + 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 *ProjectsLocationsDataStoresUserEventsWriteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresUserEventsWriteCall) 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.googleclouddiscoveryenginev1betauserevent) + 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, "v1beta/{+parent}/userEvents:write") + 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.write" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaUserEvent or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaUserEvent.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 *ProjectsLocationsDataStoresUserEventsWriteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaUserEvent, 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 := &GoogleCloudDiscoveryengineV1betaUserEvent{ + 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": "Writes a single user event.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/userEvents:write", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.userEvents.write", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/dataStores/{data_store}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/userEvents:write", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaUserEvent" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1betaUserEvent" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.operations.get": + +type ProjectsLocationsOperationsGetCall 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 *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{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 *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) 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, "v1beta/{+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 "discoveryengine.projects.locations.operations.get" 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 *ProjectsLocationsOperationsGetCall) 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": "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": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.operations.list": + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) 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, "v1beta/{+name}/operations") + 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 "discoveryengine.projects.locations.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.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 *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, 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 := &GoogleLongrunningListOperationsResponse{ + 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": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}/operations", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "discoveryengine.projects.operations.get": + +type ProjectsOperationsGetCall 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 *ProjectsOperationsService) Get(name string) *ProjectsOperationsGetCall { + c := &ProjectsOperationsGetCall{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 *ProjectsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsOperationsGetCall { + 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 *ProjectsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsOperationsGetCall { + 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 *ProjectsOperationsGetCall) Context(ctx context.Context) *ProjectsOperationsGetCall { + 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 *ProjectsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsOperationsGetCall) 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, "v1beta/{+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 "discoveryengine.projects.operations.get" 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 *ProjectsOperationsGetCall) 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": "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": "v1beta/projects/{projectsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.operations.list": + +type ProjectsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsOperationsService) List(name string) *ProjectsOperationsListCall { + c := &ProjectsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsOperationsListCall) Filter(filter string) *ProjectsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsOperationsListCall) PageSize(pageSize int64) *ProjectsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsOperationsListCall) PageToken(pageToken string) *ProjectsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsOperationsListCall { + 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 *ProjectsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsOperationsListCall { + 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 *ProjectsOperationsListCall) Context(ctx context.Context) *ProjectsOperationsListCall { + 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 *ProjectsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsOperationsListCall) 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, "v1beta/{+name}/operations") + 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 "discoveryengine.projects.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.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 *ProjectsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, 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 := &GoogleLongrunningListOperationsResponse{ + 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": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1beta/projects/{projectsId}/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}/operations", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} diff --git a/displayvideo/v1/displayvideo-api.json b/displayvideo/v1/displayvideo-api.json index ff2403aefbb..d25de9ada6f 100644 --- a/displayvideo/v1/displayvideo-api.json +++ b/displayvideo/v1/displayvideo-api.json @@ -312,7 +312,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", "format": "int32", "location": "query", "type": "integer" @@ -607,7 +607,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", "format": "int32", "location": "query", "type": "integer" @@ -1097,7 +1097,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -1535,7 +1535,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -2207,7 +2207,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -2513,7 +2513,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -3278,7 +3278,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. Defaults to `100` if not set. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. Defaults to `100` if not set. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -3494,7 +3494,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -3687,7 +3687,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", "format": "int32", "location": "query", "type": "integer" @@ -3871,7 +3871,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. Defaults to `100` if not set. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. Defaults to `100` if not set. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -4784,7 +4784,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -4893,7 +4893,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -5112,7 +5112,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -5199,7 +5199,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -5338,7 +5338,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -5546,7 +5546,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -5695,7 +5695,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified or greater than `100` will default to `100`.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", "format": "int32", "location": "query", "type": "integer" @@ -5901,7 +5901,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", "format": "int32", "location": "query", "type": "integer" @@ -6274,7 +6274,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", "format": "int32", "location": "query", "type": "integer" @@ -6495,7 +6495,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", "format": "int32", "location": "query", "type": "integer" @@ -6620,7 +6620,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -7365,7 +7365,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -7720,7 +7720,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -8089,7 +8089,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", "format": "int32", "location": "query", "type": "integer" @@ -8146,7 +8146,7 @@ } } }, - "revision": "20220926", + "revision": "20221107", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActivateManualTriggerRequest": { @@ -14321,7 +14321,7 @@ "description": "Required. The start and end date settings of the budget segment. They are resolved relative to the parent advertiser's time zone. * When creating a new budget segment, both `start_date` and `end_date` must be in the future. * An existing budget segment with a `start_date` in the past has a mutable `end_date` but an immutable `start_date`. * `end_date` must be the `start_date` or later, both before the year 2037." }, "description": { - "description": "The budget segment description. It can be used to enter Purchase Order information for each budget segment and have that information printed on the invoices. Must be UTF-8 encoded with a length of no more than 80 characters.", + "description": "The budget segment description. It can be used to enter Purchase Order information for each budget segment and have that information printed on the invoices. Must be UTF-8 encoded.", "type": "string" } }, @@ -15366,7 +15366,7 @@ }, "targetingExpansion": { "$ref": "TargetingExpansionConfig", - "description": "The [targeting expansion](https://support.google.com/displayvideo/answer/10191558) settings of the line item. This config is only applicable when eligible audience list targeting is assigned to the line item." + "description": "The [targeting expansion](//support.google.com/displayvideo/answer/10191558) settings of the line item. This config is only applicable when eligible audience list targeting is assigned to the line item. Beginning November 7, 2022, these settings may represent the [optimized targeting feature](//support.google.com/displayvideo/answer/12060859) in place of targeting expansion. This feature will be rolled out to all partners by November 9, 2022." }, "updateTime": { "description": "Output only. The timestamp when the line item was last updated. Assigned by the system.", @@ -17690,7 +17690,7 @@ "description": "Search terms for geo region targeting options. Can only be used when targeting_type is `TARGETING_TYPE_GEO_REGION`." }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "type": "integer" }, @@ -17898,15 +17898,15 @@ "type": "object" }, "TargetingExpansionConfig": { - "description": "Settings that control the targeting expansion of the line item. Targeting expansion allows the line item to reach a larger audience based on the original audience list and the targeting expansion level.", + "description": "Settings that control the targeting expansion of the line item. Targeting expansion allows the line item to reach a larger audience based on the original audience list and the targeting expansion level. Beginning November 7, 2022, these settings may represent the [optimized targeting feature](//support.google.com/displayvideo/answer/12060859) in place of targeting expansion. This feature will be rolled out to all partners by November 9, 2022.", "id": "TargetingExpansionConfig", "properties": { "excludeFirstPartyAudience": { - "description": "Required. Whether to exclude first party audiences from targeting. Similar audiences of the excluded first party lists will not be excluded. Only applicable when a first-party audience is positively targeted (directly or included in a combined audience), otherwise this selection will be ignored.", + "description": "Required. Whether to exclude first-party audiences from use in targeting expansion or optimized targeting. Similar audiences of the excluded first-party lists will not be excluded. Only applicable when a first-party audience is positively targeted (directly or included in a combined audience), otherwise this selection will be ignored.", "type": "boolean" }, "targetingExpansionLevel": { - "description": "Required. Magnitude of expansion for applicable targeting under this line item.", + "description": "Required. Magnitude of expansion for applicable targeting under this line item. Beginning November 7, 2022, the behavior of this field will change in the following ways with the replacement of targeting expansion with [optimized targeting](//support.google.com/displayvideo/answer/12060859): * This field will represent the optimized targeting checkbox, with a `NO_EXPANSION` value representing optimized targeting turned off and a `LEAST_EXPANSION` value representing optimized targeting turned on. * `NO_EXPANSION` will be the default value for the field and will be automatically assigned if you do not set the field. * If you set the field to any value other than `NO_EXPANSION`, it will automatically be set to `LEAST_EXPANSION`.", "enum": [ "TARGETING_EXPANSION_LEVEL_UNSPECIFIED", "NO_EXPANSION", diff --git a/displayvideo/v1/displayvideo-gen.go b/displayvideo/v1/displayvideo-gen.go index e4d0a789308..977698ad726 100644 --- a/displayvideo/v1/displayvideo-gen.go +++ b/displayvideo/v1/displayvideo-gen.go @@ -9462,8 +9462,7 @@ type InsertionOrderBudgetSegment struct { // Description: The budget segment description. It can be used to enter // Purchase Order information for each budget segment and have that - // information printed on the invoices. Must be UTF-8 encoded with a - // length of no more than 80 characters. + // information printed on the invoices. Must be UTF-8 encoded. Description string `json:"description,omitempty"` // ForceSendFields is a list of field names (e.g. "BudgetAmountMicros") @@ -10692,9 +10691,13 @@ type LineItem struct { ReservationType string `json:"reservationType,omitempty"` // TargetingExpansion: The targeting expansion - // (https://support.google.com/displayvideo/answer/10191558) settings of - // the line item. This config is only applicable when eligible audience - // list targeting is assigned to the line item. + // (//support.google.com/displayvideo/answer/10191558) settings of the + // line item. This config is only applicable when eligible audience list + // targeting is assigned to the line item. Beginning November 7, 2022, + // these settings may represent the optimized targeting feature + // (//support.google.com/displayvideo/answer/12060859) in place of + // targeting expansion. This feature will be rolled out to all partners + // by November 9, 2022. TargetingExpansion *TargetingExpansionConfig `json:"targetingExpansion,omitempty"` // UpdateTime: Output only. The timestamp when the line item was last @@ -14738,7 +14741,7 @@ type SearchTargetingOptionsRequest struct { // Can only be used when targeting_type is `TARGETING_TYPE_GEO_REGION`. GeoRegionSearchTerms *GeoRegionSearchTerms `json:"geoRegionSearchTerms,omitempty"` - // PageSize: Requested page size. Must be between `1` and `100`. If + // PageSize: Requested page size. Must be between `1` and `200`. If // unspecified will default to `100`. Returns error code // `INVALID_ARGUMENT` if an invalid value is specified. PageSize int64 `json:"pageSize,omitempty"` @@ -15140,17 +15143,32 @@ func (s *SubExchangeTargetingOptionDetails) MarshalJSON() ([]byte, error) { // TargetingExpansionConfig: Settings that control the targeting // expansion of the line item. Targeting expansion allows the line item // to reach a larger audience based on the original audience list and -// the targeting expansion level. +// the targeting expansion level. Beginning November 7, 2022, these +// settings may represent the optimized targeting feature +// (//support.google.com/displayvideo/answer/12060859) in place of +// targeting expansion. This feature will be rolled out to all partners +// by November 9, 2022. type TargetingExpansionConfig struct { - // ExcludeFirstPartyAudience: Required. Whether to exclude first party - // audiences from targeting. Similar audiences of the excluded first - // party lists will not be excluded. Only applicable when a first-party - // audience is positively targeted (directly or included in a combined - // audience), otherwise this selection will be ignored. + // ExcludeFirstPartyAudience: Required. Whether to exclude first-party + // audiences from use in targeting expansion or optimized targeting. + // Similar audiences of the excluded first-party lists will not be + // excluded. Only applicable when a first-party audience is positively + // targeted (directly or included in a combined audience), otherwise + // this selection will be ignored. ExcludeFirstPartyAudience bool `json:"excludeFirstPartyAudience,omitempty"` // TargetingExpansionLevel: Required. Magnitude of expansion for - // applicable targeting under this line item. + // applicable targeting under this line item. Beginning November 7, + // 2022, the behavior of this field will change in the following ways + // with the replacement of targeting expansion with optimized targeting + // (//support.google.com/displayvideo/answer/12060859): * This field + // will represent the optimized targeting checkbox, with a + // `NO_EXPANSION` value representing optimized targeting turned off and + // a `LEAST_EXPANSION` value representing optimized targeting turned on. + // * `NO_EXPANSION` will be the default value for the field and will be + // automatically assigned if you do not set the field. * If you set the + // field to any value other than `NO_EXPANSION`, it will automatically + // be set to `LEAST_EXPANSION`. // // Possible values: // "TARGETING_EXPANSION_LEVEL_UNSPECIFIED" - Targeting expansion level @@ -17196,7 +17214,7 @@ func (c *AdvertisersListCall) OrderBy(orderBy string) *AdvertisersListCall { } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. func (c *AdvertisersListCall) PageSize(pageSize int64) *AdvertisersListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -17333,7 +17351,7 @@ func (c *AdvertisersListCall) Do(opts ...googleapi.CallOption) (*ListAdvertisers // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", // "format": "int32", // "location": "query", // "type": "integer" @@ -18537,7 +18555,7 @@ func (c *AdvertisersCampaignsListCall) OrderBy(orderBy string) *AdvertisersCampa } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. func (c *AdvertisersCampaignsListCall) PageSize(pageSize int64) *AdvertisersCampaignsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -18679,7 +18697,7 @@ func (c *AdvertisersCampaignsListCall) Do(opts ...googleapi.CallOption) (*ListCa // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", // "format": "int32", // "location": "query", // "type": "integer" @@ -19947,7 +19965,7 @@ func (c *AdvertisersChannelsListCall) OrderBy(orderBy string) *AdvertisersChanne } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *AdvertisersChannelsListCall) PageSize(pageSize int64) *AdvertisersChannelsListCall { @@ -20098,7 +20116,7 @@ func (c *AdvertisersChannelsListCall) Do(opts ...googleapi.CallOption) (*ListCha // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -21782,7 +21800,7 @@ func (c *AdvertisersCreativesListCall) OrderBy(orderBy string) *AdvertisersCreat } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *AdvertisersCreativesListCall) PageSize(pageSize int64) *AdvertisersCreativesListCall { @@ -21926,7 +21944,7 @@ func (c *AdvertisersCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCr // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -23970,7 +23988,7 @@ func (c *AdvertisersInvoicesListCall) LoiSapinInvoiceType(loiSapinInvoiceType st } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *AdvertisersInvoicesListCall) PageSize(pageSize int64) *AdvertisersInvoicesListCall { @@ -24124,7 +24142,7 @@ func (c *AdvertisersInvoicesListCall) Do(opts ...googleapi.CallOption) (*ListInv // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -25428,7 +25446,7 @@ func (c *AdvertisersLineItemsListCall) OrderBy(orderBy string) *AdvertisersLineI } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *AdvertisersLineItemsListCall) PageSize(pageSize int64) *AdvertisersLineItemsListCall { @@ -25572,7 +25590,7 @@ func (c *AdvertisersLineItemsListCall) Do(opts ...googleapi.CallOption) (*ListLi // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -27332,7 +27350,7 @@ func (c *AdvertisersLocationListsListCall) OrderBy(orderBy string) *AdvertisersL } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. Defaults to `100` if not set. Returns +// Must be between `1` and `200`. Defaults to `100` if not set. Returns // error code `INVALID_ARGUMENT` if an invalid value is specified. func (c *AdvertisersLocationListsListCall) PageSize(pageSize int64) *AdvertisersLocationListsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) @@ -27475,7 +27493,7 @@ func (c *AdvertisersLocationListsListCall) Do(opts ...googleapi.CallOption) (*Li // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. Defaults to `100` if not set. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. Defaults to `100` if not set. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -28216,7 +28234,7 @@ func (c *AdvertisersLocationListsAssignedLocationsListCall) OrderBy(orderBy stri } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *AdvertisersLocationListsAssignedLocationsListCall) PageSize(pageSize int64) *AdvertisersLocationListsAssignedLocationsListCall { @@ -28368,7 +28386,7 @@ func (c *AdvertisersLocationListsAssignedLocationsListCall) Do(opts ...googleapi // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -29081,7 +29099,7 @@ func (c *AdvertisersManualTriggersListCall) OrderBy(orderBy string) *Advertisers } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. func (c *AdvertisersManualTriggersListCall) PageSize(pageSize int64) *AdvertisersManualTriggersListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -29223,7 +29241,7 @@ func (c *AdvertisersManualTriggersListCall) Do(opts ...googleapi.CallOption) (*L // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", // "format": "int32", // "location": "query", // "type": "integer" @@ -29916,7 +29934,7 @@ func (r *AdvertisersNegativeKeywordListsService) List(advertiserId int64) *Adver } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. Defaults to `100` if not set. Returns +// Must be between `1` and `200`. Defaults to `100` if not set. Returns // error code `INVALID_ARGUMENT` if an invalid value is specified. func (c *AdvertisersNegativeKeywordListsListCall) PageSize(pageSize int64) *AdvertisersNegativeKeywordListsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) @@ -30049,7 +30067,7 @@ func (c *AdvertisersNegativeKeywordListsListCall) Do(opts ...googleapi.CallOptio // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. Defaults to `100` if not set. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. Defaults to `100` if not set. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -32501,7 +32519,7 @@ func (c *CombinedAudiencesListCall) OrderBy(orderBy string) *CombinedAudiencesLi } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *CombinedAudiencesListCall) PageSize(pageSize int64) *CombinedAudiencesListCall { @@ -32645,7 +32663,7 @@ func (c *CombinedAudiencesListCall) Do(opts ...googleapi.CallOption) (*ListCombi // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -33053,7 +33071,7 @@ func (c *CustomBiddingAlgorithmsListCall) OrderBy(orderBy string) *CustomBidding } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *CustomBiddingAlgorithmsListCall) PageSize(pageSize int64) *CustomBiddingAlgorithmsListCall { @@ -33198,7 +33216,7 @@ func (c *CustomBiddingAlgorithmsListCall) Do(opts ...googleapi.CallOption) (*Lis // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -33984,7 +34002,7 @@ func (c *CustomBiddingAlgorithmsScriptsListCall) OrderBy(orderBy string) *Custom } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *CustomBiddingAlgorithmsScriptsListCall) PageSize(pageSize int64) *CustomBiddingAlgorithmsScriptsListCall { @@ -34137,7 +34155,7 @@ func (c *CustomBiddingAlgorithmsScriptsListCall) Do(opts ...googleapi.CallOption // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -34394,7 +34412,7 @@ func (c *CustomListsListCall) OrderBy(orderBy string) *CustomListsListCall { } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *CustomListsListCall) PageSize(pageSize int64) *CustomListsListCall { @@ -34531,7 +34549,7 @@ func (c *CustomListsListCall) Do(opts ...googleapi.CallOption) (*ListCustomLists // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -35088,7 +35106,7 @@ func (c *FirstAndThirdPartyAudiencesListCall) OrderBy(orderBy string) *FirstAndT } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *FirstAndThirdPartyAudiencesListCall) PageSize(pageSize int64) *FirstAndThirdPartyAudiencesListCall { @@ -35234,7 +35252,7 @@ func (c *FirstAndThirdPartyAudiencesListCall) Do(opts ...googleapi.CallOption) ( // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -36009,7 +36027,7 @@ func (c *GoogleAudiencesListCall) OrderBy(orderBy string) *GoogleAudiencesListCa } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *GoogleAudiencesListCall) PageSize(pageSize int64) *GoogleAudiencesListCall { @@ -36153,7 +36171,7 @@ func (c *GoogleAudiencesListCall) Do(opts ...googleapi.CallOption) (*ListGoogleA // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -36729,8 +36747,7 @@ func (c *GuaranteedOrdersListCall) OrderBy(orderBy string) *GuaranteedOrdersList } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified or greater than `100` -// will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. func (c *GuaranteedOrdersListCall) PageSize(pageSize int64) *GuaranteedOrdersListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -36872,7 +36889,7 @@ func (c *GuaranteedOrdersListCall) Do(opts ...googleapi.CallOption) (*ListGuaran // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified or greater than `100` will default to `100`.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", // "format": "int32", // "location": "query", // "type": "integer" @@ -37649,7 +37666,7 @@ func (c *InventorySourceGroupsListCall) OrderBy(orderBy string) *InventorySource } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. func (c *InventorySourceGroupsListCall) PageSize(pageSize int64) *InventorySourceGroupsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -37793,7 +37810,7 @@ func (c *InventorySourceGroupsListCall) Do(opts ...googleapi.CallOption) (*ListI // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", // "format": "int32", // "location": "query", // "type": "integer" @@ -39309,7 +39326,7 @@ func (c *InventorySourcesListCall) OrderBy(orderBy string) *InventorySourcesList } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. func (c *InventorySourcesListCall) PageSize(pageSize int64) *InventorySourcesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -39451,7 +39468,7 @@ func (c *InventorySourcesListCall) Do(opts ...googleapi.CallOption) (*ListInvent // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", // "format": "int32", // "location": "query", // "type": "integer" @@ -40419,7 +40436,7 @@ func (c *PartnersListCall) OrderBy(orderBy string) *PartnersListCall { } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. func (c *PartnersListCall) PageSize(pageSize int64) *PartnersListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -40548,7 +40565,7 @@ func (c *PartnersListCall) Do(opts ...googleapi.CallOption) (*ListPartnersRespon // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", // "format": "int32", // "location": "query", // "type": "integer" @@ -40972,7 +40989,7 @@ func (c *PartnersChannelsListCall) OrderBy(orderBy string) *PartnersChannelsList } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *PartnersChannelsListCall) PageSize(pageSize int64) *PartnersChannelsListCall { @@ -41114,7 +41131,7 @@ func (c *PartnersChannelsListCall) Do(opts ...googleapi.CallOption) (*ListChanne // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -43084,7 +43101,7 @@ func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) OrderBy(orderBy } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) PageSize(pageSize int64) *PartnersTargetingTypesAssignedTargetingOptionsListCall { @@ -43224,7 +43241,7 @@ func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...goog // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -44025,7 +44042,7 @@ func (c *TargetingTypesTargetingOptionsListCall) OrderBy(orderBy string) *Target } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *TargetingTypesTargetingOptionsListCall) PageSize(pageSize int64) *TargetingTypesTargetingOptionsListCall { @@ -44167,7 +44184,7 @@ func (c *TargetingTypesTargetingOptionsListCall) Do(opts ...googleapi.CallOption // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -45188,7 +45205,7 @@ func (c *UsersListCall) OrderBy(orderBy string) *UsersListCall { } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. func (c *UsersListCall) PageSize(pageSize int64) *UsersListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -45317,7 +45334,7 @@ func (c *UsersListCall) Do(opts ...googleapi.CallOption) (*ListUsersResponse, er // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", // "format": "int32", // "location": "query", // "type": "integer" diff --git a/displayvideo/v2/displayvideo-api.json b/displayvideo/v2/displayvideo-api.json index bfe6797c764..d5983fddb4e 100644 --- a/displayvideo/v2/displayvideo-api.json +++ b/displayvideo/v2/displayvideo-api.json @@ -265,7 +265,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", "format": "int32", "location": "query", "type": "integer" @@ -551,7 +551,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", "format": "int32", "location": "query", "type": "integer" @@ -1097,7 +1097,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -1535,7 +1535,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -2496,7 +2496,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -2726,7 +2726,7 @@ ] }, "duplicate": { - "description": "Duplicates a line item. Returns the newly created line item id if successful.", + "description": "Duplicates a line item. Returns the ID of the created line item if successful.", "flatPath": "v2/advertisers/{advertisersId}/lineItems/{lineItemsId}:duplicate", "httpMethod": "POST", "id": "displayvideo.advertisers.lineItems.duplicate", @@ -2855,7 +2855,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -3620,7 +3620,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. Defaults to `100` if not set. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. Defaults to `100` if not set. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -3836,7 +3836,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -4029,7 +4029,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", "format": "int32", "location": "query", "type": "integer" @@ -4213,7 +4213,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. Defaults to `100` if not set. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. Defaults to `100` if not set. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -5126,7 +5126,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -5235,7 +5235,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -5454,7 +5454,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -5541,7 +5541,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -5680,7 +5680,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -5888,7 +5888,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -6037,7 +6037,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified or greater than `100` will default to `100`.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", "format": "int32", "location": "query", "type": "integer" @@ -6243,7 +6243,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", "format": "int32", "location": "query", "type": "integer" @@ -6616,7 +6616,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", "format": "int32", "location": "query", "type": "integer" @@ -6837,7 +6837,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", "format": "int32", "location": "query", "type": "integer" @@ -6962,7 +6962,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -7707,7 +7707,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -8062,7 +8062,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -8431,7 +8431,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", "format": "int32", "location": "query", "type": "integer" @@ -8488,7 +8488,7 @@ } } }, - "revision": "20221020", + "revision": "20221107", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActivateManualTriggerRequest": { @@ -8662,6 +8662,10 @@ "readOnly": true, "type": "string" }, + "billingConfig": { + "$ref": "AdvertiserBillingConfig", + "description": "Billing related settings of the advertiser." + }, "creativeConfig": { "$ref": "AdvertiserCreativeConfig", "description": "Required. Creative related settings of the advertiser." @@ -8744,6 +8748,12 @@ }, "type": "object" }, + "AdvertiserBillingConfig": { + "description": "Billing related settings of an advertiser.", + "id": "AdvertiserBillingConfig", + "properties": {}, + "type": "object" + }, "AdvertiserCreativeConfig": { "description": "Creatives related settings of an advertiser.", "id": "AdvertiserCreativeConfig", @@ -12755,18 +12765,17 @@ "id": "DuplicateLineItemRequest", "properties": { "targetDisplayName": { - "description": "The display name of the resulting line item. Must be UTF-8 encoded with a maximum size of 240 bytes.", + "description": "The display name of the new line item. Must be UTF-8 encoded with a maximum size of 240 bytes.", "type": "string" } }, "type": "object" }, "DuplicateLineItemResponse": { - "description": "Response message for LineItemService.DuplicateLineItem.", "id": "DuplicateLineItemResponse", "properties": { "duplicateLineItemId": { - "description": "The ID of the successfully created line item.", + "description": "The ID of the created line item.", "format": "int64", "type": "string" } @@ -14950,7 +14959,7 @@ "description": "Required. The start and end date settings of the budget segment. They are resolved relative to the parent advertiser's time zone. * When creating a new budget segment, both `start_date` and `end_date` must be in the future. * An existing budget segment with a `start_date` in the past has a mutable `end_date` but an immutable `start_date`. * `end_date` must be the `start_date` or later, both before the year 2037." }, "description": { - "description": "The budget segment description. It can be used to enter Purchase Order information for each budget segment and have that information printed on the invoices. Must be UTF-8 encoded with a length of no more than 80 characters.", + "description": "The budget segment description. It can be used to enter Purchase Order information for each budget segment and have that information printed on the invoices. Must be UTF-8 encoded.", "type": "string" } }, @@ -16003,7 +16012,7 @@ }, "targetingExpansion": { "$ref": "TargetingExpansionConfig", - "description": "The [targeting expansion](https://support.google.com/displayvideo/answer/10191558) settings of the line item. This config is only applicable when eligible audience list targeting is assigned to the line item." + "description": "The [targeting expansion](//support.google.com/displayvideo/answer/10191558) settings of the line item. This config is only applicable when eligible audience list targeting is assigned to the line item. Beginning November 7, 2022, these settings may represent the [optimized targeting feature](//support.google.com/displayvideo/answer/12060859) in place of targeting expansion. This feature will be rolled out to all partners by November 9, 2022." }, "updateTime": { "description": "Output only. The timestamp when the line item was last updated. Assigned by the system.", @@ -18318,7 +18327,7 @@ "description": "Search terms for geo region targeting options. Can only be used when targeting_type is `TARGETING_TYPE_GEO_REGION`." }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "type": "integer" }, @@ -18529,15 +18538,15 @@ "type": "object" }, "TargetingExpansionConfig": { - "description": "Settings that control the targeting expansion of the line item. Targeting expansion allows the line item to reach a larger audience based on the original audience list and the targeting expansion level.", + "description": "Settings that control the targeting expansion of the line item. Targeting expansion allows the line item to reach a larger audience based on the original audience list and the targeting expansion level. Beginning November 7, 2022, these settings may represent the [optimized targeting feature](//support.google.com/displayvideo/answer/12060859) in place of targeting expansion. This feature will be rolled out to all partners by November 9, 2022.", "id": "TargetingExpansionConfig", "properties": { "excludeFirstPartyAudience": { - "description": "Required. Whether to exclude first party audiences from targeting. Similar audiences of the excluded first party lists will not be excluded. Only applicable when a first-party audience is positively targeted (directly or included in a combined audience), otherwise this selection will be ignored.", + "description": "Required. Whether to exclude first-party audiences from use in targeting expansion or optimized targeting. Similar audiences of the excluded first-party lists will not be excluded. Only applicable when a first-party audience is positively targeted (directly or included in a combined audience), otherwise this selection will be ignored.", "type": "boolean" }, "targetingExpansionLevel": { - "description": "Required. Magnitude of expansion for applicable targeting under this line item.", + "description": "Required. Magnitude of expansion for applicable targeting under this line item. Beginning November 7, 2022, the behavior of this field will change in the following ways with the replacement of targeting expansion with [optimized targeting](//support.google.com/displayvideo/answer/12060859): * This field will represent the optimized targeting checkbox, with a `NO_EXPANSION` value representing optimized targeting turned off and a `LEAST_EXPANSION` value representing optimized targeting turned on. * `NO_EXPANSION` will be the default value for the field and will be automatically assigned if you do not set the field. * If you set the field to any value other than `NO_EXPANSION`, it will automatically be set to `LEAST_EXPANSION`.", "enum": [ "TARGETING_EXPANSION_LEVEL_UNSPECIFIED", "NO_EXPANSION", diff --git a/displayvideo/v2/displayvideo-gen.go b/displayvideo/v2/displayvideo-gen.go index d6c9a055257..2678e8d1334 100644 --- a/displayvideo/v2/displayvideo-gen.go +++ b/displayvideo/v2/displayvideo-gen.go @@ -837,6 +837,9 @@ type Advertiser struct { // by the system. AdvertiserId int64 `json:"advertiserId,omitempty,string"` + // BillingConfig: Billing related settings of the advertiser. + BillingConfig *AdvertiserBillingConfig `json:"billingConfig,omitempty"` + // CreativeConfig: Required. Creative related settings of the // advertiser. CreativeConfig *AdvertiserCreativeConfig `json:"creativeConfig,omitempty"` @@ -967,6 +970,10 @@ func (s *AdvertiserAdServerConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AdvertiserBillingConfig: Billing related settings of an advertiser. +type AdvertiserBillingConfig struct { +} + // AdvertiserCreativeConfig: Creatives related settings of an // advertiser. type AdvertiserCreativeConfig struct { @@ -7271,8 +7278,8 @@ func (s *DoubleVerifyVideoViewability) MarshalJSON() ([]byte, error) { // DuplicateLineItemRequest: Request message for // LineItemService.DuplicateLineItem. type DuplicateLineItemRequest struct { - // TargetDisplayName: The display name of the resulting line item. Must - // be UTF-8 encoded with a maximum size of 240 bytes. + // TargetDisplayName: The display name of the new line item. Must be + // UTF-8 encoded with a maximum size of 240 bytes. TargetDisplayName string `json:"targetDisplayName,omitempty"` // ForceSendFields is a list of field names (e.g. "TargetDisplayName") @@ -7299,10 +7306,8 @@ func (s *DuplicateLineItemRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// DuplicateLineItemResponse: Response message for -// LineItemService.DuplicateLineItem. type DuplicateLineItemResponse struct { - // DuplicateLineItemId: The ID of the successfully created line item. + // DuplicateLineItemId: The ID of the created line item. DuplicateLineItemId int64 `json:"duplicateLineItemId,omitempty,string"` // ServerResponse contains the HTTP response code and headers from the @@ -9780,8 +9785,7 @@ type InsertionOrderBudgetSegment struct { // Description: The budget segment description. It can be used to enter // Purchase Order information for each budget segment and have that - // information printed on the invoices. Must be UTF-8 encoded with a - // length of no more than 80 characters. + // information printed on the invoices. Must be UTF-8 encoded. Description string `json:"description,omitempty"` // ForceSendFields is a list of field names (e.g. "BudgetAmountMicros") @@ -11031,9 +11035,13 @@ type LineItem struct { ReservationType string `json:"reservationType,omitempty"` // TargetingExpansion: The targeting expansion - // (https://support.google.com/displayvideo/answer/10191558) settings of - // the line item. This config is only applicable when eligible audience - // list targeting is assigned to the line item. + // (//support.google.com/displayvideo/answer/10191558) settings of the + // line item. This config is only applicable when eligible audience list + // targeting is assigned to the line item. Beginning November 7, 2022, + // these settings may represent the optimized targeting feature + // (//support.google.com/displayvideo/answer/12060859) in place of + // targeting expansion. This feature will be rolled out to all partners + // by November 9, 2022. TargetingExpansion *TargetingExpansionConfig `json:"targetingExpansion,omitempty"` // UpdateTime: Output only. The timestamp when the line item was last @@ -15087,7 +15095,7 @@ type SearchTargetingOptionsRequest struct { // Can only be used when targeting_type is `TARGETING_TYPE_GEO_REGION`. GeoRegionSearchTerms *GeoRegionSearchTerms `json:"geoRegionSearchTerms,omitempty"` - // PageSize: Requested page size. Must be between `1` and `100`. If + // PageSize: Requested page size. Must be between `1` and `200`. If // unspecified will default to `100`. Returns error code // `INVALID_ARGUMENT` if an invalid value is specified. PageSize int64 `json:"pageSize,omitempty"` @@ -15497,17 +15505,32 @@ func (s *SubExchangeTargetingOptionDetails) MarshalJSON() ([]byte, error) { // TargetingExpansionConfig: Settings that control the targeting // expansion of the line item. Targeting expansion allows the line item // to reach a larger audience based on the original audience list and -// the targeting expansion level. +// the targeting expansion level. Beginning November 7, 2022, these +// settings may represent the optimized targeting feature +// (//support.google.com/displayvideo/answer/12060859) in place of +// targeting expansion. This feature will be rolled out to all partners +// by November 9, 2022. type TargetingExpansionConfig struct { - // ExcludeFirstPartyAudience: Required. Whether to exclude first party - // audiences from targeting. Similar audiences of the excluded first - // party lists will not be excluded. Only applicable when a first-party - // audience is positively targeted (directly or included in a combined - // audience), otherwise this selection will be ignored. + // ExcludeFirstPartyAudience: Required. Whether to exclude first-party + // audiences from use in targeting expansion or optimized targeting. + // Similar audiences of the excluded first-party lists will not be + // excluded. Only applicable when a first-party audience is positively + // targeted (directly or included in a combined audience), otherwise + // this selection will be ignored. ExcludeFirstPartyAudience bool `json:"excludeFirstPartyAudience,omitempty"` // TargetingExpansionLevel: Required. Magnitude of expansion for - // applicable targeting under this line item. + // applicable targeting under this line item. Beginning November 7, + // 2022, the behavior of this field will change in the following ways + // with the replacement of targeting expansion with optimized targeting + // (//support.google.com/displayvideo/answer/12060859): * This field + // will represent the optimized targeting checkbox, with a + // `NO_EXPANSION` value representing optimized targeting turned off and + // a `LEAST_EXPANSION` value representing optimized targeting turned on. + // * `NO_EXPANSION` will be the default value for the field and will be + // automatically assigned if you do not set the field. * If you set the + // field to any value other than `NO_EXPANSION`, it will automatically + // be set to `LEAST_EXPANSION`. // // Possible values: // "TARGETING_EXPANSION_LEVEL_UNSPECIFIED" - Targeting expansion level @@ -17572,7 +17595,7 @@ func (c *AdvertisersListCall) OrderBy(orderBy string) *AdvertisersListCall { } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. func (c *AdvertisersListCall) PageSize(pageSize int64) *AdvertisersListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -17709,7 +17732,7 @@ func (c *AdvertisersListCall) Do(opts ...googleapi.CallOption) (*ListAdvertisers // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", // "format": "int32", // "location": "query", // "type": "integer" @@ -18895,7 +18918,7 @@ func (c *AdvertisersCampaignsListCall) OrderBy(orderBy string) *AdvertisersCampa } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. func (c *AdvertisersCampaignsListCall) PageSize(pageSize int64) *AdvertisersCampaignsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -19037,7 +19060,7 @@ func (c *AdvertisersCampaignsListCall) Do(opts ...googleapi.CallOption) (*ListCa // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", // "format": "int32", // "location": "query", // "type": "integer" @@ -20558,7 +20581,7 @@ func (c *AdvertisersChannelsListCall) OrderBy(orderBy string) *AdvertisersChanne } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *AdvertisersChannelsListCall) PageSize(pageSize int64) *AdvertisersChannelsListCall { @@ -20709,7 +20732,7 @@ func (c *AdvertisersChannelsListCall) Do(opts ...googleapi.CallOption) (*ListCha // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -22393,7 +22416,7 @@ func (c *AdvertisersCreativesListCall) OrderBy(orderBy string) *AdvertisersCreat } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *AdvertisersCreativesListCall) PageSize(pageSize int64) *AdvertisersCreativesListCall { @@ -22537,7 +22560,7 @@ func (c *AdvertisersCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCr // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -25159,7 +25182,7 @@ func (c *AdvertisersInvoicesListCall) LoiSapinInvoiceType(loiSapinInvoiceType st } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *AdvertisersInvoicesListCall) PageSize(pageSize int64) *AdvertisersInvoicesListCall { @@ -25313,7 +25336,7 @@ func (c *AdvertisersInvoicesListCall) Do(opts ...googleapi.CallOption) (*ListInv // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -26373,8 +26396,8 @@ type AdvertisersLineItemsDuplicateCall struct { header_ http.Header } -// Duplicate: Duplicates a line item. Returns the newly created line -// item id if successful. +// Duplicate: Duplicates a line item. Returns the ID of the created line +// item if successful. // // - advertiserId: The ID of the advertiser this line item belongs to. // - lineItemId: The ID of the line item to duplicate. @@ -26478,7 +26501,7 @@ func (c *AdvertisersLineItemsDuplicateCall) Do(opts ...googleapi.CallOption) (*D } return ret, nil // { - // "description": "Duplicates a line item. Returns the newly created line item id if successful.", + // "description": "Duplicates a line item. Returns the ID of the created line item if successful.", // "flatPath": "v2/advertisers/{advertisersId}/lineItems/{lineItemsId}:duplicate", // "httpMethod": "POST", // "id": "displayvideo.advertisers.lineItems.duplicate", @@ -26899,7 +26922,7 @@ func (c *AdvertisersLineItemsListCall) OrderBy(orderBy string) *AdvertisersLineI } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *AdvertisersLineItemsListCall) PageSize(pageSize int64) *AdvertisersLineItemsListCall { @@ -27043,7 +27066,7 @@ func (c *AdvertisersLineItemsListCall) Do(opts ...googleapi.CallOption) (*ListLi // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -28803,7 +28826,7 @@ func (c *AdvertisersLocationListsListCall) OrderBy(orderBy string) *AdvertisersL } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. Defaults to `100` if not set. Returns +// Must be between `1` and `200`. Defaults to `100` if not set. Returns // error code `INVALID_ARGUMENT` if an invalid value is specified. func (c *AdvertisersLocationListsListCall) PageSize(pageSize int64) *AdvertisersLocationListsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) @@ -28946,7 +28969,7 @@ func (c *AdvertisersLocationListsListCall) Do(opts ...googleapi.CallOption) (*Li // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. Defaults to `100` if not set. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. Defaults to `100` if not set. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -29687,7 +29710,7 @@ func (c *AdvertisersLocationListsAssignedLocationsListCall) OrderBy(orderBy stri } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *AdvertisersLocationListsAssignedLocationsListCall) PageSize(pageSize int64) *AdvertisersLocationListsAssignedLocationsListCall { @@ -29839,7 +29862,7 @@ func (c *AdvertisersLocationListsAssignedLocationsListCall) Do(opts ...googleapi // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -30552,7 +30575,7 @@ func (c *AdvertisersManualTriggersListCall) OrderBy(orderBy string) *Advertisers } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. func (c *AdvertisersManualTriggersListCall) PageSize(pageSize int64) *AdvertisersManualTriggersListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -30694,7 +30717,7 @@ func (c *AdvertisersManualTriggersListCall) Do(opts ...googleapi.CallOption) (*L // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", // "format": "int32", // "location": "query", // "type": "integer" @@ -31387,7 +31410,7 @@ func (r *AdvertisersNegativeKeywordListsService) List(advertiserId int64) *Adver } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. Defaults to `100` if not set. Returns +// Must be between `1` and `200`. Defaults to `100` if not set. Returns // error code `INVALID_ARGUMENT` if an invalid value is specified. func (c *AdvertisersNegativeKeywordListsListCall) PageSize(pageSize int64) *AdvertisersNegativeKeywordListsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) @@ -31520,7 +31543,7 @@ func (c *AdvertisersNegativeKeywordListsListCall) Do(opts ...googleapi.CallOptio // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. Defaults to `100` if not set. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. Defaults to `100` if not set. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -33972,7 +33995,7 @@ func (c *CombinedAudiencesListCall) OrderBy(orderBy string) *CombinedAudiencesLi } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *CombinedAudiencesListCall) PageSize(pageSize int64) *CombinedAudiencesListCall { @@ -34116,7 +34139,7 @@ func (c *CombinedAudiencesListCall) Do(opts ...googleapi.CallOption) (*ListCombi // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -34524,7 +34547,7 @@ func (c *CustomBiddingAlgorithmsListCall) OrderBy(orderBy string) *CustomBidding } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *CustomBiddingAlgorithmsListCall) PageSize(pageSize int64) *CustomBiddingAlgorithmsListCall { @@ -34669,7 +34692,7 @@ func (c *CustomBiddingAlgorithmsListCall) Do(opts ...googleapi.CallOption) (*Lis // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -35455,7 +35478,7 @@ func (c *CustomBiddingAlgorithmsScriptsListCall) OrderBy(orderBy string) *Custom } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *CustomBiddingAlgorithmsScriptsListCall) PageSize(pageSize int64) *CustomBiddingAlgorithmsScriptsListCall { @@ -35608,7 +35631,7 @@ func (c *CustomBiddingAlgorithmsScriptsListCall) Do(opts ...googleapi.CallOption // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -35865,7 +35888,7 @@ func (c *CustomListsListCall) OrderBy(orderBy string) *CustomListsListCall { } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *CustomListsListCall) PageSize(pageSize int64) *CustomListsListCall { @@ -36002,7 +36025,7 @@ func (c *CustomListsListCall) Do(opts ...googleapi.CallOption) (*ListCustomLists // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -36559,7 +36582,7 @@ func (c *FirstAndThirdPartyAudiencesListCall) OrderBy(orderBy string) *FirstAndT } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *FirstAndThirdPartyAudiencesListCall) PageSize(pageSize int64) *FirstAndThirdPartyAudiencesListCall { @@ -36705,7 +36728,7 @@ func (c *FirstAndThirdPartyAudiencesListCall) Do(opts ...googleapi.CallOption) ( // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -37480,7 +37503,7 @@ func (c *GoogleAudiencesListCall) OrderBy(orderBy string) *GoogleAudiencesListCa } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *GoogleAudiencesListCall) PageSize(pageSize int64) *GoogleAudiencesListCall { @@ -37624,7 +37647,7 @@ func (c *GoogleAudiencesListCall) Do(opts ...googleapi.CallOption) (*ListGoogleA // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -38200,8 +38223,7 @@ func (c *GuaranteedOrdersListCall) OrderBy(orderBy string) *GuaranteedOrdersList } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified or greater than `100` -// will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. func (c *GuaranteedOrdersListCall) PageSize(pageSize int64) *GuaranteedOrdersListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -38343,7 +38365,7 @@ func (c *GuaranteedOrdersListCall) Do(opts ...googleapi.CallOption) (*ListGuaran // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified or greater than `100` will default to `100`.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", // "format": "int32", // "location": "query", // "type": "integer" @@ -39120,7 +39142,7 @@ func (c *InventorySourceGroupsListCall) OrderBy(orderBy string) *InventorySource } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. func (c *InventorySourceGroupsListCall) PageSize(pageSize int64) *InventorySourceGroupsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -39264,7 +39286,7 @@ func (c *InventorySourceGroupsListCall) Do(opts ...googleapi.CallOption) (*ListI // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", // "format": "int32", // "location": "query", // "type": "integer" @@ -40780,7 +40802,7 @@ func (c *InventorySourcesListCall) OrderBy(orderBy string) *InventorySourcesList } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. func (c *InventorySourcesListCall) PageSize(pageSize int64) *InventorySourcesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -40922,7 +40944,7 @@ func (c *InventorySourcesListCall) Do(opts ...googleapi.CallOption) (*ListInvent // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", // "format": "int32", // "location": "query", // "type": "integer" @@ -41890,7 +41912,7 @@ func (c *PartnersListCall) OrderBy(orderBy string) *PartnersListCall { } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. func (c *PartnersListCall) PageSize(pageSize int64) *PartnersListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -42019,7 +42041,7 @@ func (c *PartnersListCall) Do(opts ...googleapi.CallOption) (*ListPartnersRespon // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", // "format": "int32", // "location": "query", // "type": "integer" @@ -42443,7 +42465,7 @@ func (c *PartnersChannelsListCall) OrderBy(orderBy string) *PartnersChannelsList } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *PartnersChannelsListCall) PageSize(pageSize int64) *PartnersChannelsListCall { @@ -42585,7 +42607,7 @@ func (c *PartnersChannelsListCall) Do(opts ...googleapi.CallOption) (*ListChanne // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -44555,7 +44577,7 @@ func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) OrderBy(orderBy } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) PageSize(pageSize int64) *PartnersTargetingTypesAssignedTargetingOptionsListCall { @@ -44695,7 +44717,7 @@ func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...goog // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -45496,7 +45518,7 @@ func (c *TargetingTypesTargetingOptionsListCall) OrderBy(orderBy string) *Target } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. // Returns error code `INVALID_ARGUMENT` if an invalid value is // specified. func (c *TargetingTypesTargetingOptionsListCall) PageSize(pageSize int64) *TargetingTypesTargetingOptionsListCall { @@ -45638,7 +45660,7 @@ func (c *TargetingTypesTargetingOptionsListCall) Do(opts ...googleapi.CallOption // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", // "format": "int32", // "location": "query", // "type": "integer" @@ -46659,7 +46681,7 @@ func (c *UsersListCall) OrderBy(orderBy string) *UsersListCall { } // PageSize sets the optional parameter "pageSize": Requested page size. -// Must be between `1` and `100`. If unspecified will default to `100`. +// Must be between `1` and `200`. If unspecified will default to `100`. func (c *UsersListCall) PageSize(pageSize int64) *UsersListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -46788,7 +46810,7 @@ func (c *UsersListCall) Do(opts ...googleapi.CallOption) (*ListUsersResponse, er // "type": "string" // }, // "pageSize": { - // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`.", + // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", // "format": "int32", // "location": "query", // "type": "integer" diff --git a/documentai/v1/documentai-api.json b/documentai/v1/documentai-api.json index 36925e47d9f..487e8795b7a 100644 --- a/documentai/v1/documentai-api.json +++ b/documentai/v1/documentai-api.json @@ -1069,7 +1069,7 @@ } } }, - "revision": "20221027", + "revision": "20221106", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -3337,6 +3337,14 @@ "description": "Metadata about an entity type.", "id": "GoogleCloudDocumentaiV1EntityTypeMetadata", "properties": { + "humanReviewLabelingMetadata": { + "$ref": "GoogleCloudDocumentaiV1HumanReviewLabelingMetadata", + "description": "Human review labeling config on the property." + }, + "humanReviewMetadata": { + "$ref": "GoogleCloudDocumentaiV1HumanReviewValidationMetadata", + "description": "Human review config on the entity type." + }, "inactive": { "description": "Whether the entity type should be considered as \"inactive\".", "type": "boolean" @@ -3398,6 +3406,17 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1HumanReviewLabelingMetadata": { + "description": "Metadata for human review labeling config.", + "id": "GoogleCloudDocumentaiV1HumanReviewLabelingMetadata", + "properties": { + "enableNormalizationEditing": { + "description": "Whether to enable normalization editing.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1HumanReviewStatus": { "description": "The status of human review on a processed document.", "id": "GoogleCloudDocumentaiV1HumanReviewStatus", @@ -3431,6 +3450,22 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1HumanReviewValidationMetadata": { + "description": "Metadata for Human Review config.", + "id": "GoogleCloudDocumentaiV1HumanReviewValidationMetadata", + "properties": { + "confidenceThreshold": { + "description": "The confidence threshold if human review validation is enabled.", + "format": "float", + "type": "number" + }, + "enableValidation": { + "description": "Whether to enable human review validation.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1ListProcessorTypesResponse": { "description": "Response message for list processor types.", "id": "GoogleCloudDocumentaiV1ListProcessorTypesResponse", @@ -3686,10 +3721,6 @@ "description": "The display name of the processor version.", "type": "string" }, - "documentSchema": { - "$ref": "GoogleCloudDocumentaiV1DocumentSchema", - "description": "The schema of the processor version. Describes the output." - }, "googleManaged": { "description": "Denotes that this ProcessorVersion is managed by google.", "type": "boolean" @@ -3753,6 +3784,14 @@ "description": "Metadata about a property.", "id": "GoogleCloudDocumentaiV1PropertyMetadata", "properties": { + "humanReviewLabelingMetadata": { + "$ref": "GoogleCloudDocumentaiV1HumanReviewLabelingMetadata", + "description": "Human review labeling config on the property." + }, + "humanReviewMetadata": { + "$ref": "GoogleCloudDocumentaiV1HumanReviewValidationMetadata", + "description": "Human review validation config on the property." + }, "inactive": { "description": "Whether the property should be considered as \"inactive\".", "type": "boolean" diff --git a/documentai/v1/documentai-gen.go b/documentai/v1/documentai-gen.go index 5741a0246f7..5d37a9b8021 100644 --- a/documentai/v1/documentai-gen.go +++ b/documentai/v1/documentai-gen.go @@ -4111,23 +4111,32 @@ type GoogleCloudDocumentaiV1EnableProcessorResponse struct { // GoogleCloudDocumentaiV1EntityTypeMetadata: Metadata about an entity // type. type GoogleCloudDocumentaiV1EntityTypeMetadata struct { + // HumanReviewLabelingMetadata: Human review labeling config on the + // property. + HumanReviewLabelingMetadata *GoogleCloudDocumentaiV1HumanReviewLabelingMetadata `json:"humanReviewLabelingMetadata,omitempty"` + + // HumanReviewMetadata: Human review config on the entity type. + HumanReviewMetadata *GoogleCloudDocumentaiV1HumanReviewValidationMetadata `json:"humanReviewMetadata,omitempty"` + // Inactive: Whether the entity type should be considered as "inactive". Inactive bool `json:"inactive,omitempty"` - // ForceSendFields is a list of field names (e.g. "Inactive") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "HumanReviewLabelingMetadata") 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. "Inactive") 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 is a list of field names (e.g. + // "HumanReviewLabelingMetadata") 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:"-"` } @@ -4261,6 +4270,37 @@ func (s *GoogleCloudDocumentaiV1GcsPrefix) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1HumanReviewLabelingMetadata: Metadata for +// human review labeling config. +type GoogleCloudDocumentaiV1HumanReviewLabelingMetadata struct { + // EnableNormalizationEditing: Whether to enable normalization editing. + EnableNormalizationEditing bool `json:"enableNormalizationEditing,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnableNormalizationEditing") 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. + // "EnableNormalizationEditing") 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 *GoogleCloudDocumentaiV1HumanReviewLabelingMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1HumanReviewLabelingMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1HumanReviewStatus: The status of human review // on a processed document. type GoogleCloudDocumentaiV1HumanReviewStatus struct { @@ -4316,6 +4356,54 @@ func (s *GoogleCloudDocumentaiV1HumanReviewStatus) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1HumanReviewValidationMetadata: Metadata for +// Human Review config. +type GoogleCloudDocumentaiV1HumanReviewValidationMetadata struct { + // ConfidenceThreshold: The confidence threshold if human review + // validation is enabled. + ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` + + // EnableValidation: Whether to enable human review validation. + EnableValidation bool `json:"enableValidation,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") + // 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. "ConfidenceThreshold") 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 *GoogleCloudDocumentaiV1HumanReviewValidationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1HumanReviewValidationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDocumentaiV1HumanReviewValidationMetadata) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1HumanReviewValidationMetadata + var s1 struct { + ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) + return nil +} + // GoogleCloudDocumentaiV1ListProcessorTypesResponse: Response message // for list processor types. type GoogleCloudDocumentaiV1ListProcessorTypesResponse struct { @@ -4765,10 +4853,6 @@ type GoogleCloudDocumentaiV1ProcessorVersion struct { // DisplayName: The display name of the processor version. DisplayName string `json:"displayName,omitempty"` - // DocumentSchema: The schema of the processor version. Describes the - // output. - DocumentSchema *GoogleCloudDocumentaiV1DocumentSchema `json:"documentSchema,omitempty"` - // GoogleManaged: Denotes that this ProcessorVersion is managed by // google. GoogleManaged bool `json:"googleManaged,omitempty"` @@ -4865,23 +4949,32 @@ func (s *GoogleCloudDocumentaiV1ProcessorVersionDeprecationInfo) MarshalJSON() ( // GoogleCloudDocumentaiV1PropertyMetadata: Metadata about a property. type GoogleCloudDocumentaiV1PropertyMetadata struct { + // HumanReviewLabelingMetadata: Human review labeling config on the + // property. + HumanReviewLabelingMetadata *GoogleCloudDocumentaiV1HumanReviewLabelingMetadata `json:"humanReviewLabelingMetadata,omitempty"` + + // HumanReviewMetadata: Human review validation config on the property. + HumanReviewMetadata *GoogleCloudDocumentaiV1HumanReviewValidationMetadata `json:"humanReviewMetadata,omitempty"` + // Inactive: Whether the property should be considered as "inactive". Inactive bool `json:"inactive,omitempty"` - // ForceSendFields is a list of field names (e.g. "Inactive") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "HumanReviewLabelingMetadata") 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. "Inactive") 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 is a list of field names (e.g. + // "HumanReviewLabelingMetadata") 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:"-"` } @@ -10860,17 +10953,17 @@ func (c *OperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobuf if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ @@ -11011,17 +11104,17 @@ func (c *ProjectsLocationsFetchProcessorTypesCall) Do(opts ...googleapi.CallOpti if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleCloudDocumentaiV1FetchProcessorTypesResponse{ ServerResponse: googleapi.ServerResponse{ @@ -11157,17 +11250,17 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleCloudLocationLocation{ ServerResponse: googleapi.ServerResponse{ @@ -11331,17 +11424,17 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleClo if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleCloudLocationListLocationsResponse{ ServerResponse: googleapi.ServerResponse{ @@ -11509,17 +11602,17 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ @@ -11657,17 +11750,17 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ @@ -11834,17 +11927,17 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ @@ -12037,17 +12130,17 @@ func (c *ProjectsLocationsProcessorTypesListCall) Do(opts ...googleapi.CallOptio if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleCloudDocumentaiV1ListProcessorTypesResponse{ ServerResponse: googleapi.ServerResponse{ @@ -12213,17 +12306,17 @@ func (c *ProjectsLocationsProcessorsBatchProcessCall) Do(opts ...googleapi.CallO if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ @@ -12358,17 +12451,17 @@ func (c *ProjectsLocationsProcessorsCreateCall) Do(opts ...googleapi.CallOption) if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleCloudDocumentaiV1Processor{ ServerResponse: googleapi.ServerResponse{ @@ -12495,17 +12588,17 @@ func (c *ProjectsLocationsProcessorsDeleteCall) Do(opts ...googleapi.CallOption) if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ @@ -12634,17 +12727,17 @@ func (c *ProjectsLocationsProcessorsDisableCall) Do(opts ...googleapi.CallOption if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ @@ -12776,17 +12869,17 @@ func (c *ProjectsLocationsProcessorsEnableCall) Do(opts ...googleapi.CallOption) if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ @@ -12925,17 +13018,17 @@ func (c *ProjectsLocationsProcessorsGetCall) Do(opts ...googleapi.CallOption) (* if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleCloudDocumentaiV1Processor{ ServerResponse: googleapi.ServerResponse{ @@ -13092,17 +13185,17 @@ func (c *ProjectsLocationsProcessorsListCall) Do(opts ...googleapi.CallOption) ( if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleCloudDocumentaiV1ListProcessorsResponse{ ServerResponse: googleapi.ServerResponse{ @@ -13270,17 +13363,17 @@ func (c *ProjectsLocationsProcessorsProcessCall) Do(opts ...googleapi.CallOption if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleCloudDocumentaiV1ProcessResponse{ ServerResponse: googleapi.ServerResponse{ @@ -13415,17 +13508,17 @@ func (c *ProjectsLocationsProcessorsSetDefaultProcessorVersionCall) Do(opts ...g if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ @@ -13559,17 +13652,17 @@ func (c *ProjectsLocationsProcessorsHumanReviewConfigReviewDocumentCall) Do(opts if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ @@ -13706,17 +13799,17 @@ func (c *ProjectsLocationsProcessorsProcessorVersionsBatchProcessCall) Do(opts . if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ @@ -13842,17 +13935,17 @@ func (c *ProjectsLocationsProcessorsProcessorVersionsDeleteCall) Do(opts ...goog if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ @@ -13981,17 +14074,17 @@ func (c *ProjectsLocationsProcessorsProcessorVersionsDeployCall) Do(opts ...goog if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ @@ -14131,17 +14224,17 @@ func (c *ProjectsLocationsProcessorsProcessorVersionsGetCall) Do(opts ...googlea if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleCloudDocumentaiV1ProcessorVersion{ ServerResponse: googleapi.ServerResponse{ @@ -14298,17 +14391,17 @@ func (c *ProjectsLocationsProcessorsProcessorVersionsListCall) Do(opts ...google if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleCloudDocumentaiV1ListProcessorVersionsResponse{ ServerResponse: googleapi.ServerResponse{ @@ -14476,17 +14569,17 @@ func (c *ProjectsLocationsProcessorsProcessorVersionsProcessCall) Do(opts ...goo if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleCloudDocumentaiV1ProcessResponse{ ServerResponse: googleapi.ServerResponse{ @@ -14618,17 +14711,17 @@ func (c *ProjectsLocationsProcessorsProcessorVersionsUndeployCall) Do(opts ...go if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ @@ -14769,17 +14862,17 @@ func (c *ProjectsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLon if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ @@ -14915,17 +15008,17 @@ func (c *Uiv1beta3ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*G if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleCloudLocationLocation{ ServerResponse: googleapi.ServerResponse{ @@ -15089,17 +15182,17 @@ func (c *Uiv1beta3ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (* if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleCloudLocationListLocationsResponse{ ServerResponse: googleapi.ServerResponse{ @@ -15267,17 +15360,17 @@ func (c *Uiv1beta3ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.Ca if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ @@ -15415,17 +15508,17 @@ func (c *Uiv1beta3ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallO if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ @@ -15592,17 +15685,17 @@ func (c *Uiv1beta3ProjectsLocationsOperationsListCall) Do(opts ...googleapi.Call if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ diff --git a/documentai/v1beta3/documentai-api.json b/documentai/v1beta3/documentai-api.json index 2297ad538b7..673c53bfbef 100644 --- a/documentai/v1beta3/documentai-api.json +++ b/documentai/v1beta3/documentai-api.json @@ -836,7 +836,7 @@ } } }, - "revision": "20221027", + "revision": "20221106", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -6089,6 +6089,14 @@ "description": "Metadata about an entity type.", "id": "GoogleCloudDocumentaiV1beta3EntityTypeMetadata", "properties": { + "humanReviewLabelingMetadata": { + "$ref": "GoogleCloudDocumentaiV1beta3HumanReviewLabelingMetadata", + "description": "Human review labeling config on the property." + }, + "humanReviewMetadata": { + "$ref": "GoogleCloudDocumentaiV1beta3HumanReviewValidationMetadata", + "description": "Human review config on the entity type." + }, "inactive": { "description": "Whether the entity type should be considered as \"inactive\".", "type": "boolean" @@ -6150,6 +6158,17 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta3HumanReviewLabelingMetadata": { + "description": "Metadata for human review labeling config.", + "id": "GoogleCloudDocumentaiV1beta3HumanReviewLabelingMetadata", + "properties": { + "enableNormalizationEditing": { + "description": "Whether to enable normalization editing.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3HumanReviewStatus": { "description": "The status of human review on a processed document.", "id": "GoogleCloudDocumentaiV1beta3HumanReviewStatus", @@ -6183,6 +6202,22 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta3HumanReviewValidationMetadata": { + "description": "Metadata for Human Review config.", + "id": "GoogleCloudDocumentaiV1beta3HumanReviewValidationMetadata", + "properties": { + "confidenceThreshold": { + "description": "The confidence threshold if human review validation is enabled.", + "format": "float", + "type": "number" + }, + "enableValidation": { + "description": "Whether to enable human review validation.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3ListProcessorTypesResponse": { "description": "Response message for list processor types.", "id": "GoogleCloudDocumentaiV1beta3ListProcessorTypesResponse", @@ -6446,10 +6481,6 @@ "description": "The display name of the processor version.", "type": "string" }, - "documentSchema": { - "$ref": "GoogleCloudDocumentaiV1beta3DocumentSchema", - "description": "The schema of the processor version. Describes the output." - }, "googleManaged": { "description": "Denotes that this ProcessorVersion is managed by google.", "type": "boolean" @@ -6513,6 +6544,14 @@ "description": "Metadata about a property.", "id": "GoogleCloudDocumentaiV1beta3PropertyMetadata", "properties": { + "humanReviewLabelingMetadata": { + "$ref": "GoogleCloudDocumentaiV1beta3HumanReviewLabelingMetadata", + "description": "Human review labeling config on the property." + }, + "humanReviewMetadata": { + "$ref": "GoogleCloudDocumentaiV1beta3HumanReviewValidationMetadata", + "description": "Human review validation config on the property." + }, "inactive": { "description": "Whether the property should be considered as \"inactive\".", "type": "boolean" diff --git a/documentai/v1beta3/documentai-gen.go b/documentai/v1beta3/documentai-gen.go index 15ebbd24ebe..a953ec696b4 100644 --- a/documentai/v1beta3/documentai-gen.go +++ b/documentai/v1beta3/documentai-gen.go @@ -8996,23 +8996,32 @@ type GoogleCloudDocumentaiV1beta3EnableProcessorResponse struct { // GoogleCloudDocumentaiV1beta3EntityTypeMetadata: Metadata about an // entity type. type GoogleCloudDocumentaiV1beta3EntityTypeMetadata struct { + // HumanReviewLabelingMetadata: Human review labeling config on the + // property. + HumanReviewLabelingMetadata *GoogleCloudDocumentaiV1beta3HumanReviewLabelingMetadata `json:"humanReviewLabelingMetadata,omitempty"` + + // HumanReviewMetadata: Human review config on the entity type. + HumanReviewMetadata *GoogleCloudDocumentaiV1beta3HumanReviewValidationMetadata `json:"humanReviewMetadata,omitempty"` + // Inactive: Whether the entity type should be considered as "inactive". Inactive bool `json:"inactive,omitempty"` - // ForceSendFields is a list of field names (e.g. "Inactive") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "HumanReviewLabelingMetadata") 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. "Inactive") 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 is a list of field names (e.g. + // "HumanReviewLabelingMetadata") 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:"-"` } @@ -9146,6 +9155,37 @@ func (s *GoogleCloudDocumentaiV1beta3GcsPrefix) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta3HumanReviewLabelingMetadata: Metadata for +// human review labeling config. +type GoogleCloudDocumentaiV1beta3HumanReviewLabelingMetadata struct { + // EnableNormalizationEditing: Whether to enable normalization editing. + EnableNormalizationEditing bool `json:"enableNormalizationEditing,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnableNormalizationEditing") 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. + // "EnableNormalizationEditing") 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 *GoogleCloudDocumentaiV1beta3HumanReviewLabelingMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3HumanReviewLabelingMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta3HumanReviewStatus: The status of human // review on a processed document. type GoogleCloudDocumentaiV1beta3HumanReviewStatus struct { @@ -9201,6 +9241,54 @@ func (s *GoogleCloudDocumentaiV1beta3HumanReviewStatus) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta3HumanReviewValidationMetadata: Metadata +// for Human Review config. +type GoogleCloudDocumentaiV1beta3HumanReviewValidationMetadata struct { + // ConfidenceThreshold: The confidence threshold if human review + // validation is enabled. + ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` + + // EnableValidation: Whether to enable human review validation. + EnableValidation bool `json:"enableValidation,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") + // 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. "ConfidenceThreshold") 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 *GoogleCloudDocumentaiV1beta3HumanReviewValidationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3HumanReviewValidationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDocumentaiV1beta3HumanReviewValidationMetadata) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1beta3HumanReviewValidationMetadata + var s1 struct { + ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) + return nil +} + // GoogleCloudDocumentaiV1beta3ListProcessorTypesResponse: Response // message for list processor types. type GoogleCloudDocumentaiV1beta3ListProcessorTypesResponse struct { @@ -9660,10 +9748,6 @@ type GoogleCloudDocumentaiV1beta3ProcessorVersion struct { // DisplayName: The display name of the processor version. DisplayName string `json:"displayName,omitempty"` - // DocumentSchema: The schema of the processor version. Describes the - // output. - DocumentSchema *GoogleCloudDocumentaiV1beta3DocumentSchema `json:"documentSchema,omitempty"` - // GoogleManaged: Denotes that this ProcessorVersion is managed by // google. GoogleManaged bool `json:"googleManaged,omitempty"` @@ -9761,23 +9845,32 @@ func (s *GoogleCloudDocumentaiV1beta3ProcessorVersionDeprecationInfo) MarshalJSO // GoogleCloudDocumentaiV1beta3PropertyMetadata: Metadata about a // property. type GoogleCloudDocumentaiV1beta3PropertyMetadata struct { + // HumanReviewLabelingMetadata: Human review labeling config on the + // property. + HumanReviewLabelingMetadata *GoogleCloudDocumentaiV1beta3HumanReviewLabelingMetadata `json:"humanReviewLabelingMetadata,omitempty"` + + // HumanReviewMetadata: Human review validation config on the property. + HumanReviewMetadata *GoogleCloudDocumentaiV1beta3HumanReviewValidationMetadata `json:"humanReviewMetadata,omitempty"` + // Inactive: Whether the property should be considered as "inactive". Inactive bool `json:"inactive,omitempty"` - // ForceSendFields is a list of field names (e.g. "Inactive") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "HumanReviewLabelingMetadata") 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. "Inactive") 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 is a list of field names (e.g. + // "HumanReviewLabelingMetadata") 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:"-"` } @@ -10895,17 +10988,17 @@ func (c *ProjectsLocationsFetchProcessorTypesCall) Do(opts ...googleapi.CallOpti if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleCloudDocumentaiV1beta3FetchProcessorTypesResponse{ ServerResponse: googleapi.ServerResponse{ @@ -11041,17 +11134,17 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleCloudLocationLocation{ ServerResponse: googleapi.ServerResponse{ @@ -11215,17 +11308,17 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleClo if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleCloudLocationListLocationsResponse{ ServerResponse: googleapi.ServerResponse{ @@ -11393,17 +11486,17 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ @@ -11541,17 +11634,17 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ @@ -11718,17 +11811,17 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ @@ -11922,17 +12015,17 @@ func (c *ProjectsLocationsProcessorTypesListCall) Do(opts ...googleapi.CallOptio if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleCloudDocumentaiV1beta3ListProcessorTypesResponse{ ServerResponse: googleapi.ServerResponse{ @@ -12098,17 +12191,17 @@ func (c *ProjectsLocationsProcessorsBatchProcessCall) Do(opts ...googleapi.CallO if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ @@ -12244,17 +12337,17 @@ func (c *ProjectsLocationsProcessorsCreateCall) Do(opts ...googleapi.CallOption) if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleCloudDocumentaiV1beta3Processor{ ServerResponse: googleapi.ServerResponse{ @@ -12381,17 +12474,17 @@ func (c *ProjectsLocationsProcessorsDeleteCall) Do(opts ...googleapi.CallOption) if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ @@ -12520,17 +12613,17 @@ func (c *ProjectsLocationsProcessorsDisableCall) Do(opts ...googleapi.CallOption if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ @@ -12662,17 +12755,17 @@ func (c *ProjectsLocationsProcessorsEnableCall) Do(opts ...googleapi.CallOption) if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ @@ -12812,17 +12905,17 @@ func (c *ProjectsLocationsProcessorsGetCall) Do(opts ...googleapi.CallOption) (* if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleCloudDocumentaiV1beta3Processor{ ServerResponse: googleapi.ServerResponse{ @@ -12979,17 +13072,17 @@ func (c *ProjectsLocationsProcessorsListCall) Do(opts ...googleapi.CallOption) ( if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleCloudDocumentaiV1beta3ListProcessorsResponse{ ServerResponse: googleapi.ServerResponse{ @@ -13158,17 +13251,17 @@ func (c *ProjectsLocationsProcessorsProcessCall) Do(opts ...googleapi.CallOption if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleCloudDocumentaiV1beta3ProcessResponse{ ServerResponse: googleapi.ServerResponse{ @@ -13303,17 +13396,17 @@ func (c *ProjectsLocationsProcessorsSetDefaultProcessorVersionCall) Do(opts ...g if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ @@ -13447,17 +13540,17 @@ func (c *ProjectsLocationsProcessorsHumanReviewConfigReviewDocumentCall) Do(opts if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ @@ -13594,17 +13687,17 @@ func (c *ProjectsLocationsProcessorsProcessorVersionsBatchProcessCall) Do(opts . if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ @@ -13730,17 +13823,17 @@ func (c *ProjectsLocationsProcessorsProcessorVersionsDeleteCall) Do(opts ...goog if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ @@ -13869,17 +13962,17 @@ func (c *ProjectsLocationsProcessorsProcessorVersionsDeployCall) Do(opts ...goog if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ @@ -14020,17 +14113,17 @@ func (c *ProjectsLocationsProcessorsProcessorVersionsGetCall) Do(opts ...googlea if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleCloudDocumentaiV1beta3ProcessorVersion{ ServerResponse: googleapi.ServerResponse{ @@ -14188,17 +14281,17 @@ func (c *ProjectsLocationsProcessorsProcessorVersionsListCall) Do(opts ...google if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleCloudDocumentaiV1beta3ListProcessorVersionsResponse{ ServerResponse: googleapi.ServerResponse{ @@ -14367,17 +14460,17 @@ func (c *ProjectsLocationsProcessorsProcessorVersionsProcessCall) Do(opts ...goo if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleCloudDocumentaiV1beta3ProcessResponse{ ServerResponse: googleapi.ServerResponse{ @@ -14509,17 +14602,17 @@ func (c *ProjectsLocationsProcessorsProcessorVersionsUndeployCall) Do(opts ...go if res.Body != nil { res.Body.Close() } - return nil, &googleapi.Error{ + 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, err + return nil, gensupport.WrapError(err) } ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ diff --git a/securitycenter/v1/securitycenter-api.json b/securitycenter/v1/securitycenter-api.json index d15ee62825b..57e581cec1f 100644 --- a/securitycenter/v1/securitycenter-api.json +++ b/securitycenter/v1/securitycenter-api.json @@ -924,7 +924,7 @@ ], "parameters": { "name": { - "description": "Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/finding/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/finding/{finding_id}\", \"projects/{project_id}/sources/{source_id}/finding/{finding_id}\".", + "description": "Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", "location": "path", "pattern": "^folders/[^/]+/sources/[^/]+/findings/[^/]+$", "required": true, @@ -952,7 +952,7 @@ ], "parameters": { "name": { - "description": "Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/finding/{finding_id}\".", + "description": "Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\".", "location": "path", "pattern": "^folders/[^/]+/sources/[^/]+/findings/[^/]+$", "required": true, @@ -2288,7 +2288,7 @@ ], "parameters": { "name": { - "description": "Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/finding/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/finding/{finding_id}\", \"projects/{project_id}/sources/{source_id}/finding/{finding_id}\".", + "description": "Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", "location": "path", "pattern": "^organizations/[^/]+/sources/[^/]+/findings/[^/]+$", "required": true, @@ -2316,7 +2316,7 @@ ], "parameters": { "name": { - "description": "Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/finding/{finding_id}\".", + "description": "Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\".", "location": "path", "pattern": "^organizations/[^/]+/sources/[^/]+/findings/[^/]+$", "required": true, @@ -3239,7 +3239,7 @@ ], "parameters": { "name": { - "description": "Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/finding/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/finding/{finding_id}\", \"projects/{project_id}/sources/{source_id}/finding/{finding_id}\".", + "description": "Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", "location": "path", "pattern": "^projects/[^/]+/sources/[^/]+/findings/[^/]+$", "required": true, @@ -3267,7 +3267,7 @@ ], "parameters": { "name": { - "description": "Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/finding/{finding_id}\".", + "description": "Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\".", "location": "path", "pattern": "^projects/[^/]+/sources/[^/]+/findings/[^/]+$", "required": true, @@ -3372,7 +3372,7 @@ } } }, - "revision": "20221027", + "revision": "20221103", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -4175,6 +4175,13 @@ "description": "The URI that, if available, points to a web page outside of Security Command Center where additional information about the finding can be found. This field is guaranteed to be either empty or a well formed URL.", "type": "string" }, + "files": { + "description": "File associated with the finding.", + "items": { + "$ref": "File" + }, + "type": "array" + }, "findingClass": { "description": "The class of the finding.", "enum": [ @@ -5547,7 +5554,8 @@ "IMPAIR_DEFENSES", "NETWORK_SERVICE_DISCOVERY", "ACCESS_TOKEN_MANIPULATION", - "ABUSE_ELEVATION_CONTROL_MECHANISM" + "ABUSE_ELEVATION_CONTROL_MECHANISM", + "DEFAULT_ACCOUNTS" ], "enumDescriptions": [ "Unspecified value.", @@ -5584,7 +5592,8 @@ "T1562", "T1046", "T1134", - "T1548" + "T1548", + "T1078.001" ], "type": "string" }, @@ -5666,7 +5675,8 @@ "IMPAIR_DEFENSES", "NETWORK_SERVICE_DISCOVERY", "ACCESS_TOKEN_MANIPULATION", - "ABUSE_ELEVATION_CONTROL_MECHANISM" + "ABUSE_ELEVATION_CONTROL_MECHANISM", + "DEFAULT_ACCOUNTS" ], "enumDescriptions": [ "Unspecified value.", @@ -5703,7 +5713,8 @@ "T1562", "T1046", "T1134", - "T1548" + "T1548", + "T1078.001" ], "type": "string" }, diff --git a/securitycenter/v1/securitycenter-gen.go b/securitycenter/v1/securitycenter-gen.go index 2094c23b8e4..7ff72344cce 100644 --- a/securitycenter/v1/securitycenter-gen.go +++ b/securitycenter/v1/securitycenter-gen.go @@ -1795,6 +1795,9 @@ type Finding struct { // a well formed URL. ExternalUri string `json:"externalUri,omitempty"` + // Files: File associated with the finding. + Files []*File `json:"files,omitempty"` + // FindingClass: The class of the finding. // // Possible values: @@ -4014,6 +4017,7 @@ type MitreAttack struct { // "NETWORK_SERVICE_DISCOVERY" - T1046 // "ACCESS_TOKEN_MANIPULATION" - T1134 // "ABUSE_ELEVATION_CONTROL_MECHANISM" - T1548 + // "DEFAULT_ACCOUNTS" - T1078.001 AdditionalTechniques []string `json:"additionalTechniques,omitempty"` // PrimaryTactic: The MITRE ATT&CK tactic most closely represented by @@ -4081,6 +4085,7 @@ type MitreAttack struct { // "NETWORK_SERVICE_DISCOVERY" - T1046 // "ACCESS_TOKEN_MANIPULATION" - T1134 // "ABUSE_ELEVATION_CONTROL_MECHANISM" - T1548 + // "DEFAULT_ACCOUNTS" - T1078.001 PrimaryTechniques []string `json:"primaryTechniques,omitempty"` // Version: The MITRE ATT&CK version referenced by the above fields. @@ -9450,10 +9455,10 @@ type FoldersSourcesFindingsSetMuteCall struct { // - name: The relative resource name of the finding. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name // Example: -// "organizations/{organization_id}/sources/{source_id}/finding/{findin -// g_id}", -// "folders/{folder_id}/sources/{source_id}/finding/{finding_id}", -// "projects/{project_id}/sources/{source_id}/finding/{finding_id}". +// "organizations/{organization_id}/sources/{source_id}/findings/{findi +// ng_id}", +// "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", +// "projects/{project_id}/sources/{source_id}/findings/{finding_id}". func (r *FoldersSourcesFindingsService) SetMute(name string, setmuterequest *SetMuteRequest) *FoldersSourcesFindingsSetMuteCall { c := &FoldersSourcesFindingsSetMuteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -9561,7 +9566,7 @@ func (c *FoldersSourcesFindingsSetMuteCall) Do(opts ...googleapi.CallOption) (*F // ], // "parameters": { // "name": { - // "description": "Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/finding/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/finding/{finding_id}\", \"projects/{project_id}/sources/{source_id}/finding/{finding_id}\".", + // "description": "Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", // "location": "path", // "pattern": "^folders/[^/]+/sources/[^/]+/findings/[^/]+$", // "required": true, @@ -9598,8 +9603,8 @@ type FoldersSourcesFindingsSetStateCall struct { // - name: The relative resource name of the finding. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name // Example: -// "organizations/{organization_id}/sources/{source_id}/finding/{findin -// g_id}". +// "organizations/{organization_id}/sources/{source_id}/findings/{findi +// ng_id}". func (r *FoldersSourcesFindingsService) SetState(name string, setfindingstaterequest *SetFindingStateRequest) *FoldersSourcesFindingsSetStateCall { c := &FoldersSourcesFindingsSetStateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -9707,7 +9712,7 @@ func (c *FoldersSourcesFindingsSetStateCall) Do(opts ...googleapi.CallOption) (* // ], // "parameters": { // "name": { - // "description": "Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/finding/{finding_id}\".", + // "description": "Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\".", // "location": "path", // "pattern": "^folders/[^/]+/sources/[^/]+/findings/[^/]+$", // "required": true, @@ -16312,10 +16317,10 @@ type OrganizationsSourcesFindingsSetMuteCall struct { // - name: The relative resource name of the finding. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name // Example: -// "organizations/{organization_id}/sources/{source_id}/finding/{findin -// g_id}", -// "folders/{folder_id}/sources/{source_id}/finding/{finding_id}", -// "projects/{project_id}/sources/{source_id}/finding/{finding_id}". +// "organizations/{organization_id}/sources/{source_id}/findings/{findi +// ng_id}", +// "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", +// "projects/{project_id}/sources/{source_id}/findings/{finding_id}". func (r *OrganizationsSourcesFindingsService) SetMute(name string, setmuterequest *SetMuteRequest) *OrganizationsSourcesFindingsSetMuteCall { c := &OrganizationsSourcesFindingsSetMuteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -16423,7 +16428,7 @@ func (c *OrganizationsSourcesFindingsSetMuteCall) Do(opts ...googleapi.CallOptio // ], // "parameters": { // "name": { - // "description": "Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/finding/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/finding/{finding_id}\", \"projects/{project_id}/sources/{source_id}/finding/{finding_id}\".", + // "description": "Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", // "location": "path", // "pattern": "^organizations/[^/]+/sources/[^/]+/findings/[^/]+$", // "required": true, @@ -16460,8 +16465,8 @@ type OrganizationsSourcesFindingsSetStateCall struct { // - name: The relative resource name of the finding. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name // Example: -// "organizations/{organization_id}/sources/{source_id}/finding/{findin -// g_id}". +// "organizations/{organization_id}/sources/{source_id}/findings/{findi +// ng_id}". func (r *OrganizationsSourcesFindingsService) SetState(name string, setfindingstaterequest *SetFindingStateRequest) *OrganizationsSourcesFindingsSetStateCall { c := &OrganizationsSourcesFindingsSetStateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -16569,7 +16574,7 @@ func (c *OrganizationsSourcesFindingsSetStateCall) Do(opts ...googleapi.CallOpti // ], // "parameters": { // "name": { - // "description": "Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/finding/{finding_id}\".", + // "description": "Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\".", // "location": "path", // "pattern": "^organizations/[^/]+/sources/[^/]+/findings/[^/]+$", // "required": true, @@ -21043,10 +21048,10 @@ type ProjectsSourcesFindingsSetMuteCall struct { // - name: The relative resource name of the finding. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name // Example: -// "organizations/{organization_id}/sources/{source_id}/finding/{findin -// g_id}", -// "folders/{folder_id}/sources/{source_id}/finding/{finding_id}", -// "projects/{project_id}/sources/{source_id}/finding/{finding_id}". +// "organizations/{organization_id}/sources/{source_id}/findings/{findi +// ng_id}", +// "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", +// "projects/{project_id}/sources/{source_id}/findings/{finding_id}". func (r *ProjectsSourcesFindingsService) SetMute(name string, setmuterequest *SetMuteRequest) *ProjectsSourcesFindingsSetMuteCall { c := &ProjectsSourcesFindingsSetMuteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -21154,7 +21159,7 @@ func (c *ProjectsSourcesFindingsSetMuteCall) Do(opts ...googleapi.CallOption) (* // ], // "parameters": { // "name": { - // "description": "Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/finding/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/finding/{finding_id}\", \"projects/{project_id}/sources/{source_id}/finding/{finding_id}\".", + // "description": "Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", // "location": "path", // "pattern": "^projects/[^/]+/sources/[^/]+/findings/[^/]+$", // "required": true, @@ -21191,8 +21196,8 @@ type ProjectsSourcesFindingsSetStateCall struct { // - name: The relative resource name of the finding. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name // Example: -// "organizations/{organization_id}/sources/{source_id}/finding/{findin -// g_id}". +// "organizations/{organization_id}/sources/{source_id}/findings/{findi +// ng_id}". func (r *ProjectsSourcesFindingsService) SetState(name string, setfindingstaterequest *SetFindingStateRequest) *ProjectsSourcesFindingsSetStateCall { c := &ProjectsSourcesFindingsSetStateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -21300,7 +21305,7 @@ func (c *ProjectsSourcesFindingsSetStateCall) Do(opts ...googleapi.CallOption) ( // ], // "parameters": { // "name": { - // "description": "Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/finding/{finding_id}\".", + // "description": "Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\".", // "location": "path", // "pattern": "^projects/[^/]+/sources/[^/]+/findings/[^/]+$", // "required": true, diff --git a/securitycenter/v1beta1/securitycenter-api.json b/securitycenter/v1beta1/securitycenter-api.json index fb0091db0e0..ad6fae8e45f 100644 --- a/securitycenter/v1beta1/securitycenter-api.json +++ b/securitycenter/v1beta1/securitycenter-api.json @@ -896,7 +896,7 @@ } } }, - "revision": "20221027", + "revision": "20221103", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -1675,6 +1675,13 @@ "description": "The URI that, if available, points to a web page outside of Security Command Center where additional information about the finding can be found. This field is guaranteed to be either empty or a well formed URL.", "type": "string" }, + "files": { + "description": "File associated with the finding.", + "items": { + "$ref": "File" + }, + "type": "array" + }, "findingClass": { "description": "The class of the finding.", "enum": [ @@ -3016,7 +3023,8 @@ "IMPAIR_DEFENSES", "NETWORK_SERVICE_DISCOVERY", "ACCESS_TOKEN_MANIPULATION", - "ABUSE_ELEVATION_CONTROL_MECHANISM" + "ABUSE_ELEVATION_CONTROL_MECHANISM", + "DEFAULT_ACCOUNTS" ], "enumDescriptions": [ "Unspecified value.", @@ -3053,7 +3061,8 @@ "T1562", "T1046", "T1134", - "T1548" + "T1548", + "T1078.001" ], "type": "string" }, @@ -3135,7 +3144,8 @@ "IMPAIR_DEFENSES", "NETWORK_SERVICE_DISCOVERY", "ACCESS_TOKEN_MANIPULATION", - "ABUSE_ELEVATION_CONTROL_MECHANISM" + "ABUSE_ELEVATION_CONTROL_MECHANISM", + "DEFAULT_ACCOUNTS" ], "enumDescriptions": [ "Unspecified value.", @@ -3172,7 +3182,8 @@ "T1562", "T1046", "T1134", - "T1548" + "T1548", + "T1078.001" ], "type": "string" }, diff --git a/securitycenter/v1beta1/securitycenter-gen.go b/securitycenter/v1beta1/securitycenter-gen.go index 5e47207028a..76ebbb8a401 100644 --- a/securitycenter/v1beta1/securitycenter-gen.go +++ b/securitycenter/v1beta1/securitycenter-gen.go @@ -1462,6 +1462,9 @@ type Finding struct { // a well formed URL. ExternalUri string `json:"externalUri,omitempty"` + // Files: File associated with the finding. + Files []*File `json:"files,omitempty"` + // FindingClass: The class of the finding. // // Possible values: @@ -3544,6 +3547,7 @@ type MitreAttack struct { // "NETWORK_SERVICE_DISCOVERY" - T1046 // "ACCESS_TOKEN_MANIPULATION" - T1134 // "ABUSE_ELEVATION_CONTROL_MECHANISM" - T1548 + // "DEFAULT_ACCOUNTS" - T1078.001 AdditionalTechniques []string `json:"additionalTechniques,omitempty"` // PrimaryTactic: The MITRE ATT&CK tactic most closely represented by @@ -3611,6 +3615,7 @@ type MitreAttack struct { // "NETWORK_SERVICE_DISCOVERY" - T1046 // "ACCESS_TOKEN_MANIPULATION" - T1134 // "ABUSE_ELEVATION_CONTROL_MECHANISM" - T1548 + // "DEFAULT_ACCOUNTS" - T1078.001 PrimaryTechniques []string `json:"primaryTechniques,omitempty"` // Version: The MITRE ATT&CK version referenced by the above fields. diff --git a/securitycenter/v1beta2/securitycenter-api.json b/securitycenter/v1beta2/securitycenter-api.json index b2c49c1a97e..a40dd6b1b0e 100644 --- a/securitycenter/v1beta2/securitycenter-api.json +++ b/securitycenter/v1beta2/securitycenter-api.json @@ -1981,7 +1981,7 @@ } } }, - "revision": "20221027", + "revision": "20221103", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -2742,6 +2742,13 @@ "description": "The URI that, if available, points to a web page outside of Security Command Center where additional information about the finding can be found. This field is guaranteed to be either empty or a well formed URL.", "type": "string" }, + "files": { + "description": "File associated with the finding.", + "items": { + "$ref": "File" + }, + "type": "array" + }, "findingClass": { "description": "The class of the finding.", "enum": [ @@ -3730,7 +3737,8 @@ "IMPAIR_DEFENSES", "NETWORK_SERVICE_DISCOVERY", "ACCESS_TOKEN_MANIPULATION", - "ABUSE_ELEVATION_CONTROL_MECHANISM" + "ABUSE_ELEVATION_CONTROL_MECHANISM", + "DEFAULT_ACCOUNTS" ], "enumDescriptions": [ "Unspecified value.", @@ -3767,7 +3775,8 @@ "T1562", "T1046", "T1134", - "T1548" + "T1548", + "T1078.001" ], "type": "string" }, @@ -3849,7 +3858,8 @@ "IMPAIR_DEFENSES", "NETWORK_SERVICE_DISCOVERY", "ACCESS_TOKEN_MANIPULATION", - "ABUSE_ELEVATION_CONTROL_MECHANISM" + "ABUSE_ELEVATION_CONTROL_MECHANISM", + "DEFAULT_ACCOUNTS" ], "enumDescriptions": [ "Unspecified value.", @@ -3886,7 +3896,8 @@ "T1562", "T1046", "T1134", - "T1548" + "T1548", + "T1078.001" ], "type": "string" }, diff --git a/securitycenter/v1beta2/securitycenter-gen.go b/securitycenter/v1beta2/securitycenter-gen.go index bb82f7f821d..334ed0377ed 100644 --- a/securitycenter/v1beta2/securitycenter-gen.go +++ b/securitycenter/v1beta2/securitycenter-gen.go @@ -1545,6 +1545,9 @@ type Finding struct { // a well formed URL. ExternalUri string `json:"externalUri,omitempty"` + // Files: File associated with the finding. + Files []*File `json:"files,omitempty"` + // FindingClass: The class of the finding. // // Possible values: @@ -2945,6 +2948,7 @@ type MitreAttack struct { // "NETWORK_SERVICE_DISCOVERY" - T1046 // "ACCESS_TOKEN_MANIPULATION" - T1134 // "ABUSE_ELEVATION_CONTROL_MECHANISM" - T1548 + // "DEFAULT_ACCOUNTS" - T1078.001 AdditionalTechniques []string `json:"additionalTechniques,omitempty"` // PrimaryTactic: The MITRE ATT&CK tactic most closely represented by @@ -3012,6 +3016,7 @@ type MitreAttack struct { // "NETWORK_SERVICE_DISCOVERY" - T1046 // "ACCESS_TOKEN_MANIPULATION" - T1134 // "ABUSE_ELEVATION_CONTROL_MECHANISM" - T1548 + // "DEFAULT_ACCOUNTS" - T1078.001 PrimaryTechniques []string `json:"primaryTechniques,omitempty"` // Version: The MITRE ATT&CK version referenced by the above fields.