diff --git a/admob/v1/admob-api.json b/admob/v1/admob-api.json index 0c35580e28..703dacfcc4 100644 --- a/admob/v1/admob-api.json +++ b/admob/v1/admob-api.json @@ -253,7 +253,7 @@ "mediationReport": { "methods": { "generate": { - "description": "Generates an AdMob mediation report based on the provided report specification. Returns result of a server-side streaming RPC. The result is returned in a sequence of responses.", + "description": "Generates an AdMob Mediation report based on the provided report specification. Returns result of a server-side streaming RPC. The result is returned in a sequence of responses.", "flatPath": "v1/accounts/{accountsId}/mediationReport:generate", "httpMethod": "POST", "id": "admob.accounts.mediationReport.generate", @@ -321,7 +321,7 @@ } } }, - "revision": "20230425", + "revision": "20240514", "rootUrl": "https://admob.googleapis.com/", "schemas": { "AdUnit": { @@ -467,7 +467,7 @@ "type": "object" }, "GenerateMediationReportRequest": { - "description": "Request to generate an AdMob mediation report.", + "description": "Request to generate an AdMob Mediation report.", "id": "GenerateMediationReportRequest", "properties": { "reportSpec": { @@ -478,7 +478,7 @@ "type": "object" }, "GenerateMediationReportResponse": { - "description": "The streaming response for the AdMob mediation report where the first response contains the report header, then a stream of row responses, and finally a footer as the last response message. For example: [{ \"header\": { \"date_range\": { \"start_date\": {\"year\": 2018, \"month\": 9, \"day\": 1}, \"end_date\": {\"year\": 2018, \"month\": 9, \"day\": 1} }, \"localization_settings\": { \"currency_code\": \"USD\", \"language_code\": \"en-US\" } } }, { \"row\": { \"dimension_values\": { \"DATE\": {\"value\": \"20180918\"}, \"APP\": { \"value\": \"ca-app-pub-8123415297019784~1001342552\", \"display_label\": \"My app name!\" } }, \"metric_values\": { \"ESTIMATED_EARNINGS\": {\"decimal_value\": \"1324746\"} } } }, { \"footer\": {\"matching_row_count\": 1} }]", + "description": "The streaming response for the AdMob Mediation report where the first response contains the report header, then a stream of row responses, and finally a footer as the last response message. For example: [{ \"header\": { \"date_range\": { \"start_date\": {\"year\": 2018, \"month\": 9, \"day\": 1}, \"end_date\": {\"year\": 2018, \"month\": 9, \"day\": 1} }, \"localization_settings\": { \"currency_code\": \"USD\", \"language_code\": \"en-US\" } } }, { \"row\": { \"dimension_values\": { \"DATE\": {\"value\": \"20180918\"}, \"APP\": { \"value\": \"ca-app-pub-8123415297019784~1001342552\", \"display_label\": \"My app name!\" } }, \"metric_values\": { \"ESTIMATED_EARNINGS\": {\"decimal_value\": \"1324746\"} } } }, { \"footer\": {\"matching_row_count\": 1} }]", "id": "GenerateMediationReportResponse", "properties": { "footer": { diff --git a/admob/v1/admob-gen.go b/admob/v1/admob-gen.go index 7afd4ed399..503edc3d11 100644 --- a/admob/v1/admob-gen.go +++ b/admob/v1/admob-gen.go @@ -441,7 +441,7 @@ func (s *DateRange) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GenerateMediationReportRequest: Request to generate an AdMob mediation +// GenerateMediationReportRequest: Request to generate an AdMob Mediation // report. type GenerateMediationReportRequest struct { // ReportSpec: Network report specification. @@ -465,7 +465,7 @@ func (s *GenerateMediationReportRequest) MarshalJSON() ([]byte, error) { } // GenerateMediationReportResponse: The streaming response for the AdMob -// mediation report where the first response contains the report header, then a +// Mediation report where the first response contains the report header, then a // stream of row responses, and finally a footer as the last response message. // For example: [{ "header": { "date_range": { "start_date": {"year": 2018, // "month": 9, "day": 1}, "end_date": {"year": 2018, "month": 9, "day": 1} }, @@ -2035,7 +2035,7 @@ type AccountsMediationReportGenerateCall struct { header_ http.Header } -// Generate: Generates an AdMob mediation report based on the provided report +// Generate: Generates an AdMob Mediation report based on the provided report // specification. Returns result of a server-side streaming RPC. The result is // returned in a sequence of responses. // diff --git a/admob/v1beta/admob-api.json b/admob/v1beta/admob-api.json index 0cf27139cf..379a66aea7 100644 --- a/admob/v1beta/admob-api.json +++ b/admob/v1beta/admob-api.json @@ -690,7 +690,7 @@ "mediationReport": { "methods": { "generate": { - "description": "Generates an AdMob mediation report based on the provided report specification. Returns result of a server-side streaming RPC. The result is returned in a sequence of responses.", + "description": "Generates an AdMob Mediation report based on the provided report specification. Returns result of a server-side streaming RPC. The result is returned in a sequence of responses.", "flatPath": "v1beta/accounts/{accountsId}/mediationReport:generate", "httpMethod": "POST", "id": "admob.accounts.mediationReport.generate", @@ -758,7 +758,7 @@ } } }, - "revision": "20240201", + "revision": "20240514", "rootUrl": "https://admob.googleapis.com/", "schemas": { "AdSource": { @@ -1213,7 +1213,7 @@ "type": "object" }, "GenerateMediationReportRequest": { - "description": "Request to generate an AdMob mediation report.", + "description": "Request to generate an AdMob Mediation report.", "id": "GenerateMediationReportRequest", "properties": { "reportSpec": { @@ -1224,7 +1224,7 @@ "type": "object" }, "GenerateMediationReportResponse": { - "description": "The streaming response for the AdMob mediation report where the first response contains the report header, then a stream of row responses, and finally a footer as the last response message. For example: [{ \"header\": { \"date_range\": { \"start_date\": {\"year\": 2018, \"month\": 9, \"day\": 1}, \"end_date\": {\"year\": 2018, \"month\": 9, \"day\": 1} }, \"localization_settings\": { \"currency_code\": \"USD\", \"language_code\": \"en-US\" } } }, { \"row\": { \"dimension_values\": { \"DATE\": {\"value\": \"20180918\"}, \"APP\": { \"value\": \"ca-app-pub-8123415297019784~1001342552\", \"display_label\": \"My app name!\" } }, \"metric_values\": { \"ESTIMATED_EARNINGS\": {\"decimal_value\": \"1324746\"} } } }, { \"footer\": {\"matching_row_count\": 1} }]", + "description": "The streaming response for the AdMob Mediation report where the first response contains the report header, then a stream of row responses, and finally a footer as the last response message. For example: [{ \"header\": { \"date_range\": { \"start_date\": {\"year\": 2018, \"month\": 9, \"day\": 1}, \"end_date\": {\"year\": 2018, \"month\": 9, \"day\": 1} }, \"localization_settings\": { \"currency_code\": \"USD\", \"language_code\": \"en-US\" } } }, { \"row\": { \"dimension_values\": { \"DATE\": {\"value\": \"20180918\"}, \"APP\": { \"value\": \"ca-app-pub-8123415297019784~1001342552\", \"display_label\": \"My app name!\" } }, \"metric_values\": { \"ESTIMATED_EARNINGS\": {\"decimal_value\": \"1324746\"} } } }, { \"footer\": {\"matching_row_count\": 1} }]", "id": "GenerateMediationReportResponse", "properties": { "footer": { @@ -1520,7 +1520,7 @@ "type": "object" }, "MediationGroup": { - "description": "Describes an AdMob mediation group.", + "description": "Describes an AdMob Mediation group.", "id": "MediationGroup", "properties": { "displayName": { diff --git a/admob/v1beta/admob-gen.go b/admob/v1beta/admob-gen.go index 68a6b2887c..dce8f8e443 100644 --- a/admob/v1beta/admob-gen.go +++ b/admob/v1beta/admob-gen.go @@ -920,7 +920,7 @@ func (s *GenerateCampaignReportResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GenerateMediationReportRequest: Request to generate an AdMob mediation +// GenerateMediationReportRequest: Request to generate an AdMob Mediation // report. type GenerateMediationReportRequest struct { // ReportSpec: Network report specification. @@ -944,7 +944,7 @@ func (s *GenerateMediationReportRequest) MarshalJSON() ([]byte, error) { } // GenerateMediationReportResponse: The streaming response for the AdMob -// mediation report where the first response contains the report header, then a +// Mediation report where the first response contains the report header, then a // stream of row responses, and finally a footer as the last response message. // For example: [{ "header": { "date_range": { "start_date": {"year": 2018, // "month": 9, "day": 1}, "end_date": {"year": 2018, "month": 9, "day": 1} }, @@ -1383,7 +1383,7 @@ func (s *MediationAbExperimentExperimentMediationLine) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// MediationGroup: Describes an AdMob mediation group. +// MediationGroup: Describes an AdMob Mediation group. type MediationGroup struct { // DisplayName: User provided name for the mediation group. The maximum length // allowed is 120 characters. @@ -4542,7 +4542,7 @@ type AccountsMediationReportGenerateCall struct { header_ http.Header } -// Generate: Generates an AdMob mediation report based on the provided report +// Generate: Generates an AdMob Mediation report based on the provided report // specification. Returns result of a server-side streaming RPC. The result is // returned in a sequence of responses. // diff --git a/androidpublisher/v3/androidpublisher-api.json b/androidpublisher/v3/androidpublisher-api.json index 2624899747..91b06b00e6 100644 --- a/androidpublisher/v3/androidpublisher-api.json +++ b/androidpublisher/v3/androidpublisher-api.json @@ -4731,7 +4731,7 @@ } } }, - "revision": "20240509", + "revision": "20240514", "rootUrl": "https://androidpublisher.googleapis.com/", "schemas": { "Abi": { @@ -5306,6 +5306,10 @@ "description": "If the subscription is currently set to auto-renew, e.g. the user has not canceled the subscription", "type": "boolean" }, + "installmentDetails": { + "$ref": "InstallmentPlan", + "description": "The installment plan commitment and state related info for the auto renewing plan." + }, "priceChangeDetails": { "$ref": "SubscriptionItemPriceChangeDetails", "description": "The information of the last price change for the item since subscription signup." @@ -5325,6 +5329,10 @@ "description": "Required. Immutable. The unique identifier of this base plan. Must be unique within the subscription, and conform with RFC-1034. That is, this ID can only contain lower-case letters (a-z), numbers (0-9), and hyphens (-), and be at most 63 characters.", "type": "string" }, + "installmentsBasePlanType": { + "$ref": "InstallmentsBasePlanType", + "description": "Set for installments base plans where a user is committed to a specified number of payments." + }, "offerTags": { "description": "List of up to 20 custom tags specified for this base plan, and returned to the app through the billing library. Subscription offers for this base plan will also receive these offer tags in the billing library.", "items": { @@ -7021,6 +7029,98 @@ }, "type": "object" }, + "InstallmentPlan": { + "description": "Information to a installment plan.", + "id": "InstallmentPlan", + "properties": { + "initialCommittedPaymentsCount": { + "description": "Total number of payments the user is initially committed for.", + "format": "int32", + "type": "integer" + }, + "pendingCancellation": { + "$ref": "PendingCancellation", + "description": "If present, this installment plan is pending to be canceled. The cancellation will happen only after the user finished all committed payments." + }, + "remainingCommittedPaymentsCount": { + "description": "Total number of committed payments remaining to be paid for in this renewal cycle.", + "format": "int32", + "type": "integer" + }, + "subsequentCommittedPaymentsCount": { + "description": "Total number of payments the user will be committed for after each commitment period. Empty means the installment plan will fall back to a normal auto-renew subscription after initial commitment.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "InstallmentsBasePlanType": { + "description": "Represents an installments base plan where a user commits to a specified number of payments.", + "id": "InstallmentsBasePlanType", + "properties": { + "accountHoldDuration": { + "description": "Optional. Account hold period of the subscription, specified exclusively in days and in ISO 8601 format. Acceptable values are P0D (zero days) to P30D (30days). If not specified, the default value is P30D (30 days).", + "type": "string" + }, + "billingPeriodDuration": { + "description": "Required. Subscription period, specified in ISO 8601 format. For a list of acceptable billing periods, refer to the help center.", + "type": "string" + }, + "committedPaymentsCount": { + "description": "Required. The number of payments the user is committed to.", + "format": "int32", + "type": "integer" + }, + "gracePeriodDuration": { + "description": "Grace period of the subscription, specified in ISO 8601 format. Acceptable values are P0D (zero days), P3D (3 days), P7D (7 days), P14D (14 days), and P30D (30 days). If not specified, a default value will be used based on the recurring period duration.", + "type": "string" + }, + "prorationMode": { + "description": "The proration mode for the base plan determines what happens when a user switches to this plan from another base plan. If unspecified, defaults to CHARGE_ON_NEXT_BILLING_DATE.", + "enum": [ + "SUBSCRIPTION_PRORATION_MODE_UNSPECIFIED", + "SUBSCRIPTION_PRORATION_MODE_CHARGE_ON_NEXT_BILLING_DATE", + "SUBSCRIPTION_PRORATION_MODE_CHARGE_FULL_PRICE_IMMEDIATELY" + ], + "enumDescriptions": [ + "Unspecified mode.", + "Users will be charged for their new base plan at the end of their current billing period.", + "Users will be charged for their new base plan immediately and in full. Any remaining period of their existing subscription will be used to extend the duration of the new billing plan." + ], + "type": "string" + }, + "renewalType": { + "description": "Required. Installments base plan renewal type. Determines the behavior at the end of the initial commitment.", + "enum": [ + "RENEWAL_TYPE_UNSPECIFIED", + "RENEWAL_TYPE_RENEWS_WITHOUT_COMMITMENT", + "RENEWAL_TYPE_RENEWS_WITH_COMMITMENT" + ], + "enumDescriptions": [ + "Unspecified state.", + "Renews periodically for the billing period duration without commitment.", + "Renews with the commitment of the same duration as the initial one." + ], + "type": "string" + }, + "resubscribeState": { + "description": "Whether users should be able to resubscribe to this base plan in Google Play surfaces. Defaults to RESUBSCRIBE_STATE_ACTIVE if not specified.", + "enum": [ + "RESUBSCRIBE_STATE_UNSPECIFIED", + "RESUBSCRIBE_STATE_ACTIVE", + "RESUBSCRIBE_STATE_INACTIVE" + ], + "enumDescriptions": [ + "Unspecified state.", + "Resubscribe is active.", + "Resubscribe is inactive." + ], + "type": "string" + } + }, + "type": "object" + }, "InternalAppSharingArtifact": { "description": "An artifact resource which gets created when uploading an APK or Android App Bundle through internal app sharing.", "id": "InternalAppSharingArtifact", @@ -7616,6 +7716,12 @@ }, "type": "object" }, + "PendingCancellation": { + "description": "This is an indicator of whether there is a pending cancellation on the virtual installment plan. The cancellation will happen only after the user finished all committed payments.", + "id": "PendingCancellation", + "properties": {}, + "type": "object" + }, "PrepaidBasePlanType": { "description": "Represents a base plan that does not automatically renew at the end of the base plan, and must be manually renewed by the user.", "id": "PrepaidBasePlanType", diff --git a/androidpublisher/v3/androidpublisher-gen.go b/androidpublisher/v3/androidpublisher-gen.go index b96b854b27..42d80aaf7d 100644 --- a/androidpublisher/v3/androidpublisher-gen.go +++ b/androidpublisher/v3/androidpublisher-gen.go @@ -1310,6 +1310,9 @@ type AutoRenewingPlan struct { // AutoRenewEnabled: If the subscription is currently set to auto-renew, e.g. // the user has not canceled the subscription AutoRenewEnabled bool `json:"autoRenewEnabled,omitempty"` + // InstallmentDetails: The installment plan commitment and state related info + // for the auto renewing plan. + InstallmentDetails *InstallmentPlan `json:"installmentDetails,omitempty"` // PriceChangeDetails: The information of the last price change for the item // since subscription signup. PriceChangeDetails *SubscriptionItemPriceChangeDetails `json:"priceChangeDetails,omitempty"` @@ -1341,6 +1344,9 @@ type BasePlan struct { // this ID can only contain lower-case letters (a-z), numbers (0-9), and // hyphens (-), and be at most 63 characters. BasePlanId string `json:"basePlanId,omitempty"` + // InstallmentsBasePlanType: Set for installments base plans where a user is + // committed to a specified number of payments. + InstallmentsBasePlanType *InstallmentsBasePlanType `json:"installmentsBasePlanType,omitempty"` // OfferTags: List of up to 20 custom tags specified for this base plan, and // returned to the app through the billing library. Subscription offers for // this base plan will also receive these offer tags in the billing library. @@ -3566,6 +3572,109 @@ func (s *InappproductsUpdateRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// InstallmentPlan: Information to a installment plan. +type InstallmentPlan struct { + // InitialCommittedPaymentsCount: Total number of payments the user is + // initially committed for. + InitialCommittedPaymentsCount int64 `json:"initialCommittedPaymentsCount,omitempty"` + // PendingCancellation: If present, this installment plan is pending to be + // canceled. The cancellation will happen only after the user finished all + // committed payments. + PendingCancellation *PendingCancellation `json:"pendingCancellation,omitempty"` + // RemainingCommittedPaymentsCount: Total number of committed payments + // remaining to be paid for in this renewal cycle. + RemainingCommittedPaymentsCount int64 `json:"remainingCommittedPaymentsCount,omitempty"` + // SubsequentCommittedPaymentsCount: Total number of payments the user will be + // committed for after each commitment period. Empty means the installment plan + // will fall back to a normal auto-renew subscription after initial commitment. + SubsequentCommittedPaymentsCount int64 `json:"subsequentCommittedPaymentsCount,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "InitialCommittedPaymentsCount") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields + // for more details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "InitialCommittedPaymentsCount") + // to include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *InstallmentPlan) MarshalJSON() ([]byte, error) { + type NoMethod InstallmentPlan + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// InstallmentsBasePlanType: Represents an installments base plan where a user +// commits to a specified number of payments. +type InstallmentsBasePlanType struct { + // AccountHoldDuration: Optional. Account hold period of the subscription, + // specified exclusively in days and in ISO 8601 format. Acceptable values are + // P0D (zero days) to P30D (30days). If not specified, the default value is + // P30D (30 days). + AccountHoldDuration string `json:"accountHoldDuration,omitempty"` + // BillingPeriodDuration: Required. Subscription period, specified in ISO 8601 + // format. For a list of acceptable billing periods, refer to the help center. + BillingPeriodDuration string `json:"billingPeriodDuration,omitempty"` + // CommittedPaymentsCount: Required. The number of payments the user is + // committed to. + CommittedPaymentsCount int64 `json:"committedPaymentsCount,omitempty"` + // GracePeriodDuration: Grace period of the subscription, specified in ISO 8601 + // format. Acceptable values are P0D (zero days), P3D (3 days), P7D (7 days), + // P14D (14 days), and P30D (30 days). If not specified, a default value will + // be used based on the recurring period duration. + GracePeriodDuration string `json:"gracePeriodDuration,omitempty"` + // ProrationMode: The proration mode for the base plan determines what happens + // when a user switches to this plan from another base plan. If unspecified, + // defaults to CHARGE_ON_NEXT_BILLING_DATE. + // + // Possible values: + // "SUBSCRIPTION_PRORATION_MODE_UNSPECIFIED" - Unspecified mode. + // "SUBSCRIPTION_PRORATION_MODE_CHARGE_ON_NEXT_BILLING_DATE" - Users will be + // charged for their new base plan at the end of their current billing period. + // "SUBSCRIPTION_PRORATION_MODE_CHARGE_FULL_PRICE_IMMEDIATELY" - Users will + // be charged for their new base plan immediately and in full. Any remaining + // period of their existing subscription will be used to extend the duration of + // the new billing plan. + ProrationMode string `json:"prorationMode,omitempty"` + // RenewalType: Required. Installments base plan renewal type. Determines the + // behavior at the end of the initial commitment. + // + // Possible values: + // "RENEWAL_TYPE_UNSPECIFIED" - Unspecified state. + // "RENEWAL_TYPE_RENEWS_WITHOUT_COMMITMENT" - Renews periodically for the + // billing period duration without commitment. + // "RENEWAL_TYPE_RENEWS_WITH_COMMITMENT" - Renews with the commitment of the + // same duration as the initial one. + RenewalType string `json:"renewalType,omitempty"` + // ResubscribeState: Whether users should be able to resubscribe to this base + // plan in Google Play surfaces. Defaults to RESUBSCRIBE_STATE_ACTIVE if not + // specified. + // + // Possible values: + // "RESUBSCRIBE_STATE_UNSPECIFIED" - Unspecified state. + // "RESUBSCRIBE_STATE_ACTIVE" - Resubscribe is active. + // "RESUBSCRIBE_STATE_INACTIVE" - Resubscribe is inactive. + ResubscribeState string `json:"resubscribeState,omitempty"` + // ForceSendFields is a list of field names (e.g. "AccountHoldDuration") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AccountHoldDuration") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *InstallmentsBasePlanType) MarshalJSON() ([]byte, error) { + type NoMethod InstallmentsBasePlanType + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // InternalAppSharingArtifact: An artifact resource which gets created when // uploading an APK or Android App Bundle through internal app sharing. type InternalAppSharingArtifact struct { @@ -4442,6 +4551,12 @@ func (s *PausedStateContext) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// PendingCancellation: This is an indicator of whether there is a pending +// cancellation on the virtual installment plan. The cancellation will happen +// only after the user finished all committed payments. +type PendingCancellation struct { +} + // PrepaidBasePlanType: Represents a base plan that does not automatically // renew at the end of the base plan, and must be manually renewed by the user. type PrepaidBasePlanType struct { diff --git a/discoveryengine/v1/discoveryengine-api.json b/discoveryengine/v1/discoveryengine-api.json index 2e13372c12..33758469b4 100644 --- a/discoveryengine/v1/discoveryengine-api.json +++ b/discoveryengine/v1/discoveryengine-api.json @@ -644,6 +644,34 @@ }, "operations": { "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.dataStores.branches.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "GoogleLongrunningCancelOperationRequest" + }, + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "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": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}", @@ -2984,6 +3012,34 @@ }, "operations": { "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.branches.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "GoogleLongrunningCancelOperationRequest" + }, + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "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": "v1/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}", @@ -4031,6 +4087,38 @@ } } }, + "groundingConfigs": { + "methods": { + "check": { + "description": "Performs a grounding check.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groundingConfigs/{groundingConfigsId}:check", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.groundingConfigs.check", + "parameterOrder": [ + "groundingConfig" + ], + "parameters": { + "groundingConfig": { + "description": "Required. The resource name of the grounding config, such as `projects/*/locations/global/groundingConfigs/default_grounding_config`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/groundingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+groundingConfig}:check", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1CheckGroundingRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1CheckGroundingResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "operations": { "methods": { "get": { @@ -4137,6 +4225,34 @@ }, "operations": { "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v1/projects/{projectsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "discoveryengine.projects.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "GoogleLongrunningCancelOperationRequest" + }, + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "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": "v1/projects/{projectsId}/operations/{operationsId}", @@ -4208,7 +4324,7 @@ } } }, - "revision": "20240502", + "revision": "20240512", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -4590,6 +4706,106 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1CheckGroundingRequest": { + "description": "Request message for GroundedGenerationService.CheckGrounding method.", + "id": "GoogleCloudDiscoveryengineV1CheckGroundingRequest", + "properties": { + "answerCandidate": { + "description": "Answer candidate to check. Can have a maximum length of 1024 characters.", + "type": "string" + }, + "facts": { + "description": "List of facts for the grounding check. We support up to 200 facts.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1GroundingFact" + }, + "type": "array" + }, + "groundingSpec": { + "$ref": "GoogleCloudDiscoveryengineV1CheckGroundingSpec", + "description": "Configuration of the grounding check." + }, + "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" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1CheckGroundingResponse": { + "description": "Response message for the GroundedGenerationService.CheckGrounding method.", + "id": "GoogleCloudDiscoveryengineV1CheckGroundingResponse", + "properties": { + "citedChunks": { + "description": "List of facts cited across all claims in the answer candidate. These are derived from the facts supplied in the request.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1FactChunk" + }, + "type": "array" + }, + "claims": { + "description": "Claim texts and citation info across all claims in the answer candidate.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim" + }, + "type": "array" + }, + "supportScore": { + "description": "The support score for the input answer candidate. Higher the score, higher is the fraction of claims that are supported by the provided facts. This is always set when a response is returned.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim": { + "description": "Text and citation info for a claim in the answer candidate.", + "id": "GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim", + "properties": { + "citationIndices": { + "description": "A list of indices (into 'cited_chunks') specifying the citations associated with the claim. For instance [1,3,4] means that cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited supporting for the claim. A citation to a fact indicates that the claim is supported by the fact.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "claimText": { + "description": "Text for the claim in the answer candidate. Always provided regardless of whether citations or anti-citations are found.", + "type": "string" + }, + "endPos": { + "description": "Position indicating the end of the claim in the answer candidate, exclusive.", + "format": "int32", + "type": "integer" + }, + "groundingCheckRequired": { + "description": "Indicates that this claim required grounding check. When the system decided this claim doesn't require attribution/grounding check, this field will be set to false. In that case, no grounding check was done for the claim and therefore citation_indices, and anti_citation_indices should not be returned.", + "type": "boolean" + }, + "startPos": { + "description": "Position indicating the start of the claim in the answer candidate, measured in bytes.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1CheckGroundingSpec": { + "description": "Specification for the grounding check.", + "id": "GoogleCloudDiscoveryengineV1CheckGroundingSpec", + "properties": { + "citationThreshold": { + "description": "The threshold (in [0,1]) used for determining whether a fact must be cited for a claim in the answer candidate. Choosing a higher threshold will lead to fewer but very strong citations, while choosing a lower threshold may lead to more but somewhat weaker citations. If unset, the threshold will default to 0.6.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1CloudSqlSource": { "description": "Cloud SQL source import data from.", "id": "GoogleCloudDiscoveryengineV1CloudSqlSource", @@ -5490,6 +5706,33 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1FactChunk": { + "description": "Fact Chunk.", + "id": "GoogleCloudDiscoveryengineV1FactChunk", + "properties": { + "chunkText": { + "description": "Text content of the fact chunk. Can be at most 10K characters long.", + "type": "string" + }, + "index": { + "description": "The index of this chunk. Currently, only used for the streaming mode.", + "format": "int32", + "type": "integer" + }, + "source": { + "description": "Source from which this fact chunk was retrieved. If it was retrieved from the GroundingFacts provided in the request then this field will contain the index of the specific fact from which this chunk was retrieved.", + "type": "string" + }, + "sourceMetadata": { + "additionalProperties": { + "type": "string" + }, + "description": "More fine-grained information for the source reference.", + "type": "object" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1FetchDomainVerificationStatusResponse": { "description": "Response message for SiteSearchEngineService.FetchDomainVerificationStatus method.", "id": "GoogleCloudDiscoveryengineV1FetchDomainVerificationStatusResponse", @@ -5569,6 +5812,24 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1GroundingFact": { + "description": "Grounding Fact.", + "id": "GoogleCloudDiscoveryengineV1GroundingFact", + "properties": { + "attributes": { + "additionalProperties": { + "type": "string" + }, + "description": "Attributes associated with the fact. Common attributes include `source` (indicating where the fact was sourced from), `author` (indicating the author of the fact), and so on.", + "type": "object" + }, + "factText": { + "description": "Text content of the fact. Can be at most 10K characters long.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1ImportDocumentsMetadata": { "description": "Metadata related to the progress of the ImportDocuments operation. This is returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1ImportDocumentsMetadata", @@ -10765,6 +11026,12 @@ }, "type": "object" }, + "GoogleLongrunningCancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "GoogleLongrunningCancelOperationRequest", + "properties": {}, + "type": "object" + }, "GoogleLongrunningListOperationsResponse": { "description": "The response message for Operations.ListOperations.", "id": "GoogleLongrunningListOperationsResponse", diff --git a/discoveryengine/v1/discoveryengine-gen.go b/discoveryengine/v1/discoveryengine-gen.go index 6b4e685eeb..ab4790a63c 100644 --- a/discoveryengine/v1/discoveryengine-gen.go +++ b/discoveryengine/v1/discoveryengine-gen.go @@ -173,6 +173,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.Collections = NewProjectsLocationsCollectionsService(s) rs.DataStores = NewProjectsLocationsDataStoresService(s) + rs.GroundingConfigs = NewProjectsLocationsGroundingConfigsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) rs.UserEvents = NewProjectsLocationsUserEventsService(s) return rs @@ -185,6 +186,8 @@ type ProjectsLocationsService struct { DataStores *ProjectsLocationsDataStoresService + GroundingConfigs *ProjectsLocationsGroundingConfigsService + Operations *ProjectsLocationsOperationsService UserEvents *ProjectsLocationsUserEventsService @@ -652,6 +655,15 @@ type ProjectsLocationsDataStoresUserEventsService struct { s *Service } +func NewProjectsLocationsGroundingConfigsService(s *Service) *ProjectsLocationsGroundingConfigsService { + rs := &ProjectsLocationsGroundingConfigsService{s: s} + return rs +} + +type ProjectsLocationsGroundingConfigsService struct { + s *Service +} + func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { rs := &ProjectsLocationsOperationsService{s: s} return rs @@ -1207,6 +1219,178 @@ func (s *GoogleCloudDiscoveryengineV1BigtableSource) MarshalJSON() ([]byte, erro return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1CheckGroundingRequest: Request message for +// GroundedGenerationService.CheckGrounding method. +type GoogleCloudDiscoveryengineV1CheckGroundingRequest struct { + // AnswerCandidate: Answer candidate to check. Can have a maximum length of + // 1024 characters. + AnswerCandidate string `json:"answerCandidate,omitempty"` + // Facts: List of facts for the grounding check. We support up to 200 facts. + Facts []*GoogleCloudDiscoveryengineV1GroundingFact `json:"facts,omitempty"` + // GroundingSpec: Configuration of the grounding check. + GroundingSpec *GoogleCloudDiscoveryengineV1CheckGroundingSpec `json:"groundingSpec,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"` + // ForceSendFields is a list of field names (e.g. "AnswerCandidate") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AnswerCandidate") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1CheckGroundingRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1CheckGroundingRequest + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1CheckGroundingResponse: Response message for the +// GroundedGenerationService.CheckGrounding method. +type GoogleCloudDiscoveryengineV1CheckGroundingResponse struct { + // CitedChunks: List of facts cited across all claims in the answer candidate. + // These are derived from the facts supplied in the request. + CitedChunks []*GoogleCloudDiscoveryengineV1FactChunk `json:"citedChunks,omitempty"` + // Claims: Claim texts and citation info across all claims in the answer + // candidate. + Claims []*GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim `json:"claims,omitempty"` + // SupportScore: The support score for the input answer candidate. Higher the + // score, higher is the fraction of claims that are supported by the provided + // facts. This is always set when a response is returned. + SupportScore float64 `json:"supportScore,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CitedChunks") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CitedChunks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1CheckGroundingResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1CheckGroundingResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1CheckGroundingResponse) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1CheckGroundingResponse + var s1 struct { + SupportScore gensupport.JSONFloat64 `json:"supportScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.SupportScore = float64(s1.SupportScore) + return nil +} + +// GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim: Text and citation +// info for a claim in the answer candidate. +type GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim struct { + // CitationIndices: A list of indices (into 'cited_chunks') specifying the + // citations associated with the claim. For instance [1,3,4] means that + // cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited + // supporting for the claim. A citation to a fact indicates that the claim is + // supported by the fact. + CitationIndices []int64 `json:"citationIndices,omitempty"` + // ClaimText: Text for the claim in the answer candidate. Always provided + // regardless of whether citations or anti-citations are found. + ClaimText string `json:"claimText,omitempty"` + // EndPos: Position indicating the end of the claim in the answer candidate, + // exclusive. + EndPos int64 `json:"endPos,omitempty"` + // GroundingCheckRequired: Indicates that this claim required grounding check. + // When the system decided this claim doesn't require attribution/grounding + // check, this field will be set to false. In that case, no grounding check was + // done for the claim and therefore citation_indices, and anti_citation_indices + // should not be returned. + GroundingCheckRequired bool `json:"groundingCheckRequired,omitempty"` + // StartPos: Position indicating the start of the claim in the answer + // candidate, measured in bytes. + StartPos int64 `json:"startPos,omitempty"` + // ForceSendFields is a list of field names (e.g. "CitationIndices") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CitationIndices") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1CheckGroundingSpec: Specification for the +// grounding check. +type GoogleCloudDiscoveryengineV1CheckGroundingSpec struct { + // CitationThreshold: The threshold (in [0,1]) used for determining whether a + // fact must be cited for a claim in the answer candidate. Choosing a higher + // threshold will lead to fewer but very strong citations, while choosing a + // lower threshold may lead to more but somewhat weaker citations. If unset, + // the threshold will default to 0.6. + CitationThreshold float64 `json:"citationThreshold,omitempty"` + // ForceSendFields is a list of field names (e.g. "CitationThreshold") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CitationThreshold") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1CheckGroundingSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1CheckGroundingSpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1CheckGroundingSpec) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1CheckGroundingSpec + var s1 struct { + CitationThreshold gensupport.JSONFloat64 `json:"citationThreshold"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.CitationThreshold = float64(s1.CitationThreshold) + return nil +} + // GoogleCloudDiscoveryengineV1CloudSqlSource: Cloud SQL source import data // from. type GoogleCloudDiscoveryengineV1CloudSqlSource struct { @@ -2462,6 +2646,37 @@ func (s *GoogleCloudDiscoveryengineV1EngineSearchEngineConfig) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1FactChunk: Fact Chunk. +type GoogleCloudDiscoveryengineV1FactChunk struct { + // ChunkText: Text content of the fact chunk. Can be at most 10K characters + // long. + ChunkText string `json:"chunkText,omitempty"` + // Index: The index of this chunk. Currently, only used for the streaming mode. + Index int64 `json:"index,omitempty"` + // Source: Source from which this fact chunk was retrieved. If it was retrieved + // from the GroundingFacts provided in the request then this field will contain + // the index of the specific fact from which this chunk was retrieved. + Source string `json:"source,omitempty"` + // SourceMetadata: More fine-grained information for the source reference. + SourceMetadata map[string]string `json:"sourceMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkText") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChunkText") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1FactChunk) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1FactChunk + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1FetchDomainVerificationStatusResponse: Response // message for SiteSearchEngineService.FetchDomainVerificationStatus method. type GoogleCloudDiscoveryengineV1FetchDomainVerificationStatusResponse struct { @@ -2602,6 +2817,32 @@ func (s *GoogleCloudDiscoveryengineV1GcsSource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1GroundingFact: Grounding Fact. +type GoogleCloudDiscoveryengineV1GroundingFact struct { + // Attributes: Attributes associated with the fact. Common attributes include + // `source` (indicating where the fact was sourced from), `author` (indicating + // the author of the fact), and so on. + Attributes map[string]string `json:"attributes,omitempty"` + // FactText: Text content of the fact. Can be at most 10K characters long. + FactText string `json:"factText,omitempty"` + // 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Attributes") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1GroundingFact) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1GroundingFact + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1ImportDocumentsMetadata: Metadata related to the // progress of the ImportDocuments operation. This is returned by the // google.longrunning.Operation.metadata field. @@ -9822,6 +10063,11 @@ func (s *GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata) MarshalJSON() return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleLongrunningCancelOperationRequest: The request message for +// Operations.CancelOperation. +type GoogleLongrunningCancelOperationRequest struct { +} + // GoogleLongrunningListOperationsResponse: The response message for // Operations.ListOperations. type GoogleLongrunningListOperationsResponse struct { @@ -11944,6 +12190,116 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Do(op return ret, nil } +type ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall struct { + s *Service + name string + googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.operations.cancel" call. +// 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) 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 +} + type ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall struct { s *Service name string @@ -20589,6 +20945,116 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googl return ret, nil } +type ProjectsLocationsDataStoresBranchesOperationsCancelCall struct { + s *Service + name string + googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsDataStoresBranchesOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { + c := &ProjectsLocationsDataStoresBranchesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.cancel" call. +// 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 *ProjectsLocationsDataStoresBranchesOperationsCancelCall) 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 +} + type ProjectsLocationsDataStoresBranchesOperationsGetCall struct { s *Service name string @@ -24444,6 +24910,109 @@ func (c *ProjectsLocationsDataStoresUserEventsWriteCall) Do(opts ...googleapi.Ca return ret, nil } +type ProjectsLocationsGroundingConfigsCheckCall struct { + s *Service + groundingConfig string + googleclouddiscoveryenginev1checkgroundingrequest *GoogleCloudDiscoveryengineV1CheckGroundingRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Check: Performs a grounding check. +// +// - groundingConfig: The resource name of the grounding config, such as +// `projects/*/locations/global/groundingConfigs/default_grounding_config`. +func (r *ProjectsLocationsGroundingConfigsService) Check(groundingConfig string, googleclouddiscoveryenginev1checkgroundingrequest *GoogleCloudDiscoveryengineV1CheckGroundingRequest) *ProjectsLocationsGroundingConfigsCheckCall { + c := &ProjectsLocationsGroundingConfigsCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.groundingConfig = groundingConfig + c.googleclouddiscoveryenginev1checkgroundingrequest = googleclouddiscoveryenginev1checkgroundingrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsGroundingConfigsCheckCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroundingConfigsCheckCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGroundingConfigsCheckCall) Context(ctx context.Context) *ProjectsLocationsGroundingConfigsCheckCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGroundingConfigsCheckCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGroundingConfigsCheckCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1checkgroundingrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+groundingConfig}:check") + 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{ + "groundingConfig": c.groundingConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.groundingConfigs.check" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1CheckGroundingResponse.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 *ProjectsLocationsGroundingConfigsCheckCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1CheckGroundingResponse, 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 := &GoogleCloudDiscoveryengineV1CheckGroundingResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsOperationsGetCall struct { s *Service name string @@ -24811,6 +25380,116 @@ func (c *ProjectsLocationsUserEventsWriteCall) Do(opts ...googleapi.CallOption) return ret, nil } +type ProjectsOperationsCancelCall struct { + s *Service + name string + googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsOperationsCancelCall { + c := &ProjectsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsOperationsCancelCall) Context(ctx context.Context) *ProjectsOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.operations.cancel" call. +// 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 *ProjectsOperationsCancelCall) 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 +} + type ProjectsOperationsGetCall struct { s *Service name string diff --git a/discoveryengine/v1alpha/discoveryengine-api.json b/discoveryengine/v1alpha/discoveryengine-api.json index fb03609dd6..4a1475a85f 100644 --- a/discoveryengine/v1alpha/discoveryengine-api.json +++ b/discoveryengine/v1alpha/discoveryengine-api.json @@ -1019,6 +1019,34 @@ }, "operations": { "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.dataStores.branches.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:cancel", + "request": { + "$ref": "GoogleLongrunningCancelOperationRequest" + }, + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "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}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}", @@ -4313,6 +4341,34 @@ }, "operations": { "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.branches.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:cancel", + "request": { + "$ref": "GoogleLongrunningCancelOperationRequest" + }, + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "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}", @@ -6011,7 +6067,7 @@ } } }, - "revision": "20240502", + "revision": "20240512", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -8315,6 +8371,11 @@ "pageSpan": { "$ref": "GoogleCloudDiscoveryengineV1alphaChunkPageSpan", "description": "Page span of the chunk." + }, + "relevanceScore": { + "description": "Represents the relevance score based on similarity. Higher score represents the chunk relevance. The score is in range [0.0, 1.0]. Only populated on SearchService.SearchResponse", + "format": "double", + "type": "number" } }, "type": "object" @@ -14077,6 +14138,12 @@ }, "type": "object" }, + "GoogleLongrunningCancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "GoogleLongrunningCancelOperationRequest", + "properties": {}, + "type": "object" + }, "GoogleLongrunningListOperationsResponse": { "description": "The response message for Operations.ListOperations.", "id": "GoogleLongrunningListOperationsResponse", diff --git a/discoveryengine/v1alpha/discoveryengine-gen.go b/discoveryengine/v1alpha/discoveryengine-gen.go index 35aba4d3f5..8e86aec8e8 100644 --- a/discoveryengine/v1alpha/discoveryengine-gen.go +++ b/discoveryengine/v1alpha/discoveryengine-gen.go @@ -4020,6 +4020,10 @@ type GoogleCloudDiscoveryengineV1alphaChunk struct { Name string `json:"name,omitempty"` // PageSpan: Page span of the chunk. PageSpan *GoogleCloudDiscoveryengineV1alphaChunkPageSpan `json:"pageSpan,omitempty"` + // RelevanceScore: Represents the relevance score based on similarity. Higher + // score represents the chunk relevance. The score is in range [0.0, 1.0]. Only + // populated on SearchService.SearchResponse + RelevanceScore float64 `json:"relevanceScore,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -4041,6 +4045,20 @@ func (s *GoogleCloudDiscoveryengineV1alphaChunk) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDiscoveryengineV1alphaChunk) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaChunk + var s1 struct { + RelevanceScore gensupport.JSONFloat64 `json:"relevanceScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.RelevanceScore = float64(s1.RelevanceScore) + return nil +} + // GoogleCloudDiscoveryengineV1alphaChunkChunkMetadata: Metadata of the current // chunk. This field is only populated on SearchService.Search API. type GoogleCloudDiscoveryengineV1alphaChunkChunkMetadata struct { @@ -12304,6 +12322,11 @@ func (s *GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata) MarshalJSON() return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleLongrunningCancelOperationRequest: The request message for +// Operations.CancelOperation. +type GoogleLongrunningCancelOperationRequest struct { +} + // GoogleLongrunningListOperationsResponse: The response message for // Operations.ListOperations. type GoogleLongrunningListOperationsResponse struct { @@ -15816,6 +15839,116 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) } } +type ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall struct { + s *Service + name string + googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.operations.cancel" call. +// 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) 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 +} + type ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall struct { s *Service name string @@ -27995,6 +28128,116 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Pages(ctx c } } +type ProjectsLocationsDataStoresBranchesOperationsCancelCall struct { + s *Service + name string + googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsDataStoresBranchesOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { + c := &ProjectsLocationsDataStoresBranchesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.cancel" call. +// 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 *ProjectsLocationsDataStoresBranchesOperationsCancelCall) 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 +} + type ProjectsLocationsDataStoresBranchesOperationsGetCall struct { s *Service name string diff --git a/discoveryengine/v1beta/discoveryengine-api.json b/discoveryengine/v1beta/discoveryengine-api.json index d58ec2ead7..84e478e59f 100644 --- a/discoveryengine/v1beta/discoveryengine-api.json +++ b/discoveryengine/v1beta/discoveryengine-api.json @@ -672,6 +672,34 @@ }, "operations": { "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.dataStores.branches.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}:cancel", + "request": { + "$ref": "GoogleLongrunningCancelOperationRequest" + }, + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "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}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}", @@ -3757,6 +3785,34 @@ }, "operations": { "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.branches.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}:cancel", + "request": { + "$ref": "GoogleLongrunningCancelOperationRequest" + }, + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "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}", @@ -5361,7 +5417,7 @@ } } }, - "revision": "20240502", + "revision": "20240512", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -13500,6 +13556,12 @@ }, "type": "object" }, + "GoogleLongrunningCancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "GoogleLongrunningCancelOperationRequest", + "properties": {}, + "type": "object" + }, "GoogleLongrunningListOperationsResponse": { "description": "The response message for Operations.ListOperations.", "id": "GoogleLongrunningListOperationsResponse", diff --git a/discoveryengine/v1beta/discoveryengine-gen.go b/discoveryengine/v1beta/discoveryengine-gen.go index 13906a890a..36e42eadea 100644 --- a/discoveryengine/v1beta/discoveryengine-gen.go +++ b/discoveryengine/v1beta/discoveryengine-gen.go @@ -12181,6 +12181,11 @@ func (s *GoogleCloudDiscoveryengineV1betaUserInfo) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleLongrunningCancelOperationRequest: The request message for +// Operations.CancelOperation. +type GoogleLongrunningCancelOperationRequest struct { +} + // GoogleLongrunningListOperationsResponse: The response message for // Operations.ListOperations. type GoogleLongrunningListOperationsResponse struct { @@ -14410,6 +14415,116 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Do(op return ret, nil } +type ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall struct { + s *Service + name string + googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.operations.cancel" call. +// 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) 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 +} + type ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall struct { s *Service name string @@ -25839,6 +25954,116 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googl return ret, nil } +type ProjectsLocationsDataStoresBranchesOperationsCancelCall struct { + s *Service + name string + googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsDataStoresBranchesOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { + c := &ProjectsLocationsDataStoresBranchesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.cancel" call. +// 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 *ProjectsLocationsDataStoresBranchesOperationsCancelCall) 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 +} + type ProjectsLocationsDataStoresBranchesOperationsGetCall struct { s *Service name string diff --git a/firebaseml/v2beta/firebaseml-api.json b/firebaseml/v2beta/firebaseml-api.json index 5c02eac088..6a3b456ad1 100644 --- a/firebaseml/v2beta/firebaseml-api.json +++ b/firebaseml/v2beta/firebaseml-api.json @@ -206,7 +206,7 @@ } } }, - "revision": "20240510", + "revision": "20240514", "rootUrl": "https://firebaseml.googleapis.com/", "schemas": { "Blob": { @@ -627,6 +627,22 @@ "description": "Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature.", "type": "string" }, + "responseStyle": { + "description": "Optional. Control Three levels of creativity in the model output. Default: RESPONSE_STYLE_BALANCED", + "enum": [ + "RESPONSE_STYLE_UNSPECIFIED", + "RESPONSE_STYLE_PRECISE", + "RESPONSE_STYLE_BALANCED", + "RESPONSE_STYLE_CREATIVE" + ], + "enumDescriptions": [ + "response style unspecified.", + "Precise response.", + "Default response style.", + "Creative response style." + ], + "type": "string" + }, "stopSequences": { "description": "Optional. Stop sequences.", "items": { diff --git a/firebaseml/v2beta/firebaseml-gen.go b/firebaseml/v2beta/firebaseml-gen.go index c58c20d314..5f0109a7d3 100644 --- a/firebaseml/v2beta/firebaseml-gen.go +++ b/firebaseml/v2beta/firebaseml-gen.go @@ -719,6 +719,15 @@ type GenerationConfig struct { // prompted to output the appropriate response type, otherwise the behavior is // undefined. This is a preview feature. ResponseMimeType string `json:"responseMimeType,omitempty"` + // ResponseStyle: Optional. Control Three levels of creativity in the model + // output. Default: RESPONSE_STYLE_BALANCED + // + // Possible values: + // "RESPONSE_STYLE_UNSPECIFIED" - response style unspecified. + // "RESPONSE_STYLE_PRECISE" - Precise response. + // "RESPONSE_STYLE_BALANCED" - Default response style. + // "RESPONSE_STYLE_CREATIVE" - Creative response style. + ResponseStyle string `json:"responseStyle,omitempty"` // StopSequences: Optional. Stop sequences. StopSequences []string `json:"stopSequences,omitempty"` // Temperature: Optional. Controls the randomness of predictions. diff --git a/healthcare/v1beta1/healthcare-api.json b/healthcare/v1beta1/healthcare-api.json index 856de39e1c..acaaa10903 100644 --- a/healthcare/v1beta1/healthcare-api.json +++ b/healthcare/v1beta1/healthcare-api.json @@ -3739,6 +3739,35 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "exportHistory": { + "description": "Export resources including historical versions from the FHIR store to the specified destination. The exported resource, along with previous versions, will be exported in one or more FHIR history bundles. This method returns an Operation that can be used to track the status of the export by calling GetOperation. Immediate fatal errors appear in the error field, errors are also logged to Cloud Logging (see [Viewing error logs in Cloud Logging](https://cloud.google.com/healthcare/docs/how-tos/logging)). Otherwise, when the operation finishes, a detailed response of type ExportResourcesResponse is returned in the response field. The metadata field type for this operation is OperationMetadata.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:exportHistory", + "httpMethod": "POST", + "id": "healthcare.projects.locations.datasets.fhirStores.exportHistory", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the FHIR store to export resource from, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:exportHistory", + "request": { + "$ref": "ExportResourcesHistoryRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-healthcare", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets the configuration of the specified FHIR store.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}", @@ -3852,6 +3881,35 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "importHistory": { + "description": "Import resource historical versions from Cloud Storage source to destination fhir store. The exported resource, along with previous versions, will be exported in one or more FHIR history bundles. This method returns an Operation that can be used to track the status of the export by calling GetOperation. Immediate fatal errors appear in the error field, errors are also logged to Cloud Logging (see [Viewing error logs in Cloud Logging](https://cloud.google.com/healthcare/docs/how-tos/logging)). Otherwise, when the operation finishes, a detailed response of type ImportResourcesResponse is returned in the response field. The metadata field type for this operation is OperationMetadata.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:importHistory", + "httpMethod": "POST", + "id": "healthcare.projects.locations.datasets.fhirStores.importHistory", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the FHIR store to import FHIR resources to, in the format of `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:importHistory", + "request": { + "$ref": "ImportResourcesHistoryRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-healthcare", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "Lists the FHIR stores in the given dataset.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores", @@ -5614,7 +5672,7 @@ } } }, - "revision": "20240429", + "revision": "20240508", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "AccessDeterminationLogConfig": { @@ -7379,6 +7437,34 @@ "properties": {}, "type": "object" }, + "ExportResourcesHistoryRequest": { + "description": "Request to export the history of resources.", + "id": "ExportResourcesHistoryRequest", + "properties": { + "_since": { + "description": "If provided, only resources versions updated after this time are exported. The time uses the format YYYY-MM-DDThh:mm:ss.sss+zz:zz. For example, `2015-02-07T13:28:17.239+02:00` or `2017-01-01T00:00:00Z`. The time must be specified to the second and include a time zone.", + "type": "string" + }, + "_type": { + "description": "String of comma-delimited FHIR resource types. If provided, only resources of the specified resource type(s) are exported.", + "type": "string" + }, + "bigqueryDestination": { + "$ref": "GoogleCloudHealthcareV1beta1FhirBigQueryDestination", + "description": "The BigQuery output destination. The Cloud Healthcare Service Agent requires two IAM roles on the BigQuery location: `roles/bigquery.dataEditor` and `roles/bigquery.jobUser`. The output is one BigQuery table per resource type. Unlike when setting `BigQueryDestination` for `StreamConfig`, `ExportResources` does not create BigQuery views." + }, + "gcsDestination": { + "$ref": "GoogleCloudHealthcareV1beta1FhirGcsDestination", + "description": "The Cloud Storage output destination. The Healthcare Service Agent account requires the `roles/storage.objectAdmin` role on the Cloud Storage location. The exported outputs are organized by FHIR resource types. The server creates one or more objects per resource type depending on the volume of the resources exported. When there is only one object per resource type, the object name is in the form of `{operation_id})_history_{resource_type}`. When there are multiple objects for a given resource type, the object names are in the form of `{operation_id}_history_{resource_type}-{index}-of-{total}`. Each object contains newline delimited JSON, and each line is a FHIR history bundle containing the history for a single resource." + }, + "maxResourceVersions": { + "description": "If provided and non-zero, places a limit on the number of resource versions that are returned for a given resource. For example, if the limit is `100` and a resource has over 100 versions, only the 100 most recent versions will be returned. Must be positive.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "ExportResourcesRequest": { "description": "Request to export resources.", "id": "ExportResourcesRequest", @@ -8433,6 +8519,40 @@ "properties": {}, "type": "object" }, + "ImportResourcesHistoryRequest": { + "description": "Request to import the history of resources.", + "id": "ImportResourcesHistoryRequest", + "properties": { + "contentStructure": { + "description": "The content structure in the source location. If not specified, the server treats the input source files as BUNDLE.", + "enum": [ + "CONTENT_STRUCTURE_UNSPECIFIED", + "BUNDLE", + "RESOURCE", + "BUNDLE_PRETTY", + "RESOURCE_PRETTY" + ], + "enumDescriptions": [ + "If the content structure is not specified, the default value `BUNDLE` is used.", + "The source file contains one or more lines of newline-delimited JSON (ndjson). Each line is a bundle that contains one or more resources.", + "The source file contains one or more lines of newline-delimited JSON (ndjson). Each line is a single resource.", + "The entire file is one JSON bundle. The JSON can span multiple lines.", + "The entire file is one JSON resource. The JSON can span multiple lines." + ], + "type": "string" + }, + "gcsSource": { + "$ref": "GoogleCloudHealthcareV1beta1FhirGcsSource", + "description": "Cloud Storage source data location and import configuration. The Cloud Healthcare Service Agent requires the `roles/storage.objectAdmin` Cloud IAM roles on the Cloud Storage location. The Healthcare Service Agent Each Cloud Storage object should be a text file that contains the format specified in ContentStructure." + }, + "maxErrorCount": { + "description": "The maximum number of errors before the server cancels the operation. If not specified or set to 0, defaults to 100. -1 means no maximum, the server tries to process all input. Since the server executes the operation in parallel, it might not stop the operation after exactly this number of errors occur.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "ImportResourcesRequest": { "description": "Request to import resources.", "id": "ImportResourcesRequest", diff --git a/healthcare/v1beta1/healthcare-gen.go b/healthcare/v1beta1/healthcare-gen.go index 5ecda151a3..448cd157fb 100644 --- a/healthcare/v1beta1/healthcare-gen.go +++ b/healthcare/v1beta1/healthcare-gen.go @@ -3142,6 +3142,57 @@ func (s *ExportMessagesRequest) MarshalJSON() ([]byte, error) { type ExportMessagesResponse struct { } +// ExportResourcesHistoryRequest: Request to export the history of resources. +type ExportResourcesHistoryRequest struct { + // Since: If provided, only resources versions updated after this time are + // exported. The time uses the format YYYY-MM-DDThh:mm:ss.sss+zz:zz. For + // example, `2015-02-07T13:28:17.239+02:00` or `2017-01-01T00:00:00Z`. The time + // must be specified to the second and include a time zone. + Since string `json:"_since,omitempty"` + // Type: String of comma-delimited FHIR resource types. If provided, only + // resources of the specified resource type(s) are exported. + Type string `json:"_type,omitempty"` + // BigqueryDestination: The BigQuery output destination. The Cloud Healthcare + // Service Agent requires two IAM roles on the BigQuery location: + // `roles/bigquery.dataEditor` and `roles/bigquery.jobUser`. The output is one + // BigQuery table per resource type. Unlike when setting `BigQueryDestination` + // for `StreamConfig`, `ExportResources` does not create BigQuery views. + BigqueryDestination *GoogleCloudHealthcareV1beta1FhirBigQueryDestination `json:"bigqueryDestination,omitempty"` + // GcsDestination: The Cloud Storage output destination. The Healthcare Service + // Agent account requires the `roles/storage.objectAdmin` role on the Cloud + // Storage location. The exported outputs are organized by FHIR resource types. + // The server creates one or more objects per resource type depending on the + // volume of the resources exported. When there is only one object per resource + // type, the object name is in the form of + // `{operation_id})_history_{resource_type}`. When there are multiple objects + // for a given resource type, the object names are in the form of + // `{operation_id}_history_{resource_type}-{index}-of-{total}`. Each object + // contains newline delimited JSON, and each line is a FHIR history bundle + // containing the history for a single resource. + GcsDestination *GoogleCloudHealthcareV1beta1FhirGcsDestination `json:"gcsDestination,omitempty"` + // MaxResourceVersions: If provided and non-zero, places a limit on the number + // of resource versions that are returned for a given resource. For example, if + // the limit is `100` and a resource has over 100 versions, only the 100 most + // recent versions will be returned. Must be positive. + MaxResourceVersions int64 `json:"maxResourceVersions,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "Since") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Since") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *ExportResourcesHistoryRequest) MarshalJSON() ([]byte, error) { + type NoMethod ExportResourcesHistoryRequest + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // ExportResourcesRequest: Request to export resources. type ExportResourcesRequest struct { // Since: If provided, only resources updated after this time are exported. The @@ -4936,6 +4987,53 @@ func (s *ImportMessagesRequest) MarshalJSON() ([]byte, error) { type ImportMessagesResponse struct { } +// ImportResourcesHistoryRequest: Request to import the history of resources. +type ImportResourcesHistoryRequest struct { + // ContentStructure: The content structure in the source location. If not + // specified, the server treats the input source files as BUNDLE. + // + // Possible values: + // "CONTENT_STRUCTURE_UNSPECIFIED" - If the content structure is not + // specified, the default value `BUNDLE` is used. + // "BUNDLE" - The source file contains one or more lines of newline-delimited + // JSON (ndjson). Each line is a bundle that contains one or more resources. + // "RESOURCE" - The source file contains one or more lines of + // newline-delimited JSON (ndjson). Each line is a single resource. + // "BUNDLE_PRETTY" - The entire file is one JSON bundle. The JSON can span + // multiple lines. + // "RESOURCE_PRETTY" - The entire file is one JSON resource. The JSON can + // span multiple lines. + ContentStructure string `json:"contentStructure,omitempty"` + // GcsSource: Cloud Storage source data location and import configuration. The + // Cloud Healthcare Service Agent requires the `roles/storage.objectAdmin` + // Cloud IAM roles on the Cloud Storage location. The Healthcare Service Agent + // Each Cloud Storage object should be a text file that contains the format + // specified in ContentStructure. + GcsSource *GoogleCloudHealthcareV1beta1FhirGcsSource `json:"gcsSource,omitempty"` + // MaxErrorCount: The maximum number of errors before the server cancels the + // operation. If not specified or set to 0, defaults to 100. -1 means no + // maximum, the server tries to process all input. Since the server executes + // the operation in parallel, it might not stop the operation after exactly + // this number of errors occur. + MaxErrorCount int64 `json:"maxErrorCount,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "ContentStructure") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ContentStructure") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *ImportResourcesHistoryRequest) MarshalJSON() ([]byte, error) { + type NoMethod ImportResourcesHistoryRequest + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // ImportResourcesRequest: Request to import resources. type ImportResourcesRequest struct { // ContentStructure: The content structure in the source location. If not @@ -20101,6 +20199,118 @@ func (c *ProjectsLocationsDatasetsFhirStoresExportCall) Do(opts ...googleapi.Cal return ret, nil } +type ProjectsLocationsDatasetsFhirStoresExportHistoryCall struct { + s *Service + name string + exportresourceshistoryrequest *ExportResourcesHistoryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ExportHistory: Export resources including historical versions from the FHIR +// store to the specified destination. The exported resource, along with +// previous versions, will be exported in one or more FHIR history bundles. +// This method returns an Operation that can be used to track the status of the +// export by calling GetOperation. Immediate fatal errors appear in the error +// field, errors are also logged to Cloud Logging (see Viewing error logs in +// Cloud Logging (https://cloud.google.com/healthcare/docs/how-tos/logging)). +// Otherwise, when the operation finishes, a detailed response of type +// ExportResourcesResponse is returned in the response field. The metadata +// field type for this operation is OperationMetadata. +// +// - name: The name of the FHIR store to export resource from, in the format +// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt +// ores/{fhir_store_id}`. +func (r *ProjectsLocationsDatasetsFhirStoresService) ExportHistory(name string, exportresourceshistoryrequest *ExportResourcesHistoryRequest) *ProjectsLocationsDatasetsFhirStoresExportHistoryCall { + c := &ProjectsLocationsDatasetsFhirStoresExportHistoryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.exportresourceshistoryrequest = exportresourceshistoryrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDatasetsFhirStoresExportHistoryCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresExportHistoryCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDatasetsFhirStoresExportHistoryCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresExportHistoryCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDatasetsFhirStoresExportHistoryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDatasetsFhirStoresExportHistoryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportresourceshistoryrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:exportHistory") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "healthcare.projects.locations.datasets.fhirStores.exportHistory" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsDatasetsFhirStoresExportHistoryCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsDatasetsFhirStoresGetCall struct { s *Service name string @@ -20601,6 +20811,119 @@ func (c *ProjectsLocationsDatasetsFhirStoresImportCall) Do(opts ...googleapi.Cal return ret, nil } +type ProjectsLocationsDatasetsFhirStoresImportHistoryCall struct { + s *Service + name string + importresourceshistoryrequest *ImportResourcesHistoryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ImportHistory: Import resource historical versions from Cloud Storage source +// to destination fhir store. The exported resource, along with previous +// versions, will be exported in one or more FHIR history bundles. This method +// returns an Operation that can be used to track the status of the export by +// calling GetOperation. Immediate fatal errors appear in the error field, +// errors are also logged to Cloud Logging (see Viewing error logs in Cloud +// Logging (https://cloud.google.com/healthcare/docs/how-tos/logging)). +// Otherwise, when the operation finishes, a detailed response of type +// ImportResourcesResponse is returned in the response field. The metadata +// field type for this operation is OperationMetadata. +// +// - name: The name of the FHIR store to import FHIR resources to, in the +// format of +// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirSt +// ores/{fhir_store_id}`. +func (r *ProjectsLocationsDatasetsFhirStoresService) ImportHistory(name string, importresourceshistoryrequest *ImportResourcesHistoryRequest) *ProjectsLocationsDatasetsFhirStoresImportHistoryCall { + c := &ProjectsLocationsDatasetsFhirStoresImportHistoryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.importresourceshistoryrequest = importresourceshistoryrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDatasetsFhirStoresImportHistoryCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresImportHistoryCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDatasetsFhirStoresImportHistoryCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresImportHistoryCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDatasetsFhirStoresImportHistoryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDatasetsFhirStoresImportHistoryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.importresourceshistoryrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:importHistory") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "healthcare.projects.locations.datasets.fhirStores.importHistory" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsDatasetsFhirStoresImportHistoryCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsDatasetsFhirStoresListCall struct { s *Service parent string diff --git a/iap/v1/iap-api.json b/iap/v1/iap-api.json index 04b47a6d06..21a9057ae9 100644 --- a/iap/v1/iap-api.json +++ b/iap/v1/iap-api.json @@ -472,7 +472,7 @@ ], "parameters": { "name": { - "description": "Required. Immutable. Identifier for the TunnelDestGroup. Must be unique within the project and contain only lower case letters (a-z) and dashes (-).", + "description": "Identifier. Identifier for the TunnelDestGroup. Must be unique within the project and contain only lower case letters (a-z) and dashes (-).", "location": "path", "pattern": "^projects/[^/]+/iap_tunnel/locations/[^/]+/destGroups/[^/]+$", "required": true, @@ -682,7 +682,7 @@ } } }, - "revision": "20240430", + "revision": "20240513", "rootUrl": "https://iap.googleapis.com/", "schemas": { "AccessDeniedPageSettings": { @@ -710,15 +710,15 @@ "properties": { "allowedDomainsSettings": { "$ref": "AllowedDomainsSettings", - "description": "Settings to configure and enable allowed domains." + "description": "Optional. Settings to configure and enable allowed domains." }, "corsSettings": { "$ref": "CorsSettings", - "description": "Configuration to allow cross-origin requests via IAP." + "description": "Optional. Configuration to allow cross-origin requests via IAP." }, "gcipSettings": { "$ref": "GcipSettings", - "description": "GCIP claims and endpoint configurations for 3p identity providers." + "description": "Optional. GCIP claims and endpoint configurations for 3p identity providers." }, "identitySources": { "description": "Optional. Identity sources that IAP can use to authenticate the end user. Only one identity source can be configured.", @@ -737,15 +737,15 @@ }, "oauthSettings": { "$ref": "OAuthSettings", - "description": "Settings to configure IAP's OAuth behavior." + "description": "Optional. Settings to configure IAP's OAuth behavior." }, "policyDelegationSettings": { "$ref": "PolicyDelegationSettings", - "description": "Settings to configure Policy delegation for apps hosted in tenant projects. INTERNAL_ONLY." + "description": "Optional. Settings to configure Policy delegation for apps hosted in tenant projects. INTERNAL_ONLY." }, "reauthSettings": { "$ref": "ReauthSettings", - "description": "Settings to configure reauthentication policies in IAP." + "description": "Optional. Settings to configure reauthentication policies in IAP." }, "workforceIdentitySettings": { "$ref": "WorkforceIdentitySettings", @@ -759,14 +759,14 @@ "id": "AllowedDomainsSettings", "properties": { "domains": { - "description": "List of trusted domains.", + "description": "Optional. List of trusted domains.", "items": { "type": "string" }, "type": "array" }, "enable": { - "description": "Configuration for customers to opt in for the feature.", + "description": "Optional. Configuration for customers to opt in for the feature.", "type": "boolean" } }, @@ -778,11 +778,11 @@ "properties": { "accessDeniedPageSettings": { "$ref": "AccessDeniedPageSettings", - "description": "Customization for Access Denied page." + "description": "Optional. Customization for Access Denied page." }, "attributePropagationSettings": { "$ref": "AttributePropagationSettings", - "description": "Settings to configure attribute propagation." + "description": "Optional. Settings to configure attribute propagation." }, "cookieDomain": { "description": "The Domain value to set for cookies generated by IAP. This value is not validated by the API, but will be ignored at runtime if invalid.", @@ -790,7 +790,7 @@ }, "csmSettings": { "$ref": "CsmSettings", - "description": "Settings to configure IAP's behavior for a service mesh." + "description": "Optional. Settings to configure IAP's behavior for a service mesh." } }, "type": "object" @@ -800,15 +800,15 @@ "id": "AttributePropagationSettings", "properties": { "enable": { - "description": "Whether the provided attribute propagation settings should be evaluated on user requests. If set to true, attributes returned from the expression will be propagated in the set output credentials.", + "description": "Optional. Whether the provided attribute propagation settings should be evaluated on user requests. If set to true, attributes returned from the expression will be propagated in the set output credentials.", "type": "boolean" }, "expression": { - "description": "Raw string CEL expression. Must return a list of attributes. A maximum of 45 attributes can be selected. Expressions can select different attribute types from `attributes`: `attributes.saml_attributes`, `attributes.iap_attributes`. The following functions are supported: - filter `.filter(, )`: Returns a subset of `` where `` is true for every item. - in ` in `: Returns true if `` contains ``. - selectByName `.selectByName()`: Returns the attribute in `` with the given `` name, otherwise returns empty. - emitAs `.emitAs()`: Sets the `` name field to the given `` for propagation in selected output credentials. - strict `.strict()`: Ignores the `x-goog-iap-attr-` prefix for the provided `` when propagating with the `HEADER` output credential, such as request headers. - append `.append()` OR `.append()`: Appends the provided `` or `` to the end of ``. Example expression: `attributes.saml_attributes.filter(x, x.name in ['test']).append(attributes.iap_attributes.selectByName('exact').emitAs('custom').strict())`", + "description": "Optional. Raw string CEL expression. Must return a list of attributes. A maximum of 45 attributes can be selected. Expressions can select different attribute types from `attributes`: `attributes.saml_attributes`, `attributes.iap_attributes`. The following functions are supported: - filter `.filter(, )`: Returns a subset of `` where `` is true for every item. - in ` in `: Returns true if `` contains ``. - selectByName `.selectByName()`: Returns the attribute in `` with the given `` name, otherwise returns empty. - emitAs `.emitAs()`: Sets the `` name field to the given `` for propagation in selected output credentials. - strict `.strict()`: Ignores the `x-goog-iap-attr-` prefix for the provided `` when propagating with the `HEADER` output credential, such as request headers. - append `.append()` OR `.append()`: Appends the provided `` or `` to the end of ``. Example expression: `attributes.saml_attributes.filter(x, x.name in ['test']).append(attributes.iap_attributes.selectByName('exact').emitAs('custom').strict())`", "type": "string" }, "outputCredentials": { - "description": "Which output credentials attributes selected by the CEL expression should be propagated in. All attributes will be fully duplicated in each selected output credential.", + "description": "Optional. Which output credentials attributes selected by the CEL expression should be propagated in. All attributes will be fully duplicated in each selected output credential.", "items": { "enum": [ "OUTPUT_CREDENTIALS_UNSPECIFIED", @@ -936,7 +936,7 @@ "type": "string" }, "tenantIds": { - "description": "GCIP tenant ids that are linked to the IAP resource. tenant_ids could be a string beginning with a number character to indicate authenticating with GCIP tenant flow, or in the format of _ to indicate authenticating with GCIP agent flow. If agent flow is used, tenant_ids should only contain one single element, while for tenant flow, tenant_ids can contain multiple elements.", + "description": "Optional. GCIP tenant ids that are linked to the IAP resource. tenant_ids could be a string beginning with a number character to indicate authenticating with GCIP tenant flow, or in the format of _ to indicate authenticating with GCIP agent flow. If agent flow is used, tenant_ids should only contain one single element, while for tenant flow, tenant_ids can contain multiple elements.", "items": { "type": "string" }, @@ -974,11 +974,11 @@ "properties": { "accessSettings": { "$ref": "AccessSettings", - "description": "Top level wrapper for all access related setting in IAP" + "description": "Optional. Top level wrapper for all access related setting in IAP" }, "applicationSettings": { "$ref": "ApplicationSettings", - "description": "Top level wrapper for all application related settings in IAP" + "description": "Optional. Top level wrapper for all application related settings in IAP" }, "name": { "description": "Required. The resource name of the IAP protected resource.", @@ -1087,7 +1087,7 @@ "type": "string" }, "programmaticClients": { - "description": "List of client ids allowed to use IAP programmatically.", + "description": "Optional. List of client ids allowed to use IAP programmatically.", "items": { "type": "string" }, @@ -1167,7 +1167,7 @@ "id": "ReauthSettings", "properties": { "maxAge": { - "description": "Reauth session lifetime, how long before a user has to reauthenticate again.", + "description": "Optional. Reauth session lifetime, how long before a user has to reauthenticate again.", "format": "google-duration", "type": "string" }, @@ -1197,7 +1197,7 @@ "type": "string" }, "policyType": { - "description": "How IAP determines the effective policy in cases of hierarchical policies. Policies are merged from higher in the hierarchy to lower in the hierarchy.", + "description": "Optional. How IAP determines the effective policy in cases of hierarchical policies. Policies are merged from higher in the hierarchy to lower in the hierarchy.", "enum": [ "POLICY_TYPE_UNSPECIFIED", "MINIMUM", @@ -1296,28 +1296,28 @@ "id": "TunnelDestGroup", "properties": { "cidrs": { - "description": "Unordered list. List of CIDRs that this group applies to.", + "description": "Optional. Unordered list. List of CIDRs that this group applies to.", "items": { "type": "string" }, "type": "array" }, "fqdns": { - "description": "Unordered list. List of FQDNs that this group applies to.", + "description": "Optional. Unordered list. List of FQDNs that this group applies to.", "items": { "type": "string" }, "type": "array" }, "name": { - "description": "Required. Immutable. Identifier for the TunnelDestGroup. Must be unique within the project and contain only lower case letters (a-z) and dashes (-).", + "description": "Identifier. Identifier for the TunnelDestGroup. Must be unique within the project and contain only lower case letters (a-z) and dashes (-).", "type": "string" } }, "type": "object" }, "ValidateIapAttributeExpressionResponse": { - "description": "API requires a return message, but currently all response strings will fit in the status and public message. In the future, this response can hold AST validation info.", + "description": "IAP Expression Linter endpoint returns empty response body.", "id": "ValidateIapAttributeExpressionResponse", "properties": {}, "type": "object" diff --git a/iap/v1/iap-gen.go b/iap/v1/iap-gen.go index e3e84b1b97..fee50b11be 100644 --- a/iap/v1/iap-gen.go +++ b/iap/v1/iap-gen.go @@ -268,12 +268,14 @@ func (s *AccessDeniedPageSettings) MarshalJSON() ([]byte, error) { // AccessSettings: Access related settings for IAP protected apps. type AccessSettings struct { - // AllowedDomainsSettings: Settings to configure and enable allowed domains. + // AllowedDomainsSettings: Optional. Settings to configure and enable allowed + // domains. AllowedDomainsSettings *AllowedDomainsSettings `json:"allowedDomainsSettings,omitempty"` - // CorsSettings: Configuration to allow cross-origin requests via IAP. + // CorsSettings: Optional. Configuration to allow cross-origin requests via + // IAP. CorsSettings *CorsSettings `json:"corsSettings,omitempty"` - // GcipSettings: GCIP claims and endpoint configurations for 3p identity - // providers. + // GcipSettings: Optional. GCIP claims and endpoint configurations for 3p + // identity providers. GcipSettings *GcipSettings `json:"gcipSettings,omitempty"` // IdentitySources: Optional. Identity sources that IAP can use to authenticate // the end user. Only one identity source can be configured. @@ -286,12 +288,13 @@ type AccessSettings struct { // "WORKFORCE_IDENTITY_FEDERATION" - Use external identities set up on Google // Cloud Workforce Identity Federation. IdentitySources []string `json:"identitySources,omitempty"` - // OauthSettings: Settings to configure IAP's OAuth behavior. + // OauthSettings: Optional. Settings to configure IAP's OAuth behavior. OauthSettings *OAuthSettings `json:"oauthSettings,omitempty"` - // PolicyDelegationSettings: Settings to configure Policy delegation for apps - // hosted in tenant projects. INTERNAL_ONLY. + // PolicyDelegationSettings: Optional. Settings to configure Policy delegation + // for apps hosted in tenant projects. INTERNAL_ONLY. PolicyDelegationSettings *PolicyDelegationSettings `json:"policyDelegationSettings,omitempty"` - // ReauthSettings: Settings to configure reauthentication policies in IAP. + // ReauthSettings: Optional. Settings to configure reauthentication policies in + // IAP. ReauthSettings *ReauthSettings `json:"reauthSettings,omitempty"` // WorkforceIdentitySettings: Optional. Settings to configure the workforce // identity federation, including workforce pools and OAuth 2.0 settings. @@ -318,9 +321,9 @@ func (s *AccessSettings) MarshalJSON() ([]byte, error) { // restrict access to an app and allow access to only the domains that you // list. type AllowedDomainsSettings struct { - // Domains: List of trusted domains. + // Domains: Optional. List of trusted domains. Domains []string `json:"domains,omitempty"` - // Enable: Configuration for customers to opt in for the feature. + // Enable: Optional. Configuration for customers to opt in for the feature. Enable bool `json:"enable,omitempty"` // ForceSendFields is a list of field names (e.g. "Domains") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -342,15 +345,17 @@ func (s *AllowedDomainsSettings) MarshalJSON() ([]byte, error) { // ApplicationSettings: Wrapper over application specific settings for IAP. type ApplicationSettings struct { - // AccessDeniedPageSettings: Customization for Access Denied page. + // AccessDeniedPageSettings: Optional. Customization for Access Denied page. AccessDeniedPageSettings *AccessDeniedPageSettings `json:"accessDeniedPageSettings,omitempty"` - // AttributePropagationSettings: Settings to configure attribute propagation. + // AttributePropagationSettings: Optional. Settings to configure attribute + // propagation. AttributePropagationSettings *AttributePropagationSettings `json:"attributePropagationSettings,omitempty"` // CookieDomain: The Domain value to set for cookies generated by IAP. This // value is not validated by the API, but will be ignored at runtime if // invalid. CookieDomain string `json:"cookieDomain,omitempty"` - // CsmSettings: Settings to configure IAP's behavior for a service mesh. + // CsmSettings: Optional. Settings to configure IAP's behavior for a service + // mesh. CsmSettings *CsmSettings `json:"csmSettings,omitempty"` // ForceSendFields is a list of field names (e.g. "AccessDeniedPageSettings") // to unconditionally include in API requests. By default, fields with empty or @@ -373,29 +378,30 @@ func (s *ApplicationSettings) MarshalJSON() ([]byte, error) { // AttributePropagationSettings: Configuration for propagating attributes to // applications protected by IAP. type AttributePropagationSettings struct { - // Enable: Whether the provided attribute propagation settings should be - // evaluated on user requests. If set to true, attributes returned from the + // Enable: Optional. Whether the provided attribute propagation settings should + // be evaluated on user requests. If set to true, attributes returned from the // expression will be propagated in the set output credentials. Enable bool `json:"enable,omitempty"` - // Expression: Raw string CEL expression. Must return a list of attributes. A - // maximum of 45 attributes can be selected. Expressions can select different - // attribute types from `attributes`: `attributes.saml_attributes`, - // `attributes.iap_attributes`. The following functions are supported: - filter - // `.filter(, )`: Returns a subset of `` where `` is true for every item. - in - // ` in `: Returns true if `` contains ``. - selectByName `.selectByName()`: - // Returns the attribute in `` with the given `` name, otherwise returns empty. - // - emitAs `.emitAs()`: Sets the `` name field to the given `` for propagation - // in selected output credentials. - strict `.strict()`: Ignores the - // `x-goog-iap-attr-` prefix for the provided `` when propagating with the - // `HEADER` output credential, such as request headers. - append `.append()` OR - // `.append()`: Appends the provided `` or `` to the end of ``. Example - // expression: `attributes.saml_attributes.filter(x, x.name in + // Expression: Optional. Raw string CEL expression. Must return a list of + // attributes. A maximum of 45 attributes can be selected. Expressions can + // select different attribute types from `attributes`: + // `attributes.saml_attributes`, `attributes.iap_attributes`. The following + // functions are supported: - filter `.filter(, )`: Returns a subset of `` + // where `` is true for every item. - in ` in `: Returns true if `` contains + // ``. - selectByName `.selectByName()`: Returns the attribute in `` with the + // given `` name, otherwise returns empty. - emitAs `.emitAs()`: Sets the `` + // name field to the given `` for propagation in selected output credentials. - + // strict `.strict()`: Ignores the `x-goog-iap-attr-` prefix for the provided + // `` when propagating with the `HEADER` output credential, such as request + // headers. - append `.append()` OR `.append()`: Appends the provided `` or `` + // to the end of ``. Example expression: `attributes.saml_attributes.filter(x, + // x.name in // ['test']).append(attributes.iap_attributes.selectByName('exact').emitAs('cust // om').strict())` Expression string `json:"expression,omitempty"` - // OutputCredentials: Which output credentials attributes selected by the CEL - // expression should be propagated in. All attributes will be fully duplicated - // in each selected output credential. + // OutputCredentials: Optional. Which output credentials attributes selected by + // the CEL expression should be propagated in. All attributes will be fully + // duplicated in each selected output credential. // // Possible values: // "OUTPUT_CREDENTIALS_UNSPECIFIED" - An output credential is required. @@ -674,8 +680,8 @@ type GcipSettings struct { // all resources within the same project share the same login page, though it // could be overridden at the sub resource level. LoginPageUri string `json:"loginPageUri,omitempty"` - // TenantIds: GCIP tenant ids that are linked to the IAP resource. tenant_ids - // could be a string beginning with a number character to indicate + // TenantIds: Optional. GCIP tenant ids that are linked to the IAP resource. + // tenant_ids could be a string beginning with a number character to indicate // authenticating with GCIP tenant flow, or in the format of _ to indicate // authenticating with GCIP agent flow. If agent flow is used, tenant_ids // should only contain one single element, while for tenant flow, tenant_ids @@ -756,10 +762,11 @@ func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) { // IapSettings: The IAP configurable settings. type IapSettings struct { - // AccessSettings: Top level wrapper for all access related setting in IAP - AccessSettings *AccessSettings `json:"accessSettings,omitempty"` - // ApplicationSettings: Top level wrapper for all application related settings + // AccessSettings: Optional. Top level wrapper for all access related setting // in IAP + AccessSettings *AccessSettings `json:"accessSettings,omitempty"` + // ApplicationSettings: Optional. Top level wrapper for all application related + // settings in IAP ApplicationSettings *ApplicationSettings `json:"applicationSettings,omitempty"` // Name: Required. The resource name of the IAP protected resource. Name string `json:"name,omitempty"` @@ -934,7 +941,8 @@ type OAuthSettings struct { // Note: IAP does not verify that the id token's hd claim matches this value // since access behavior is managed by IAM policies. LoginHint string `json:"loginHint,omitempty"` - // ProgrammaticClients: List of client ids allowed to use IAP programmatically. + // ProgrammaticClients: Optional. List of client ids allowed to use IAP + // programmatically. ProgrammaticClients []string `json:"programmaticClients,omitempty"` // ForceSendFields is a list of field names (e.g. "LoginHint") to // unconditionally include in API requests. By default, fields with empty or @@ -1118,7 +1126,7 @@ func (s *PolicyName) MarshalJSON() ([]byte, error) { // ReauthSettings: Configuration for IAP reauthentication policies. type ReauthSettings struct { - // MaxAge: Reauth session lifetime, how long before a user has to + // MaxAge: Optional. Reauth session lifetime, how long before a user has to // reauthenticate again. MaxAge string `json:"maxAge,omitempty"` // Method: Reauth method requested. @@ -1130,9 +1138,9 @@ type ReauthSettings struct { // "SECURE_KEY" - User must use their secure key 2nd factor device. // "ENROLLED_SECOND_FACTORS" - User can use any enabled 2nd factor. Method string `json:"method,omitempty"` - // PolicyType: How IAP determines the effective policy in cases of hierarchical - // policies. Policies are merged from higher in the hierarchy to lower in the - // hierarchy. + // PolicyType: Optional. How IAP determines the effective policy in cases of + // hierarchical policies. Policies are merged from higher in the hierarchy to + // lower in the hierarchy. // // Possible values: // "POLICY_TYPE_UNSPECIFIED" - Default value. This value is unused. @@ -1323,13 +1331,12 @@ func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { // TunnelDestGroup: A TunnelDestGroup. type TunnelDestGroup struct { - // Cidrs: Unordered list. List of CIDRs that this group applies to. + // Cidrs: Optional. Unordered list. List of CIDRs that this group applies to. Cidrs []string `json:"cidrs,omitempty"` - // Fqdns: Unordered list. List of FQDNs that this group applies to. + // Fqdns: Optional. Unordered list. List of FQDNs that this group applies to. Fqdns []string `json:"fqdns,omitempty"` - // Name: Required. Immutable. Identifier for the TunnelDestGroup. Must be - // unique within the project and contain only lower case letters (a-z) and - // dashes (-). + // Name: Identifier. Identifier for the TunnelDestGroup. Must be unique within + // the project and contain only lower case letters (a-z) and dashes (-). Name string `json:"name,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -1352,9 +1359,8 @@ func (s *TunnelDestGroup) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// ValidateIapAttributeExpressionResponse: API requires a return message, but -// currently all response strings will fit in the status and public message. In -// the future, this response can hold AST validation info. +// ValidateIapAttributeExpressionResponse: IAP Expression Linter endpoint +// returns empty response body. type ValidateIapAttributeExpressionResponse struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -2770,8 +2776,9 @@ type ProjectsIapTunnelLocationsDestGroupsPatchCall struct { // Patch: Updates a TunnelDestGroup. // -// - name: Immutable. Identifier for the TunnelDestGroup. Must be unique within -// the project and contain only lower case letters (a-z) and dashes (-). +// - name: Identifier. Identifier for the TunnelDestGroup. Must be unique +// within the project and contain only lower case letters (a-z) and dashes +// (-). func (r *ProjectsIapTunnelLocationsDestGroupsService) Patch(name string, tunneldestgroup *TunnelDestGroup) *ProjectsIapTunnelLocationsDestGroupsPatchCall { c := &ProjectsIapTunnelLocationsDestGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name diff --git a/retail/v2/retail-api.json b/retail/v2/retail-api.json index 3caebf79c1..e63bb69cc0 100644 --- a/retail/v2/retail-api.json +++ b/retail/v2/retail-api.json @@ -2092,7 +2092,7 @@ } } }, - "revision": "20240502", + "revision": "20240509", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -5503,7 +5503,7 @@ "type": "string" }, "eventType": { - "description": "Required. User event type. Allowed values are: * `add-to-cart`: Products being added to cart. * `category-page-view`: Special pages such as sale or promotion pages viewed. * `detail-page-view`: Products detail page viewed. * `home-page-view`: Homepage viewed. * `promotion-offered`: Promotion is offered to a user. * `promotion-not-offered`: Promotion is not offered to a user. * `purchase-complete`: User finishing a purchase. * `search`: Product search. * `shopping-cart-page-view`: User viewing a shopping cart.", + "description": "Required. User event type. Allowed values are: * `add-to-cart`: Products being added to cart. * `remove-from-cart`: Products being removed from cart. * `category-page-view`: Special pages such as sale or promotion pages viewed. * `detail-page-view`: Products detail page viewed. * `home-page-view`: Homepage viewed. * `promotion-offered`: Promotion is offered to a user. * `promotion-not-offered`: Promotion is not offered to a user. * `purchase-complete`: User finishing a purchase. * `search`: Product search. * `shopping-cart-page-view`: User viewing a shopping cart.", "type": "string" }, "experimentIds": { diff --git a/retail/v2/retail-gen.go b/retail/v2/retail-gen.go index b5340a9311..f8330a7cca 100644 --- a/retail/v2/retail-gen.go +++ b/retail/v2/retail-gen.go @@ -5680,13 +5680,13 @@ type GoogleCloudRetailV2UserEvent struct { // Timestamp of when the user event happened. EventTime string `json:"eventTime,omitempty"` // EventType: Required. User event type. Allowed values are: * `add-to-cart`: - // Products being added to cart. * `category-page-view`: Special pages such as - // sale or promotion pages viewed. * `detail-page-view`: Products detail page - // viewed. * `home-page-view`: Homepage viewed. * `promotion-offered`: - // Promotion is offered to a user. * `promotion-not-offered`: Promotion is not - // offered to a user. * `purchase-complete`: User finishing a purchase. * - // `search`: Product search. * `shopping-cart-page-view`: User viewing a - // shopping cart. + // Products being added to cart. * `remove-from-cart`: Products being removed + // from cart. * `category-page-view`: Special pages such as sale or promotion + // pages viewed. * `detail-page-view`: Products detail page viewed. * + // `home-page-view`: Homepage viewed. * `promotion-offered`: Promotion is + // offered to a user. * `promotion-not-offered`: Promotion is not offered to a + // user. * `purchase-complete`: User finishing a purchase. * `search`: Product + // search. * `shopping-cart-page-view`: User viewing a shopping cart. EventType string `json:"eventType,omitempty"` // ExperimentIds: A list of identifiers for the independent experiment groups // this user event belongs to. This is used to distinguish between user events diff --git a/retail/v2alpha/retail-api.json b/retail/v2alpha/retail-api.json index ed17840d27..d0a863eeb0 100644 --- a/retail/v2alpha/retail-api.json +++ b/retail/v2alpha/retail-api.json @@ -2557,7 +2557,7 @@ } } }, - "revision": "20240418", + "revision": "20240509", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -7336,7 +7336,7 @@ "type": "string" }, "eventType": { - "description": "Required. User event type. Allowed values are: * `add-to-cart`: Products being added to cart. * `category-page-view`: Special pages such as sale or promotion pages viewed. * `detail-page-view`: Products detail page viewed. * `home-page-view`: Homepage viewed. * `promotion-offered`: Promotion is offered to a user. * `promotion-not-offered`: Promotion is not offered to a user. * `purchase-complete`: User finishing a purchase. * `search`: Product search. * `shopping-cart-page-view`: User viewing a shopping cart.", + "description": "Required. User event type. Allowed values are: * `add-to-cart`: Products being added to cart. * `remove-from-cart`: Products being removed from cart. * `category-page-view`: Special pages such as sale or promotion pages viewed. * `detail-page-view`: Products detail page viewed. * `home-page-view`: Homepage viewed. * `promotion-offered`: Promotion is offered to a user. * `promotion-not-offered`: Promotion is not offered to a user. * `purchase-complete`: User finishing a purchase. * `search`: Product search. * `shopping-cart-page-view`: User viewing a shopping cart.", "type": "string" }, "experimentIds": { diff --git a/retail/v2alpha/retail-gen.go b/retail/v2alpha/retail-gen.go index df50952e10..8147beeabf 100644 --- a/retail/v2alpha/retail-gen.go +++ b/retail/v2alpha/retail-gen.go @@ -7704,13 +7704,13 @@ type GoogleCloudRetailV2alphaUserEvent struct { // Timestamp of when the user event happened. EventTime string `json:"eventTime,omitempty"` // EventType: Required. User event type. Allowed values are: * `add-to-cart`: - // Products being added to cart. * `category-page-view`: Special pages such as - // sale or promotion pages viewed. * `detail-page-view`: Products detail page - // viewed. * `home-page-view`: Homepage viewed. * `promotion-offered`: - // Promotion is offered to a user. * `promotion-not-offered`: Promotion is not - // offered to a user. * `purchase-complete`: User finishing a purchase. * - // `search`: Product search. * `shopping-cart-page-view`: User viewing a - // shopping cart. + // Products being added to cart. * `remove-from-cart`: Products being removed + // from cart. * `category-page-view`: Special pages such as sale or promotion + // pages viewed. * `detail-page-view`: Products detail page viewed. * + // `home-page-view`: Homepage viewed. * `promotion-offered`: Promotion is + // offered to a user. * `promotion-not-offered`: Promotion is not offered to a + // user. * `purchase-complete`: User finishing a purchase. * `search`: Product + // search. * `shopping-cart-page-view`: User viewing a shopping cart. EventType string `json:"eventType,omitempty"` // ExperimentIds: A list of identifiers for the independent experiment groups // this user event belongs to. This is used to distinguish between user events diff --git a/retail/v2beta/retail-api.json b/retail/v2beta/retail-api.json index ff87c4b652..77d8241425 100644 --- a/retail/v2beta/retail-api.json +++ b/retail/v2beta/retail-api.json @@ -2120,7 +2120,7 @@ } } }, - "revision": "20240502", + "revision": "20240509", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -7196,7 +7196,7 @@ "type": "string" }, "eventType": { - "description": "Required. User event type. Allowed values are: * `add-to-cart`: Products being added to cart. * `category-page-view`: Special pages such as sale or promotion pages viewed. * `detail-page-view`: Products detail page viewed. * `home-page-view`: Homepage viewed. * `promotion-offered`: Promotion is offered to a user. * `promotion-not-offered`: Promotion is not offered to a user. * `purchase-complete`: User finishing a purchase. * `search`: Product search. * `shopping-cart-page-view`: User viewing a shopping cart.", + "description": "Required. User event type. Allowed values are: * `add-to-cart`: Products being added to cart. * `remove-from-cart`: Products being removed from cart. * `category-page-view`: Special pages such as sale or promotion pages viewed. * `detail-page-view`: Products detail page viewed. * `home-page-view`: Homepage viewed. * `promotion-offered`: Promotion is offered to a user. * `promotion-not-offered`: Promotion is not offered to a user. * `purchase-complete`: User finishing a purchase. * `search`: Product search. * `shopping-cart-page-view`: User viewing a shopping cart.", "type": "string" }, "experimentIds": { diff --git a/retail/v2beta/retail-gen.go b/retail/v2beta/retail-gen.go index ded889d330..6b6660791b 100644 --- a/retail/v2beta/retail-gen.go +++ b/retail/v2beta/retail-gen.go @@ -8026,13 +8026,13 @@ type GoogleCloudRetailV2betaUserEvent struct { // Timestamp of when the user event happened. EventTime string `json:"eventTime,omitempty"` // EventType: Required. User event type. Allowed values are: * `add-to-cart`: - // Products being added to cart. * `category-page-view`: Special pages such as - // sale or promotion pages viewed. * `detail-page-view`: Products detail page - // viewed. * `home-page-view`: Homepage viewed. * `promotion-offered`: - // Promotion is offered to a user. * `promotion-not-offered`: Promotion is not - // offered to a user. * `purchase-complete`: User finishing a purchase. * - // `search`: Product search. * `shopping-cart-page-view`: User viewing a - // shopping cart. + // Products being added to cart. * `remove-from-cart`: Products being removed + // from cart. * `category-page-view`: Special pages such as sale or promotion + // pages viewed. * `detail-page-view`: Products detail page viewed. * + // `home-page-view`: Homepage viewed. * `promotion-offered`: Promotion is + // offered to a user. * `promotion-not-offered`: Promotion is not offered to a + // user. * `purchase-complete`: User finishing a purchase. * `search`: Product + // search. * `shopping-cart-page-view`: User viewing a shopping cart. EventType string `json:"eventType,omitempty"` // ExperimentIds: A list of identifiers for the independent experiment groups // this user event belongs to. This is used to distinguish between user events diff --git a/run/v2/run-api.json b/run/v2/run-api.json index a4a07ca0a4..ac0f248c9e 100644 --- a/run/v2/run-api.json +++ b/run/v2/run-api.json @@ -1469,7 +1469,7 @@ } } }, - "revision": "20240503", + "revision": "20240510", "rootUrl": "https://run.googleapis.com/", "schemas": { "GoogleCloudRunV2BinaryAuthorization": { @@ -4460,6 +4460,26 @@ }, "type": "object" }, + "GoogleDevtoolsCloudbuildV1GCSLocation": { + "description": "Represents a storage location in Cloud Storage", + "id": "GoogleDevtoolsCloudbuildV1GCSLocation", + "properties": { + "bucket": { + "description": "Cloud Storage bucket. See https://cloud.google.com/storage/docs/naming#requirements", + "type": "string" + }, + "generation": { + "description": "Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.", + "format": "int64", + "type": "string" + }, + "object": { + "description": "Cloud Storage object. See https://cloud.google.com/storage/docs/naming#objectnames", + "type": "string" + } + }, + "type": "object" + }, "GoogleDevtoolsCloudbuildV1GitConfig": { "description": "GitConfig is a configuration for git operations.", "id": "GoogleDevtoolsCloudbuildV1GitConfig", @@ -4525,6 +4545,10 @@ "proxySecretVersionName": { "description": "SecretVersion resource of the HTTP proxy URL. The proxy URL should be in format protocol://@]proxyhost[:port].", "type": "string" + }, + "proxySslCaInfo": { + "$ref": "GoogleDevtoolsCloudbuildV1GCSLocation", + "description": "Optional. Cloud Storage object storing the certificate to use with the HTTP proxy." } }, "type": "object" diff --git a/run/v2/run-gen.go b/run/v2/run-gen.go index 44988d987c..75ed32a55a 100644 --- a/run/v2/run-gen.go +++ b/run/v2/run-gen.go @@ -3502,6 +3502,36 @@ func (s *GoogleDevtoolsCloudbuildV1FileHashes) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleDevtoolsCloudbuildV1GCSLocation: Represents a storage location in +// Cloud Storage +type GoogleDevtoolsCloudbuildV1GCSLocation struct { + // Bucket: Cloud Storage bucket. See + // https://cloud.google.com/storage/docs/naming#requirements + Bucket string `json:"bucket,omitempty"` + // Generation: Cloud Storage generation for the object. If the generation is + // omitted, the latest generation will be used. + Generation int64 `json:"generation,omitempty,string"` + // Object: Cloud Storage object. See + // https://cloud.google.com/storage/docs/naming#objectnames + Object string `json:"object,omitempty"` + // ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Bucket") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleDevtoolsCloudbuildV1GCSLocation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleDevtoolsCloudbuildV1GCSLocation + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleDevtoolsCloudbuildV1GitConfig: GitConfig is a configuration for git // operations. type GoogleDevtoolsCloudbuildV1GitConfig struct { @@ -3597,6 +3627,9 @@ type GoogleDevtoolsCloudbuildV1HttpConfig struct { // ProxySecretVersionName: SecretVersion resource of the HTTP proxy URL. The // proxy URL should be in format protocol://@]proxyhost[:port]. ProxySecretVersionName string `json:"proxySecretVersionName,omitempty"` + // ProxySslCaInfo: Optional. Cloud Storage object storing the certificate to + // use with the HTTP proxy. + ProxySslCaInfo *GoogleDevtoolsCloudbuildV1GCSLocation `json:"proxySslCaInfo,omitempty"` // ForceSendFields is a list of field names (e.g. "ProxySecretVersionName") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See diff --git a/walletobjects/v1/walletobjects-api.json b/walletobjects/v1/walletobjects-api.json index 7b03294fa5..07d9757644 100644 --- a/walletobjects/v1/walletobjects-api.json +++ b/walletobjects/v1/walletobjects-api.json @@ -2681,7 +2681,7 @@ } } }, - "revision": "20240508", + "revision": "20240514", "rootUrl": "https://walletobjects.googleapis.com/", "schemas": { "ActivationOptions": { @@ -7024,21 +7024,24 @@ "TEXT", "text", "EXPIRATION_NOTIFICATION", - "expirationNotification" + "expirationNotification", + "TEXT_AND_NOTIFY" ], "enumDeprecated": [ false, false, true, false, - true + true, + false ], "enumDescriptions": [ "", "Renders the message as text on the card details screen. This is the default message type.", "Legacy alias for `TEXT`. Deprecated.", "Note: This enum is currently not supported.", - "Legacy alias for `EXPIRATION_NOTIFICATION`. Deprecated." + "Legacy alias for `EXPIRATION_NOTIFICATION`. Deprecated.", + "Renders the message as text on the card details screen and as an Android notification." ], "type": "string" } diff --git a/walletobjects/v1/walletobjects-gen.go b/walletobjects/v1/walletobjects-gen.go index 99e78525e2..23f264e7b0 100644 --- a/walletobjects/v1/walletobjects-gen.go +++ b/walletobjects/v1/walletobjects-gen.go @@ -5059,6 +5059,8 @@ type Message struct { // "EXPIRATION_NOTIFICATION" - Note: This enum is currently not supported. // "expirationNotification" - Legacy alias for `EXPIRATION_NOTIFICATION`. // Deprecated. + // "TEXT_AND_NOTIFY" - Renders the message as text on the card details screen + // and as an Android notification. MessageType string `json:"messageType,omitempty"` // ForceSendFields is a list of field names (e.g. "Body") to unconditionally // include in API requests. By default, fields with empty or default values are