From 8fbf5724ef77000d747c0457fbc0dbe6ee7da980 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 7 Aug 2023 00:24:13 -0700 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#2102) --- analyticshub/v1/analyticshub-api.json | 552 +++++- analyticshub/v1/analyticshub-gen.go | 2082 ++++++++++++++++++-- analyticshub/v1beta1/analyticshub-api.json | 110 +- analyticshub/v1beta1/analyticshub-gen.go | 169 ++ api-list.json | 15 - connectors/v1/connectors-api.json | 15 +- connectors/v1/connectors-gen.go | 74 +- youtube/v3/youtube-api.json | 51 +- youtube/v3/youtube-gen.go | 82 + 9 files changed, 2974 insertions(+), 176 deletions(-) diff --git a/analyticshub/v1/analyticshub-api.json b/analyticshub/v1/analyticshub-api.json index 14f30cbc6c6..e6a7efc31dd 100644 --- a/analyticshub/v1/analyticshub-api.json +++ b/analyticshub/v1/analyticshub-api.json @@ -315,6 +315,48 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "listSubscriptions": { + "description": "Lists all subscriptions on a given Data Exchange or Listing.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}:listSubscriptions", + "httpMethod": "GET", + "id": "analyticshub.projects.locations.dataExchanges.listSubscriptions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "includeDeletedSubscriptions": { + "description": "If selected, includes deleted subscriptions in the response (up to 63 days after deletion).", + "location": "query", + "type": "boolean" + }, + "pageSize": { + "description": "The maximum number of results to return in a single response page.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Page token, returned by a previous call.", + "location": "query", + "type": "string" + }, + "resource": { + "description": "Required. Resource name of the requested target. This resource may be either a Listing or a DataExchange. e.g. projects/123/locations/US/dataExchanges/456 OR e.g. projects/123/locations/US/dataExchanges/456/listings/789", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:listSubscriptions", + "response": { + "$ref": "ListSharedResourceSubscriptionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "patch": { "description": "Updates an existing data exchange.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}", @@ -379,6 +421,35 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "subscribe": { + "description": "Creates a Subscription to a Data Exchange. This is a long-running operation as it will create one or more linked datasets.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}:subscribe", + "httpMethod": "POST", + "id": "analyticshub.projects.locations.dataExchanges.subscribe", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the Data Exchange. e.g. `projects/publisherproject/locations/US/dataExchanges/123`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:subscribe", + "request": { + "$ref": "SubscribeDataExchangeRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "testIamPermissions": { "description": "Returns the permissions that a caller has.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}:testIamPermissions", @@ -564,6 +635,48 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "listSubscriptions": { + "description": "Lists all subscriptions on a given Data Exchange or Listing.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}/listings/{listingsId}:listSubscriptions", + "httpMethod": "GET", + "id": "analyticshub.projects.locations.dataExchanges.listings.listSubscriptions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "includeDeletedSubscriptions": { + "description": "If selected, includes deleted subscriptions in the response (up to 63 days after deletion).", + "location": "query", + "type": "boolean" + }, + "pageSize": { + "description": "The maximum number of results to return in a single response page.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Page token, returned by a previous call.", + "location": "query", + "type": "string" + }, + "resource": { + "description": "Required. Resource name of the requested target. This resource may be either a Listing or a DataExchange. e.g. projects/123/locations/US/dataExchanges/456 OR e.g. projects/123/locations/US/dataExchanges/456/listings/789", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:listSubscriptions", + "response": { + "$ref": "ListSharedResourceSubscriptionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "patch": { "description": "Updates an existing listing.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}/listings/{listingsId}", @@ -689,13 +802,169 @@ } } } + }, + "subscriptions": { + "methods": { + "delete": { + "description": "Deletes a subscription.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/subscriptions/{subscriptionsId}", + "httpMethod": "DELETE", + "id": "analyticshub.projects.locations.subscriptions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the subscription to delete. e.g. projects/123/locations/US/subscriptions/456", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of a Subscription.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/subscriptions/{subscriptionsId}", + "httpMethod": "GET", + "id": "analyticshub.projects.locations.subscriptions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the subscription. e.g. projects/123/locations/US/subscriptions/456", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Subscription" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all subscriptions in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/subscriptions", + "httpMethod": "GET", + "id": "analyticshub.projects.locations.subscriptions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "The filter expression may be used to filter by Data Exchange or Listing.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return in a single response page.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Page token, returned by a previous call.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource path of the subscription. e.g. projects/myproject/locations/US", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/subscriptions", + "response": { + "$ref": "ListSubscriptionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "refresh": { + "description": "Refreshes a Subscription to a Data Exchange. A Data Exchange can become stale when a publisher adds or removes data. This is a long-running operation as it may create many linked datasets.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/subscriptions/{subscriptionsId}:refresh", + "httpMethod": "POST", + "id": "analyticshub.projects.locations.subscriptions.refresh", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the Subscription to refresh. e.g. `projects/subscriberproject/locations/US/subscriptions/123`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:refresh", + "request": { + "$ref": "RefreshSubscriptionRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "revoke": { + "description": "Revokes a given subscription.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/subscriptions/{subscriptionsId}:revoke", + "httpMethod": "POST", + "id": "analyticshub.projects.locations.subscriptions.revoke", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the subscription to revoke. e.g. projects/123/locations/US/subscriptions/456", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:revoke", + "request": { + "$ref": "RevokeSubscriptionRequest" + }, + "response": { + "$ref": "RevokeSubscriptionResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } } } } }, - "revision": "20230703", + "revision": "20230803", "rootUrl": "https://analyticshub.googleapis.com/", "schemas": { "AuditConfig": { @@ -814,6 +1083,10 @@ "primaryContact": { "description": "Optional. Email or URL of the primary point of contact of the data exchange. Max Length: 1000 bytes.", "type": "string" + }, + "sharingEnvironmentConfig": { + "$ref": "SharingEnvironmentConfig", + "description": "Required. Configurable data sharing environment option for a data exchange." } }, "type": "object" @@ -833,6 +1106,18 @@ }, "type": "object" }, + "DcrExchangeConfig": { + "description": "Data Clean Room (DCR), used for privacy-safe and secured data sharing.", + "id": "DcrExchangeConfig", + "properties": {}, + "type": "object" + }, + "DefaultExchangeConfig": { + "description": "Default Analytics Hub data exchange, used for secured data sharing.", + "id": "DefaultExchangeConfig", + "properties": {}, + "type": "object" + }, "DestinationDataset": { "description": "Defines the destination bigquery dataset.", "id": "DestinationDataset", @@ -930,6 +1215,18 @@ }, "type": "object" }, + "LinkedResource": { + "description": "Reference to a linked resource tracked by this Subscription.", + "id": "LinkedResource", + "properties": { + "linkedDataset": { + "description": "Output only. Name of the linked dataset, e.g. projects/subscriberproject/datasets/linked_dataset", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ListDataExchangesResponse": { "description": "Message for response to the list of data exchanges.", "id": "ListDataExchangesResponse", @@ -984,6 +1281,42 @@ }, "type": "object" }, + "ListSharedResourceSubscriptionsResponse": { + "description": "Message for response to the listing of shared resource subscriptions.", + "id": "ListSharedResourceSubscriptionsResponse", + "properties": { + "nextPageToken": { + "description": "Next page token.", + "type": "string" + }, + "sharedResourceSubscriptions": { + "description": "The list of subscriptions.", + "items": { + "$ref": "Subscription" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListSubscriptionsResponse": { + "description": "Message for response to the listing of subscriptions.", + "id": "ListSubscriptionsResponse", + "properties": { + "nextPageToken": { + "description": "Next page token.", + "type": "string" + }, + "subscriptions": { + "description": "The list of subscriptions.", + "items": { + "$ref": "Subscription" + }, + "type": "array" + } + }, + "type": "object" + }, "Listing": { "description": "A listing is what gets published into a data exchange that a subscriber can subscribe to. It contains a reference to the data source along with descriptive information that will help subscribers find and subscribe the data.", "id": "Listing", @@ -1101,6 +1434,41 @@ }, "type": "object" }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, "OperationMetadata": { "description": "Represents the metadata of the long-running operation.", "id": "OperationMetadata", @@ -1191,6 +1559,23 @@ }, "type": "object" }, + "RefreshSubscriptionRequest": { + "description": "Message for refreshing a subscription.", + "id": "RefreshSubscriptionRequest", + "properties": {}, + "type": "object" + }, + "RefreshSubscriptionResponse": { + "description": "Message for response when you refresh a subscription.", + "id": "RefreshSubscriptionResponse", + "properties": { + "subscription": { + "$ref": "Subscription", + "description": "The refreshed subscription resource." + } + }, + "type": "object" + }, "RestrictedExportConfig": { "description": "Restricted export config, used to configure restricted export on linked dataset.", "id": "RestrictedExportConfig", @@ -1211,6 +1596,18 @@ }, "type": "object" }, + "RevokeSubscriptionRequest": { + "description": "Message for revoking a subscription.", + "id": "RevokeSubscriptionRequest", + "properties": {}, + "type": "object" + }, + "RevokeSubscriptionResponse": { + "description": "Message for response when you revoke a subscription.", + "id": "RevokeSubscriptionResponse", + "properties": {}, + "type": "object" + }, "SetIamPolicyRequest": { "description": "Request message for `SetIamPolicy` method.", "id": "SetIamPolicyRequest", @@ -1227,6 +1624,78 @@ }, "type": "object" }, + "SharingEnvironmentConfig": { + "description": "Sharing environment is a behavior model for sharing data within a data exchange. This option is configurable for a data exchange.", + "id": "SharingEnvironmentConfig", + "properties": { + "dcrExchangeConfig": { + "$ref": "DcrExchangeConfig", + "description": "Data Clean Room (DCR), used for privacy-safe and secured data sharing." + }, + "defaultExchangeConfig": { + "$ref": "DefaultExchangeConfig", + "description": "Default Analytics Hub data exchange, used for secured data sharing." + } + }, + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, + "SubscribeDataExchangeRequest": { + "description": "Message for subscribing to a Data Exchange.", + "id": "SubscribeDataExchangeRequest", + "properties": { + "destination": { + "description": "Required. The parent resource path of the Subscription. e.g. `projects/subscriberproject/locations/US`", + "type": "string" + }, + "subscriberContact": { + "description": "Email of the subscriber.", + "type": "string" + }, + "subscription": { + "description": "Required. Name of the subscription to create. e.g. `subscription1`", + "type": "string" + } + }, + "type": "object" + }, + "SubscribeDataExchangeResponse": { + "description": "Message for response when you subscribe to a Data Exchange.", + "id": "SubscribeDataExchangeResponse", + "properties": { + "subscription": { + "$ref": "Subscription", + "description": "Subscription object created from this subscribe action." + } + }, + "type": "object" + }, "SubscribeListingRequest": { "description": "Message for subscribing to a listing.", "id": "SubscribeListingRequest", @@ -1241,7 +1710,86 @@ "SubscribeListingResponse": { "description": "Message for response when you subscribe to a listing.", "id": "SubscribeListingResponse", - "properties": {}, + "properties": { + "subscription": { + "$ref": "Subscription", + "description": "Subscription object created from this subscribe action." + } + }, + "type": "object" + }, + "Subscription": { + "description": "A subscription represents a subscribers' access to a particular set of published data. It contains references to associated listings, data exchanges, and linked datasets. TODO(b/267528977) Consider port the new resource to v1beta1 and dataexchange APIs.", + "id": "Subscription", + "properties": { + "creationTime": { + "description": "Output only. Timestamp when the subscription was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "dataExchange": { + "description": "Output only. Resource name of the source Data Exchange. e.g. projects/123/locations/US/dataExchanges/456", + "readOnly": true, + "type": "string" + }, + "lastModifyTime": { + "description": "Output only. Timestamp when the subscription was last modified.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "linkedDatasetMap": { + "additionalProperties": { + "$ref": "LinkedResource" + }, + "description": "Output only. Map of listing resource names to associated linked resource, e.g. projects/123/locations/US/dataExchanges/456/listings/789 -\u003e projects/123/datasets/my_dataset For listing-level subscriptions, this is a map of size 1. Only contains values if state == STATE_ACTIVE.", + "readOnly": true, + "type": "object" + }, + "listing": { + "description": "Output only. Resource name of the source Listing. e.g. projects/123/locations/US/dataExchanges/456/listings/789", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The resource name of the subscription. e.g. `projects/myproject/locations/US/subscriptions/123`.", + "readOnly": true, + "type": "string" + }, + "organizationDisplayName": { + "description": "Output only. Display name of the project of this subscription.", + "readOnly": true, + "type": "string" + }, + "organizationId": { + "description": "Output only. Organization of the project this subscription belongs to.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. Current state of the subscription.", + "enum": [ + "STATE_UNSPECIFIED", + "STATE_ACTIVE", + "STATE_STALE", + "STATE_INACTIVE" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "This subscription is active and the data is accessible.", + "The data referenced by this subscription is out of date and should be refreshed. This can happen when a data provider adds or removes datasets.", + "This subscription has been cancelled or revoked and the data is no longer accessible." + ], + "readOnly": true, + "type": "string" + }, + "subscriberContact": { + "description": "Output only. Email of the subscriber.", + "readOnly": true, + "type": "string" + } + }, "type": "object" }, "TestIamPermissionsRequest": { diff --git a/analyticshub/v1/analyticshub-gen.go b/analyticshub/v1/analyticshub-gen.go index 69884d84505..414c75b683b 100644 --- a/analyticshub/v1/analyticshub-gen.go +++ b/analyticshub/v1/analyticshub-gen.go @@ -198,6 +198,7 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.DataExchanges = NewProjectsLocationsDataExchangesService(s) + rs.Subscriptions = NewProjectsLocationsSubscriptionsService(s) return rs } @@ -205,6 +206,8 @@ type ProjectsLocationsService struct { s *Service DataExchanges *ProjectsLocationsDataExchangesService + + Subscriptions *ProjectsLocationsSubscriptionsService } func NewProjectsLocationsDataExchangesService(s *Service) *ProjectsLocationsDataExchangesService { @@ -228,6 +231,15 @@ type ProjectsLocationsDataExchangesListingsService struct { s *Service } +func NewProjectsLocationsSubscriptionsService(s *Service) *ProjectsLocationsSubscriptionsService { + rs := &ProjectsLocationsSubscriptionsService{s: s} + return rs +} + +type ProjectsLocationsSubscriptionsService struct { + s *Service +} + // AuditConfig: Specifies the audit configuration for a service. The // configuration determines which permission types are logged, and what // identities, if any, are exempted from logging. An AuditConfig must @@ -479,6 +491,10 @@ type DataExchange struct { // contact of the data exchange. Max Length: 1000 bytes. PrimaryContact string `json:"primaryContact,omitempty"` + // SharingEnvironmentConfig: Required. Configurable data sharing + // environment option for a data exchange. + SharingEnvironmentConfig *SharingEnvironmentConfig `json:"sharingEnvironmentConfig,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -538,6 +554,16 @@ func (s *DataProvider) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DcrExchangeConfig: Data Clean Room (DCR), used for privacy-safe and +// secured data sharing. +type DcrExchangeConfig struct { +} + +// DefaultExchangeConfig: Default Analytics Hub data exchange, used for +// secured data sharing. +type DefaultExchangeConfig struct { +} + // DestinationDataset: Defines the destination bigquery dataset. type DestinationDataset struct { // DatasetReference: Required. A reference that identifies the @@ -761,6 +787,36 @@ func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LinkedResource: Reference to a linked resource tracked by this +// Subscription. +type LinkedResource struct { + // LinkedDataset: Output only. Name of the linked dataset, e.g. + // projects/subscriberproject/datasets/linked_dataset + LinkedDataset string `json:"linkedDataset,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LinkedDataset") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LinkedDataset") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LinkedResource) MarshalJSON() ([]byte, error) { + type NoMethod LinkedResource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListDataExchangesResponse: Message for response to the list of data // exchanges. type ListDataExchangesResponse struct { @@ -868,6 +924,78 @@ func (s *ListOrgDataExchangesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListSharedResourceSubscriptionsResponse: Message for response to the +// listing of shared resource subscriptions. +type ListSharedResourceSubscriptionsResponse struct { + // NextPageToken: Next page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SharedResourceSubscriptions: The list of subscriptions. + SharedResourceSubscriptions []*Subscription `json:"sharedResourceSubscriptions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListSharedResourceSubscriptionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListSharedResourceSubscriptionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListSubscriptionsResponse: Message for response to the listing of +// subscriptions. +type ListSubscriptionsResponse struct { + // NextPageToken: Next page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Subscriptions: The list of subscriptions. + Subscriptions []*Subscription `json:"subscriptions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListSubscriptionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListSubscriptionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Listing: A listing is what gets published into a data exchange that a // subscriber can subscribe to. It contains a reference to the data // source along with descriptive information that will help subscribers @@ -990,6 +1118,68 @@ func (s *Listing) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Operation: This resource represents a long-running operation that is +// the result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *Status `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal response of the operation in case of success. If + // the original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // OperationMetadata: Represents the metadata of the long-running // operation. type OperationMetadata struct { @@ -1184,6 +1374,39 @@ func (s *Publisher) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RefreshSubscriptionRequest: Message for refreshing a subscription. +type RefreshSubscriptionRequest struct { +} + +// RefreshSubscriptionResponse: Message for response when you refresh a +// subscription. +type RefreshSubscriptionResponse struct { + // Subscription: The refreshed subscription resource. + Subscription *Subscription `json:"subscription,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Subscription") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Subscription") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RefreshSubscriptionResponse) MarshalJSON() ([]byte, error) { + type NoMethod RefreshSubscriptionResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RestrictedExportConfig: Restricted export config, used to configure // restricted export on linked dataset. type RestrictedExportConfig struct { @@ -1221,6 +1444,18 @@ func (s *RestrictedExportConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RevokeSubscriptionRequest: Message for revoking a subscription. +type RevokeSubscriptionRequest struct { +} + +// RevokeSubscriptionResponse: Message for response when you revoke a +// subscription. +type RevokeSubscriptionResponse struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + // SetIamPolicyRequest: Request message for `SetIamPolicy` method. type SetIamPolicyRequest struct { // Policy: REQUIRED: The complete policy to be applied to the @@ -1258,6 +1493,152 @@ func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SharingEnvironmentConfig: Sharing environment is a behavior model for +// sharing data within a data exchange. This option is configurable for +// a data exchange. +type SharingEnvironmentConfig struct { + // DcrExchangeConfig: Data Clean Room (DCR), used for privacy-safe and + // secured data sharing. + DcrExchangeConfig *DcrExchangeConfig `json:"dcrExchangeConfig,omitempty"` + + // DefaultExchangeConfig: Default Analytics Hub data exchange, used for + // secured data sharing. + DefaultExchangeConfig *DefaultExchangeConfig `json:"defaultExchangeConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DcrExchangeConfig") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DcrExchangeConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SharingEnvironmentConfig) MarshalJSON() ([]byte, error) { + type NoMethod SharingEnvironmentConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Status: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SubscribeDataExchangeRequest: Message for subscribing to a Data +// Exchange. +type SubscribeDataExchangeRequest struct { + // Destination: Required. The parent resource path of the Subscription. + // e.g. `projects/subscriberproject/locations/US` + Destination string `json:"destination,omitempty"` + + // SubscriberContact: Email of the subscriber. + SubscriberContact string `json:"subscriberContact,omitempty"` + + // Subscription: Required. Name of the subscription to create. e.g. + // `subscription1` + Subscription string `json:"subscription,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Destination") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Destination") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SubscribeDataExchangeRequest) MarshalJSON() ([]byte, error) { + type NoMethod SubscribeDataExchangeRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SubscribeDataExchangeResponse: Message for response when you +// subscribe to a Data Exchange. +type SubscribeDataExchangeResponse struct { + // Subscription: Subscription object created from this subscribe action. + Subscription *Subscription `json:"subscription,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Subscription") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Subscription") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SubscribeDataExchangeResponse) MarshalJSON() ([]byte, error) { + type NoMethod SubscribeDataExchangeResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SubscribeListingRequest: Message for subscribing to a listing. type SubscribeListingRequest struct { // DestinationDataset: BigQuery destination dataset to create for the @@ -1291,21 +1672,14 @@ func (s *SubscribeListingRequest) MarshalJSON() ([]byte, error) { // SubscribeListingResponse: Message for response when you subscribe to // a listing. type SubscribeListingResponse struct { + // Subscription: Subscription object created from this subscribe action. + Subscription *Subscription `json:"subscription,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` -} -// TestIamPermissionsRequest: Request message for `TestIamPermissions` -// method. -type TestIamPermissionsRequest struct { - // Permissions: The set of permissions to check for the `resource`. - // Permissions with wildcards (such as `*` or `storage.*`) are not - // allowed. For more information see IAM Overview - // (https://cloud.google.com/iam/docs/overview#permissions). - Permissions []string `json:"permissions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Permissions") to + // ForceSendFields is a list of field names (e.g. "Subscription") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1313,7 +1687,7 @@ type TestIamPermissionsRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Permissions") to include + // NullFields is a list of field names (e.g. "Subscription") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -1322,24 +1696,75 @@ type TestIamPermissionsRequest struct { NullFields []string `json:"-"` } -func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { - type NoMethod TestIamPermissionsRequest +func (s *SubscribeListingResponse) MarshalJSON() ([]byte, error) { + type NoMethod SubscribeListingResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TestIamPermissionsResponse: Response message for `TestIamPermissions` -// method. -type TestIamPermissionsResponse struct { - // Permissions: A subset of `TestPermissionsRequest.permissions` that - // the caller is allowed. - Permissions []string `json:"permissions,omitempty"` +// Subscription: A subscription represents a subscribers' access to a +// particular set of published data. It contains references to +// associated listings, data exchanges, and linked datasets. +// TODO(b/267528977) Consider port the new resource to v1beta1 and +// dataexchange APIs. +type Subscription struct { + // CreationTime: Output only. Timestamp when the subscription was + // created. + CreationTime string `json:"creationTime,omitempty"` + + // DataExchange: Output only. Resource name of the source Data Exchange. + // e.g. projects/123/locations/US/dataExchanges/456 + DataExchange string `json:"dataExchange,omitempty"` + + // LastModifyTime: Output only. Timestamp when the subscription was last + // modified. + LastModifyTime string `json:"lastModifyTime,omitempty"` + + // LinkedDatasetMap: Output only. Map of listing resource names to + // associated linked resource, e.g. + // projects/123/locations/US/dataExchanges/456/listings/789 -> + // projects/123/datasets/my_dataset For listing-level subscriptions, + // this is a map of size 1. Only contains values if state == + // STATE_ACTIVE. + LinkedDatasetMap map[string]LinkedResource `json:"linkedDatasetMap,omitempty"` + + // Listing: Output only. Resource name of the source Listing. e.g. + // projects/123/locations/US/dataExchanges/456/listings/789 + Listing string `json:"listing,omitempty"` + + // Name: Output only. The resource name of the subscription. e.g. + // `projects/myproject/locations/US/subscriptions/123`. + Name string `json:"name,omitempty"` + + // OrganizationDisplayName: Output only. Display name of the project of + // this subscription. + OrganizationDisplayName string `json:"organizationDisplayName,omitempty"` + + // OrganizationId: Output only. Organization of the project this + // subscription belongs to. + OrganizationId string `json:"organizationId,omitempty"` + + // State: Output only. Current state of the subscription. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default value. This value is unused. + // "STATE_ACTIVE" - This subscription is active and the data is + // accessible. + // "STATE_STALE" - The data referenced by this subscription is out of + // date and should be refreshed. This can happen when a data provider + // adds or removes datasets. + // "STATE_INACTIVE" - This subscription has been cancelled or revoked + // and the data is no longer accessible. + State string `json:"state,omitempty"` + + // SubscriberContact: Output only. Email of the subscriber. + SubscriberContact string `json:"subscriberContact,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Permissions") to + // ForceSendFields is a list of field names (e.g. "CreationTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1347,7 +1772,7 @@ type TestIamPermissionsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Permissions") to include + // NullFields is a list of field names (e.g. "CreationTime") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -1356,8 +1781,74 @@ type TestIamPermissionsResponse struct { NullFields []string `json:"-"` } -func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod TestIamPermissionsResponse +func (s *Subscription) MarshalJSON() ([]byte, error) { + type NoMethod Subscription + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsRequest: Request message for `TestIamPermissions` +// method. +type TestIamPermissionsRequest struct { + // Permissions: The set of permissions to check for the `resource`. + // Permissions with wildcards (such as `*` or `storage.*`) are not + // allowed. For more information see IAM Overview + // (https://cloud.google.com/iam/docs/overview#permissions). + Permissions []string `json:"permissions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsResponse: Response message for `TestIamPermissions` +// method. +type TestIamPermissionsResponse struct { + // Permissions: A subset of `TestPermissionsRequest.permissions` that + // the caller is allowed. + Permissions []string `json:"permissions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -2341,6 +2832,217 @@ func (c *ProjectsLocationsDataExchangesListCall) Pages(ctx context.Context, f fu } } +// method id "analyticshub.projects.locations.dataExchanges.listSubscriptions": + +type ProjectsLocationsDataExchangesListSubscriptionsCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListSubscriptions: Lists all subscriptions on a given Data Exchange +// or Listing. +// +// - resource: Resource name of the requested target. This resource may +// be either a Listing or a DataExchange. e.g. +// projects/123/locations/US/dataExchanges/456 OR e.g. +// projects/123/locations/US/dataExchanges/456/listings/789. +func (r *ProjectsLocationsDataExchangesService) ListSubscriptions(resource string) *ProjectsLocationsDataExchangesListSubscriptionsCall { + c := &ProjectsLocationsDataExchangesListSubscriptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// IncludeDeletedSubscriptions sets the optional parameter +// "includeDeletedSubscriptions": If selected, includes deleted +// subscriptions in the response (up to 63 days after deletion). +func (c *ProjectsLocationsDataExchangesListSubscriptionsCall) IncludeDeletedSubscriptions(includeDeletedSubscriptions bool) *ProjectsLocationsDataExchangesListSubscriptionsCall { + c.urlParams_.Set("includeDeletedSubscriptions", fmt.Sprint(includeDeletedSubscriptions)) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return in a single response page. +func (c *ProjectsLocationsDataExchangesListSubscriptionsCall) PageSize(pageSize int64) *ProjectsLocationsDataExchangesListSubscriptionsCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token, +// returned by a previous call. +func (c *ProjectsLocationsDataExchangesListSubscriptionsCall) PageToken(pageToken string) *ProjectsLocationsDataExchangesListSubscriptionsCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataExchangesListSubscriptionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListSubscriptionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataExchangesListSubscriptionsCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataExchangesListSubscriptionsCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataExchangesListSubscriptionsCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListSubscriptionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataExchangesListSubscriptionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataExchangesListSubscriptionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:listSubscriptions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "analyticshub.projects.locations.dataExchanges.listSubscriptions" call. +// Exactly one of *ListSharedResourceSubscriptionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *ListSharedResourceSubscriptionsResponse.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 *ProjectsLocationsDataExchangesListSubscriptionsCall) Do(opts ...googleapi.CallOption) (*ListSharedResourceSubscriptionsResponse, 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 := &ListSharedResourceSubscriptionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all subscriptions on a given Data Exchange or Listing.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}:listSubscriptions", + // "httpMethod": "GET", + // "id": "analyticshub.projects.locations.dataExchanges.listSubscriptions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "includeDeletedSubscriptions": { + // "description": "If selected, includes deleted subscriptions in the response (up to 63 days after deletion).", + // "location": "query", + // "type": "boolean" + // }, + // "pageSize": { + // "description": "The maximum number of results to return in a single response page.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page token, returned by a previous call.", + // "location": "query", + // "type": "string" + // }, + // "resource": { + // "description": "Required. Resource name of the requested target. This resource may be either a Listing or a DataExchange. e.g. projects/123/locations/US/dataExchanges/456 OR e.g. projects/123/locations/US/dataExchanges/456/listings/789", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:listSubscriptions", + // "response": { + // "$ref": "ListSharedResourceSubscriptionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataExchangesListSubscriptionsCall) Pages(ctx context.Context, f func(*ListSharedResourceSubscriptionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "analyticshub.projects.locations.dataExchanges.patch": type ProjectsLocationsDataExchangesPatchCall struct { @@ -2646,34 +3348,33 @@ func (c *ProjectsLocationsDataExchangesSetIamPolicyCall) Do(opts ...googleapi.Ca } -// method id "analyticshub.projects.locations.dataExchanges.testIamPermissions": +// method id "analyticshub.projects.locations.dataExchanges.subscribe": -type ProjectsLocationsDataExchangesTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataExchangesSubscribeCall struct { + s *Service + name string + subscribedataexchangerequest *SubscribeDataExchangeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns the permissions that a caller has. +// Subscribe: Creates a Subscription to a Data Exchange. This is a +// long-running operation as it will create one or more linked datasets. // -// - resource: REQUIRED: The resource for which the policy detail is -// being requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsDataExchangesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDataExchangesTestIamPermissionsCall { - c := &ProjectsLocationsDataExchangesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest +// - name: Resource name of the Data Exchange. e.g. +// `projects/publisherproject/locations/US/dataExchanges/123`. +func (r *ProjectsLocationsDataExchangesService) Subscribe(name string, subscribedataexchangerequest *SubscribeDataExchangeRequest) *ProjectsLocationsDataExchangesSubscribeCall { + c := &ProjectsLocationsDataExchangesSubscribeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.subscribedataexchangerequest = subscribedataexchangerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataExchangesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesTestIamPermissionsCall { +func (c *ProjectsLocationsDataExchangesSubscribeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesSubscribeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2681,21 +3382,21 @@ func (c *ProjectsLocationsDataExchangesTestIamPermissionsCall) Fields(s ...googl // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataExchangesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesTestIamPermissionsCall { +func (c *ProjectsLocationsDataExchangesSubscribeCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesSubscribeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataExchangesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsDataExchangesSubscribeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataExchangesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataExchangesSubscribeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2703,14 +3404,14 @@ func (c *ProjectsLocationsDataExchangesTestIamPermissionsCall) doRequest(alt str } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.subscribedataexchangerequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:subscribe") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -2718,7 +3419,153 @@ func (c *ProjectsLocationsDataExchangesTestIamPermissionsCall) doRequest(alt str } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "analyticshub.projects.locations.dataExchanges.subscribe" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataExchangesSubscribeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a Subscription to a Data Exchange. This is a long-running operation as it will create one or more linked datasets.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}:subscribe", + // "httpMethod": "POST", + // "id": "analyticshub.projects.locations.dataExchanges.subscribe", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the Data Exchange. e.g. `projects/publisherproject/locations/US/dataExchanges/123`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:subscribe", + // "request": { + // "$ref": "SubscribeDataExchangeRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "analyticshub.projects.locations.dataExchanges.testIamPermissions": + +type ProjectsLocationsDataExchangesTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns the permissions that a caller has. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsDataExchangesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDataExchangesTestIamPermissionsCall { + c := &ProjectsLocationsDataExchangesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataExchangesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataExchangesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataExchangesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataExchangesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + 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{ + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -3574,98 +4421,122 @@ func (c *ProjectsLocationsDataExchangesListingsListCall) Pages(ctx context.Conte } } -// method id "analyticshub.projects.locations.dataExchanges.listings.patch": +// method id "analyticshub.projects.locations.dataExchanges.listings.listSubscriptions": -type ProjectsLocationsDataExchangesListingsPatchCall struct { - s *Service - name string - listing *Listing - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataExchangesListingsListSubscriptionsCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates an existing listing. +// ListSubscriptions: Lists all subscriptions on a given Data Exchange +// or Listing. // -// - name: Output only. The resource name of the listing. e.g. -// `projects/myproject/locations/US/dataExchanges/123/listings/456`. -func (r *ProjectsLocationsDataExchangesListingsService) Patch(name string, listing *Listing) *ProjectsLocationsDataExchangesListingsPatchCall { - c := &ProjectsLocationsDataExchangesListingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.listing = listing +// - resource: Resource name of the requested target. This resource may +// be either a Listing or a DataExchange. e.g. +// projects/123/locations/US/dataExchanges/456 OR e.g. +// projects/123/locations/US/dataExchanges/456/listings/789. +func (r *ProjectsLocationsDataExchangesListingsService) ListSubscriptions(resource string) *ProjectsLocationsDataExchangesListingsListSubscriptionsCall { + c := &ProjectsLocationsDataExchangesListingsListSubscriptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// UpdateMask sets the optional parameter "updateMask": Required. Field -// mask specifies the fields to update in the listing resource. The -// fields specified in the `updateMask` are relative to the resource and -// are not a full request. -func (c *ProjectsLocationsDataExchangesListingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataExchangesListingsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// IncludeDeletedSubscriptions sets the optional parameter +// "includeDeletedSubscriptions": If selected, includes deleted +// subscriptions in the response (up to 63 days after deletion). +func (c *ProjectsLocationsDataExchangesListingsListSubscriptionsCall) IncludeDeletedSubscriptions(includeDeletedSubscriptions bool) *ProjectsLocationsDataExchangesListingsListSubscriptionsCall { + c.urlParams_.Set("includeDeletedSubscriptions", fmt.Sprint(includeDeletedSubscriptions)) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return in a single response page. +func (c *ProjectsLocationsDataExchangesListingsListSubscriptionsCall) PageSize(pageSize int64) *ProjectsLocationsDataExchangesListingsListSubscriptionsCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token, +// returned by a previous call. +func (c *ProjectsLocationsDataExchangesListingsListSubscriptionsCall) PageToken(pageToken string) *ProjectsLocationsDataExchangesListingsListSubscriptionsCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataExchangesListingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsPatchCall { +func (c *ProjectsLocationsDataExchangesListingsListSubscriptionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsListSubscriptionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataExchangesListingsListSubscriptionsCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataExchangesListingsListSubscriptionsCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataExchangesListingsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsPatchCall { +func (c *ProjectsLocationsDataExchangesListingsListSubscriptionsCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsListSubscriptionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataExchangesListingsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataExchangesListingsListSubscriptionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataExchangesListingsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataExchangesListingsListSubscriptionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.listing) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:listSubscriptions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "analyticshub.projects.locations.dataExchanges.listings.patch" call. -// Exactly one of *Listing or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Listing.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 *ProjectsLocationsDataExchangesListingsPatchCall) Do(opts ...googleapi.CallOption) (*Listing, error) { +// Do executes the "analyticshub.projects.locations.dataExchanges.listings.listSubscriptions" call. +// Exactly one of *ListSharedResourceSubscriptionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *ListSharedResourceSubscriptionsResponse.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 *ProjectsLocationsDataExchangesListingsListSubscriptionsCall) Do(opts ...googleapi.CallOption) (*ListSharedResourceSubscriptionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3684,7 +4555,7 @@ func (c *ProjectsLocationsDataExchangesListingsPatchCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Listing{ + ret := &ListSharedResourceSubscriptionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3696,34 +4567,41 @@ func (c *ProjectsLocationsDataExchangesListingsPatchCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Updates an existing listing.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}/listings/{listingsId}", - // "httpMethod": "PATCH", - // "id": "analyticshub.projects.locations.dataExchanges.listings.patch", + // "description": "Lists all subscriptions on a given Data Exchange or Listing.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}/listings/{listingsId}:listSubscriptions", + // "httpMethod": "GET", + // "id": "analyticshub.projects.locations.dataExchanges.listings.listSubscriptions", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "Output only. The resource name of the listing. e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`", + // "includeDeletedSubscriptions": { + // "description": "If selected, includes deleted subscriptions in the response (up to 63 days after deletion).", + // "location": "query", + // "type": "boolean" + // }, + // "pageSize": { + // "description": "The maximum number of results to return in a single response page.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page token, returned by a previous call.", + // "location": "query", + // "type": "string" + // }, + // "resource": { + // "description": "Required. Resource name of the requested target. This resource may be either a Listing or a DataExchange. e.g. projects/123/locations/US/dataExchanges/456 OR e.g. projects/123/locations/US/dataExchanges/456/listings/789", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Required. Field mask specifies the fields to update in the listing resource. The fields specified in the `updateMask` are relative to the resource and are not a full request.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}", - // "request": { - // "$ref": "Listing" - // }, + // "path": "v1/{+resource}:listSubscriptions", // "response": { - // "$ref": "Listing" + // "$ref": "ListSharedResourceSubscriptionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/bigquery", @@ -3733,21 +4611,201 @@ func (c *ProjectsLocationsDataExchangesListingsPatchCall) Do(opts ...googleapi.C } -// method id "analyticshub.projects.locations.dataExchanges.listings.setIamPolicy": - -type ProjectsLocationsDataExchangesListingsSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the IAM policy. -// -// - resource: REQUIRED: The resource for which the policy is being -// specified. See Resource names +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataExchangesListingsListSubscriptionsCall) Pages(ctx context.Context, f func(*ListSharedResourceSubscriptionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "analyticshub.projects.locations.dataExchanges.listings.patch": + +type ProjectsLocationsDataExchangesListingsPatchCall struct { + s *Service + name string + listing *Listing + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an existing listing. +// +// - name: Output only. The resource name of the listing. e.g. +// `projects/myproject/locations/US/dataExchanges/123/listings/456`. +func (r *ProjectsLocationsDataExchangesListingsService) Patch(name string, listing *Listing) *ProjectsLocationsDataExchangesListingsPatchCall { + c := &ProjectsLocationsDataExchangesListingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.listing = listing + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask specifies the fields to update in the listing resource. The +// fields specified in the `updateMask` are relative to the resource and +// are not a full request. +func (c *ProjectsLocationsDataExchangesListingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataExchangesListingsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataExchangesListingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataExchangesListingsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataExchangesListingsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataExchangesListingsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.listing) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "analyticshub.projects.locations.dataExchanges.listings.patch" call. +// Exactly one of *Listing or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Listing.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 *ProjectsLocationsDataExchangesListingsPatchCall) Do(opts ...googleapi.CallOption) (*Listing, 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 := &Listing{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates an existing listing.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataExchanges/{dataExchangesId}/listings/{listingsId}", + // "httpMethod": "PATCH", + // "id": "analyticshub.projects.locations.dataExchanges.listings.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The resource name of the listing. e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/listings/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Field mask specifies the fields to update in the listing resource. The fields specified in the `updateMask` are relative to the resource and are not a full request.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Listing" + // }, + // "response": { + // "$ref": "Listing" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "analyticshub.projects.locations.dataExchanges.listings.setIamPolicy": + +type ProjectsLocationsDataExchangesListingsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the IAM policy. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. func (r *ProjectsLocationsDataExchangesListingsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDataExchangesListingsSetIamPolicyCall { @@ -4172,3 +5230,781 @@ func (c *ProjectsLocationsDataExchangesListingsTestIamPermissionsCall) Do(opts . // } } + +// method id "analyticshub.projects.locations.subscriptions.delete": + +type ProjectsLocationsSubscriptionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a subscription. +// +// - name: Resource name of the subscription to delete. e.g. +// projects/123/locations/US/subscriptions/456. +func (r *ProjectsLocationsSubscriptionsService) Delete(name string) *ProjectsLocationsSubscriptionsDeleteCall { + c := &ProjectsLocationsSubscriptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsSubscriptionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSubscriptionsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsSubscriptionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSubscriptionsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsSubscriptionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSubscriptionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "analyticshub.projects.locations.subscriptions.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsSubscriptionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a subscription.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/subscriptions/{subscriptionsId}", + // "httpMethod": "DELETE", + // "id": "analyticshub.projects.locations.subscriptions.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the subscription to delete. e.g. projects/123/locations/US/subscriptions/456", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "analyticshub.projects.locations.subscriptions.get": + +type ProjectsLocationsSubscriptionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of a Subscription. +// +// - name: Resource name of the subscription. e.g. +// projects/123/locations/US/subscriptions/456. +func (r *ProjectsLocationsSubscriptionsService) Get(name string) *ProjectsLocationsSubscriptionsGetCall { + c := &ProjectsLocationsSubscriptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsSubscriptionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSubscriptionsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsSubscriptionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSubscriptionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsSubscriptionsGetCall) Context(ctx context.Context) *ProjectsLocationsSubscriptionsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsSubscriptionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSubscriptionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "analyticshub.projects.locations.subscriptions.get" call. +// Exactly one of *Subscription or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Subscription.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 *ProjectsLocationsSubscriptionsGetCall) Do(opts ...googleapi.CallOption) (*Subscription, 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 := &Subscription{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the details of a Subscription.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/subscriptions/{subscriptionsId}", + // "httpMethod": "GET", + // "id": "analyticshub.projects.locations.subscriptions.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the subscription. e.g. projects/123/locations/US/subscriptions/456", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Subscription" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "analyticshub.projects.locations.subscriptions.list": + +type ProjectsLocationsSubscriptionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all subscriptions in a given project and location. +// +// - parent: The parent resource path of the subscription. e.g. +// projects/myproject/locations/US. +func (r *ProjectsLocationsSubscriptionsService) List(parent string) *ProjectsLocationsSubscriptionsListCall { + c := &ProjectsLocationsSubscriptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter expression +// may be used to filter by Data Exchange or Listing. +func (c *ProjectsLocationsSubscriptionsListCall) Filter(filter string) *ProjectsLocationsSubscriptionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return in a single response page. +func (c *ProjectsLocationsSubscriptionsListCall) PageSize(pageSize int64) *ProjectsLocationsSubscriptionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token, +// returned by a previous call. +func (c *ProjectsLocationsSubscriptionsListCall) PageToken(pageToken string) *ProjectsLocationsSubscriptionsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsSubscriptionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSubscriptionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsSubscriptionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSubscriptionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsSubscriptionsListCall) Context(ctx context.Context) *ProjectsLocationsSubscriptionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsSubscriptionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSubscriptionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/subscriptions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "analyticshub.projects.locations.subscriptions.list" call. +// Exactly one of *ListSubscriptionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListSubscriptionsResponse.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 *ProjectsLocationsSubscriptionsListCall) Do(opts ...googleapi.CallOption) (*ListSubscriptionsResponse, 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 := &ListSubscriptionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all subscriptions in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/subscriptions", + // "httpMethod": "GET", + // "id": "analyticshub.projects.locations.subscriptions.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "The filter expression may be used to filter by Data Exchange or Listing.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return in a single response page.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page token, returned by a previous call.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource path of the subscription. e.g. projects/myproject/locations/US", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/subscriptions", + // "response": { + // "$ref": "ListSubscriptionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsSubscriptionsListCall) Pages(ctx context.Context, f func(*ListSubscriptionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "analyticshub.projects.locations.subscriptions.refresh": + +type ProjectsLocationsSubscriptionsRefreshCall struct { + s *Service + name string + refreshsubscriptionrequest *RefreshSubscriptionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Refresh: Refreshes a Subscription to a Data Exchange. A Data Exchange +// can become stale when a publisher adds or removes data. This is a +// long-running operation as it may create many linked datasets. +// +// - name: Resource name of the Subscription to refresh. e.g. +// `projects/subscriberproject/locations/US/subscriptions/123`. +func (r *ProjectsLocationsSubscriptionsService) Refresh(name string, refreshsubscriptionrequest *RefreshSubscriptionRequest) *ProjectsLocationsSubscriptionsRefreshCall { + c := &ProjectsLocationsSubscriptionsRefreshCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.refreshsubscriptionrequest = refreshsubscriptionrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsSubscriptionsRefreshCall) Fields(s ...googleapi.Field) *ProjectsLocationsSubscriptionsRefreshCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsSubscriptionsRefreshCall) Context(ctx context.Context) *ProjectsLocationsSubscriptionsRefreshCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsSubscriptionsRefreshCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSubscriptionsRefreshCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.refreshsubscriptionrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:refresh") + 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 "analyticshub.projects.locations.subscriptions.refresh" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsSubscriptionsRefreshCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Refreshes a Subscription to a Data Exchange. A Data Exchange can become stale when a publisher adds or removes data. This is a long-running operation as it may create many linked datasets.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/subscriptions/{subscriptionsId}:refresh", + // "httpMethod": "POST", + // "id": "analyticshub.projects.locations.subscriptions.refresh", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the Subscription to refresh. e.g. `projects/subscriberproject/locations/US/subscriptions/123`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:refresh", + // "request": { + // "$ref": "RefreshSubscriptionRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "analyticshub.projects.locations.subscriptions.revoke": + +type ProjectsLocationsSubscriptionsRevokeCall struct { + s *Service + name string + revokesubscriptionrequest *RevokeSubscriptionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Revoke: Revokes a given subscription. +// +// - name: Resource name of the subscription to revoke. e.g. +// projects/123/locations/US/subscriptions/456. +func (r *ProjectsLocationsSubscriptionsService) Revoke(name string, revokesubscriptionrequest *RevokeSubscriptionRequest) *ProjectsLocationsSubscriptionsRevokeCall { + c := &ProjectsLocationsSubscriptionsRevokeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.revokesubscriptionrequest = revokesubscriptionrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsSubscriptionsRevokeCall) Fields(s ...googleapi.Field) *ProjectsLocationsSubscriptionsRevokeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsSubscriptionsRevokeCall) Context(ctx context.Context) *ProjectsLocationsSubscriptionsRevokeCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsSubscriptionsRevokeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSubscriptionsRevokeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.revokesubscriptionrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:revoke") + 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 "analyticshub.projects.locations.subscriptions.revoke" call. +// Exactly one of *RevokeSubscriptionResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *RevokeSubscriptionResponse.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 *ProjectsLocationsSubscriptionsRevokeCall) Do(opts ...googleapi.CallOption) (*RevokeSubscriptionResponse, 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 := &RevokeSubscriptionResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Revokes a given subscription.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/subscriptions/{subscriptionsId}:revoke", + // "httpMethod": "POST", + // "id": "analyticshub.projects.locations.subscriptions.revoke", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the subscription to revoke. e.g. projects/123/locations/US/subscriptions/456", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:revoke", + // "request": { + // "$ref": "RevokeSubscriptionRequest" + // }, + // "response": { + // "$ref": "RevokeSubscriptionResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} diff --git a/analyticshub/v1beta1/analyticshub-api.json b/analyticshub/v1beta1/analyticshub-api.json index 350e40ecd62..93d37c3d140 100644 --- a/analyticshub/v1beta1/analyticshub-api.json +++ b/analyticshub/v1beta1/analyticshub-api.json @@ -695,7 +695,7 @@ } } }, - "revision": "20230703", + "revision": "20230803", "rootUrl": "https://analyticshub.googleapis.com/", "schemas": { "AuditConfig": { @@ -930,6 +930,18 @@ }, "type": "object" }, + "LinkedResource": { + "description": "Reference to a linked resource tracked by this Subscription.", + "id": "LinkedResource", + "properties": { + "linkedDataset": { + "description": "Output only. Name of the linked dataset, e.g. projects/subscriberproject/datasets/linked_dataset", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ListDataExchangesResponse": { "description": "Message for response to the list of data exchanges.", "id": "ListDataExchangesResponse", @@ -1191,6 +1203,17 @@ }, "type": "object" }, + "RefreshSubscriptionResponse": { + "description": "Message for response when you refresh a subscription.", + "id": "RefreshSubscriptionResponse", + "properties": { + "subscription": { + "$ref": "Subscription", + "description": "The refreshed subscription resource." + } + }, + "type": "object" + }, "RestrictedExportConfig": { "description": "Restricted export config, used to configure restricted export on linked dataset.", "id": "RestrictedExportConfig", @@ -1227,6 +1250,17 @@ }, "type": "object" }, + "SubscribeDataExchangeResponse": { + "description": "Message for response when you subscribe to a Data Exchange.", + "id": "SubscribeDataExchangeResponse", + "properties": { + "subscription": { + "$ref": "Subscription", + "description": "Subscription object created from this subscribe action." + } + }, + "type": "object" + }, "SubscribeListingRequest": { "description": "Message for subscribing to a listing.", "id": "SubscribeListingRequest", @@ -1244,6 +1278,80 @@ "properties": {}, "type": "object" }, + "Subscription": { + "description": "A subscription represents a subscribers' access to a particular set of published data. It contains references to associated listings, data exchanges, and linked datasets. TODO(b/267528977) Consider port the new resource to v1beta1 and dataexchange APIs.", + "id": "Subscription", + "properties": { + "creationTime": { + "description": "Output only. Timestamp when the subscription was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "dataExchange": { + "description": "Output only. Resource name of the source Data Exchange. e.g. projects/123/locations/US/dataExchanges/456", + "readOnly": true, + "type": "string" + }, + "lastModifyTime": { + "description": "Output only. Timestamp when the subscription was last modified.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "linkedDatasetMap": { + "additionalProperties": { + "$ref": "LinkedResource" + }, + "description": "Output only. Map of listing resource names to associated linked resource, e.g. projects/123/locations/US/dataExchanges/456/listings/789 -\u003e projects/123/datasets/my_dataset For listing-level subscriptions, this is a map of size 1. Only contains values if state == STATE_ACTIVE.", + "readOnly": true, + "type": "object" + }, + "listing": { + "description": "Output only. Resource name of the source Listing. e.g. projects/123/locations/US/dataExchanges/456/listings/789", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The resource name of the subscription. e.g. `projects/myproject/locations/US/subscriptions/123`.", + "readOnly": true, + "type": "string" + }, + "organizationDisplayName": { + "description": "Output only. Display name of the project of this subscription.", + "readOnly": true, + "type": "string" + }, + "organizationId": { + "description": "Output only. Organization of the project this subscription belongs to.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. Current state of the subscription.", + "enum": [ + "STATE_UNSPECIFIED", + "STATE_ACTIVE", + "STATE_STALE", + "STATE_INACTIVE" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "This subscription is active and the data is accessible.", + "The data referenced by this subscription is out of date and should be refreshed. This can happen when a data provider adds or removes datasets.", + "This subscription has been cancelled or revoked and the data is no longer accessible." + ], + "readOnly": true, + "type": "string" + }, + "subscriberContact": { + "description": "Output only. Email of the subscriber.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "TestIamPermissionsRequest": { "description": "Request message for `TestIamPermissions` method.", "id": "TestIamPermissionsRequest", diff --git a/analyticshub/v1beta1/analyticshub-gen.go b/analyticshub/v1beta1/analyticshub-gen.go index b3edcd8e459..88caacd6e17 100644 --- a/analyticshub/v1beta1/analyticshub-gen.go +++ b/analyticshub/v1beta1/analyticshub-gen.go @@ -761,6 +761,36 @@ func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LinkedResource: Reference to a linked resource tracked by this +// Subscription. +type LinkedResource struct { + // LinkedDataset: Output only. Name of the linked dataset, e.g. + // projects/subscriberproject/datasets/linked_dataset + LinkedDataset string `json:"linkedDataset,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LinkedDataset") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LinkedDataset") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LinkedResource) MarshalJSON() ([]byte, error) { + type NoMethod LinkedResource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListDataExchangesResponse: Message for response to the list of data // exchanges. type ListDataExchangesResponse struct { @@ -1184,6 +1214,35 @@ func (s *Publisher) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RefreshSubscriptionResponse: Message for response when you refresh a +// subscription. +type RefreshSubscriptionResponse struct { + // Subscription: The refreshed subscription resource. + Subscription *Subscription `json:"subscription,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Subscription") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Subscription") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RefreshSubscriptionResponse) MarshalJSON() ([]byte, error) { + type NoMethod RefreshSubscriptionResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RestrictedExportConfig: Restricted export config, used to configure // restricted export on linked dataset. type RestrictedExportConfig struct { @@ -1258,6 +1317,35 @@ func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SubscribeDataExchangeResponse: Message for response when you +// subscribe to a Data Exchange. +type SubscribeDataExchangeResponse struct { + // Subscription: Subscription object created from this subscribe action. + Subscription *Subscription `json:"subscription,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Subscription") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Subscription") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SubscribeDataExchangeResponse) MarshalJSON() ([]byte, error) { + type NoMethod SubscribeDataExchangeResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SubscribeListingRequest: Message for subscribing to a listing. type SubscribeListingRequest struct { // DestinationDataset: BigQuery destination dataset to create for the @@ -1296,6 +1384,87 @@ type SubscribeListingResponse struct { googleapi.ServerResponse `json:"-"` } +// Subscription: A subscription represents a subscribers' access to a +// particular set of published data. It contains references to +// associated listings, data exchanges, and linked datasets. +// TODO(b/267528977) Consider port the new resource to v1beta1 and +// dataexchange APIs. +type Subscription struct { + // CreationTime: Output only. Timestamp when the subscription was + // created. + CreationTime string `json:"creationTime,omitempty"` + + // DataExchange: Output only. Resource name of the source Data Exchange. + // e.g. projects/123/locations/US/dataExchanges/456 + DataExchange string `json:"dataExchange,omitempty"` + + // LastModifyTime: Output only. Timestamp when the subscription was last + // modified. + LastModifyTime string `json:"lastModifyTime,omitempty"` + + // LinkedDatasetMap: Output only. Map of listing resource names to + // associated linked resource, e.g. + // projects/123/locations/US/dataExchanges/456/listings/789 -> + // projects/123/datasets/my_dataset For listing-level subscriptions, + // this is a map of size 1. Only contains values if state == + // STATE_ACTIVE. + LinkedDatasetMap map[string]LinkedResource `json:"linkedDatasetMap,omitempty"` + + // Listing: Output only. Resource name of the source Listing. e.g. + // projects/123/locations/US/dataExchanges/456/listings/789 + Listing string `json:"listing,omitempty"` + + // Name: Output only. The resource name of the subscription. e.g. + // `projects/myproject/locations/US/subscriptions/123`. + Name string `json:"name,omitempty"` + + // OrganizationDisplayName: Output only. Display name of the project of + // this subscription. + OrganizationDisplayName string `json:"organizationDisplayName,omitempty"` + + // OrganizationId: Output only. Organization of the project this + // subscription belongs to. + OrganizationId string `json:"organizationId,omitempty"` + + // State: Output only. Current state of the subscription. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default value. This value is unused. + // "STATE_ACTIVE" - This subscription is active and the data is + // accessible. + // "STATE_STALE" - The data referenced by this subscription is out of + // date and should be refreshed. This can happen when a data provider + // adds or removes datasets. + // "STATE_INACTIVE" - This subscription has been cancelled or revoked + // and the data is no longer accessible. + State string `json:"state,omitempty"` + + // SubscriberContact: Output only. Email of the subscriber. + SubscriberContact string `json:"subscriberContact,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreationTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreationTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Subscription) MarshalJSON() ([]byte, error) { + type NoMethod Subscription + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // TestIamPermissionsRequest: Request message for `TestIamPermissions` // method. type TestIamPermissionsRequest struct { diff --git a/api-list.json b/api-list.json index f5ed9037ec0..6176e1a31fa 100644 --- a/api-list.json +++ b/api-list.json @@ -1186,21 +1186,6 @@ "documentationLink": "https://cloud.google.com/channel", "preferred": true }, - { - "kind": "discovery#directoryItem", - "id": "clouddebugger:v2", - "name": "clouddebugger", - "version": "v2", - "title": "Cloud Debugger API (Deprecated)", - "description": "Examines the call stack and variables of a running application without stopping or slowing it down. (Deprecated)", - "discoveryRestUrl": "https://clouddebugger.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/debugger", - "preferred": true - }, { "kind": "discovery#directoryItem", "id": "clouddeploy:v1", diff --git a/connectors/v1/connectors-api.json b/connectors/v1/connectors-api.json index cf760d10763..d34d61fb74b 100644 --- a/connectors/v1/connectors-api.json +++ b/connectors/v1/connectors-api.json @@ -1773,7 +1773,7 @@ } } }, - "revision": "20230724", + "revision": "20230801", "rootUrl": "https://connectors.googleapis.com/", "schemas": { "AuditConfig": { @@ -2450,6 +2450,11 @@ "description": "This cofiguration provides infra configs like rate limit threshold which need to be configurable for every connector version", "id": "ConnectorInfraConfig", "properties": { + "internalclientRatelimitThreshold": { + "description": "Max QPS supported for internal requests originating from Connd.", + "format": "int64", + "type": "string" + }, "ratelimitThreshold": { "description": "Max QPS supported by the connector version before throttling of requests.", "format": "int64", @@ -2585,6 +2590,12 @@ "description": "This cofiguration provides infra configs like rate limit threshold which need to be configurable for every connector version", "id": "ConnectorVersionInfraConfig", "properties": { + "internalclientRatelimitThreshold": { + "description": "Output only. Max QPS supported for internal requests originating from Connd.", + "format": "int64", + "readOnly": true, + "type": "string" + }, "ratelimitThreshold": { "description": "Output only. Max QPS supported by the connector version before throttling of requests.", "format": "int64", @@ -4187,7 +4198,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "auditConfigs": { diff --git a/connectors/v1/connectors-gen.go b/connectors/v1/connectors-gen.go index b545cbbe5f9..558786f4ffc 100644 --- a/connectors/v1/connectors-gen.go +++ b/connectors/v1/connectors-gen.go @@ -1114,25 +1114,30 @@ func (s *Connector) MarshalJSON() ([]byte, error) { // rate limit threshold which need to be configurable for every // connector version type ConnectorInfraConfig struct { + // InternalclientRatelimitThreshold: Max QPS supported for internal + // requests originating from Connd. + InternalclientRatelimitThreshold int64 `json:"internalclientRatelimitThreshold,omitempty,string"` + // RatelimitThreshold: Max QPS supported by the connector version before // throttling of requests. RatelimitThreshold int64 `json:"ratelimitThreshold,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "RatelimitThreshold") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "InternalclientRatelimitThreshold") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RatelimitThreshold") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. + // "InternalclientRatelimitThreshold") to include in API requests with + // the JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -1251,25 +1256,30 @@ func (s *ConnectorVersion) MarshalJSON() ([]byte, error) { // like rate limit threshold which need to be configurable for every // connector version type ConnectorVersionInfraConfig struct { + // InternalclientRatelimitThreshold: Output only. Max QPS supported for + // internal requests originating from Connd. + InternalclientRatelimitThreshold int64 `json:"internalclientRatelimitThreshold,omitempty,string"` + // RatelimitThreshold: Output only. Max QPS supported by the connector // version before throttling of requests. RatelimitThreshold int64 `json:"ratelimitThreshold,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "RatelimitThreshold") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "InternalclientRatelimitThreshold") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RatelimitThreshold") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. + // "InternalclientRatelimitThreshold") to include in API requests with + // the JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -3416,7 +3426,7 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -3425,17 +3435,17 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. diff --git a/youtube/v3/youtube-api.json b/youtube/v3/youtube-api.json index ecafabe4938..f2c6443880f 100644 --- a/youtube/v3/youtube-api.json +++ b/youtube/v3/youtube-api.json @@ -3833,7 +3833,7 @@ } } }, - "revision": "20230711", + "revision": "20230806", "rootUrl": "https://youtube.googleapis.com/", "schemas": { "AbuseReport": { @@ -7434,6 +7434,41 @@ }, "type": "object" }, + "CuepointSchedule": { + "description": "Schedule to insert cuepoints into a broadcast by ads automator.", + "id": "CuepointSchedule", + "properties": { + "enabled": { + "description": "This field is semantically required. If it is set false or not set, other fields in this message will be ignored.", + "type": "boolean" + }, + "pauseAdsUntil": { + "description": "If set, automatic cuepoint insertion is paused until this timestamp (\"No Ad Zone\").", + "format": "google-datetime", + "type": "string" + }, + "repeatInterval": { + "description": "Interval frequency that api uses to insert cuepoints automatically.", + "format": "google-duration", + "type": "string" + }, + "scheduleStrategy": { + "description": "The strategy to use when scheduling cuepoints.", + "enum": [ + "scheduleStrategyUnspecified", + "concurrent", + "nonConcurrent" + ], + "enumDescriptions": [ + "", + "Strategy to schedule cuepoints at one time for all viewers.", + "Strategy to schedule cuepoints at an increased rate to allow viewers to receive cuepoints when eligible. See go/lcr-non-concurrent-ads for more details." + ], + "type": "string" + } + }, + "type": "object" + }, "Entity": { "id": "Entity", "properties": { @@ -7894,6 +7929,10 @@ "description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#liveBroadcast\".", "type": "string" }, + "monetizationDetails": { + "$ref": "LiveBroadcastMonetizationDetails", + "description": "The monetizationDetails object contains information about the event's monetization details." + }, "snippet": { "$ref": "LiveBroadcastSnippet", "description": "The snippet object contains basic details about the event, including its title, description, start time, and end time." @@ -8083,6 +8122,16 @@ }, "type": "object" }, + "LiveBroadcastMonetizationDetails": { + "description": "Monetization settings of a broadcast.", + "id": "LiveBroadcastMonetizationDetails", + "properties": { + "cuepointSchedule": { + "$ref": "CuepointSchedule" + } + }, + "type": "object" + }, "LiveBroadcastSnippet": { "description": "Basic broadcast information.", "id": "LiveBroadcastSnippet", diff --git a/youtube/v3/youtube-gen.go b/youtube/v3/youtube-gen.go index 5996d29991b..dfdb93543be 100644 --- a/youtube/v3/youtube-gen.go +++ b/youtube/v3/youtube-gen.go @@ -4142,6 +4142,55 @@ func (s *Cuepoint) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CuepointSchedule: Schedule to insert cuepoints into a broadcast by +// ads automator. +type CuepointSchedule struct { + // Enabled: This field is semantically required. If it is set false or + // not set, other fields in this message will be ignored. + Enabled bool `json:"enabled,omitempty"` + + // PauseAdsUntil: If set, automatic cuepoint insertion is paused until + // this timestamp ("No Ad Zone"). + PauseAdsUntil string `json:"pauseAdsUntil,omitempty"` + + // RepeatInterval: Interval frequency that api uses to insert cuepoints + // automatically. + RepeatInterval string `json:"repeatInterval,omitempty"` + + // ScheduleStrategy: The strategy to use when scheduling cuepoints. + // + // Possible values: + // "scheduleStrategyUnspecified" + // "concurrent" - Strategy to schedule cuepoints at one time for all + // viewers. + // "nonConcurrent" - Strategy to schedule cuepoints at an increased + // rate to allow viewers to receive cuepoints when eligible. See + // go/lcr-non-concurrent-ads for more details. + ScheduleStrategy string `json:"scheduleStrategy,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enabled") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CuepointSchedule) MarshalJSON() ([]byte, error) { + type NoMethod CuepointSchedule + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type Entity struct { Id string `json:"id,omitempty"` @@ -4840,6 +4889,10 @@ type LiveBroadcast struct { // string "youtube#liveBroadcast". Kind string `json:"kind,omitempty"` + // MonetizationDetails: The monetizationDetails object contains + // information about the event's monetization details. + MonetizationDetails *LiveBroadcastMonetizationDetails `json:"monetizationDetails,omitempty"` + // Snippet: The snippet object contains basic details about the event, // including its title, description, start time, and end time. Snippet *LiveBroadcastSnippet `json:"snippet,omitempty"` @@ -5085,6 +5138,35 @@ func (s *LiveBroadcastListResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LiveBroadcastMonetizationDetails: Monetization settings of a +// broadcast. +type LiveBroadcastMonetizationDetails struct { + CuepointSchedule *CuepointSchedule `json:"cuepointSchedule,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CuepointSchedule") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CuepointSchedule") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *LiveBroadcastMonetizationDetails) MarshalJSON() ([]byte, error) { + type NoMethod LiveBroadcastMonetizationDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // LiveBroadcastSnippet: Basic broadcast information. type LiveBroadcastSnippet struct { // ActualEndTime: The date and time that the broadcast actually ended.