...

Source file src/google.golang.org/api/analyticshub/v1/analyticshub-gen.go

Documentation: google.golang.org/api/analyticshub/v1

     1  // Copyright 2024 Google LLC.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated file. DO NOT EDIT.
     6  
     7  // Package analyticshub provides access to the Analytics Hub API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/bigquery/docs/analytics-hub-introduction
    10  //
    11  // # Library status
    12  //
    13  // These client libraries are officially supported by Google. However, this
    14  // library is considered complete and is in maintenance mode. This means
    15  // that we will address critical bugs and security issues but will not add
    16  // any new features.
    17  //
    18  // When possible, we recommend using our newer
    19  // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
    20  // that are still actively being worked and iterated on.
    21  //
    22  // # Creating a client
    23  //
    24  // Usage example:
    25  //
    26  //	import "google.golang.org/api/analyticshub/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	analyticshubService, err := analyticshub.NewService(ctx)
    30  //
    31  // In this example, Google Application Default Credentials are used for
    32  // authentication. For information on how to create and obtain Application
    33  // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    34  //
    35  // # Other authentication options
    36  //
    37  // By default, all available scopes (see "Constants") are used to authenticate.
    38  // To restrict scopes, use [google.golang.org/api/option.WithScopes]:
    39  //
    40  //	analyticshubService, err := analyticshub.NewService(ctx, option.WithScopes(analyticshub.CloudPlatformScope))
    41  //
    42  // To use an API key for authentication (note: some APIs do not support API
    43  // keys), use [google.golang.org/api/option.WithAPIKey]:
    44  //
    45  //	analyticshubService, err := analyticshub.NewService(ctx, option.WithAPIKey("AIza..."))
    46  //
    47  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    48  // flow, use [google.golang.org/api/option.WithTokenSource]:
    49  //
    50  //	config := &oauth2.Config{...}
    51  //	// ...
    52  //	token, err := config.Exchange(ctx, ...)
    53  //	analyticshubService, err := analyticshub.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    54  //
    55  // See [google.golang.org/api/option.ClientOption] for details on options.
    56  package analyticshub // import "google.golang.org/api/analyticshub/v1"
    57  
    58  import (
    59  	"bytes"
    60  	"context"
    61  	"encoding/json"
    62  	"errors"
    63  	"fmt"
    64  	"io"
    65  	"net/http"
    66  	"net/url"
    67  	"strconv"
    68  	"strings"
    69  
    70  	googleapi "google.golang.org/api/googleapi"
    71  	internal "google.golang.org/api/internal"
    72  	gensupport "google.golang.org/api/internal/gensupport"
    73  	option "google.golang.org/api/option"
    74  	internaloption "google.golang.org/api/option/internaloption"
    75  	htransport "google.golang.org/api/transport/http"
    76  )
    77  
    78  // Always reference these packages, just in case the auto-generated code
    79  // below doesn't.
    80  var _ = bytes.NewBuffer
    81  var _ = strconv.Itoa
    82  var _ = fmt.Sprintf
    83  var _ = json.NewDecoder
    84  var _ = io.Copy
    85  var _ = url.Parse
    86  var _ = gensupport.MarshalJSON
    87  var _ = googleapi.Version
    88  var _ = errors.New
    89  var _ = strings.Replace
    90  var _ = context.Canceled
    91  var _ = internaloption.WithDefaultEndpoint
    92  var _ = internal.Version
    93  
    94  const apiId = "analyticshub:v1"
    95  const apiName = "analyticshub"
    96  const apiVersion = "v1"
    97  const basePath = "https://analyticshub.googleapis.com/"
    98  const basePathTemplate = "https://analyticshub.UNIVERSE_DOMAIN/"
    99  const mtlsBasePath = "https://analyticshub.mtls.googleapis.com/"
   100  
   101  // OAuth2 scopes used by this API.
   102  const (
   103  	// View and manage your data in Google BigQuery and see the email address for
   104  	// your Google Account
   105  	BigqueryScope = "https://www.googleapis.com/auth/bigquery"
   106  
   107  	// See, edit, configure, and delete your Google Cloud data and see the email
   108  	// address for your Google Account.
   109  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
   110  )
   111  
   112  // NewService creates a new Service.
   113  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   114  	scopesOption := internaloption.WithDefaultScopes(
   115  		"https://www.googleapis.com/auth/bigquery",
   116  		"https://www.googleapis.com/auth/cloud-platform",
   117  	)
   118  	// NOTE: prepend, so we don't override user-specified scopes.
   119  	opts = append([]option.ClientOption{scopesOption}, opts...)
   120  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   121  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   122  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   123  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   124  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   125  	if err != nil {
   126  		return nil, err
   127  	}
   128  	s, err := New(client)
   129  	if err != nil {
   130  		return nil, err
   131  	}
   132  	if endpoint != "" {
   133  		s.BasePath = endpoint
   134  	}
   135  	return s, nil
   136  }
   137  
   138  // New creates a new Service. It uses the provided http.Client for requests.
   139  //
   140  // Deprecated: please use NewService instead.
   141  // To provide a custom HTTP client, use option.WithHTTPClient.
   142  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   143  func New(client *http.Client) (*Service, error) {
   144  	if client == nil {
   145  		return nil, errors.New("client is nil")
   146  	}
   147  	s := &Service{client: client, BasePath: basePath}
   148  	s.Organizations = NewOrganizationsService(s)
   149  	s.Projects = NewProjectsService(s)
   150  	return s, nil
   151  }
   152  
   153  type Service struct {
   154  	client    *http.Client
   155  	BasePath  string // API endpoint base URL
   156  	UserAgent string // optional additional User-Agent fragment
   157  
   158  	Organizations *OrganizationsService
   159  
   160  	Projects *ProjectsService
   161  }
   162  
   163  func (s *Service) userAgent() string {
   164  	if s.UserAgent == "" {
   165  		return googleapi.UserAgent
   166  	}
   167  	return googleapi.UserAgent + " " + s.UserAgent
   168  }
   169  
   170  func NewOrganizationsService(s *Service) *OrganizationsService {
   171  	rs := &OrganizationsService{s: s}
   172  	rs.Locations = NewOrganizationsLocationsService(s)
   173  	return rs
   174  }
   175  
   176  type OrganizationsService struct {
   177  	s *Service
   178  
   179  	Locations *OrganizationsLocationsService
   180  }
   181  
   182  func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService {
   183  	rs := &OrganizationsLocationsService{s: s}
   184  	rs.DataExchanges = NewOrganizationsLocationsDataExchangesService(s)
   185  	return rs
   186  }
   187  
   188  type OrganizationsLocationsService struct {
   189  	s *Service
   190  
   191  	DataExchanges *OrganizationsLocationsDataExchangesService
   192  }
   193  
   194  func NewOrganizationsLocationsDataExchangesService(s *Service) *OrganizationsLocationsDataExchangesService {
   195  	rs := &OrganizationsLocationsDataExchangesService{s: s}
   196  	return rs
   197  }
   198  
   199  type OrganizationsLocationsDataExchangesService struct {
   200  	s *Service
   201  }
   202  
   203  func NewProjectsService(s *Service) *ProjectsService {
   204  	rs := &ProjectsService{s: s}
   205  	rs.Locations = NewProjectsLocationsService(s)
   206  	return rs
   207  }
   208  
   209  type ProjectsService struct {
   210  	s *Service
   211  
   212  	Locations *ProjectsLocationsService
   213  }
   214  
   215  func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
   216  	rs := &ProjectsLocationsService{s: s}
   217  	rs.DataExchanges = NewProjectsLocationsDataExchangesService(s)
   218  	rs.Subscriptions = NewProjectsLocationsSubscriptionsService(s)
   219  	return rs
   220  }
   221  
   222  type ProjectsLocationsService struct {
   223  	s *Service
   224  
   225  	DataExchanges *ProjectsLocationsDataExchangesService
   226  
   227  	Subscriptions *ProjectsLocationsSubscriptionsService
   228  }
   229  
   230  func NewProjectsLocationsDataExchangesService(s *Service) *ProjectsLocationsDataExchangesService {
   231  	rs := &ProjectsLocationsDataExchangesService{s: s}
   232  	rs.Listings = NewProjectsLocationsDataExchangesListingsService(s)
   233  	return rs
   234  }
   235  
   236  type ProjectsLocationsDataExchangesService struct {
   237  	s *Service
   238  
   239  	Listings *ProjectsLocationsDataExchangesListingsService
   240  }
   241  
   242  func NewProjectsLocationsDataExchangesListingsService(s *Service) *ProjectsLocationsDataExchangesListingsService {
   243  	rs := &ProjectsLocationsDataExchangesListingsService{s: s}
   244  	return rs
   245  }
   246  
   247  type ProjectsLocationsDataExchangesListingsService struct {
   248  	s *Service
   249  }
   250  
   251  func NewProjectsLocationsSubscriptionsService(s *Service) *ProjectsLocationsSubscriptionsService {
   252  	rs := &ProjectsLocationsSubscriptionsService{s: s}
   253  	return rs
   254  }
   255  
   256  type ProjectsLocationsSubscriptionsService struct {
   257  	s *Service
   258  }
   259  
   260  // AuditConfig: Specifies the audit configuration for a service. The
   261  // configuration determines which permission types are logged, and what
   262  // identities, if any, are exempted from logging. An AuditConfig must have one
   263  // or more AuditLogConfigs. If there are AuditConfigs for both `allServices`
   264  // and a specific service, the union of the two AuditConfigs is used for that
   265  // service: the log_types specified in each AuditConfig are enabled, and the
   266  // exempted_members in each AuditLogConfig are exempted. Example Policy with
   267  // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices",
   268  // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [
   269  // "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type":
   270  // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com",
   271  // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type":
   272  // "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For
   273  // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
   274  // logging. It also exempts `jose@example.com` from DATA_READ logging, and
   275  // `aliya@example.com` from DATA_WRITE logging.
   276  type AuditConfig struct {
   277  	// AuditLogConfigs: The configuration for logging of each type of permission.
   278  	AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
   279  	// Service: Specifies a service that will be enabled for audit logging. For
   280  	// example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices`
   281  	// is a special value that covers all services.
   282  	Service string `json:"service,omitempty"`
   283  	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
   284  	// unconditionally include in API requests. By default, fields with empty or
   285  	// default values are omitted from API requests. See
   286  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   287  	// details.
   288  	ForceSendFields []string `json:"-"`
   289  	// NullFields is a list of field names (e.g. "AuditLogConfigs") to include in
   290  	// API requests with the JSON null value. By default, fields with empty values
   291  	// are omitted from API requests. See
   292  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   293  	NullFields []string `json:"-"`
   294  }
   295  
   296  func (s *AuditConfig) MarshalJSON() ([]byte, error) {
   297  	type NoMethod AuditConfig
   298  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   299  }
   300  
   301  // AuditLogConfig: Provides the configuration for logging a type of
   302  // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ",
   303  // "exempted_members": [ "user:jose@example.com" ] }, { "log_type":
   304  // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while
   305  // exempting jose@example.com from DATA_READ logging.
   306  type AuditLogConfig struct {
   307  	// ExemptedMembers: Specifies the identities that do not cause logging for this
   308  	// type of permission. Follows the same format of Binding.members.
   309  	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
   310  	// LogType: The log type that this config enables.
   311  	//
   312  	// Possible values:
   313  	//   "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
   314  	//   "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
   315  	//   "DATA_WRITE" - Data writes. Example: CloudSQL Users create
   316  	//   "DATA_READ" - Data reads. Example: CloudSQL Users list
   317  	LogType string `json:"logType,omitempty"`
   318  	// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
   319  	// unconditionally include in API requests. By default, fields with empty or
   320  	// default values are omitted from API requests. See
   321  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   322  	// details.
   323  	ForceSendFields []string `json:"-"`
   324  	// NullFields is a list of field names (e.g. "ExemptedMembers") to include in
   325  	// API requests with the JSON null value. By default, fields with empty values
   326  	// are omitted from API requests. See
   327  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   328  	NullFields []string `json:"-"`
   329  }
   330  
   331  func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
   332  	type NoMethod AuditLogConfig
   333  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   334  }
   335  
   336  // BigQueryDatasetSource: A reference to a shared dataset. It is an existing
   337  // BigQuery dataset with a collection of objects such as tables and views that
   338  // you want to share with subscribers. When subscriber's subscribe to a
   339  // listing, Analytics Hub creates a linked dataset in the subscriber's project.
   340  // A Linked dataset is an opaque, read-only BigQuery dataset that serves as a
   341  // _symbolic link_ to a shared dataset.
   342  type BigQueryDatasetSource struct {
   343  	// Dataset: Resource name of the dataset source for this listing. e.g.
   344  	// `projects/myproject/datasets/123`
   345  	Dataset string `json:"dataset,omitempty"`
   346  	// RestrictedExportPolicy: Optional. If set, restricted export policy will be
   347  	// propagated and enforced on the linked dataset.
   348  	RestrictedExportPolicy *RestrictedExportPolicy `json:"restrictedExportPolicy,omitempty"`
   349  	// SelectedResources: Optional. Resources in this dataset that are selectively
   350  	// shared. If this field is empty, then the entire dataset (all resources) are
   351  	// shared. This field is only valid for data clean room exchanges.
   352  	SelectedResources []*SelectedResource `json:"selectedResources,omitempty"`
   353  	// ForceSendFields is a list of field names (e.g. "Dataset") to unconditionally
   354  	// include in API requests. By default, fields with empty or default values are
   355  	// omitted from API requests. See
   356  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   357  	// details.
   358  	ForceSendFields []string `json:"-"`
   359  	// NullFields is a list of field names (e.g. "Dataset") to include in API
   360  	// requests with the JSON null value. By default, fields with empty values are
   361  	// omitted from API requests. See
   362  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   363  	NullFields []string `json:"-"`
   364  }
   365  
   366  func (s *BigQueryDatasetSource) MarshalJSON() ([]byte, error) {
   367  	type NoMethod BigQueryDatasetSource
   368  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   369  }
   370  
   371  // Binding: Associates `members`, or principals, with a `role`.
   372  type Binding struct {
   373  	// Condition: The condition that is associated with this binding. If the
   374  	// condition evaluates to `true`, then this binding applies to the current
   375  	// request. If the condition evaluates to `false`, then this binding does not
   376  	// apply to the current request. However, a different role binding might grant
   377  	// the same role to one or more of the principals in this binding. To learn
   378  	// which resources support conditions in their IAM policies, see the IAM
   379  	// documentation
   380  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
   381  	Condition *Expr `json:"condition,omitempty"`
   382  	// Members: Specifies the principals requesting access for a Google Cloud
   383  	// resource. `members` can have the following values: * `allUsers`: A special
   384  	// identifier that represents anyone who is on the internet; with or without a
   385  	// Google account. * `allAuthenticatedUsers`: A special identifier that
   386  	// represents anyone who is authenticated with a Google account or a service
   387  	// account. Does not include identities that come from external identity
   388  	// providers (IdPs) through identity federation. * `user:{emailid}`: An email
   389  	// address that represents a specific Google account. For example,
   390  	// `alice@example.com` . * `serviceAccount:{emailid}`: An email address that
   391  	// represents a Google service account. For example,
   392  	// `my-other-app@appspot.gserviceaccount.com`. *
   393  	// `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
   394  	// identifier for a Kubernetes service account
   395  	// (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
   396  	// For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
   397  	// `group:{emailid}`: An email address that represents a Google group. For
   398  	// example, `admins@example.com`. * `domain:{domain}`: The G Suite domain
   399  	// (primary) that represents all the users of that domain. For example,
   400  	// `google.com` or `example.com`. *
   401  	// `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub
   402  	// ject/{subject_attribute_value}`: A single identity in a workforce identity
   403  	// pool. *
   404  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   405  	// group/{group_id}`: All workforce identities in a group. *
   406  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   407  	// attribute.{attribute_name}/{attribute_value}`: All workforce identities with
   408  	// a specific attribute value. *
   409  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   410  	// *`: All identities in a workforce identity pool. *
   411  	// `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo
   412  	// rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single
   413  	// identity in a workload identity pool. *
   414  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   415  	// /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool
   416  	// group. *
   417  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   418  	// /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}
   419  	// `: All identities in a workload identity pool with a certain attribute. *
   420  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   421  	// /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity
   422  	// pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus
   423  	// unique identifier) representing a user that has been recently deleted. For
   424  	// example, `alice@example.com?uid=123456789012345678901`. If the user is
   425  	// recovered, this value reverts to `user:{emailid}` and the recovered user
   426  	// retains the role in the binding. *
   427  	// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
   428  	// unique identifier) representing a service account that has been recently
   429  	// deleted. For example,
   430  	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the
   431  	// service account is undeleted, this value reverts to
   432  	// `serviceAccount:{emailid}` and the undeleted service account retains the
   433  	// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
   434  	// address (plus unique identifier) representing a Google group that has been
   435  	// recently deleted. For example,
   436  	// `admins@example.com?uid=123456789012345678901`. If the group is recovered,
   437  	// this value reverts to `group:{emailid}` and the recovered group retains the
   438  	// role in the binding. *
   439  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool
   440  	// _id}/subject/{subject_attribute_value}`: Deleted single identity in a
   441  	// workforce identity pool. For example,
   442  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po
   443  	// ol-id/subject/my-subject-attribute-value`.
   444  	Members []string `json:"members,omitempty"`
   445  	// Role: Role that is assigned to the list of `members`, or principals. For
   446  	// example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview
   447  	// of the IAM roles and permissions, see the IAM documentation
   448  	// (https://cloud.google.com/iam/docs/roles-overview). For a list of the
   449  	// available pre-defined roles, see here
   450  	// (https://cloud.google.com/iam/docs/understanding-roles).
   451  	Role string `json:"role,omitempty"`
   452  	// ForceSendFields is a list of field names (e.g. "Condition") to
   453  	// unconditionally include in API requests. By default, fields with empty or
   454  	// default values are omitted from API requests. See
   455  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   456  	// details.
   457  	ForceSendFields []string `json:"-"`
   458  	// NullFields is a list of field names (e.g. "Condition") to include in API
   459  	// requests with the JSON null value. By default, fields with empty values are
   460  	// omitted from API requests. See
   461  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   462  	NullFields []string `json:"-"`
   463  }
   464  
   465  func (s *Binding) MarshalJSON() ([]byte, error) {
   466  	type NoMethod Binding
   467  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   468  }
   469  
   470  // DataExchange: A data exchange is a container that lets you share data. Along
   471  // with the descriptive information about the data exchange, it contains
   472  // listings that reference shared datasets.
   473  type DataExchange struct {
   474  	// Description: Optional. Description of the data exchange. The description
   475  	// must not contain Unicode non-characters as well as C0 and C1 control codes
   476  	// except tabs (HT), new lines (LF), carriage returns (CR), and page breaks
   477  	// (FF). Default value is an empty string. Max length: 2000 bytes.
   478  	Description string `json:"description,omitempty"`
   479  	// DisplayName: Required. Human-readable display name of the data exchange. The
   480  	// display name must contain only Unicode letters, numbers (0-9), underscores
   481  	// (_), dashes (-), spaces ( ), ampersands (&) and must not start or end with
   482  	// spaces. Default value is an empty string. Max length: 63 bytes.
   483  	DisplayName string `json:"displayName,omitempty"`
   484  	// Documentation: Optional. Documentation describing the data exchange.
   485  	Documentation string `json:"documentation,omitempty"`
   486  	// Icon: Optional. Base64 encoded image representing the data exchange. Max
   487  	// Size: 3.0MiB Expected image dimensions are 512x512 pixels, however the API
   488  	// only performs validation on size of the encoded data. Note: For byte fields,
   489  	// the content of the fields are base64-encoded (which increases the size of
   490  	// the data by 33-36%) when using JSON on the wire.
   491  	Icon string `json:"icon,omitempty"`
   492  	// ListingCount: Output only. Number of listings contained in the data
   493  	// exchange.
   494  	ListingCount int64 `json:"listingCount,omitempty"`
   495  	// Name: Output only. The resource name of the data exchange. e.g.
   496  	// `projects/myproject/locations/US/dataExchanges/123`.
   497  	Name string `json:"name,omitempty"`
   498  	// PrimaryContact: Optional. Email or URL of the primary point of contact of
   499  	// the data exchange. Max Length: 1000 bytes.
   500  	PrimaryContact string `json:"primaryContact,omitempty"`
   501  	// SharingEnvironmentConfig: Optional. Configurable data sharing environment
   502  	// option for a data exchange.
   503  	SharingEnvironmentConfig *SharingEnvironmentConfig `json:"sharingEnvironmentConfig,omitempty"`
   504  
   505  	// ServerResponse contains the HTTP response code and headers from the server.
   506  	googleapi.ServerResponse `json:"-"`
   507  	// ForceSendFields is a list of field names (e.g. "Description") to
   508  	// unconditionally include in API requests. By default, fields with empty or
   509  	// default values are omitted from API requests. See
   510  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   511  	// details.
   512  	ForceSendFields []string `json:"-"`
   513  	// NullFields is a list of field names (e.g. "Description") to include in API
   514  	// requests with the JSON null value. By default, fields with empty values are
   515  	// omitted from API requests. See
   516  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   517  	NullFields []string `json:"-"`
   518  }
   519  
   520  func (s *DataExchange) MarshalJSON() ([]byte, error) {
   521  	type NoMethod DataExchange
   522  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   523  }
   524  
   525  // DataProvider: Contains details of the data provider.
   526  type DataProvider struct {
   527  	// Name: Optional. Name of the data provider.
   528  	Name string `json:"name,omitempty"`
   529  	// PrimaryContact: Optional. Email or URL of the data provider. Max Length:
   530  	// 1000 bytes.
   531  	PrimaryContact string `json:"primaryContact,omitempty"`
   532  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
   533  	// include in API requests. By default, fields with empty or default values are
   534  	// omitted from API requests. See
   535  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   536  	// details.
   537  	ForceSendFields []string `json:"-"`
   538  	// NullFields is a list of field names (e.g. "Name") to include in API requests
   539  	// with the JSON null value. By default, fields with empty values are omitted
   540  	// from API requests. See
   541  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   542  	NullFields []string `json:"-"`
   543  }
   544  
   545  func (s *DataProvider) MarshalJSON() ([]byte, error) {
   546  	type NoMethod DataProvider
   547  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   548  }
   549  
   550  // DcrExchangeConfig: Data Clean Room (DCR), used for privacy-safe and secured
   551  // data sharing.
   552  type DcrExchangeConfig struct {
   553  	// SingleLinkedDatasetPerCleanroom: Output only. If True, when subscribing to
   554  	// this DCR, it will create only one linked dataset containing all resources
   555  	// shared within the cleanroom. If False, when subscribing to this DCR, it will
   556  	// create 1 linked dataset per listing. This is not configurable, and by
   557  	// default, all new DCRs will have the restriction set to True.
   558  	SingleLinkedDatasetPerCleanroom bool `json:"singleLinkedDatasetPerCleanroom,omitempty"`
   559  	// SingleSelectedResourceSharingRestriction: Output only. If True, this DCR
   560  	// restricts the contributors to sharing only a single resource in a Listing.
   561  	// And no two resources should have the same IDs. So if a contributor adds a
   562  	// view with a conflicting name, the CreateListing API will reject the request.
   563  	// if False, the data contributor can publish an entire dataset (as before).
   564  	// This is not configurable, and by default, all new DCRs will have the
   565  	// restriction set to True.
   566  	SingleSelectedResourceSharingRestriction bool `json:"singleSelectedResourceSharingRestriction,omitempty"`
   567  	// ForceSendFields is a list of field names (e.g.
   568  	// "SingleLinkedDatasetPerCleanroom") to unconditionally include in API
   569  	// requests. By default, fields with empty or default values are omitted from
   570  	// API requests. See
   571  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   572  	// details.
   573  	ForceSendFields []string `json:"-"`
   574  	// NullFields is a list of field names (e.g. "SingleLinkedDatasetPerCleanroom")
   575  	// to include in API requests with the JSON null value. By default, fields with
   576  	// empty values are omitted from API requests. See
   577  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   578  	NullFields []string `json:"-"`
   579  }
   580  
   581  func (s *DcrExchangeConfig) MarshalJSON() ([]byte, error) {
   582  	type NoMethod DcrExchangeConfig
   583  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   584  }
   585  
   586  // DefaultExchangeConfig: Default Analytics Hub data exchange, used for secured
   587  // data sharing.
   588  type DefaultExchangeConfig struct {
   589  }
   590  
   591  // DestinationDataset: Defines the destination bigquery dataset.
   592  type DestinationDataset struct {
   593  	// DatasetReference: Required. A reference that identifies the destination
   594  	// dataset.
   595  	DatasetReference *DestinationDatasetReference `json:"datasetReference,omitempty"`
   596  	// Description: Optional. A user-friendly description of the dataset.
   597  	Description string `json:"description,omitempty"`
   598  	// FriendlyName: Optional. A descriptive name for the dataset.
   599  	FriendlyName string `json:"friendlyName,omitempty"`
   600  	// Labels: Optional. The labels associated with this dataset. You can use these
   601  	// to organize and group your datasets. You can set this property when
   602  	// inserting or updating a dataset. See
   603  	// https://cloud.google.com/resource-manager/docs/creating-managing-labels for
   604  	// more information.
   605  	Labels map[string]string `json:"labels,omitempty"`
   606  	// Location: Required. The geographic location where the dataset should reside.
   607  	// See https://cloud.google.com/bigquery/docs/locations for supported
   608  	// locations.
   609  	Location string `json:"location,omitempty"`
   610  	// ForceSendFields is a list of field names (e.g. "DatasetReference") to
   611  	// unconditionally include in API requests. By default, fields with empty or
   612  	// default values are omitted from API requests. See
   613  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   614  	// details.
   615  	ForceSendFields []string `json:"-"`
   616  	// NullFields is a list of field names (e.g. "DatasetReference") to include in
   617  	// API requests with the JSON null value. By default, fields with empty values
   618  	// are omitted from API requests. See
   619  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   620  	NullFields []string `json:"-"`
   621  }
   622  
   623  func (s *DestinationDataset) MarshalJSON() ([]byte, error) {
   624  	type NoMethod DestinationDataset
   625  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   626  }
   627  
   628  // DestinationDatasetReference: Contains the reference that identifies a
   629  // destination bigquery dataset.
   630  type DestinationDatasetReference struct {
   631  	// DatasetId: Required. A unique ID for this dataset, without the project name.
   632  	// The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores
   633  	// (_). The maximum length is 1,024 characters.
   634  	DatasetId string `json:"datasetId,omitempty"`
   635  	// ProjectId: Required. The ID of the project containing this dataset.
   636  	ProjectId string `json:"projectId,omitempty"`
   637  	// ForceSendFields is a list of field names (e.g. "DatasetId") to
   638  	// unconditionally include in API requests. By default, fields with empty or
   639  	// default values are omitted from API requests. See
   640  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   641  	// details.
   642  	ForceSendFields []string `json:"-"`
   643  	// NullFields is a list of field names (e.g. "DatasetId") to include in API
   644  	// requests with the JSON null value. By default, fields with empty values are
   645  	// omitted from API requests. See
   646  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   647  	NullFields []string `json:"-"`
   648  }
   649  
   650  func (s *DestinationDatasetReference) MarshalJSON() ([]byte, error) {
   651  	type NoMethod DestinationDatasetReference
   652  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   653  }
   654  
   655  // Empty: A generic empty message that you can re-use to avoid defining
   656  // duplicated empty messages in your APIs. A typical example is to use it as
   657  // the request or the response type of an API method. For instance: service Foo
   658  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
   659  type Empty struct {
   660  	// ServerResponse contains the HTTP response code and headers from the server.
   661  	googleapi.ServerResponse `json:"-"`
   662  }
   663  
   664  // Expr: Represents a textual expression in the Common Expression Language
   665  // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
   666  // of CEL are documented at https://github.com/google/cel-spec. Example
   667  // (Comparison): title: "Summary size limit" description: "Determines if a
   668  // summary is less than 100 chars" expression: "document.summary.size() < 100"
   669  // Example (Equality): title: "Requestor is owner" description: "Determines if
   670  // requestor is the document owner" expression: "document.owner ==
   671  // request.auth.claims.email" Example (Logic): title: "Public documents"
   672  // description: "Determine whether the document should be publicly visible"
   673  // expression: "document.type != 'private' && document.type != 'internal'"
   674  // Example (Data Manipulation): title: "Notification string" description:
   675  // "Create a notification string with a timestamp." expression: "'New message
   676  // received at ' + string(document.create_time)" The exact variables and
   677  // functions that may be referenced within an expression are determined by the
   678  // service that evaluates it. See the service documentation for additional
   679  // information.
   680  type Expr struct {
   681  	// Description: Optional. Description of the expression. This is a longer text
   682  	// which describes the expression, e.g. when hovered over it in a UI.
   683  	Description string `json:"description,omitempty"`
   684  	// Expression: Textual representation of an expression in Common Expression
   685  	// Language syntax.
   686  	Expression string `json:"expression,omitempty"`
   687  	// Location: Optional. String indicating the location of the expression for
   688  	// error reporting, e.g. a file name and a position in the file.
   689  	Location string `json:"location,omitempty"`
   690  	// Title: Optional. Title for the expression, i.e. a short string describing
   691  	// its purpose. This can be used e.g. in UIs which allow to enter the
   692  	// expression.
   693  	Title string `json:"title,omitempty"`
   694  	// ForceSendFields is a list of field names (e.g. "Description") to
   695  	// unconditionally include in API requests. By default, fields with empty or
   696  	// default values are omitted from API requests. See
   697  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   698  	// details.
   699  	ForceSendFields []string `json:"-"`
   700  	// NullFields is a list of field names (e.g. "Description") to include in API
   701  	// requests with the JSON null value. By default, fields with empty values are
   702  	// omitted from API requests. See
   703  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   704  	NullFields []string `json:"-"`
   705  }
   706  
   707  func (s *Expr) MarshalJSON() ([]byte, error) {
   708  	type NoMethod Expr
   709  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   710  }
   711  
   712  // GetIamPolicyRequest: Request message for `GetIamPolicy` method.
   713  type GetIamPolicyRequest struct {
   714  	// Options: OPTIONAL: A `GetPolicyOptions` object for specifying options to
   715  	// `GetIamPolicy`.
   716  	Options *GetPolicyOptions `json:"options,omitempty"`
   717  	// ForceSendFields is a list of field names (e.g. "Options") to unconditionally
   718  	// include in API requests. By default, fields with empty or default values are
   719  	// omitted from API requests. See
   720  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   721  	// details.
   722  	ForceSendFields []string `json:"-"`
   723  	// NullFields is a list of field names (e.g. "Options") to include in API
   724  	// requests with the JSON null value. By default, fields with empty values are
   725  	// omitted from API requests. See
   726  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   727  	NullFields []string `json:"-"`
   728  }
   729  
   730  func (s *GetIamPolicyRequest) MarshalJSON() ([]byte, error) {
   731  	type NoMethod GetIamPolicyRequest
   732  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   733  }
   734  
   735  // GetPolicyOptions: Encapsulates settings provided to GetIamPolicy.
   736  type GetPolicyOptions struct {
   737  	// RequestedPolicyVersion: Optional. The maximum policy version that will be
   738  	// used to format the policy. Valid values are 0, 1, and 3. Requests specifying
   739  	// an invalid value will be rejected. Requests for policies with any
   740  	// conditional role bindings must specify version 3. Policies with no
   741  	// conditional role bindings may specify any valid value or leave the field
   742  	// unset. The policy in the response might use the policy version that you
   743  	// specified, or it might use a lower policy version. For example, if you
   744  	// specify version 3, but the policy has no conditional role bindings, the
   745  	// response uses version 1. To learn which resources support conditions in
   746  	// their IAM policies, see the IAM documentation
   747  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
   748  	RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"`
   749  	// ForceSendFields is a list of field names (e.g. "RequestedPolicyVersion") to
   750  	// unconditionally include in API requests. By default, fields with empty or
   751  	// default values are omitted from API requests. See
   752  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   753  	// details.
   754  	ForceSendFields []string `json:"-"`
   755  	// NullFields is a list of field names (e.g. "RequestedPolicyVersion") to
   756  	// include in API requests with the JSON null value. By default, fields with
   757  	// empty values are omitted from API requests. See
   758  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   759  	NullFields []string `json:"-"`
   760  }
   761  
   762  func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) {
   763  	type NoMethod GetPolicyOptions
   764  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   765  }
   766  
   767  // LinkedResource: Reference to a linked resource tracked by this Subscription.
   768  type LinkedResource struct {
   769  	// LinkedDataset: Output only. Name of the linked dataset, e.g.
   770  	// projects/subscriberproject/datasets/linked_dataset
   771  	LinkedDataset string `json:"linkedDataset,omitempty"`
   772  	// ForceSendFields is a list of field names (e.g. "LinkedDataset") to
   773  	// unconditionally include in API requests. By default, fields with empty or
   774  	// default values are omitted from API requests. See
   775  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   776  	// details.
   777  	ForceSendFields []string `json:"-"`
   778  	// NullFields is a list of field names (e.g. "LinkedDataset") to include in API
   779  	// requests with the JSON null value. By default, fields with empty values are
   780  	// omitted from API requests. See
   781  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   782  	NullFields []string `json:"-"`
   783  }
   784  
   785  func (s *LinkedResource) MarshalJSON() ([]byte, error) {
   786  	type NoMethod LinkedResource
   787  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   788  }
   789  
   790  // ListDataExchangesResponse: Message for response to the list of data
   791  // exchanges.
   792  type ListDataExchangesResponse struct {
   793  	// DataExchanges: The list of data exchanges.
   794  	DataExchanges []*DataExchange `json:"dataExchanges,omitempty"`
   795  	// NextPageToken: A token to request the next page of results.
   796  	NextPageToken string `json:"nextPageToken,omitempty"`
   797  
   798  	// ServerResponse contains the HTTP response code and headers from the server.
   799  	googleapi.ServerResponse `json:"-"`
   800  	// ForceSendFields is a list of field names (e.g. "DataExchanges") to
   801  	// unconditionally include in API requests. By default, fields with empty or
   802  	// default values are omitted from API requests. See
   803  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   804  	// details.
   805  	ForceSendFields []string `json:"-"`
   806  	// NullFields is a list of field names (e.g. "DataExchanges") to include in API
   807  	// requests with the JSON null value. By default, fields with empty values are
   808  	// omitted from API requests. See
   809  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   810  	NullFields []string `json:"-"`
   811  }
   812  
   813  func (s *ListDataExchangesResponse) MarshalJSON() ([]byte, error) {
   814  	type NoMethod ListDataExchangesResponse
   815  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   816  }
   817  
   818  // ListListingsResponse: Message for response to the list of Listings.
   819  type ListListingsResponse struct {
   820  	// Listings: The list of Listing.
   821  	Listings []*Listing `json:"listings,omitempty"`
   822  	// NextPageToken: A token to request the next page of results.
   823  	NextPageToken string `json:"nextPageToken,omitempty"`
   824  
   825  	// ServerResponse contains the HTTP response code and headers from the server.
   826  	googleapi.ServerResponse `json:"-"`
   827  	// ForceSendFields is a list of field names (e.g. "Listings") to
   828  	// unconditionally include in API requests. By default, fields with empty or
   829  	// default values are omitted from API requests. See
   830  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   831  	// details.
   832  	ForceSendFields []string `json:"-"`
   833  	// NullFields is a list of field names (e.g. "Listings") to include in API
   834  	// requests with the JSON null value. By default, fields with empty values are
   835  	// omitted from API requests. See
   836  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   837  	NullFields []string `json:"-"`
   838  }
   839  
   840  func (s *ListListingsResponse) MarshalJSON() ([]byte, error) {
   841  	type NoMethod ListListingsResponse
   842  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   843  }
   844  
   845  // ListOrgDataExchangesResponse: Message for response to listing data exchanges
   846  // in an organization and location.
   847  type ListOrgDataExchangesResponse struct {
   848  	// DataExchanges: The list of data exchanges.
   849  	DataExchanges []*DataExchange `json:"dataExchanges,omitempty"`
   850  	// NextPageToken: A token to request the next page of results.
   851  	NextPageToken string `json:"nextPageToken,omitempty"`
   852  
   853  	// ServerResponse contains the HTTP response code and headers from the server.
   854  	googleapi.ServerResponse `json:"-"`
   855  	// ForceSendFields is a list of field names (e.g. "DataExchanges") to
   856  	// unconditionally include in API requests. By default, fields with empty or
   857  	// default values are omitted from API requests. See
   858  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   859  	// details.
   860  	ForceSendFields []string `json:"-"`
   861  	// NullFields is a list of field names (e.g. "DataExchanges") to include in API
   862  	// requests with the JSON null value. By default, fields with empty values are
   863  	// omitted from API requests. See
   864  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   865  	NullFields []string `json:"-"`
   866  }
   867  
   868  func (s *ListOrgDataExchangesResponse) MarshalJSON() ([]byte, error) {
   869  	type NoMethod ListOrgDataExchangesResponse
   870  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   871  }
   872  
   873  // ListSharedResourceSubscriptionsResponse: Message for response to the listing
   874  // of shared resource subscriptions.
   875  type ListSharedResourceSubscriptionsResponse struct {
   876  	// NextPageToken: Next page token.
   877  	NextPageToken string `json:"nextPageToken,omitempty"`
   878  	// SharedResourceSubscriptions: The list of subscriptions.
   879  	SharedResourceSubscriptions []*Subscription `json:"sharedResourceSubscriptions,omitempty"`
   880  
   881  	// ServerResponse contains the HTTP response code and headers from the server.
   882  	googleapi.ServerResponse `json:"-"`
   883  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   884  	// unconditionally include in API requests. By default, fields with empty or
   885  	// default values are omitted from API requests. See
   886  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   887  	// details.
   888  	ForceSendFields []string `json:"-"`
   889  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   890  	// requests with the JSON null value. By default, fields with empty values are
   891  	// omitted from API requests. See
   892  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   893  	NullFields []string `json:"-"`
   894  }
   895  
   896  func (s *ListSharedResourceSubscriptionsResponse) MarshalJSON() ([]byte, error) {
   897  	type NoMethod ListSharedResourceSubscriptionsResponse
   898  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   899  }
   900  
   901  // ListSubscriptionsResponse: Message for response to the listing of
   902  // subscriptions.
   903  type ListSubscriptionsResponse struct {
   904  	// NextPageToken: Next page token.
   905  	NextPageToken string `json:"nextPageToken,omitempty"`
   906  	// Subscriptions: The list of subscriptions.
   907  	Subscriptions []*Subscription `json:"subscriptions,omitempty"`
   908  
   909  	// ServerResponse contains the HTTP response code and headers from the server.
   910  	googleapi.ServerResponse `json:"-"`
   911  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   912  	// unconditionally include in API requests. By default, fields with empty or
   913  	// default values are omitted from API requests. See
   914  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   915  	// details.
   916  	ForceSendFields []string `json:"-"`
   917  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   918  	// requests with the JSON null value. By default, fields with empty values are
   919  	// omitted from API requests. See
   920  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   921  	NullFields []string `json:"-"`
   922  }
   923  
   924  func (s *ListSubscriptionsResponse) MarshalJSON() ([]byte, error) {
   925  	type NoMethod ListSubscriptionsResponse
   926  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   927  }
   928  
   929  // Listing: A listing is what gets published into a data exchange that a
   930  // subscriber can subscribe to. It contains a reference to the data source
   931  // along with descriptive information that will help subscribers find and
   932  // subscribe the data.
   933  type Listing struct {
   934  	// BigqueryDataset: Required. Shared dataset i.e. BigQuery dataset source.
   935  	BigqueryDataset *BigQueryDatasetSource `json:"bigqueryDataset,omitempty"`
   936  	// Categories: Optional. Categories of the listing. Up to two categories are
   937  	// allowed.
   938  	//
   939  	// Possible values:
   940  	//   "CATEGORY_UNSPECIFIED"
   941  	//   "CATEGORY_OTHERS"
   942  	//   "CATEGORY_ADVERTISING_AND_MARKETING"
   943  	//   "CATEGORY_COMMERCE"
   944  	//   "CATEGORY_CLIMATE_AND_ENVIRONMENT"
   945  	//   "CATEGORY_DEMOGRAPHICS"
   946  	//   "CATEGORY_ECONOMICS"
   947  	//   "CATEGORY_EDUCATION"
   948  	//   "CATEGORY_ENERGY"
   949  	//   "CATEGORY_FINANCIAL"
   950  	//   "CATEGORY_GAMING"
   951  	//   "CATEGORY_GEOSPATIAL"
   952  	//   "CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE"
   953  	//   "CATEGORY_MEDIA"
   954  	//   "CATEGORY_PUBLIC_SECTOR"
   955  	//   "CATEGORY_RETAIL"
   956  	//   "CATEGORY_SPORTS"
   957  	//   "CATEGORY_SCIENCE_AND_RESEARCH"
   958  	//   "CATEGORY_TRANSPORTATION_AND_LOGISTICS"
   959  	//   "CATEGORY_TRAVEL_AND_TOURISM"
   960  	Categories []string `json:"categories,omitempty"`
   961  	// DataProvider: Optional. Details of the data provider who owns the source
   962  	// data.
   963  	DataProvider *DataProvider `json:"dataProvider,omitempty"`
   964  	// Description: Optional. Short description of the listing. The description
   965  	// must not contain Unicode non-characters and C0 and C1 control codes except
   966  	// tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF).
   967  	// Default value is an empty string. Max length: 2000 bytes.
   968  	Description string `json:"description,omitempty"`
   969  	// DisplayName: Required. Human-readable display name of the listing. The
   970  	// display name must contain only Unicode letters, numbers (0-9), underscores
   971  	// (_), dashes (-), spaces ( ), ampersands (&) and can't start or end with
   972  	// spaces. Default value is an empty string. Max length: 63 bytes.
   973  	DisplayName string `json:"displayName,omitempty"`
   974  	// Documentation: Optional. Documentation describing the listing.
   975  	Documentation string `json:"documentation,omitempty"`
   976  	// Icon: Optional. Base64 encoded image representing the listing. Max Size:
   977  	// 3.0MiB Expected image dimensions are 512x512 pixels, however the API only
   978  	// performs validation on size of the encoded data. Note: For byte fields, the
   979  	// contents of the field are base64-encoded (which increases the size of the
   980  	// data by 33-36%) when using JSON on the wire.
   981  	Icon string `json:"icon,omitempty"`
   982  	// Name: Output only. The resource name of the listing. e.g.
   983  	// `projects/myproject/locations/US/dataExchanges/123/listings/456`
   984  	Name string `json:"name,omitempty"`
   985  	// PrimaryContact: Optional. Email or URL of the primary point of contact of
   986  	// the listing. Max Length: 1000 bytes.
   987  	PrimaryContact string `json:"primaryContact,omitempty"`
   988  	// Publisher: Optional. Details of the publisher who owns the listing and who
   989  	// can share the source data.
   990  	Publisher *Publisher `json:"publisher,omitempty"`
   991  	// RequestAccess: Optional. Email or URL of the request access of the listing.
   992  	// Subscribers can use this reference to request access. Max Length: 1000
   993  	// bytes.
   994  	RequestAccess string `json:"requestAccess,omitempty"`
   995  	// RestrictedExportConfig: Optional. If set, restricted export configuration
   996  	// will be propagated and enforced on the linked dataset.
   997  	RestrictedExportConfig *RestrictedExportConfig `json:"restrictedExportConfig,omitempty"`
   998  	// State: Output only. Current state of the listing.
   999  	//
  1000  	// Possible values:
  1001  	//   "STATE_UNSPECIFIED" - Default value. This value is unused.
  1002  	//   "ACTIVE" - Subscribable state. Users with dataexchange.listings.subscribe
  1003  	// permission can subscribe to this listing.
  1004  	State string `json:"state,omitempty"`
  1005  
  1006  	// ServerResponse contains the HTTP response code and headers from the server.
  1007  	googleapi.ServerResponse `json:"-"`
  1008  	// ForceSendFields is a list of field names (e.g. "BigqueryDataset") to
  1009  	// unconditionally include in API requests. By default, fields with empty or
  1010  	// default values are omitted from API requests. See
  1011  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1012  	// details.
  1013  	ForceSendFields []string `json:"-"`
  1014  	// NullFields is a list of field names (e.g. "BigqueryDataset") to include in
  1015  	// API requests with the JSON null value. By default, fields with empty values
  1016  	// are omitted from API requests. See
  1017  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1018  	NullFields []string `json:"-"`
  1019  }
  1020  
  1021  func (s *Listing) MarshalJSON() ([]byte, error) {
  1022  	type NoMethod Listing
  1023  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1024  }
  1025  
  1026  // Operation: This resource represents a long-running operation that is the
  1027  // result of a network API call.
  1028  type Operation struct {
  1029  	// Done: If the value is `false`, it means the operation is still in progress.
  1030  	// If `true`, the operation is completed, and either `error` or `response` is
  1031  	// available.
  1032  	Done bool `json:"done,omitempty"`
  1033  	// Error: The error result of the operation in case of failure or cancellation.
  1034  	Error *Status `json:"error,omitempty"`
  1035  	// Metadata: Service-specific metadata associated with the operation. It
  1036  	// typically contains progress information and common metadata such as create
  1037  	// time. Some services might not provide such metadata. Any method that returns
  1038  	// a long-running operation should document the metadata type, if any.
  1039  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1040  	// Name: The server-assigned name, which is only unique within the same service
  1041  	// that originally returns it. If you use the default HTTP mapping, the `name`
  1042  	// should be a resource name ending with `operations/{unique_id}`.
  1043  	Name string `json:"name,omitempty"`
  1044  	// Response: The normal, successful response of the operation. If the original
  1045  	// method returns no data on success, such as `Delete`, the response is
  1046  	// `google.protobuf.Empty`. If the original method is standard
  1047  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  1048  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  1049  	// original method name. For example, if the original method name is
  1050  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  1051  	Response googleapi.RawMessage `json:"response,omitempty"`
  1052  
  1053  	// ServerResponse contains the HTTP response code and headers from the server.
  1054  	googleapi.ServerResponse `json:"-"`
  1055  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  1056  	// include in API requests. By default, fields with empty or default values are
  1057  	// omitted from API requests. See
  1058  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1059  	// details.
  1060  	ForceSendFields []string `json:"-"`
  1061  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  1062  	// with the JSON null value. By default, fields with empty values are omitted
  1063  	// from API requests. See
  1064  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1065  	NullFields []string `json:"-"`
  1066  }
  1067  
  1068  func (s *Operation) MarshalJSON() ([]byte, error) {
  1069  	type NoMethod Operation
  1070  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1071  }
  1072  
  1073  // OperationMetadata: Represents the metadata of a long-running operation in
  1074  // Analytics Hub.
  1075  type OperationMetadata struct {
  1076  	// ApiVersion: Output only. API version used to start the operation.
  1077  	ApiVersion string `json:"apiVersion,omitempty"`
  1078  	// CreateTime: Output only. The time the operation was created.
  1079  	CreateTime string `json:"createTime,omitempty"`
  1080  	// EndTime: Output only. The time the operation finished running.
  1081  	EndTime string `json:"endTime,omitempty"`
  1082  	// RequestedCancellation: Output only. Identifies whether the user has
  1083  	// requested cancellation of the operation. Operations that have successfully
  1084  	// been cancelled have Operation.error value with a google.rpc.Status.code of
  1085  	// 1, corresponding to `Code.CANCELLED`.
  1086  	RequestedCancellation bool `json:"requestedCancellation,omitempty"`
  1087  	// StatusMessage: Output only. Human-readable status of the operation, if any.
  1088  	StatusMessage string `json:"statusMessage,omitempty"`
  1089  	// Target: Output only. Server-defined resource path for the target of the
  1090  	// operation.
  1091  	Target string `json:"target,omitempty"`
  1092  	// Verb: Output only. Name of the verb executed by the operation.
  1093  	Verb string `json:"verb,omitempty"`
  1094  	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
  1095  	// unconditionally include in API requests. By default, fields with empty or
  1096  	// default values are omitted from API requests. See
  1097  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1098  	// details.
  1099  	ForceSendFields []string `json:"-"`
  1100  	// NullFields is a list of field names (e.g. "ApiVersion") to include in API
  1101  	// requests with the JSON null value. By default, fields with empty values are
  1102  	// omitted from API requests. See
  1103  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1104  	NullFields []string `json:"-"`
  1105  }
  1106  
  1107  func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  1108  	type NoMethod OperationMetadata
  1109  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1110  }
  1111  
  1112  // Policy: An Identity and Access Management (IAM) policy, which specifies
  1113  // access controls for Google Cloud resources. A `Policy` is a collection of
  1114  // `bindings`. A `binding` binds one or more `members`, or principals, to a
  1115  // single `role`. Principals can be user accounts, service accounts, Google
  1116  // groups, and domains (such as G Suite). A `role` is a named list of
  1117  // permissions; each `role` can be an IAM predefined role or a user-created
  1118  // custom role. For some types of Google Cloud resources, a `binding` can also
  1119  // specify a `condition`, which is a logical expression that allows access to a
  1120  // resource only if the expression evaluates to `true`. A condition can add
  1121  // constraints based on attributes of the request, the resource, or both. To
  1122  // learn which resources support conditions in their IAM policies, see the IAM
  1123  // documentation
  1124  // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
  1125  // example:** ``` { "bindings": [ { "role":
  1126  // "roles/resourcemanager.organizationAdmin", "members": [
  1127  // "user:mike@example.com", "group:admins@example.com", "domain:google.com",
  1128  // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role":
  1129  // "roles/resourcemanager.organizationViewer", "members": [
  1130  // "user:eve@example.com" ], "condition": { "title": "expirable access",
  1131  // "description": "Does not grant access after Sep 2020", "expression":
  1132  // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
  1133  // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
  1134  // members: - user:mike@example.com - group:admins@example.com -
  1135  // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
  1136  // role: roles/resourcemanager.organizationAdmin - members: -
  1137  // user:eve@example.com role: roles/resourcemanager.organizationViewer
  1138  // condition: title: expirable access description: Does not grant access after
  1139  // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
  1140  // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
  1141  // see the IAM documentation (https://cloud.google.com/iam/docs/).
  1142  type Policy struct {
  1143  	// AuditConfigs: Specifies cloud audit logging configuration for this policy.
  1144  	AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
  1145  	// Bindings: Associates a list of `members`, or principals, with a `role`.
  1146  	// Optionally, may specify a `condition` that determines how and when the
  1147  	// `bindings` are applied. Each of the `bindings` must contain at least one
  1148  	// principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
  1149  	// up to 250 of these principals can be Google groups. Each occurrence of a
  1150  	// principal counts towards these limits. For example, if the `bindings` grant
  1151  	// 50 different roles to `user:alice@example.com`, and not to any other
  1152  	// principal, then you can add another 1,450 principals to the `bindings` in
  1153  	// the `Policy`.
  1154  	Bindings []*Binding `json:"bindings,omitempty"`
  1155  	// Etag: `etag` is used for optimistic concurrency control as a way to help
  1156  	// prevent simultaneous updates of a policy from overwriting each other. It is
  1157  	// strongly suggested that systems make use of the `etag` in the
  1158  	// read-modify-write cycle to perform policy updates in order to avoid race
  1159  	// conditions: An `etag` is returned in the response to `getIamPolicy`, and
  1160  	// systems are expected to put that etag in the request to `setIamPolicy` to
  1161  	// ensure that their change will be applied to the same version of the policy.
  1162  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  1163  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  1164  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  1165  	// the conditions in the version `3` policy are lost.
  1166  	Etag string `json:"etag,omitempty"`
  1167  	// Version: Specifies the format of the policy. Valid values are `0`, `1`, and
  1168  	// `3`. Requests that specify an invalid value are rejected. Any operation that
  1169  	// affects conditional role bindings must specify version `3`. This requirement
  1170  	// applies to the following operations: * Getting a policy that includes a
  1171  	// conditional role binding * Adding a conditional role binding to a policy *
  1172  	// Changing a conditional role binding in a policy * Removing any role binding,
  1173  	// with or without a condition, from a policy that includes conditions
  1174  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  1175  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  1176  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  1177  	// the conditions in the version `3` policy are lost. If a policy does not
  1178  	// include any conditions, operations on that policy may specify any valid
  1179  	// version or leave the field unset. To learn which resources support
  1180  	// conditions in their IAM policies, see the IAM documentation
  1181  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  1182  	Version int64 `json:"version,omitempty"`
  1183  
  1184  	// ServerResponse contains the HTTP response code and headers from the server.
  1185  	googleapi.ServerResponse `json:"-"`
  1186  	// ForceSendFields is a list of field names (e.g. "AuditConfigs") to
  1187  	// unconditionally include in API requests. By default, fields with empty or
  1188  	// default values are omitted from API requests. See
  1189  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1190  	// details.
  1191  	ForceSendFields []string `json:"-"`
  1192  	// NullFields is a list of field names (e.g. "AuditConfigs") to include in API
  1193  	// requests with the JSON null value. By default, fields with empty values are
  1194  	// omitted from API requests. See
  1195  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1196  	NullFields []string `json:"-"`
  1197  }
  1198  
  1199  func (s *Policy) MarshalJSON() ([]byte, error) {
  1200  	type NoMethod Policy
  1201  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1202  }
  1203  
  1204  // Publisher: Contains details of the listing publisher.
  1205  type Publisher struct {
  1206  	// Name: Optional. Name of the listing publisher.
  1207  	Name string `json:"name,omitempty"`
  1208  	// PrimaryContact: Optional. Email or URL of the listing publisher. Max Length:
  1209  	// 1000 bytes.
  1210  	PrimaryContact string `json:"primaryContact,omitempty"`
  1211  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  1212  	// include in API requests. By default, fields with empty or default values are
  1213  	// omitted from API requests. See
  1214  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1215  	// details.
  1216  	ForceSendFields []string `json:"-"`
  1217  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  1218  	// with the JSON null value. By default, fields with empty values are omitted
  1219  	// from API requests. See
  1220  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1221  	NullFields []string `json:"-"`
  1222  }
  1223  
  1224  func (s *Publisher) MarshalJSON() ([]byte, error) {
  1225  	type NoMethod Publisher
  1226  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1227  }
  1228  
  1229  // RefreshSubscriptionRequest: Message for refreshing a subscription.
  1230  type RefreshSubscriptionRequest struct {
  1231  }
  1232  
  1233  // RefreshSubscriptionResponse: Message for response when you refresh a
  1234  // subscription.
  1235  type RefreshSubscriptionResponse struct {
  1236  	// Subscription: The refreshed subscription resource.
  1237  	Subscription *Subscription `json:"subscription,omitempty"`
  1238  	// ForceSendFields is a list of field names (e.g. "Subscription") to
  1239  	// unconditionally include in API requests. By default, fields with empty or
  1240  	// default values are omitted from API requests. See
  1241  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1242  	// details.
  1243  	ForceSendFields []string `json:"-"`
  1244  	// NullFields is a list of field names (e.g. "Subscription") to include in API
  1245  	// requests with the JSON null value. By default, fields with empty values are
  1246  	// omitted from API requests. See
  1247  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1248  	NullFields []string `json:"-"`
  1249  }
  1250  
  1251  func (s *RefreshSubscriptionResponse) MarshalJSON() ([]byte, error) {
  1252  	type NoMethod RefreshSubscriptionResponse
  1253  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1254  }
  1255  
  1256  // RestrictedExportConfig: Restricted export config, used to configure
  1257  // restricted export on linked dataset.
  1258  type RestrictedExportConfig struct {
  1259  	// Enabled: Optional. If true, enable restricted export.
  1260  	Enabled bool `json:"enabled,omitempty"`
  1261  	// RestrictDirectTableAccess: Output only. If true, restrict direct table
  1262  	// access(read api/tabledata.list) on linked table.
  1263  	RestrictDirectTableAccess bool `json:"restrictDirectTableAccess,omitempty"`
  1264  	// RestrictQueryResult: Optional. If true, restrict export of query result
  1265  	// derived from restricted linked dataset table.
  1266  	RestrictQueryResult bool `json:"restrictQueryResult,omitempty"`
  1267  	// ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
  1268  	// include in API requests. By default, fields with empty or default values are
  1269  	// omitted from API requests. See
  1270  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1271  	// details.
  1272  	ForceSendFields []string `json:"-"`
  1273  	// NullFields is a list of field names (e.g. "Enabled") to include in API
  1274  	// requests with the JSON null value. By default, fields with empty values are
  1275  	// omitted from API requests. See
  1276  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1277  	NullFields []string `json:"-"`
  1278  }
  1279  
  1280  func (s *RestrictedExportConfig) MarshalJSON() ([]byte, error) {
  1281  	type NoMethod RestrictedExportConfig
  1282  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1283  }
  1284  
  1285  // RestrictedExportPolicy: Restricted export policy used to configure
  1286  // restricted export on linked dataset.
  1287  type RestrictedExportPolicy struct {
  1288  	// Enabled: Optional. If true, enable restricted export.
  1289  	Enabled bool `json:"enabled,omitempty"`
  1290  	// RestrictDirectTableAccess: Optional. If true, restrict direct table access
  1291  	// (read api/tabledata.list) on linked table.
  1292  	RestrictDirectTableAccess bool `json:"restrictDirectTableAccess,omitempty"`
  1293  	// RestrictQueryResult: Optional. If true, restrict export of query result
  1294  	// derived from restricted linked dataset table.
  1295  	RestrictQueryResult bool `json:"restrictQueryResult,omitempty"`
  1296  	// ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
  1297  	// include in API requests. By default, fields with empty or default values are
  1298  	// omitted from API requests. See
  1299  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1300  	// details.
  1301  	ForceSendFields []string `json:"-"`
  1302  	// NullFields is a list of field names (e.g. "Enabled") to include in API
  1303  	// requests with the JSON null value. By default, fields with empty values are
  1304  	// omitted from API requests. See
  1305  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1306  	NullFields []string `json:"-"`
  1307  }
  1308  
  1309  func (s *RestrictedExportPolicy) MarshalJSON() ([]byte, error) {
  1310  	type NoMethod RestrictedExportPolicy
  1311  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1312  }
  1313  
  1314  // RevokeSubscriptionRequest: Message for revoking a subscription.
  1315  type RevokeSubscriptionRequest struct {
  1316  }
  1317  
  1318  // RevokeSubscriptionResponse: Message for response when you revoke a
  1319  // subscription.
  1320  type RevokeSubscriptionResponse struct {
  1321  	// ServerResponse contains the HTTP response code and headers from the server.
  1322  	googleapi.ServerResponse `json:"-"`
  1323  }
  1324  
  1325  // SelectedResource: Resource in this dataset that are selectively shared.
  1326  type SelectedResource struct {
  1327  	// Table: Optional. Format: For table:
  1328  	// `projects/{projectId}/datasets/{datasetId}/tables/{tableId}`
  1329  	// Example:"projects/test_project/datasets/test_dataset/tables/test_table"
  1330  	Table string `json:"table,omitempty"`
  1331  	// ForceSendFields is a list of field names (e.g. "Table") to unconditionally
  1332  	// include in API requests. By default, fields with empty or default values are
  1333  	// omitted from API requests. See
  1334  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1335  	// details.
  1336  	ForceSendFields []string `json:"-"`
  1337  	// NullFields is a list of field names (e.g. "Table") to include in API
  1338  	// requests with the JSON null value. By default, fields with empty values are
  1339  	// omitted from API requests. See
  1340  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1341  	NullFields []string `json:"-"`
  1342  }
  1343  
  1344  func (s *SelectedResource) MarshalJSON() ([]byte, error) {
  1345  	type NoMethod SelectedResource
  1346  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1347  }
  1348  
  1349  // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
  1350  type SetIamPolicyRequest struct {
  1351  	// Policy: REQUIRED: The complete policy to be applied to the `resource`. The
  1352  	// size of the policy is limited to a few 10s of KB. An empty policy is a valid
  1353  	// policy but certain Google Cloud services (such as Projects) might reject
  1354  	// them.
  1355  	Policy *Policy `json:"policy,omitempty"`
  1356  	// UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to
  1357  	// modify. Only the fields in the mask will be modified. If no mask is
  1358  	// provided, the following default mask is used: `paths: "bindings, etag"
  1359  	UpdateMask string `json:"updateMask,omitempty"`
  1360  	// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
  1361  	// include in API requests. By default, fields with empty or default values are
  1362  	// omitted from API requests. See
  1363  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1364  	// details.
  1365  	ForceSendFields []string `json:"-"`
  1366  	// NullFields is a list of field names (e.g. "Policy") to include in API
  1367  	// requests with the JSON null value. By default, fields with empty values are
  1368  	// omitted from API requests. See
  1369  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1370  	NullFields []string `json:"-"`
  1371  }
  1372  
  1373  func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  1374  	type NoMethod SetIamPolicyRequest
  1375  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1376  }
  1377  
  1378  // SharingEnvironmentConfig: Sharing environment is a behavior model for
  1379  // sharing data within a data exchange. This option is configurable for a data
  1380  // exchange.
  1381  type SharingEnvironmentConfig struct {
  1382  	// DcrExchangeConfig: Data Clean Room (DCR), used for privacy-safe and secured
  1383  	// data sharing.
  1384  	DcrExchangeConfig *DcrExchangeConfig `json:"dcrExchangeConfig,omitempty"`
  1385  	// DefaultExchangeConfig: Default Analytics Hub data exchange, used for secured
  1386  	// data sharing.
  1387  	DefaultExchangeConfig *DefaultExchangeConfig `json:"defaultExchangeConfig,omitempty"`
  1388  	// ForceSendFields is a list of field names (e.g. "DcrExchangeConfig") to
  1389  	// unconditionally include in API requests. By default, fields with empty or
  1390  	// default values are omitted from API requests. See
  1391  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1392  	// details.
  1393  	ForceSendFields []string `json:"-"`
  1394  	// NullFields is a list of field names (e.g. "DcrExchangeConfig") to include in
  1395  	// API requests with the JSON null value. By default, fields with empty values
  1396  	// are omitted from API requests. See
  1397  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1398  	NullFields []string `json:"-"`
  1399  }
  1400  
  1401  func (s *SharingEnvironmentConfig) MarshalJSON() ([]byte, error) {
  1402  	type NoMethod SharingEnvironmentConfig
  1403  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1404  }
  1405  
  1406  // Status: The `Status` type defines a logical error model that is suitable for
  1407  // different programming environments, including REST APIs and RPC APIs. It is
  1408  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  1409  // pieces of data: error code, error message, and error details. You can find
  1410  // out more about this error model and how to work with it in the API Design
  1411  // Guide (https://cloud.google.com/apis/design/errors).
  1412  type Status struct {
  1413  	// Code: The status code, which should be an enum value of google.rpc.Code.
  1414  	Code int64 `json:"code,omitempty"`
  1415  	// Details: A list of messages that carry the error details. There is a common
  1416  	// set of message types for APIs to use.
  1417  	Details []googleapi.RawMessage `json:"details,omitempty"`
  1418  	// Message: A developer-facing error message, which should be in English. Any
  1419  	// user-facing error message should be localized and sent in the
  1420  	// google.rpc.Status.details field, or localized by the client.
  1421  	Message string `json:"message,omitempty"`
  1422  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  1423  	// include in API requests. By default, fields with empty or default values are
  1424  	// omitted from API requests. See
  1425  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1426  	// details.
  1427  	ForceSendFields []string `json:"-"`
  1428  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  1429  	// with the JSON null value. By default, fields with empty values are omitted
  1430  	// from API requests. See
  1431  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1432  	NullFields []string `json:"-"`
  1433  }
  1434  
  1435  func (s *Status) MarshalJSON() ([]byte, error) {
  1436  	type NoMethod Status
  1437  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1438  }
  1439  
  1440  // SubscribeDataExchangeRequest: Message for subscribing to a Data Exchange.
  1441  type SubscribeDataExchangeRequest struct {
  1442  	// Destination: Required. The parent resource path of the Subscription. e.g.
  1443  	// `projects/subscriberproject/locations/US`
  1444  	Destination string `json:"destination,omitempty"`
  1445  	// SubscriberContact: Email of the subscriber.
  1446  	SubscriberContact string `json:"subscriberContact,omitempty"`
  1447  	// Subscription: Required. Name of the subscription to create. e.g.
  1448  	// `subscription1`
  1449  	Subscription string `json:"subscription,omitempty"`
  1450  	// ForceSendFields is a list of field names (e.g. "Destination") to
  1451  	// unconditionally include in API requests. By default, fields with empty or
  1452  	// default values are omitted from API requests. See
  1453  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1454  	// details.
  1455  	ForceSendFields []string `json:"-"`
  1456  	// NullFields is a list of field names (e.g. "Destination") to include in API
  1457  	// requests with the JSON null value. By default, fields with empty values are
  1458  	// omitted from API requests. See
  1459  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1460  	NullFields []string `json:"-"`
  1461  }
  1462  
  1463  func (s *SubscribeDataExchangeRequest) MarshalJSON() ([]byte, error) {
  1464  	type NoMethod SubscribeDataExchangeRequest
  1465  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1466  }
  1467  
  1468  // SubscribeDataExchangeResponse: Message for response when you subscribe to a
  1469  // Data Exchange.
  1470  type SubscribeDataExchangeResponse struct {
  1471  	// Subscription: Subscription object created from this subscribe action.
  1472  	Subscription *Subscription `json:"subscription,omitempty"`
  1473  	// ForceSendFields is a list of field names (e.g. "Subscription") to
  1474  	// unconditionally include in API requests. By default, fields with empty or
  1475  	// default values are omitted from API requests. See
  1476  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1477  	// details.
  1478  	ForceSendFields []string `json:"-"`
  1479  	// NullFields is a list of field names (e.g. "Subscription") to include in API
  1480  	// requests with the JSON null value. By default, fields with empty values are
  1481  	// omitted from API requests. See
  1482  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1483  	NullFields []string `json:"-"`
  1484  }
  1485  
  1486  func (s *SubscribeDataExchangeResponse) MarshalJSON() ([]byte, error) {
  1487  	type NoMethod SubscribeDataExchangeResponse
  1488  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1489  }
  1490  
  1491  // SubscribeListingRequest: Message for subscribing to a listing.
  1492  type SubscribeListingRequest struct {
  1493  	// DestinationDataset: Input only. BigQuery destination dataset to create for
  1494  	// the subscriber.
  1495  	DestinationDataset *DestinationDataset `json:"destinationDataset,omitempty"`
  1496  	// ForceSendFields is a list of field names (e.g. "DestinationDataset") to
  1497  	// unconditionally include in API requests. By default, fields with empty or
  1498  	// default values are omitted from API requests. See
  1499  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1500  	// details.
  1501  	ForceSendFields []string `json:"-"`
  1502  	// NullFields is a list of field names (e.g. "DestinationDataset") to include
  1503  	// in API requests with the JSON null value. By default, fields with empty
  1504  	// values are omitted from API requests. See
  1505  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1506  	NullFields []string `json:"-"`
  1507  }
  1508  
  1509  func (s *SubscribeListingRequest) MarshalJSON() ([]byte, error) {
  1510  	type NoMethod SubscribeListingRequest
  1511  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1512  }
  1513  
  1514  // SubscribeListingResponse: Message for response when you subscribe to a
  1515  // listing.
  1516  type SubscribeListingResponse struct {
  1517  	// Subscription: Subscription object created from this subscribe action.
  1518  	Subscription *Subscription `json:"subscription,omitempty"`
  1519  
  1520  	// ServerResponse contains the HTTP response code and headers from the server.
  1521  	googleapi.ServerResponse `json:"-"`
  1522  	// ForceSendFields is a list of field names (e.g. "Subscription") to
  1523  	// unconditionally include in API requests. By default, fields with empty or
  1524  	// default values are omitted from API requests. See
  1525  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1526  	// details.
  1527  	ForceSendFields []string `json:"-"`
  1528  	// NullFields is a list of field names (e.g. "Subscription") to include in API
  1529  	// requests with the JSON null value. By default, fields with empty values are
  1530  	// omitted from API requests. See
  1531  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1532  	NullFields []string `json:"-"`
  1533  }
  1534  
  1535  func (s *SubscribeListingResponse) MarshalJSON() ([]byte, error) {
  1536  	type NoMethod SubscribeListingResponse
  1537  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1538  }
  1539  
  1540  // Subscription: A subscription represents a subscribers' access to a
  1541  // particular set of published data. It contains references to associated
  1542  // listings, data exchanges, and linked datasets.
  1543  type Subscription struct {
  1544  	// CreationTime: Output only. Timestamp when the subscription was created.
  1545  	CreationTime string `json:"creationTime,omitempty"`
  1546  	// DataExchange: Output only. Resource name of the source Data Exchange. e.g.
  1547  	// projects/123/locations/US/dataExchanges/456
  1548  	DataExchange string `json:"dataExchange,omitempty"`
  1549  	// LastModifyTime: Output only. Timestamp when the subscription was last
  1550  	// modified.
  1551  	LastModifyTime string `json:"lastModifyTime,omitempty"`
  1552  	// LinkedDatasetMap: Output only. Map of listing resource names to associated
  1553  	// linked resource, e.g.
  1554  	// projects/123/locations/US/dataExchanges/456/listings/789 ->
  1555  	// projects/123/datasets/my_dataset For listing-level subscriptions, this is a
  1556  	// map of size 1. Only contains values if state == STATE_ACTIVE.
  1557  	LinkedDatasetMap map[string]LinkedResource `json:"linkedDatasetMap,omitempty"`
  1558  	// Listing: Output only. Resource name of the source Listing. e.g.
  1559  	// projects/123/locations/US/dataExchanges/456/listings/789
  1560  	Listing string `json:"listing,omitempty"`
  1561  	// Name: Output only. The resource name of the subscription. e.g.
  1562  	// `projects/myproject/locations/US/subscriptions/123`.
  1563  	Name string `json:"name,omitempty"`
  1564  	// OrganizationDisplayName: Output only. Display name of the project of this
  1565  	// subscription.
  1566  	OrganizationDisplayName string `json:"organizationDisplayName,omitempty"`
  1567  	// OrganizationId: Output only. Organization of the project this subscription
  1568  	// belongs to.
  1569  	OrganizationId string `json:"organizationId,omitempty"`
  1570  	// State: Output only. Current state of the subscription.
  1571  	//
  1572  	// Possible values:
  1573  	//   "STATE_UNSPECIFIED" - Default value. This value is unused.
  1574  	//   "STATE_ACTIVE" - This subscription is active and the data is accessible.
  1575  	//   "STATE_STALE" - The data referenced by this subscription is out of date
  1576  	// and should be refreshed. This can happen when a data provider adds or
  1577  	// removes datasets.
  1578  	//   "STATE_INACTIVE" - This subscription has been cancelled or revoked and the
  1579  	// data is no longer accessible.
  1580  	State string `json:"state,omitempty"`
  1581  	// SubscriberContact: Output only. Email of the subscriber.
  1582  	SubscriberContact string `json:"subscriberContact,omitempty"`
  1583  
  1584  	// ServerResponse contains the HTTP response code and headers from the server.
  1585  	googleapi.ServerResponse `json:"-"`
  1586  	// ForceSendFields is a list of field names (e.g. "CreationTime") to
  1587  	// unconditionally include in API requests. By default, fields with empty or
  1588  	// default values are omitted from API requests. See
  1589  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1590  	// details.
  1591  	ForceSendFields []string `json:"-"`
  1592  	// NullFields is a list of field names (e.g. "CreationTime") to include in API
  1593  	// requests with the JSON null value. By default, fields with empty values are
  1594  	// omitted from API requests. See
  1595  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1596  	NullFields []string `json:"-"`
  1597  }
  1598  
  1599  func (s *Subscription) MarshalJSON() ([]byte, error) {
  1600  	type NoMethod Subscription
  1601  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1602  }
  1603  
  1604  // TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
  1605  type TestIamPermissionsRequest struct {
  1606  	// Permissions: The set of permissions to check for the `resource`. Permissions
  1607  	// with wildcards (such as `*` or `storage.*`) are not allowed. For more
  1608  	// information see IAM Overview
  1609  	// (https://cloud.google.com/iam/docs/overview#permissions).
  1610  	Permissions []string `json:"permissions,omitempty"`
  1611  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  1612  	// unconditionally include in API requests. By default, fields with empty or
  1613  	// default values are omitted from API requests. See
  1614  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1615  	// details.
  1616  	ForceSendFields []string `json:"-"`
  1617  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  1618  	// requests with the JSON null value. By default, fields with empty values are
  1619  	// omitted from API requests. See
  1620  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1621  	NullFields []string `json:"-"`
  1622  }
  1623  
  1624  func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  1625  	type NoMethod TestIamPermissionsRequest
  1626  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1627  }
  1628  
  1629  // TestIamPermissionsResponse: Response message for `TestIamPermissions`
  1630  // method.
  1631  type TestIamPermissionsResponse struct {
  1632  	// Permissions: A subset of `TestPermissionsRequest.permissions` that the
  1633  	// caller is allowed.
  1634  	Permissions []string `json:"permissions,omitempty"`
  1635  
  1636  	// ServerResponse contains the HTTP response code and headers from the server.
  1637  	googleapi.ServerResponse `json:"-"`
  1638  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  1639  	// unconditionally include in API requests. By default, fields with empty or
  1640  	// default values are omitted from API requests. See
  1641  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1642  	// details.
  1643  	ForceSendFields []string `json:"-"`
  1644  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  1645  	// requests with the JSON null value. By default, fields with empty values are
  1646  	// omitted from API requests. See
  1647  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1648  	NullFields []string `json:"-"`
  1649  }
  1650  
  1651  func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  1652  	type NoMethod TestIamPermissionsResponse
  1653  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1654  }
  1655  
  1656  type OrganizationsLocationsDataExchangesListCall struct {
  1657  	s            *Service
  1658  	organization string
  1659  	urlParams_   gensupport.URLParams
  1660  	ifNoneMatch_ string
  1661  	ctx_         context.Context
  1662  	header_      http.Header
  1663  }
  1664  
  1665  // List: Lists all data exchanges from projects in a given organization and
  1666  // location.
  1667  //
  1668  //   - organization: The organization resource path of the projects containing
  1669  //     DataExchanges. e.g. `organizations/myorg/locations/US`.
  1670  func (r *OrganizationsLocationsDataExchangesService) List(organization string) *OrganizationsLocationsDataExchangesListCall {
  1671  	c := &OrganizationsLocationsDataExchangesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1672  	c.organization = organization
  1673  	return c
  1674  }
  1675  
  1676  // PageSize sets the optional parameter "pageSize": The maximum number of
  1677  // results to return in a single response page. Leverage the page tokens to
  1678  // iterate through the entire collection.
  1679  func (c *OrganizationsLocationsDataExchangesListCall) PageSize(pageSize int64) *OrganizationsLocationsDataExchangesListCall {
  1680  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1681  	return c
  1682  }
  1683  
  1684  // PageToken sets the optional parameter "pageToken": Page token, returned by a
  1685  // previous call, to request the next page of results.
  1686  func (c *OrganizationsLocationsDataExchangesListCall) PageToken(pageToken string) *OrganizationsLocationsDataExchangesListCall {
  1687  	c.urlParams_.Set("pageToken", pageToken)
  1688  	return c
  1689  }
  1690  
  1691  // Fields allows partial responses to be retrieved. See
  1692  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1693  // details.
  1694  func (c *OrganizationsLocationsDataExchangesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDataExchangesListCall {
  1695  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1696  	return c
  1697  }
  1698  
  1699  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1700  // object's ETag matches the given value. This is useful for getting updates
  1701  // only after the object has changed since the last request.
  1702  func (c *OrganizationsLocationsDataExchangesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsDataExchangesListCall {
  1703  	c.ifNoneMatch_ = entityTag
  1704  	return c
  1705  }
  1706  
  1707  // Context sets the context to be used in this call's Do method.
  1708  func (c *OrganizationsLocationsDataExchangesListCall) Context(ctx context.Context) *OrganizationsLocationsDataExchangesListCall {
  1709  	c.ctx_ = ctx
  1710  	return c
  1711  }
  1712  
  1713  // Header returns a http.Header that can be modified by the caller to add
  1714  // headers to the request.
  1715  func (c *OrganizationsLocationsDataExchangesListCall) Header() http.Header {
  1716  	if c.header_ == nil {
  1717  		c.header_ = make(http.Header)
  1718  	}
  1719  	return c.header_
  1720  }
  1721  
  1722  func (c *OrganizationsLocationsDataExchangesListCall) doRequest(alt string) (*http.Response, error) {
  1723  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1724  	if c.ifNoneMatch_ != "" {
  1725  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1726  	}
  1727  	var body io.Reader = nil
  1728  	c.urlParams_.Set("alt", alt)
  1729  	c.urlParams_.Set("prettyPrint", "false")
  1730  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+organization}/dataExchanges")
  1731  	urls += "?" + c.urlParams_.Encode()
  1732  	req, err := http.NewRequest("GET", urls, body)
  1733  	if err != nil {
  1734  		return nil, err
  1735  	}
  1736  	req.Header = reqHeaders
  1737  	googleapi.Expand(req.URL, map[string]string{
  1738  		"organization": c.organization,
  1739  	})
  1740  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1741  }
  1742  
  1743  // Do executes the "analyticshub.organizations.locations.dataExchanges.list" call.
  1744  // Any non-2xx status code is an error. Response headers are in either
  1745  // *ListOrgDataExchangesResponse.ServerResponse.Header or (if a response was
  1746  // returned at all) in error.(*googleapi.Error).Header. Use
  1747  // googleapi.IsNotModified to check whether the returned error was because
  1748  // http.StatusNotModified was returned.
  1749  func (c *OrganizationsLocationsDataExchangesListCall) Do(opts ...googleapi.CallOption) (*ListOrgDataExchangesResponse, error) {
  1750  	gensupport.SetOptions(c.urlParams_, opts...)
  1751  	res, err := c.doRequest("json")
  1752  	if res != nil && res.StatusCode == http.StatusNotModified {
  1753  		if res.Body != nil {
  1754  			res.Body.Close()
  1755  		}
  1756  		return nil, gensupport.WrapError(&googleapi.Error{
  1757  			Code:   res.StatusCode,
  1758  			Header: res.Header,
  1759  		})
  1760  	}
  1761  	if err != nil {
  1762  		return nil, err
  1763  	}
  1764  	defer googleapi.CloseBody(res)
  1765  	if err := googleapi.CheckResponse(res); err != nil {
  1766  		return nil, gensupport.WrapError(err)
  1767  	}
  1768  	ret := &ListOrgDataExchangesResponse{
  1769  		ServerResponse: googleapi.ServerResponse{
  1770  			Header:         res.Header,
  1771  			HTTPStatusCode: res.StatusCode,
  1772  		},
  1773  	}
  1774  	target := &ret
  1775  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1776  		return nil, err
  1777  	}
  1778  	return ret, nil
  1779  }
  1780  
  1781  // Pages invokes f for each page of results.
  1782  // A non-nil error returned from f will halt the iteration.
  1783  // The provided context supersedes any context provided to the Context method.
  1784  func (c *OrganizationsLocationsDataExchangesListCall) Pages(ctx context.Context, f func(*ListOrgDataExchangesResponse) error) error {
  1785  	c.ctx_ = ctx
  1786  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  1787  	for {
  1788  		x, err := c.Do()
  1789  		if err != nil {
  1790  			return err
  1791  		}
  1792  		if err := f(x); err != nil {
  1793  			return err
  1794  		}
  1795  		if x.NextPageToken == "" {
  1796  			return nil
  1797  		}
  1798  		c.PageToken(x.NextPageToken)
  1799  	}
  1800  }
  1801  
  1802  type ProjectsLocationsDataExchangesCreateCall struct {
  1803  	s            *Service
  1804  	parent       string
  1805  	dataexchange *DataExchange
  1806  	urlParams_   gensupport.URLParams
  1807  	ctx_         context.Context
  1808  	header_      http.Header
  1809  }
  1810  
  1811  // Create: Creates a new data exchange.
  1812  //
  1813  //   - parent: The parent resource path of the data exchange. e.g.
  1814  //     `projects/myproject/locations/US`.
  1815  func (r *ProjectsLocationsDataExchangesService) Create(parent string, dataexchange *DataExchange) *ProjectsLocationsDataExchangesCreateCall {
  1816  	c := &ProjectsLocationsDataExchangesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1817  	c.parent = parent
  1818  	c.dataexchange = dataexchange
  1819  	return c
  1820  }
  1821  
  1822  // DataExchangeId sets the optional parameter "dataExchangeId": Required. The
  1823  // ID of the data exchange. Must contain only Unicode letters, numbers (0-9),
  1824  // underscores (_). Should not use characters that require URL-escaping, or
  1825  // characters outside of ASCII, spaces. Max length: 100 bytes.
  1826  func (c *ProjectsLocationsDataExchangesCreateCall) DataExchangeId(dataExchangeId string) *ProjectsLocationsDataExchangesCreateCall {
  1827  	c.urlParams_.Set("dataExchangeId", dataExchangeId)
  1828  	return c
  1829  }
  1830  
  1831  // Fields allows partial responses to be retrieved. See
  1832  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1833  // details.
  1834  func (c *ProjectsLocationsDataExchangesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesCreateCall {
  1835  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1836  	return c
  1837  }
  1838  
  1839  // Context sets the context to be used in this call's Do method.
  1840  func (c *ProjectsLocationsDataExchangesCreateCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesCreateCall {
  1841  	c.ctx_ = ctx
  1842  	return c
  1843  }
  1844  
  1845  // Header returns a http.Header that can be modified by the caller to add
  1846  // headers to the request.
  1847  func (c *ProjectsLocationsDataExchangesCreateCall) Header() http.Header {
  1848  	if c.header_ == nil {
  1849  		c.header_ = make(http.Header)
  1850  	}
  1851  	return c.header_
  1852  }
  1853  
  1854  func (c *ProjectsLocationsDataExchangesCreateCall) doRequest(alt string) (*http.Response, error) {
  1855  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1856  	var body io.Reader = nil
  1857  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataexchange)
  1858  	if err != nil {
  1859  		return nil, err
  1860  	}
  1861  	c.urlParams_.Set("alt", alt)
  1862  	c.urlParams_.Set("prettyPrint", "false")
  1863  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataExchanges")
  1864  	urls += "?" + c.urlParams_.Encode()
  1865  	req, err := http.NewRequest("POST", urls, body)
  1866  	if err != nil {
  1867  		return nil, err
  1868  	}
  1869  	req.Header = reqHeaders
  1870  	googleapi.Expand(req.URL, map[string]string{
  1871  		"parent": c.parent,
  1872  	})
  1873  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1874  }
  1875  
  1876  // Do executes the "analyticshub.projects.locations.dataExchanges.create" call.
  1877  // Any non-2xx status code is an error. Response headers are in either
  1878  // *DataExchange.ServerResponse.Header or (if a response was returned at all)
  1879  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1880  // whether the returned error was because http.StatusNotModified was returned.
  1881  func (c *ProjectsLocationsDataExchangesCreateCall) Do(opts ...googleapi.CallOption) (*DataExchange, error) {
  1882  	gensupport.SetOptions(c.urlParams_, opts...)
  1883  	res, err := c.doRequest("json")
  1884  	if res != nil && res.StatusCode == http.StatusNotModified {
  1885  		if res.Body != nil {
  1886  			res.Body.Close()
  1887  		}
  1888  		return nil, gensupport.WrapError(&googleapi.Error{
  1889  			Code:   res.StatusCode,
  1890  			Header: res.Header,
  1891  		})
  1892  	}
  1893  	if err != nil {
  1894  		return nil, err
  1895  	}
  1896  	defer googleapi.CloseBody(res)
  1897  	if err := googleapi.CheckResponse(res); err != nil {
  1898  		return nil, gensupport.WrapError(err)
  1899  	}
  1900  	ret := &DataExchange{
  1901  		ServerResponse: googleapi.ServerResponse{
  1902  			Header:         res.Header,
  1903  			HTTPStatusCode: res.StatusCode,
  1904  		},
  1905  	}
  1906  	target := &ret
  1907  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1908  		return nil, err
  1909  	}
  1910  	return ret, nil
  1911  }
  1912  
  1913  type ProjectsLocationsDataExchangesDeleteCall struct {
  1914  	s          *Service
  1915  	name       string
  1916  	urlParams_ gensupport.URLParams
  1917  	ctx_       context.Context
  1918  	header_    http.Header
  1919  }
  1920  
  1921  // Delete: Deletes an existing data exchange.
  1922  //
  1923  //   - name: The full name of the data exchange resource that you want to delete.
  1924  //     For example, `projects/myproject/locations/US/dataExchanges/123`.
  1925  func (r *ProjectsLocationsDataExchangesService) Delete(name string) *ProjectsLocationsDataExchangesDeleteCall {
  1926  	c := &ProjectsLocationsDataExchangesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1927  	c.name = name
  1928  	return c
  1929  }
  1930  
  1931  // Fields allows partial responses to be retrieved. See
  1932  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1933  // details.
  1934  func (c *ProjectsLocationsDataExchangesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesDeleteCall {
  1935  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1936  	return c
  1937  }
  1938  
  1939  // Context sets the context to be used in this call's Do method.
  1940  func (c *ProjectsLocationsDataExchangesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesDeleteCall {
  1941  	c.ctx_ = ctx
  1942  	return c
  1943  }
  1944  
  1945  // Header returns a http.Header that can be modified by the caller to add
  1946  // headers to the request.
  1947  func (c *ProjectsLocationsDataExchangesDeleteCall) Header() http.Header {
  1948  	if c.header_ == nil {
  1949  		c.header_ = make(http.Header)
  1950  	}
  1951  	return c.header_
  1952  }
  1953  
  1954  func (c *ProjectsLocationsDataExchangesDeleteCall) doRequest(alt string) (*http.Response, error) {
  1955  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1956  	var body io.Reader = nil
  1957  	c.urlParams_.Set("alt", alt)
  1958  	c.urlParams_.Set("prettyPrint", "false")
  1959  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  1960  	urls += "?" + c.urlParams_.Encode()
  1961  	req, err := http.NewRequest("DELETE", urls, body)
  1962  	if err != nil {
  1963  		return nil, err
  1964  	}
  1965  	req.Header = reqHeaders
  1966  	googleapi.Expand(req.URL, map[string]string{
  1967  		"name": c.name,
  1968  	})
  1969  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1970  }
  1971  
  1972  // Do executes the "analyticshub.projects.locations.dataExchanges.delete" call.
  1973  // Any non-2xx status code is an error. Response headers are in either
  1974  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  1975  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1976  // whether the returned error was because http.StatusNotModified was returned.
  1977  func (c *ProjectsLocationsDataExchangesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  1978  	gensupport.SetOptions(c.urlParams_, opts...)
  1979  	res, err := c.doRequest("json")
  1980  	if res != nil && res.StatusCode == http.StatusNotModified {
  1981  		if res.Body != nil {
  1982  			res.Body.Close()
  1983  		}
  1984  		return nil, gensupport.WrapError(&googleapi.Error{
  1985  			Code:   res.StatusCode,
  1986  			Header: res.Header,
  1987  		})
  1988  	}
  1989  	if err != nil {
  1990  		return nil, err
  1991  	}
  1992  	defer googleapi.CloseBody(res)
  1993  	if err := googleapi.CheckResponse(res); err != nil {
  1994  		return nil, gensupport.WrapError(err)
  1995  	}
  1996  	ret := &Empty{
  1997  		ServerResponse: googleapi.ServerResponse{
  1998  			Header:         res.Header,
  1999  			HTTPStatusCode: res.StatusCode,
  2000  		},
  2001  	}
  2002  	target := &ret
  2003  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2004  		return nil, err
  2005  	}
  2006  	return ret, nil
  2007  }
  2008  
  2009  type ProjectsLocationsDataExchangesGetCall struct {
  2010  	s            *Service
  2011  	name         string
  2012  	urlParams_   gensupport.URLParams
  2013  	ifNoneMatch_ string
  2014  	ctx_         context.Context
  2015  	header_      http.Header
  2016  }
  2017  
  2018  // Get: Gets the details of a data exchange.
  2019  //
  2020  //   - name: The resource name of the data exchange. e.g.
  2021  //     `projects/myproject/locations/US/dataExchanges/123`.
  2022  func (r *ProjectsLocationsDataExchangesService) Get(name string) *ProjectsLocationsDataExchangesGetCall {
  2023  	c := &ProjectsLocationsDataExchangesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2024  	c.name = name
  2025  	return c
  2026  }
  2027  
  2028  // Fields allows partial responses to be retrieved. See
  2029  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2030  // details.
  2031  func (c *ProjectsLocationsDataExchangesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesGetCall {
  2032  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2033  	return c
  2034  }
  2035  
  2036  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2037  // object's ETag matches the given value. This is useful for getting updates
  2038  // only after the object has changed since the last request.
  2039  func (c *ProjectsLocationsDataExchangesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataExchangesGetCall {
  2040  	c.ifNoneMatch_ = entityTag
  2041  	return c
  2042  }
  2043  
  2044  // Context sets the context to be used in this call's Do method.
  2045  func (c *ProjectsLocationsDataExchangesGetCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesGetCall {
  2046  	c.ctx_ = ctx
  2047  	return c
  2048  }
  2049  
  2050  // Header returns a http.Header that can be modified by the caller to add
  2051  // headers to the request.
  2052  func (c *ProjectsLocationsDataExchangesGetCall) Header() http.Header {
  2053  	if c.header_ == nil {
  2054  		c.header_ = make(http.Header)
  2055  	}
  2056  	return c.header_
  2057  }
  2058  
  2059  func (c *ProjectsLocationsDataExchangesGetCall) doRequest(alt string) (*http.Response, error) {
  2060  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2061  	if c.ifNoneMatch_ != "" {
  2062  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2063  	}
  2064  	var body io.Reader = nil
  2065  	c.urlParams_.Set("alt", alt)
  2066  	c.urlParams_.Set("prettyPrint", "false")
  2067  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2068  	urls += "?" + c.urlParams_.Encode()
  2069  	req, err := http.NewRequest("GET", urls, body)
  2070  	if err != nil {
  2071  		return nil, err
  2072  	}
  2073  	req.Header = reqHeaders
  2074  	googleapi.Expand(req.URL, map[string]string{
  2075  		"name": c.name,
  2076  	})
  2077  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2078  }
  2079  
  2080  // Do executes the "analyticshub.projects.locations.dataExchanges.get" call.
  2081  // Any non-2xx status code is an error. Response headers are in either
  2082  // *DataExchange.ServerResponse.Header or (if a response was returned at all)
  2083  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2084  // whether the returned error was because http.StatusNotModified was returned.
  2085  func (c *ProjectsLocationsDataExchangesGetCall) Do(opts ...googleapi.CallOption) (*DataExchange, error) {
  2086  	gensupport.SetOptions(c.urlParams_, opts...)
  2087  	res, err := c.doRequest("json")
  2088  	if res != nil && res.StatusCode == http.StatusNotModified {
  2089  		if res.Body != nil {
  2090  			res.Body.Close()
  2091  		}
  2092  		return nil, gensupport.WrapError(&googleapi.Error{
  2093  			Code:   res.StatusCode,
  2094  			Header: res.Header,
  2095  		})
  2096  	}
  2097  	if err != nil {
  2098  		return nil, err
  2099  	}
  2100  	defer googleapi.CloseBody(res)
  2101  	if err := googleapi.CheckResponse(res); err != nil {
  2102  		return nil, gensupport.WrapError(err)
  2103  	}
  2104  	ret := &DataExchange{
  2105  		ServerResponse: googleapi.ServerResponse{
  2106  			Header:         res.Header,
  2107  			HTTPStatusCode: res.StatusCode,
  2108  		},
  2109  	}
  2110  	target := &ret
  2111  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2112  		return nil, err
  2113  	}
  2114  	return ret, nil
  2115  }
  2116  
  2117  type ProjectsLocationsDataExchangesGetIamPolicyCall struct {
  2118  	s                   *Service
  2119  	resource            string
  2120  	getiampolicyrequest *GetIamPolicyRequest
  2121  	urlParams_          gensupport.URLParams
  2122  	ctx_                context.Context
  2123  	header_             http.Header
  2124  }
  2125  
  2126  // GetIamPolicy: Gets the IAM policy.
  2127  //
  2128  //   - resource: REQUIRED: The resource for which the policy is being requested.
  2129  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  2130  //     for the appropriate value for this field.
  2131  func (r *ProjectsLocationsDataExchangesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsDataExchangesGetIamPolicyCall {
  2132  	c := &ProjectsLocationsDataExchangesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2133  	c.resource = resource
  2134  	c.getiampolicyrequest = getiampolicyrequest
  2135  	return c
  2136  }
  2137  
  2138  // Fields allows partial responses to be retrieved. See
  2139  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2140  // details.
  2141  func (c *ProjectsLocationsDataExchangesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesGetIamPolicyCall {
  2142  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2143  	return c
  2144  }
  2145  
  2146  // Context sets the context to be used in this call's Do method.
  2147  func (c *ProjectsLocationsDataExchangesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesGetIamPolicyCall {
  2148  	c.ctx_ = ctx
  2149  	return c
  2150  }
  2151  
  2152  // Header returns a http.Header that can be modified by the caller to add
  2153  // headers to the request.
  2154  func (c *ProjectsLocationsDataExchangesGetIamPolicyCall) Header() http.Header {
  2155  	if c.header_ == nil {
  2156  		c.header_ = make(http.Header)
  2157  	}
  2158  	return c.header_
  2159  }
  2160  
  2161  func (c *ProjectsLocationsDataExchangesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  2162  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2163  	var body io.Reader = nil
  2164  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
  2165  	if err != nil {
  2166  		return nil, err
  2167  	}
  2168  	c.urlParams_.Set("alt", alt)
  2169  	c.urlParams_.Set("prettyPrint", "false")
  2170  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  2171  	urls += "?" + c.urlParams_.Encode()
  2172  	req, err := http.NewRequest("POST", urls, body)
  2173  	if err != nil {
  2174  		return nil, err
  2175  	}
  2176  	req.Header = reqHeaders
  2177  	googleapi.Expand(req.URL, map[string]string{
  2178  		"resource": c.resource,
  2179  	})
  2180  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2181  }
  2182  
  2183  // Do executes the "analyticshub.projects.locations.dataExchanges.getIamPolicy" call.
  2184  // Any non-2xx status code is an error. Response headers are in either
  2185  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  2186  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2187  // whether the returned error was because http.StatusNotModified was returned.
  2188  func (c *ProjectsLocationsDataExchangesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  2189  	gensupport.SetOptions(c.urlParams_, opts...)
  2190  	res, err := c.doRequest("json")
  2191  	if res != nil && res.StatusCode == http.StatusNotModified {
  2192  		if res.Body != nil {
  2193  			res.Body.Close()
  2194  		}
  2195  		return nil, gensupport.WrapError(&googleapi.Error{
  2196  			Code:   res.StatusCode,
  2197  			Header: res.Header,
  2198  		})
  2199  	}
  2200  	if err != nil {
  2201  		return nil, err
  2202  	}
  2203  	defer googleapi.CloseBody(res)
  2204  	if err := googleapi.CheckResponse(res); err != nil {
  2205  		return nil, gensupport.WrapError(err)
  2206  	}
  2207  	ret := &Policy{
  2208  		ServerResponse: googleapi.ServerResponse{
  2209  			Header:         res.Header,
  2210  			HTTPStatusCode: res.StatusCode,
  2211  		},
  2212  	}
  2213  	target := &ret
  2214  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2215  		return nil, err
  2216  	}
  2217  	return ret, nil
  2218  }
  2219  
  2220  type ProjectsLocationsDataExchangesListCall struct {
  2221  	s            *Service
  2222  	parent       string
  2223  	urlParams_   gensupport.URLParams
  2224  	ifNoneMatch_ string
  2225  	ctx_         context.Context
  2226  	header_      http.Header
  2227  }
  2228  
  2229  // List: Lists all data exchanges in a given project and location.
  2230  //
  2231  //   - parent: The parent resource path of the data exchanges. e.g.
  2232  //     `projects/myproject/locations/US`.
  2233  func (r *ProjectsLocationsDataExchangesService) List(parent string) *ProjectsLocationsDataExchangesListCall {
  2234  	c := &ProjectsLocationsDataExchangesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2235  	c.parent = parent
  2236  	return c
  2237  }
  2238  
  2239  // PageSize sets the optional parameter "pageSize": The maximum number of
  2240  // results to return in a single response page. Leverage the page tokens to
  2241  // iterate through the entire collection.
  2242  func (c *ProjectsLocationsDataExchangesListCall) PageSize(pageSize int64) *ProjectsLocationsDataExchangesListCall {
  2243  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2244  	return c
  2245  }
  2246  
  2247  // PageToken sets the optional parameter "pageToken": Page token, returned by a
  2248  // previous call, to request the next page of results.
  2249  func (c *ProjectsLocationsDataExchangesListCall) PageToken(pageToken string) *ProjectsLocationsDataExchangesListCall {
  2250  	c.urlParams_.Set("pageToken", pageToken)
  2251  	return c
  2252  }
  2253  
  2254  // Fields allows partial responses to be retrieved. See
  2255  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2256  // details.
  2257  func (c *ProjectsLocationsDataExchangesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListCall {
  2258  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2259  	return c
  2260  }
  2261  
  2262  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2263  // object's ETag matches the given value. This is useful for getting updates
  2264  // only after the object has changed since the last request.
  2265  func (c *ProjectsLocationsDataExchangesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataExchangesListCall {
  2266  	c.ifNoneMatch_ = entityTag
  2267  	return c
  2268  }
  2269  
  2270  // Context sets the context to be used in this call's Do method.
  2271  func (c *ProjectsLocationsDataExchangesListCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListCall {
  2272  	c.ctx_ = ctx
  2273  	return c
  2274  }
  2275  
  2276  // Header returns a http.Header that can be modified by the caller to add
  2277  // headers to the request.
  2278  func (c *ProjectsLocationsDataExchangesListCall) Header() http.Header {
  2279  	if c.header_ == nil {
  2280  		c.header_ = make(http.Header)
  2281  	}
  2282  	return c.header_
  2283  }
  2284  
  2285  func (c *ProjectsLocationsDataExchangesListCall) doRequest(alt string) (*http.Response, error) {
  2286  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2287  	if c.ifNoneMatch_ != "" {
  2288  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2289  	}
  2290  	var body io.Reader = nil
  2291  	c.urlParams_.Set("alt", alt)
  2292  	c.urlParams_.Set("prettyPrint", "false")
  2293  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataExchanges")
  2294  	urls += "?" + c.urlParams_.Encode()
  2295  	req, err := http.NewRequest("GET", urls, body)
  2296  	if err != nil {
  2297  		return nil, err
  2298  	}
  2299  	req.Header = reqHeaders
  2300  	googleapi.Expand(req.URL, map[string]string{
  2301  		"parent": c.parent,
  2302  	})
  2303  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2304  }
  2305  
  2306  // Do executes the "analyticshub.projects.locations.dataExchanges.list" call.
  2307  // Any non-2xx status code is an error. Response headers are in either
  2308  // *ListDataExchangesResponse.ServerResponse.Header or (if a response was
  2309  // returned at all) in error.(*googleapi.Error).Header. Use
  2310  // googleapi.IsNotModified to check whether the returned error was because
  2311  // http.StatusNotModified was returned.
  2312  func (c *ProjectsLocationsDataExchangesListCall) Do(opts ...googleapi.CallOption) (*ListDataExchangesResponse, error) {
  2313  	gensupport.SetOptions(c.urlParams_, opts...)
  2314  	res, err := c.doRequest("json")
  2315  	if res != nil && res.StatusCode == http.StatusNotModified {
  2316  		if res.Body != nil {
  2317  			res.Body.Close()
  2318  		}
  2319  		return nil, gensupport.WrapError(&googleapi.Error{
  2320  			Code:   res.StatusCode,
  2321  			Header: res.Header,
  2322  		})
  2323  	}
  2324  	if err != nil {
  2325  		return nil, err
  2326  	}
  2327  	defer googleapi.CloseBody(res)
  2328  	if err := googleapi.CheckResponse(res); err != nil {
  2329  		return nil, gensupport.WrapError(err)
  2330  	}
  2331  	ret := &ListDataExchangesResponse{
  2332  		ServerResponse: googleapi.ServerResponse{
  2333  			Header:         res.Header,
  2334  			HTTPStatusCode: res.StatusCode,
  2335  		},
  2336  	}
  2337  	target := &ret
  2338  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2339  		return nil, err
  2340  	}
  2341  	return ret, nil
  2342  }
  2343  
  2344  // Pages invokes f for each page of results.
  2345  // A non-nil error returned from f will halt the iteration.
  2346  // The provided context supersedes any context provided to the Context method.
  2347  func (c *ProjectsLocationsDataExchangesListCall) Pages(ctx context.Context, f func(*ListDataExchangesResponse) error) error {
  2348  	c.ctx_ = ctx
  2349  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2350  	for {
  2351  		x, err := c.Do()
  2352  		if err != nil {
  2353  			return err
  2354  		}
  2355  		if err := f(x); err != nil {
  2356  			return err
  2357  		}
  2358  		if x.NextPageToken == "" {
  2359  			return nil
  2360  		}
  2361  		c.PageToken(x.NextPageToken)
  2362  	}
  2363  }
  2364  
  2365  type ProjectsLocationsDataExchangesListSubscriptionsCall struct {
  2366  	s            *Service
  2367  	resource     string
  2368  	urlParams_   gensupport.URLParams
  2369  	ifNoneMatch_ string
  2370  	ctx_         context.Context
  2371  	header_      http.Header
  2372  }
  2373  
  2374  // ListSubscriptions: Lists all subscriptions on a given Data Exchange or
  2375  // Listing.
  2376  //
  2377  //   - resource: Resource name of the requested target. This resource may be
  2378  //     either a Listing or a DataExchange. e.g.
  2379  //     projects/123/locations/US/dataExchanges/456 OR e.g.
  2380  //     projects/123/locations/US/dataExchanges/456/listings/789.
  2381  func (r *ProjectsLocationsDataExchangesService) ListSubscriptions(resource string) *ProjectsLocationsDataExchangesListSubscriptionsCall {
  2382  	c := &ProjectsLocationsDataExchangesListSubscriptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2383  	c.resource = resource
  2384  	return c
  2385  }
  2386  
  2387  // IncludeDeletedSubscriptions sets the optional parameter
  2388  // "includeDeletedSubscriptions": If selected, includes deleted subscriptions
  2389  // in the response (up to 63 days after deletion).
  2390  func (c *ProjectsLocationsDataExchangesListSubscriptionsCall) IncludeDeletedSubscriptions(includeDeletedSubscriptions bool) *ProjectsLocationsDataExchangesListSubscriptionsCall {
  2391  	c.urlParams_.Set("includeDeletedSubscriptions", fmt.Sprint(includeDeletedSubscriptions))
  2392  	return c
  2393  }
  2394  
  2395  // PageSize sets the optional parameter "pageSize": The maximum number of
  2396  // results to return in a single response page.
  2397  func (c *ProjectsLocationsDataExchangesListSubscriptionsCall) PageSize(pageSize int64) *ProjectsLocationsDataExchangesListSubscriptionsCall {
  2398  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2399  	return c
  2400  }
  2401  
  2402  // PageToken sets the optional parameter "pageToken": Page token, returned by a
  2403  // previous call.
  2404  func (c *ProjectsLocationsDataExchangesListSubscriptionsCall) PageToken(pageToken string) *ProjectsLocationsDataExchangesListSubscriptionsCall {
  2405  	c.urlParams_.Set("pageToken", pageToken)
  2406  	return c
  2407  }
  2408  
  2409  // Fields allows partial responses to be retrieved. See
  2410  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2411  // details.
  2412  func (c *ProjectsLocationsDataExchangesListSubscriptionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListSubscriptionsCall {
  2413  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2414  	return c
  2415  }
  2416  
  2417  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2418  // object's ETag matches the given value. This is useful for getting updates
  2419  // only after the object has changed since the last request.
  2420  func (c *ProjectsLocationsDataExchangesListSubscriptionsCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataExchangesListSubscriptionsCall {
  2421  	c.ifNoneMatch_ = entityTag
  2422  	return c
  2423  }
  2424  
  2425  // Context sets the context to be used in this call's Do method.
  2426  func (c *ProjectsLocationsDataExchangesListSubscriptionsCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListSubscriptionsCall {
  2427  	c.ctx_ = ctx
  2428  	return c
  2429  }
  2430  
  2431  // Header returns a http.Header that can be modified by the caller to add
  2432  // headers to the request.
  2433  func (c *ProjectsLocationsDataExchangesListSubscriptionsCall) Header() http.Header {
  2434  	if c.header_ == nil {
  2435  		c.header_ = make(http.Header)
  2436  	}
  2437  	return c.header_
  2438  }
  2439  
  2440  func (c *ProjectsLocationsDataExchangesListSubscriptionsCall) doRequest(alt string) (*http.Response, error) {
  2441  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2442  	if c.ifNoneMatch_ != "" {
  2443  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2444  	}
  2445  	var body io.Reader = nil
  2446  	c.urlParams_.Set("alt", alt)
  2447  	c.urlParams_.Set("prettyPrint", "false")
  2448  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:listSubscriptions")
  2449  	urls += "?" + c.urlParams_.Encode()
  2450  	req, err := http.NewRequest("GET", urls, body)
  2451  	if err != nil {
  2452  		return nil, err
  2453  	}
  2454  	req.Header = reqHeaders
  2455  	googleapi.Expand(req.URL, map[string]string{
  2456  		"resource": c.resource,
  2457  	})
  2458  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2459  }
  2460  
  2461  // Do executes the "analyticshub.projects.locations.dataExchanges.listSubscriptions" call.
  2462  // Any non-2xx status code is an error. Response headers are in either
  2463  // *ListSharedResourceSubscriptionsResponse.ServerResponse.Header or (if a
  2464  // response was returned at all) in error.(*googleapi.Error).Header. Use
  2465  // googleapi.IsNotModified to check whether the returned error was because
  2466  // http.StatusNotModified was returned.
  2467  func (c *ProjectsLocationsDataExchangesListSubscriptionsCall) Do(opts ...googleapi.CallOption) (*ListSharedResourceSubscriptionsResponse, error) {
  2468  	gensupport.SetOptions(c.urlParams_, opts...)
  2469  	res, err := c.doRequest("json")
  2470  	if res != nil && res.StatusCode == http.StatusNotModified {
  2471  		if res.Body != nil {
  2472  			res.Body.Close()
  2473  		}
  2474  		return nil, gensupport.WrapError(&googleapi.Error{
  2475  			Code:   res.StatusCode,
  2476  			Header: res.Header,
  2477  		})
  2478  	}
  2479  	if err != nil {
  2480  		return nil, err
  2481  	}
  2482  	defer googleapi.CloseBody(res)
  2483  	if err := googleapi.CheckResponse(res); err != nil {
  2484  		return nil, gensupport.WrapError(err)
  2485  	}
  2486  	ret := &ListSharedResourceSubscriptionsResponse{
  2487  		ServerResponse: googleapi.ServerResponse{
  2488  			Header:         res.Header,
  2489  			HTTPStatusCode: res.StatusCode,
  2490  		},
  2491  	}
  2492  	target := &ret
  2493  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2494  		return nil, err
  2495  	}
  2496  	return ret, nil
  2497  }
  2498  
  2499  // Pages invokes f for each page of results.
  2500  // A non-nil error returned from f will halt the iteration.
  2501  // The provided context supersedes any context provided to the Context method.
  2502  func (c *ProjectsLocationsDataExchangesListSubscriptionsCall) Pages(ctx context.Context, f func(*ListSharedResourceSubscriptionsResponse) error) error {
  2503  	c.ctx_ = ctx
  2504  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2505  	for {
  2506  		x, err := c.Do()
  2507  		if err != nil {
  2508  			return err
  2509  		}
  2510  		if err := f(x); err != nil {
  2511  			return err
  2512  		}
  2513  		if x.NextPageToken == "" {
  2514  			return nil
  2515  		}
  2516  		c.PageToken(x.NextPageToken)
  2517  	}
  2518  }
  2519  
  2520  type ProjectsLocationsDataExchangesPatchCall struct {
  2521  	s            *Service
  2522  	name         string
  2523  	dataexchange *DataExchange
  2524  	urlParams_   gensupport.URLParams
  2525  	ctx_         context.Context
  2526  	header_      http.Header
  2527  }
  2528  
  2529  // Patch: Updates an existing data exchange.
  2530  //
  2531  //   - name: Output only. The resource name of the data exchange. e.g.
  2532  //     `projects/myproject/locations/US/dataExchanges/123`.
  2533  func (r *ProjectsLocationsDataExchangesService) Patch(name string, dataexchange *DataExchange) *ProjectsLocationsDataExchangesPatchCall {
  2534  	c := &ProjectsLocationsDataExchangesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2535  	c.name = name
  2536  	c.dataexchange = dataexchange
  2537  	return c
  2538  }
  2539  
  2540  // UpdateMask sets the optional parameter "updateMask": Required. Field mask
  2541  // specifies the fields to update in the data exchange resource. The fields
  2542  // specified in the `updateMask` are relative to the resource and are not a
  2543  // full request.
  2544  func (c *ProjectsLocationsDataExchangesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataExchangesPatchCall {
  2545  	c.urlParams_.Set("updateMask", updateMask)
  2546  	return c
  2547  }
  2548  
  2549  // Fields allows partial responses to be retrieved. See
  2550  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2551  // details.
  2552  func (c *ProjectsLocationsDataExchangesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesPatchCall {
  2553  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2554  	return c
  2555  }
  2556  
  2557  // Context sets the context to be used in this call's Do method.
  2558  func (c *ProjectsLocationsDataExchangesPatchCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesPatchCall {
  2559  	c.ctx_ = ctx
  2560  	return c
  2561  }
  2562  
  2563  // Header returns a http.Header that can be modified by the caller to add
  2564  // headers to the request.
  2565  func (c *ProjectsLocationsDataExchangesPatchCall) Header() http.Header {
  2566  	if c.header_ == nil {
  2567  		c.header_ = make(http.Header)
  2568  	}
  2569  	return c.header_
  2570  }
  2571  
  2572  func (c *ProjectsLocationsDataExchangesPatchCall) doRequest(alt string) (*http.Response, error) {
  2573  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2574  	var body io.Reader = nil
  2575  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataexchange)
  2576  	if err != nil {
  2577  		return nil, err
  2578  	}
  2579  	c.urlParams_.Set("alt", alt)
  2580  	c.urlParams_.Set("prettyPrint", "false")
  2581  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2582  	urls += "?" + c.urlParams_.Encode()
  2583  	req, err := http.NewRequest("PATCH", urls, body)
  2584  	if err != nil {
  2585  		return nil, err
  2586  	}
  2587  	req.Header = reqHeaders
  2588  	googleapi.Expand(req.URL, map[string]string{
  2589  		"name": c.name,
  2590  	})
  2591  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2592  }
  2593  
  2594  // Do executes the "analyticshub.projects.locations.dataExchanges.patch" call.
  2595  // Any non-2xx status code is an error. Response headers are in either
  2596  // *DataExchange.ServerResponse.Header or (if a response was returned at all)
  2597  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2598  // whether the returned error was because http.StatusNotModified was returned.
  2599  func (c *ProjectsLocationsDataExchangesPatchCall) Do(opts ...googleapi.CallOption) (*DataExchange, error) {
  2600  	gensupport.SetOptions(c.urlParams_, opts...)
  2601  	res, err := c.doRequest("json")
  2602  	if res != nil && res.StatusCode == http.StatusNotModified {
  2603  		if res.Body != nil {
  2604  			res.Body.Close()
  2605  		}
  2606  		return nil, gensupport.WrapError(&googleapi.Error{
  2607  			Code:   res.StatusCode,
  2608  			Header: res.Header,
  2609  		})
  2610  	}
  2611  	if err != nil {
  2612  		return nil, err
  2613  	}
  2614  	defer googleapi.CloseBody(res)
  2615  	if err := googleapi.CheckResponse(res); err != nil {
  2616  		return nil, gensupport.WrapError(err)
  2617  	}
  2618  	ret := &DataExchange{
  2619  		ServerResponse: googleapi.ServerResponse{
  2620  			Header:         res.Header,
  2621  			HTTPStatusCode: res.StatusCode,
  2622  		},
  2623  	}
  2624  	target := &ret
  2625  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2626  		return nil, err
  2627  	}
  2628  	return ret, nil
  2629  }
  2630  
  2631  type ProjectsLocationsDataExchangesSetIamPolicyCall struct {
  2632  	s                   *Service
  2633  	resource            string
  2634  	setiampolicyrequest *SetIamPolicyRequest
  2635  	urlParams_          gensupport.URLParams
  2636  	ctx_                context.Context
  2637  	header_             http.Header
  2638  }
  2639  
  2640  // SetIamPolicy: Sets the IAM policy.
  2641  //
  2642  //   - resource: REQUIRED: The resource for which the policy is being specified.
  2643  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  2644  //     for the appropriate value for this field.
  2645  func (r *ProjectsLocationsDataExchangesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDataExchangesSetIamPolicyCall {
  2646  	c := &ProjectsLocationsDataExchangesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2647  	c.resource = resource
  2648  	c.setiampolicyrequest = setiampolicyrequest
  2649  	return c
  2650  }
  2651  
  2652  // Fields allows partial responses to be retrieved. See
  2653  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2654  // details.
  2655  func (c *ProjectsLocationsDataExchangesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesSetIamPolicyCall {
  2656  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2657  	return c
  2658  }
  2659  
  2660  // Context sets the context to be used in this call's Do method.
  2661  func (c *ProjectsLocationsDataExchangesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesSetIamPolicyCall {
  2662  	c.ctx_ = ctx
  2663  	return c
  2664  }
  2665  
  2666  // Header returns a http.Header that can be modified by the caller to add
  2667  // headers to the request.
  2668  func (c *ProjectsLocationsDataExchangesSetIamPolicyCall) Header() http.Header {
  2669  	if c.header_ == nil {
  2670  		c.header_ = make(http.Header)
  2671  	}
  2672  	return c.header_
  2673  }
  2674  
  2675  func (c *ProjectsLocationsDataExchangesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  2676  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2677  	var body io.Reader = nil
  2678  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  2679  	if err != nil {
  2680  		return nil, err
  2681  	}
  2682  	c.urlParams_.Set("alt", alt)
  2683  	c.urlParams_.Set("prettyPrint", "false")
  2684  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  2685  	urls += "?" + c.urlParams_.Encode()
  2686  	req, err := http.NewRequest("POST", urls, body)
  2687  	if err != nil {
  2688  		return nil, err
  2689  	}
  2690  	req.Header = reqHeaders
  2691  	googleapi.Expand(req.URL, map[string]string{
  2692  		"resource": c.resource,
  2693  	})
  2694  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2695  }
  2696  
  2697  // Do executes the "analyticshub.projects.locations.dataExchanges.setIamPolicy" call.
  2698  // Any non-2xx status code is an error. Response headers are in either
  2699  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  2700  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2701  // whether the returned error was because http.StatusNotModified was returned.
  2702  func (c *ProjectsLocationsDataExchangesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  2703  	gensupport.SetOptions(c.urlParams_, opts...)
  2704  	res, err := c.doRequest("json")
  2705  	if res != nil && res.StatusCode == http.StatusNotModified {
  2706  		if res.Body != nil {
  2707  			res.Body.Close()
  2708  		}
  2709  		return nil, gensupport.WrapError(&googleapi.Error{
  2710  			Code:   res.StatusCode,
  2711  			Header: res.Header,
  2712  		})
  2713  	}
  2714  	if err != nil {
  2715  		return nil, err
  2716  	}
  2717  	defer googleapi.CloseBody(res)
  2718  	if err := googleapi.CheckResponse(res); err != nil {
  2719  		return nil, gensupport.WrapError(err)
  2720  	}
  2721  	ret := &Policy{
  2722  		ServerResponse: googleapi.ServerResponse{
  2723  			Header:         res.Header,
  2724  			HTTPStatusCode: res.StatusCode,
  2725  		},
  2726  	}
  2727  	target := &ret
  2728  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2729  		return nil, err
  2730  	}
  2731  	return ret, nil
  2732  }
  2733  
  2734  type ProjectsLocationsDataExchangesSubscribeCall struct {
  2735  	s                            *Service
  2736  	name                         string
  2737  	subscribedataexchangerequest *SubscribeDataExchangeRequest
  2738  	urlParams_                   gensupport.URLParams
  2739  	ctx_                         context.Context
  2740  	header_                      http.Header
  2741  }
  2742  
  2743  // Subscribe: Creates a Subscription to a Data Exchange. This is a long-running
  2744  // operation as it will create one or more linked datasets.
  2745  //
  2746  //   - name: Resource name of the Data Exchange. e.g.
  2747  //     `projects/publisherproject/locations/US/dataExchanges/123`.
  2748  func (r *ProjectsLocationsDataExchangesService) Subscribe(name string, subscribedataexchangerequest *SubscribeDataExchangeRequest) *ProjectsLocationsDataExchangesSubscribeCall {
  2749  	c := &ProjectsLocationsDataExchangesSubscribeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2750  	c.name = name
  2751  	c.subscribedataexchangerequest = subscribedataexchangerequest
  2752  	return c
  2753  }
  2754  
  2755  // Fields allows partial responses to be retrieved. See
  2756  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2757  // details.
  2758  func (c *ProjectsLocationsDataExchangesSubscribeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesSubscribeCall {
  2759  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2760  	return c
  2761  }
  2762  
  2763  // Context sets the context to be used in this call's Do method.
  2764  func (c *ProjectsLocationsDataExchangesSubscribeCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesSubscribeCall {
  2765  	c.ctx_ = ctx
  2766  	return c
  2767  }
  2768  
  2769  // Header returns a http.Header that can be modified by the caller to add
  2770  // headers to the request.
  2771  func (c *ProjectsLocationsDataExchangesSubscribeCall) Header() http.Header {
  2772  	if c.header_ == nil {
  2773  		c.header_ = make(http.Header)
  2774  	}
  2775  	return c.header_
  2776  }
  2777  
  2778  func (c *ProjectsLocationsDataExchangesSubscribeCall) doRequest(alt string) (*http.Response, error) {
  2779  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2780  	var body io.Reader = nil
  2781  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subscribedataexchangerequest)
  2782  	if err != nil {
  2783  		return nil, err
  2784  	}
  2785  	c.urlParams_.Set("alt", alt)
  2786  	c.urlParams_.Set("prettyPrint", "false")
  2787  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:subscribe")
  2788  	urls += "?" + c.urlParams_.Encode()
  2789  	req, err := http.NewRequest("POST", urls, body)
  2790  	if err != nil {
  2791  		return nil, err
  2792  	}
  2793  	req.Header = reqHeaders
  2794  	googleapi.Expand(req.URL, map[string]string{
  2795  		"name": c.name,
  2796  	})
  2797  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2798  }
  2799  
  2800  // Do executes the "analyticshub.projects.locations.dataExchanges.subscribe" call.
  2801  // Any non-2xx status code is an error. Response headers are in either
  2802  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2803  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2804  // whether the returned error was because http.StatusNotModified was returned.
  2805  func (c *ProjectsLocationsDataExchangesSubscribeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2806  	gensupport.SetOptions(c.urlParams_, opts...)
  2807  	res, err := c.doRequest("json")
  2808  	if res != nil && res.StatusCode == http.StatusNotModified {
  2809  		if res.Body != nil {
  2810  			res.Body.Close()
  2811  		}
  2812  		return nil, gensupport.WrapError(&googleapi.Error{
  2813  			Code:   res.StatusCode,
  2814  			Header: res.Header,
  2815  		})
  2816  	}
  2817  	if err != nil {
  2818  		return nil, err
  2819  	}
  2820  	defer googleapi.CloseBody(res)
  2821  	if err := googleapi.CheckResponse(res); err != nil {
  2822  		return nil, gensupport.WrapError(err)
  2823  	}
  2824  	ret := &Operation{
  2825  		ServerResponse: googleapi.ServerResponse{
  2826  			Header:         res.Header,
  2827  			HTTPStatusCode: res.StatusCode,
  2828  		},
  2829  	}
  2830  	target := &ret
  2831  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2832  		return nil, err
  2833  	}
  2834  	return ret, nil
  2835  }
  2836  
  2837  type ProjectsLocationsDataExchangesTestIamPermissionsCall struct {
  2838  	s                         *Service
  2839  	resource                  string
  2840  	testiampermissionsrequest *TestIamPermissionsRequest
  2841  	urlParams_                gensupport.URLParams
  2842  	ctx_                      context.Context
  2843  	header_                   http.Header
  2844  }
  2845  
  2846  // TestIamPermissions: Returns the permissions that a caller has.
  2847  //
  2848  //   - resource: REQUIRED: The resource for which the policy detail is being
  2849  //     requested. See Resource names
  2850  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  2851  //     value for this field.
  2852  func (r *ProjectsLocationsDataExchangesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDataExchangesTestIamPermissionsCall {
  2853  	c := &ProjectsLocationsDataExchangesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2854  	c.resource = resource
  2855  	c.testiampermissionsrequest = testiampermissionsrequest
  2856  	return c
  2857  }
  2858  
  2859  // Fields allows partial responses to be retrieved. See
  2860  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2861  // details.
  2862  func (c *ProjectsLocationsDataExchangesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesTestIamPermissionsCall {
  2863  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2864  	return c
  2865  }
  2866  
  2867  // Context sets the context to be used in this call's Do method.
  2868  func (c *ProjectsLocationsDataExchangesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesTestIamPermissionsCall {
  2869  	c.ctx_ = ctx
  2870  	return c
  2871  }
  2872  
  2873  // Header returns a http.Header that can be modified by the caller to add
  2874  // headers to the request.
  2875  func (c *ProjectsLocationsDataExchangesTestIamPermissionsCall) Header() http.Header {
  2876  	if c.header_ == nil {
  2877  		c.header_ = make(http.Header)
  2878  	}
  2879  	return c.header_
  2880  }
  2881  
  2882  func (c *ProjectsLocationsDataExchangesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  2883  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2884  	var body io.Reader = nil
  2885  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  2886  	if err != nil {
  2887  		return nil, err
  2888  	}
  2889  	c.urlParams_.Set("alt", alt)
  2890  	c.urlParams_.Set("prettyPrint", "false")
  2891  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  2892  	urls += "?" + c.urlParams_.Encode()
  2893  	req, err := http.NewRequest("POST", urls, body)
  2894  	if err != nil {
  2895  		return nil, err
  2896  	}
  2897  	req.Header = reqHeaders
  2898  	googleapi.Expand(req.URL, map[string]string{
  2899  		"resource": c.resource,
  2900  	})
  2901  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2902  }
  2903  
  2904  // Do executes the "analyticshub.projects.locations.dataExchanges.testIamPermissions" call.
  2905  // Any non-2xx status code is an error. Response headers are in either
  2906  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  2907  // returned at all) in error.(*googleapi.Error).Header. Use
  2908  // googleapi.IsNotModified to check whether the returned error was because
  2909  // http.StatusNotModified was returned.
  2910  func (c *ProjectsLocationsDataExchangesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  2911  	gensupport.SetOptions(c.urlParams_, opts...)
  2912  	res, err := c.doRequest("json")
  2913  	if res != nil && res.StatusCode == http.StatusNotModified {
  2914  		if res.Body != nil {
  2915  			res.Body.Close()
  2916  		}
  2917  		return nil, gensupport.WrapError(&googleapi.Error{
  2918  			Code:   res.StatusCode,
  2919  			Header: res.Header,
  2920  		})
  2921  	}
  2922  	if err != nil {
  2923  		return nil, err
  2924  	}
  2925  	defer googleapi.CloseBody(res)
  2926  	if err := googleapi.CheckResponse(res); err != nil {
  2927  		return nil, gensupport.WrapError(err)
  2928  	}
  2929  	ret := &TestIamPermissionsResponse{
  2930  		ServerResponse: googleapi.ServerResponse{
  2931  			Header:         res.Header,
  2932  			HTTPStatusCode: res.StatusCode,
  2933  		},
  2934  	}
  2935  	target := &ret
  2936  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2937  		return nil, err
  2938  	}
  2939  	return ret, nil
  2940  }
  2941  
  2942  type ProjectsLocationsDataExchangesListingsCreateCall struct {
  2943  	s          *Service
  2944  	parent     string
  2945  	listing    *Listing
  2946  	urlParams_ gensupport.URLParams
  2947  	ctx_       context.Context
  2948  	header_    http.Header
  2949  }
  2950  
  2951  // Create: Creates a new listing.
  2952  //
  2953  //   - parent: The parent resource path of the listing. e.g.
  2954  //     `projects/myproject/locations/US/dataExchanges/123`.
  2955  func (r *ProjectsLocationsDataExchangesListingsService) Create(parent string, listing *Listing) *ProjectsLocationsDataExchangesListingsCreateCall {
  2956  	c := &ProjectsLocationsDataExchangesListingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2957  	c.parent = parent
  2958  	c.listing = listing
  2959  	return c
  2960  }
  2961  
  2962  // ListingId sets the optional parameter "listingId": Required. The ID of the
  2963  // listing to create. Must contain only Unicode letters, numbers (0-9),
  2964  // underscores (_). Should not use characters that require URL-escaping, or
  2965  // characters outside of ASCII, spaces. Max length: 100 bytes.
  2966  func (c *ProjectsLocationsDataExchangesListingsCreateCall) ListingId(listingId string) *ProjectsLocationsDataExchangesListingsCreateCall {
  2967  	c.urlParams_.Set("listingId", listingId)
  2968  	return c
  2969  }
  2970  
  2971  // Fields allows partial responses to be retrieved. See
  2972  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2973  // details.
  2974  func (c *ProjectsLocationsDataExchangesListingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsCreateCall {
  2975  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2976  	return c
  2977  }
  2978  
  2979  // Context sets the context to be used in this call's Do method.
  2980  func (c *ProjectsLocationsDataExchangesListingsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsCreateCall {
  2981  	c.ctx_ = ctx
  2982  	return c
  2983  }
  2984  
  2985  // Header returns a http.Header that can be modified by the caller to add
  2986  // headers to the request.
  2987  func (c *ProjectsLocationsDataExchangesListingsCreateCall) Header() http.Header {
  2988  	if c.header_ == nil {
  2989  		c.header_ = make(http.Header)
  2990  	}
  2991  	return c.header_
  2992  }
  2993  
  2994  func (c *ProjectsLocationsDataExchangesListingsCreateCall) doRequest(alt string) (*http.Response, error) {
  2995  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2996  	var body io.Reader = nil
  2997  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.listing)
  2998  	if err != nil {
  2999  		return nil, err
  3000  	}
  3001  	c.urlParams_.Set("alt", alt)
  3002  	c.urlParams_.Set("prettyPrint", "false")
  3003  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/listings")
  3004  	urls += "?" + c.urlParams_.Encode()
  3005  	req, err := http.NewRequest("POST", urls, body)
  3006  	if err != nil {
  3007  		return nil, err
  3008  	}
  3009  	req.Header = reqHeaders
  3010  	googleapi.Expand(req.URL, map[string]string{
  3011  		"parent": c.parent,
  3012  	})
  3013  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3014  }
  3015  
  3016  // Do executes the "analyticshub.projects.locations.dataExchanges.listings.create" call.
  3017  // Any non-2xx status code is an error. Response headers are in either
  3018  // *Listing.ServerResponse.Header or (if a response was returned at all) in
  3019  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3020  // whether the returned error was because http.StatusNotModified was returned.
  3021  func (c *ProjectsLocationsDataExchangesListingsCreateCall) Do(opts ...googleapi.CallOption) (*Listing, error) {
  3022  	gensupport.SetOptions(c.urlParams_, opts...)
  3023  	res, err := c.doRequest("json")
  3024  	if res != nil && res.StatusCode == http.StatusNotModified {
  3025  		if res.Body != nil {
  3026  			res.Body.Close()
  3027  		}
  3028  		return nil, gensupport.WrapError(&googleapi.Error{
  3029  			Code:   res.StatusCode,
  3030  			Header: res.Header,
  3031  		})
  3032  	}
  3033  	if err != nil {
  3034  		return nil, err
  3035  	}
  3036  	defer googleapi.CloseBody(res)
  3037  	if err := googleapi.CheckResponse(res); err != nil {
  3038  		return nil, gensupport.WrapError(err)
  3039  	}
  3040  	ret := &Listing{
  3041  		ServerResponse: googleapi.ServerResponse{
  3042  			Header:         res.Header,
  3043  			HTTPStatusCode: res.StatusCode,
  3044  		},
  3045  	}
  3046  	target := &ret
  3047  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3048  		return nil, err
  3049  	}
  3050  	return ret, nil
  3051  }
  3052  
  3053  type ProjectsLocationsDataExchangesListingsDeleteCall struct {
  3054  	s          *Service
  3055  	name       string
  3056  	urlParams_ gensupport.URLParams
  3057  	ctx_       context.Context
  3058  	header_    http.Header
  3059  }
  3060  
  3061  // Delete: Deletes a listing.
  3062  //
  3063  //   - name: Resource name of the listing to delete. e.g.
  3064  //     `projects/myproject/locations/US/dataExchanges/123/listings/456`.
  3065  func (r *ProjectsLocationsDataExchangesListingsService) Delete(name string) *ProjectsLocationsDataExchangesListingsDeleteCall {
  3066  	c := &ProjectsLocationsDataExchangesListingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3067  	c.name = name
  3068  	return c
  3069  }
  3070  
  3071  // Fields allows partial responses to be retrieved. See
  3072  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3073  // details.
  3074  func (c *ProjectsLocationsDataExchangesListingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsDeleteCall {
  3075  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3076  	return c
  3077  }
  3078  
  3079  // Context sets the context to be used in this call's Do method.
  3080  func (c *ProjectsLocationsDataExchangesListingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsDeleteCall {
  3081  	c.ctx_ = ctx
  3082  	return c
  3083  }
  3084  
  3085  // Header returns a http.Header that can be modified by the caller to add
  3086  // headers to the request.
  3087  func (c *ProjectsLocationsDataExchangesListingsDeleteCall) Header() http.Header {
  3088  	if c.header_ == nil {
  3089  		c.header_ = make(http.Header)
  3090  	}
  3091  	return c.header_
  3092  }
  3093  
  3094  func (c *ProjectsLocationsDataExchangesListingsDeleteCall) doRequest(alt string) (*http.Response, error) {
  3095  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3096  	var body io.Reader = nil
  3097  	c.urlParams_.Set("alt", alt)
  3098  	c.urlParams_.Set("prettyPrint", "false")
  3099  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3100  	urls += "?" + c.urlParams_.Encode()
  3101  	req, err := http.NewRequest("DELETE", urls, body)
  3102  	if err != nil {
  3103  		return nil, err
  3104  	}
  3105  	req.Header = reqHeaders
  3106  	googleapi.Expand(req.URL, map[string]string{
  3107  		"name": c.name,
  3108  	})
  3109  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3110  }
  3111  
  3112  // Do executes the "analyticshub.projects.locations.dataExchanges.listings.delete" call.
  3113  // Any non-2xx status code is an error. Response headers are in either
  3114  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  3115  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3116  // whether the returned error was because http.StatusNotModified was returned.
  3117  func (c *ProjectsLocationsDataExchangesListingsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  3118  	gensupport.SetOptions(c.urlParams_, opts...)
  3119  	res, err := c.doRequest("json")
  3120  	if res != nil && res.StatusCode == http.StatusNotModified {
  3121  		if res.Body != nil {
  3122  			res.Body.Close()
  3123  		}
  3124  		return nil, gensupport.WrapError(&googleapi.Error{
  3125  			Code:   res.StatusCode,
  3126  			Header: res.Header,
  3127  		})
  3128  	}
  3129  	if err != nil {
  3130  		return nil, err
  3131  	}
  3132  	defer googleapi.CloseBody(res)
  3133  	if err := googleapi.CheckResponse(res); err != nil {
  3134  		return nil, gensupport.WrapError(err)
  3135  	}
  3136  	ret := &Empty{
  3137  		ServerResponse: googleapi.ServerResponse{
  3138  			Header:         res.Header,
  3139  			HTTPStatusCode: res.StatusCode,
  3140  		},
  3141  	}
  3142  	target := &ret
  3143  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3144  		return nil, err
  3145  	}
  3146  	return ret, nil
  3147  }
  3148  
  3149  type ProjectsLocationsDataExchangesListingsGetCall struct {
  3150  	s            *Service
  3151  	name         string
  3152  	urlParams_   gensupport.URLParams
  3153  	ifNoneMatch_ string
  3154  	ctx_         context.Context
  3155  	header_      http.Header
  3156  }
  3157  
  3158  // Get: Gets the details of a listing.
  3159  //
  3160  //   - name: The resource name of the listing. e.g.
  3161  //     `projects/myproject/locations/US/dataExchanges/123/listings/456`.
  3162  func (r *ProjectsLocationsDataExchangesListingsService) Get(name string) *ProjectsLocationsDataExchangesListingsGetCall {
  3163  	c := &ProjectsLocationsDataExchangesListingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3164  	c.name = name
  3165  	return c
  3166  }
  3167  
  3168  // Fields allows partial responses to be retrieved. See
  3169  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3170  // details.
  3171  func (c *ProjectsLocationsDataExchangesListingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsGetCall {
  3172  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3173  	return c
  3174  }
  3175  
  3176  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3177  // object's ETag matches the given value. This is useful for getting updates
  3178  // only after the object has changed since the last request.
  3179  func (c *ProjectsLocationsDataExchangesListingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataExchangesListingsGetCall {
  3180  	c.ifNoneMatch_ = entityTag
  3181  	return c
  3182  }
  3183  
  3184  // Context sets the context to be used in this call's Do method.
  3185  func (c *ProjectsLocationsDataExchangesListingsGetCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsGetCall {
  3186  	c.ctx_ = ctx
  3187  	return c
  3188  }
  3189  
  3190  // Header returns a http.Header that can be modified by the caller to add
  3191  // headers to the request.
  3192  func (c *ProjectsLocationsDataExchangesListingsGetCall) Header() http.Header {
  3193  	if c.header_ == nil {
  3194  		c.header_ = make(http.Header)
  3195  	}
  3196  	return c.header_
  3197  }
  3198  
  3199  func (c *ProjectsLocationsDataExchangesListingsGetCall) doRequest(alt string) (*http.Response, error) {
  3200  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3201  	if c.ifNoneMatch_ != "" {
  3202  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3203  	}
  3204  	var body io.Reader = nil
  3205  	c.urlParams_.Set("alt", alt)
  3206  	c.urlParams_.Set("prettyPrint", "false")
  3207  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3208  	urls += "?" + c.urlParams_.Encode()
  3209  	req, err := http.NewRequest("GET", urls, body)
  3210  	if err != nil {
  3211  		return nil, err
  3212  	}
  3213  	req.Header = reqHeaders
  3214  	googleapi.Expand(req.URL, map[string]string{
  3215  		"name": c.name,
  3216  	})
  3217  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3218  }
  3219  
  3220  // Do executes the "analyticshub.projects.locations.dataExchanges.listings.get" call.
  3221  // Any non-2xx status code is an error. Response headers are in either
  3222  // *Listing.ServerResponse.Header or (if a response was returned at all) in
  3223  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3224  // whether the returned error was because http.StatusNotModified was returned.
  3225  func (c *ProjectsLocationsDataExchangesListingsGetCall) Do(opts ...googleapi.CallOption) (*Listing, error) {
  3226  	gensupport.SetOptions(c.urlParams_, opts...)
  3227  	res, err := c.doRequest("json")
  3228  	if res != nil && res.StatusCode == http.StatusNotModified {
  3229  		if res.Body != nil {
  3230  			res.Body.Close()
  3231  		}
  3232  		return nil, gensupport.WrapError(&googleapi.Error{
  3233  			Code:   res.StatusCode,
  3234  			Header: res.Header,
  3235  		})
  3236  	}
  3237  	if err != nil {
  3238  		return nil, err
  3239  	}
  3240  	defer googleapi.CloseBody(res)
  3241  	if err := googleapi.CheckResponse(res); err != nil {
  3242  		return nil, gensupport.WrapError(err)
  3243  	}
  3244  	ret := &Listing{
  3245  		ServerResponse: googleapi.ServerResponse{
  3246  			Header:         res.Header,
  3247  			HTTPStatusCode: res.StatusCode,
  3248  		},
  3249  	}
  3250  	target := &ret
  3251  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3252  		return nil, err
  3253  	}
  3254  	return ret, nil
  3255  }
  3256  
  3257  type ProjectsLocationsDataExchangesListingsGetIamPolicyCall struct {
  3258  	s                   *Service
  3259  	resource            string
  3260  	getiampolicyrequest *GetIamPolicyRequest
  3261  	urlParams_          gensupport.URLParams
  3262  	ctx_                context.Context
  3263  	header_             http.Header
  3264  }
  3265  
  3266  // GetIamPolicy: Gets the IAM policy.
  3267  //
  3268  //   - resource: REQUIRED: The resource for which the policy is being requested.
  3269  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  3270  //     for the appropriate value for this field.
  3271  func (r *ProjectsLocationsDataExchangesListingsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsDataExchangesListingsGetIamPolicyCall {
  3272  	c := &ProjectsLocationsDataExchangesListingsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3273  	c.resource = resource
  3274  	c.getiampolicyrequest = getiampolicyrequest
  3275  	return c
  3276  }
  3277  
  3278  // Fields allows partial responses to be retrieved. See
  3279  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3280  // details.
  3281  func (c *ProjectsLocationsDataExchangesListingsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsGetIamPolicyCall {
  3282  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3283  	return c
  3284  }
  3285  
  3286  // Context sets the context to be used in this call's Do method.
  3287  func (c *ProjectsLocationsDataExchangesListingsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsGetIamPolicyCall {
  3288  	c.ctx_ = ctx
  3289  	return c
  3290  }
  3291  
  3292  // Header returns a http.Header that can be modified by the caller to add
  3293  // headers to the request.
  3294  func (c *ProjectsLocationsDataExchangesListingsGetIamPolicyCall) Header() http.Header {
  3295  	if c.header_ == nil {
  3296  		c.header_ = make(http.Header)
  3297  	}
  3298  	return c.header_
  3299  }
  3300  
  3301  func (c *ProjectsLocationsDataExchangesListingsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  3302  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3303  	var body io.Reader = nil
  3304  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
  3305  	if err != nil {
  3306  		return nil, err
  3307  	}
  3308  	c.urlParams_.Set("alt", alt)
  3309  	c.urlParams_.Set("prettyPrint", "false")
  3310  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  3311  	urls += "?" + c.urlParams_.Encode()
  3312  	req, err := http.NewRequest("POST", urls, body)
  3313  	if err != nil {
  3314  		return nil, err
  3315  	}
  3316  	req.Header = reqHeaders
  3317  	googleapi.Expand(req.URL, map[string]string{
  3318  		"resource": c.resource,
  3319  	})
  3320  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3321  }
  3322  
  3323  // Do executes the "analyticshub.projects.locations.dataExchanges.listings.getIamPolicy" call.
  3324  // Any non-2xx status code is an error. Response headers are in either
  3325  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  3326  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3327  // whether the returned error was because http.StatusNotModified was returned.
  3328  func (c *ProjectsLocationsDataExchangesListingsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  3329  	gensupport.SetOptions(c.urlParams_, opts...)
  3330  	res, err := c.doRequest("json")
  3331  	if res != nil && res.StatusCode == http.StatusNotModified {
  3332  		if res.Body != nil {
  3333  			res.Body.Close()
  3334  		}
  3335  		return nil, gensupport.WrapError(&googleapi.Error{
  3336  			Code:   res.StatusCode,
  3337  			Header: res.Header,
  3338  		})
  3339  	}
  3340  	if err != nil {
  3341  		return nil, err
  3342  	}
  3343  	defer googleapi.CloseBody(res)
  3344  	if err := googleapi.CheckResponse(res); err != nil {
  3345  		return nil, gensupport.WrapError(err)
  3346  	}
  3347  	ret := &Policy{
  3348  		ServerResponse: googleapi.ServerResponse{
  3349  			Header:         res.Header,
  3350  			HTTPStatusCode: res.StatusCode,
  3351  		},
  3352  	}
  3353  	target := &ret
  3354  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3355  		return nil, err
  3356  	}
  3357  	return ret, nil
  3358  }
  3359  
  3360  type ProjectsLocationsDataExchangesListingsListCall struct {
  3361  	s            *Service
  3362  	parent       string
  3363  	urlParams_   gensupport.URLParams
  3364  	ifNoneMatch_ string
  3365  	ctx_         context.Context
  3366  	header_      http.Header
  3367  }
  3368  
  3369  // List: Lists all listings in a given project and location.
  3370  //
  3371  //   - parent: The parent resource path of the listing. e.g.
  3372  //     `projects/myproject/locations/US/dataExchanges/123`.
  3373  func (r *ProjectsLocationsDataExchangesListingsService) List(parent string) *ProjectsLocationsDataExchangesListingsListCall {
  3374  	c := &ProjectsLocationsDataExchangesListingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3375  	c.parent = parent
  3376  	return c
  3377  }
  3378  
  3379  // PageSize sets the optional parameter "pageSize": The maximum number of
  3380  // results to return in a single response page. Leverage the page tokens to
  3381  // iterate through the entire collection.
  3382  func (c *ProjectsLocationsDataExchangesListingsListCall) PageSize(pageSize int64) *ProjectsLocationsDataExchangesListingsListCall {
  3383  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3384  	return c
  3385  }
  3386  
  3387  // PageToken sets the optional parameter "pageToken": Page token, returned by a
  3388  // previous call, to request the next page of results.
  3389  func (c *ProjectsLocationsDataExchangesListingsListCall) PageToken(pageToken string) *ProjectsLocationsDataExchangesListingsListCall {
  3390  	c.urlParams_.Set("pageToken", pageToken)
  3391  	return c
  3392  }
  3393  
  3394  // Fields allows partial responses to be retrieved. See
  3395  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3396  // details.
  3397  func (c *ProjectsLocationsDataExchangesListingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsListCall {
  3398  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3399  	return c
  3400  }
  3401  
  3402  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3403  // object's ETag matches the given value. This is useful for getting updates
  3404  // only after the object has changed since the last request.
  3405  func (c *ProjectsLocationsDataExchangesListingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataExchangesListingsListCall {
  3406  	c.ifNoneMatch_ = entityTag
  3407  	return c
  3408  }
  3409  
  3410  // Context sets the context to be used in this call's Do method.
  3411  func (c *ProjectsLocationsDataExchangesListingsListCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsListCall {
  3412  	c.ctx_ = ctx
  3413  	return c
  3414  }
  3415  
  3416  // Header returns a http.Header that can be modified by the caller to add
  3417  // headers to the request.
  3418  func (c *ProjectsLocationsDataExchangesListingsListCall) Header() http.Header {
  3419  	if c.header_ == nil {
  3420  		c.header_ = make(http.Header)
  3421  	}
  3422  	return c.header_
  3423  }
  3424  
  3425  func (c *ProjectsLocationsDataExchangesListingsListCall) doRequest(alt string) (*http.Response, error) {
  3426  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3427  	if c.ifNoneMatch_ != "" {
  3428  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3429  	}
  3430  	var body io.Reader = nil
  3431  	c.urlParams_.Set("alt", alt)
  3432  	c.urlParams_.Set("prettyPrint", "false")
  3433  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/listings")
  3434  	urls += "?" + c.urlParams_.Encode()
  3435  	req, err := http.NewRequest("GET", urls, body)
  3436  	if err != nil {
  3437  		return nil, err
  3438  	}
  3439  	req.Header = reqHeaders
  3440  	googleapi.Expand(req.URL, map[string]string{
  3441  		"parent": c.parent,
  3442  	})
  3443  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3444  }
  3445  
  3446  // Do executes the "analyticshub.projects.locations.dataExchanges.listings.list" call.
  3447  // Any non-2xx status code is an error. Response headers are in either
  3448  // *ListListingsResponse.ServerResponse.Header or (if a response was returned
  3449  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3450  // check whether the returned error was because http.StatusNotModified was
  3451  // returned.
  3452  func (c *ProjectsLocationsDataExchangesListingsListCall) Do(opts ...googleapi.CallOption) (*ListListingsResponse, error) {
  3453  	gensupport.SetOptions(c.urlParams_, opts...)
  3454  	res, err := c.doRequest("json")
  3455  	if res != nil && res.StatusCode == http.StatusNotModified {
  3456  		if res.Body != nil {
  3457  			res.Body.Close()
  3458  		}
  3459  		return nil, gensupport.WrapError(&googleapi.Error{
  3460  			Code:   res.StatusCode,
  3461  			Header: res.Header,
  3462  		})
  3463  	}
  3464  	if err != nil {
  3465  		return nil, err
  3466  	}
  3467  	defer googleapi.CloseBody(res)
  3468  	if err := googleapi.CheckResponse(res); err != nil {
  3469  		return nil, gensupport.WrapError(err)
  3470  	}
  3471  	ret := &ListListingsResponse{
  3472  		ServerResponse: googleapi.ServerResponse{
  3473  			Header:         res.Header,
  3474  			HTTPStatusCode: res.StatusCode,
  3475  		},
  3476  	}
  3477  	target := &ret
  3478  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3479  		return nil, err
  3480  	}
  3481  	return ret, nil
  3482  }
  3483  
  3484  // Pages invokes f for each page of results.
  3485  // A non-nil error returned from f will halt the iteration.
  3486  // The provided context supersedes any context provided to the Context method.
  3487  func (c *ProjectsLocationsDataExchangesListingsListCall) Pages(ctx context.Context, f func(*ListListingsResponse) error) error {
  3488  	c.ctx_ = ctx
  3489  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3490  	for {
  3491  		x, err := c.Do()
  3492  		if err != nil {
  3493  			return err
  3494  		}
  3495  		if err := f(x); err != nil {
  3496  			return err
  3497  		}
  3498  		if x.NextPageToken == "" {
  3499  			return nil
  3500  		}
  3501  		c.PageToken(x.NextPageToken)
  3502  	}
  3503  }
  3504  
  3505  type ProjectsLocationsDataExchangesListingsListSubscriptionsCall struct {
  3506  	s            *Service
  3507  	resource     string
  3508  	urlParams_   gensupport.URLParams
  3509  	ifNoneMatch_ string
  3510  	ctx_         context.Context
  3511  	header_      http.Header
  3512  }
  3513  
  3514  // ListSubscriptions: Lists all subscriptions on a given Data Exchange or
  3515  // Listing.
  3516  //
  3517  //   - resource: Resource name of the requested target. This resource may be
  3518  //     either a Listing or a DataExchange. e.g.
  3519  //     projects/123/locations/US/dataExchanges/456 OR e.g.
  3520  //     projects/123/locations/US/dataExchanges/456/listings/789.
  3521  func (r *ProjectsLocationsDataExchangesListingsService) ListSubscriptions(resource string) *ProjectsLocationsDataExchangesListingsListSubscriptionsCall {
  3522  	c := &ProjectsLocationsDataExchangesListingsListSubscriptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3523  	c.resource = resource
  3524  	return c
  3525  }
  3526  
  3527  // IncludeDeletedSubscriptions sets the optional parameter
  3528  // "includeDeletedSubscriptions": If selected, includes deleted subscriptions
  3529  // in the response (up to 63 days after deletion).
  3530  func (c *ProjectsLocationsDataExchangesListingsListSubscriptionsCall) IncludeDeletedSubscriptions(includeDeletedSubscriptions bool) *ProjectsLocationsDataExchangesListingsListSubscriptionsCall {
  3531  	c.urlParams_.Set("includeDeletedSubscriptions", fmt.Sprint(includeDeletedSubscriptions))
  3532  	return c
  3533  }
  3534  
  3535  // PageSize sets the optional parameter "pageSize": The maximum number of
  3536  // results to return in a single response page.
  3537  func (c *ProjectsLocationsDataExchangesListingsListSubscriptionsCall) PageSize(pageSize int64) *ProjectsLocationsDataExchangesListingsListSubscriptionsCall {
  3538  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3539  	return c
  3540  }
  3541  
  3542  // PageToken sets the optional parameter "pageToken": Page token, returned by a
  3543  // previous call.
  3544  func (c *ProjectsLocationsDataExchangesListingsListSubscriptionsCall) PageToken(pageToken string) *ProjectsLocationsDataExchangesListingsListSubscriptionsCall {
  3545  	c.urlParams_.Set("pageToken", pageToken)
  3546  	return c
  3547  }
  3548  
  3549  // Fields allows partial responses to be retrieved. See
  3550  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3551  // details.
  3552  func (c *ProjectsLocationsDataExchangesListingsListSubscriptionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsListSubscriptionsCall {
  3553  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3554  	return c
  3555  }
  3556  
  3557  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3558  // object's ETag matches the given value. This is useful for getting updates
  3559  // only after the object has changed since the last request.
  3560  func (c *ProjectsLocationsDataExchangesListingsListSubscriptionsCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataExchangesListingsListSubscriptionsCall {
  3561  	c.ifNoneMatch_ = entityTag
  3562  	return c
  3563  }
  3564  
  3565  // Context sets the context to be used in this call's Do method.
  3566  func (c *ProjectsLocationsDataExchangesListingsListSubscriptionsCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsListSubscriptionsCall {
  3567  	c.ctx_ = ctx
  3568  	return c
  3569  }
  3570  
  3571  // Header returns a http.Header that can be modified by the caller to add
  3572  // headers to the request.
  3573  func (c *ProjectsLocationsDataExchangesListingsListSubscriptionsCall) Header() http.Header {
  3574  	if c.header_ == nil {
  3575  		c.header_ = make(http.Header)
  3576  	}
  3577  	return c.header_
  3578  }
  3579  
  3580  func (c *ProjectsLocationsDataExchangesListingsListSubscriptionsCall) doRequest(alt string) (*http.Response, error) {
  3581  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3582  	if c.ifNoneMatch_ != "" {
  3583  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3584  	}
  3585  	var body io.Reader = nil
  3586  	c.urlParams_.Set("alt", alt)
  3587  	c.urlParams_.Set("prettyPrint", "false")
  3588  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:listSubscriptions")
  3589  	urls += "?" + c.urlParams_.Encode()
  3590  	req, err := http.NewRequest("GET", urls, body)
  3591  	if err != nil {
  3592  		return nil, err
  3593  	}
  3594  	req.Header = reqHeaders
  3595  	googleapi.Expand(req.URL, map[string]string{
  3596  		"resource": c.resource,
  3597  	})
  3598  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3599  }
  3600  
  3601  // Do executes the "analyticshub.projects.locations.dataExchanges.listings.listSubscriptions" call.
  3602  // Any non-2xx status code is an error. Response headers are in either
  3603  // *ListSharedResourceSubscriptionsResponse.ServerResponse.Header or (if a
  3604  // response was returned at all) in error.(*googleapi.Error).Header. Use
  3605  // googleapi.IsNotModified to check whether the returned error was because
  3606  // http.StatusNotModified was returned.
  3607  func (c *ProjectsLocationsDataExchangesListingsListSubscriptionsCall) Do(opts ...googleapi.CallOption) (*ListSharedResourceSubscriptionsResponse, error) {
  3608  	gensupport.SetOptions(c.urlParams_, opts...)
  3609  	res, err := c.doRequest("json")
  3610  	if res != nil && res.StatusCode == http.StatusNotModified {
  3611  		if res.Body != nil {
  3612  			res.Body.Close()
  3613  		}
  3614  		return nil, gensupport.WrapError(&googleapi.Error{
  3615  			Code:   res.StatusCode,
  3616  			Header: res.Header,
  3617  		})
  3618  	}
  3619  	if err != nil {
  3620  		return nil, err
  3621  	}
  3622  	defer googleapi.CloseBody(res)
  3623  	if err := googleapi.CheckResponse(res); err != nil {
  3624  		return nil, gensupport.WrapError(err)
  3625  	}
  3626  	ret := &ListSharedResourceSubscriptionsResponse{
  3627  		ServerResponse: googleapi.ServerResponse{
  3628  			Header:         res.Header,
  3629  			HTTPStatusCode: res.StatusCode,
  3630  		},
  3631  	}
  3632  	target := &ret
  3633  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3634  		return nil, err
  3635  	}
  3636  	return ret, nil
  3637  }
  3638  
  3639  // Pages invokes f for each page of results.
  3640  // A non-nil error returned from f will halt the iteration.
  3641  // The provided context supersedes any context provided to the Context method.
  3642  func (c *ProjectsLocationsDataExchangesListingsListSubscriptionsCall) Pages(ctx context.Context, f func(*ListSharedResourceSubscriptionsResponse) error) error {
  3643  	c.ctx_ = ctx
  3644  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3645  	for {
  3646  		x, err := c.Do()
  3647  		if err != nil {
  3648  			return err
  3649  		}
  3650  		if err := f(x); err != nil {
  3651  			return err
  3652  		}
  3653  		if x.NextPageToken == "" {
  3654  			return nil
  3655  		}
  3656  		c.PageToken(x.NextPageToken)
  3657  	}
  3658  }
  3659  
  3660  type ProjectsLocationsDataExchangesListingsPatchCall struct {
  3661  	s          *Service
  3662  	name       string
  3663  	listing    *Listing
  3664  	urlParams_ gensupport.URLParams
  3665  	ctx_       context.Context
  3666  	header_    http.Header
  3667  }
  3668  
  3669  // Patch: Updates an existing listing.
  3670  //
  3671  //   - name: Output only. The resource name of the listing. e.g.
  3672  //     `projects/myproject/locations/US/dataExchanges/123/listings/456`.
  3673  func (r *ProjectsLocationsDataExchangesListingsService) Patch(name string, listing *Listing) *ProjectsLocationsDataExchangesListingsPatchCall {
  3674  	c := &ProjectsLocationsDataExchangesListingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3675  	c.name = name
  3676  	c.listing = listing
  3677  	return c
  3678  }
  3679  
  3680  // UpdateMask sets the optional parameter "updateMask": Required. Field mask
  3681  // specifies the fields to update in the listing resource. The fields specified
  3682  // in the `updateMask` are relative to the resource and are not a full request.
  3683  func (c *ProjectsLocationsDataExchangesListingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataExchangesListingsPatchCall {
  3684  	c.urlParams_.Set("updateMask", updateMask)
  3685  	return c
  3686  }
  3687  
  3688  // Fields allows partial responses to be retrieved. See
  3689  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3690  // details.
  3691  func (c *ProjectsLocationsDataExchangesListingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsPatchCall {
  3692  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3693  	return c
  3694  }
  3695  
  3696  // Context sets the context to be used in this call's Do method.
  3697  func (c *ProjectsLocationsDataExchangesListingsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsPatchCall {
  3698  	c.ctx_ = ctx
  3699  	return c
  3700  }
  3701  
  3702  // Header returns a http.Header that can be modified by the caller to add
  3703  // headers to the request.
  3704  func (c *ProjectsLocationsDataExchangesListingsPatchCall) Header() http.Header {
  3705  	if c.header_ == nil {
  3706  		c.header_ = make(http.Header)
  3707  	}
  3708  	return c.header_
  3709  }
  3710  
  3711  func (c *ProjectsLocationsDataExchangesListingsPatchCall) doRequest(alt string) (*http.Response, error) {
  3712  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3713  	var body io.Reader = nil
  3714  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.listing)
  3715  	if err != nil {
  3716  		return nil, err
  3717  	}
  3718  	c.urlParams_.Set("alt", alt)
  3719  	c.urlParams_.Set("prettyPrint", "false")
  3720  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3721  	urls += "?" + c.urlParams_.Encode()
  3722  	req, err := http.NewRequest("PATCH", urls, body)
  3723  	if err != nil {
  3724  		return nil, err
  3725  	}
  3726  	req.Header = reqHeaders
  3727  	googleapi.Expand(req.URL, map[string]string{
  3728  		"name": c.name,
  3729  	})
  3730  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3731  }
  3732  
  3733  // Do executes the "analyticshub.projects.locations.dataExchanges.listings.patch" call.
  3734  // Any non-2xx status code is an error. Response headers are in either
  3735  // *Listing.ServerResponse.Header or (if a response was returned at all) in
  3736  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3737  // whether the returned error was because http.StatusNotModified was returned.
  3738  func (c *ProjectsLocationsDataExchangesListingsPatchCall) Do(opts ...googleapi.CallOption) (*Listing, error) {
  3739  	gensupport.SetOptions(c.urlParams_, opts...)
  3740  	res, err := c.doRequest("json")
  3741  	if res != nil && res.StatusCode == http.StatusNotModified {
  3742  		if res.Body != nil {
  3743  			res.Body.Close()
  3744  		}
  3745  		return nil, gensupport.WrapError(&googleapi.Error{
  3746  			Code:   res.StatusCode,
  3747  			Header: res.Header,
  3748  		})
  3749  	}
  3750  	if err != nil {
  3751  		return nil, err
  3752  	}
  3753  	defer googleapi.CloseBody(res)
  3754  	if err := googleapi.CheckResponse(res); err != nil {
  3755  		return nil, gensupport.WrapError(err)
  3756  	}
  3757  	ret := &Listing{
  3758  		ServerResponse: googleapi.ServerResponse{
  3759  			Header:         res.Header,
  3760  			HTTPStatusCode: res.StatusCode,
  3761  		},
  3762  	}
  3763  	target := &ret
  3764  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3765  		return nil, err
  3766  	}
  3767  	return ret, nil
  3768  }
  3769  
  3770  type ProjectsLocationsDataExchangesListingsSetIamPolicyCall struct {
  3771  	s                   *Service
  3772  	resource            string
  3773  	setiampolicyrequest *SetIamPolicyRequest
  3774  	urlParams_          gensupport.URLParams
  3775  	ctx_                context.Context
  3776  	header_             http.Header
  3777  }
  3778  
  3779  // SetIamPolicy: Sets the IAM policy.
  3780  //
  3781  //   - resource: REQUIRED: The resource for which the policy is being specified.
  3782  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  3783  //     for the appropriate value for this field.
  3784  func (r *ProjectsLocationsDataExchangesListingsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDataExchangesListingsSetIamPolicyCall {
  3785  	c := &ProjectsLocationsDataExchangesListingsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3786  	c.resource = resource
  3787  	c.setiampolicyrequest = setiampolicyrequest
  3788  	return c
  3789  }
  3790  
  3791  // Fields allows partial responses to be retrieved. See
  3792  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3793  // details.
  3794  func (c *ProjectsLocationsDataExchangesListingsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsSetIamPolicyCall {
  3795  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3796  	return c
  3797  }
  3798  
  3799  // Context sets the context to be used in this call's Do method.
  3800  func (c *ProjectsLocationsDataExchangesListingsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsSetIamPolicyCall {
  3801  	c.ctx_ = ctx
  3802  	return c
  3803  }
  3804  
  3805  // Header returns a http.Header that can be modified by the caller to add
  3806  // headers to the request.
  3807  func (c *ProjectsLocationsDataExchangesListingsSetIamPolicyCall) Header() http.Header {
  3808  	if c.header_ == nil {
  3809  		c.header_ = make(http.Header)
  3810  	}
  3811  	return c.header_
  3812  }
  3813  
  3814  func (c *ProjectsLocationsDataExchangesListingsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  3815  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3816  	var body io.Reader = nil
  3817  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  3818  	if err != nil {
  3819  		return nil, err
  3820  	}
  3821  	c.urlParams_.Set("alt", alt)
  3822  	c.urlParams_.Set("prettyPrint", "false")
  3823  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  3824  	urls += "?" + c.urlParams_.Encode()
  3825  	req, err := http.NewRequest("POST", urls, body)
  3826  	if err != nil {
  3827  		return nil, err
  3828  	}
  3829  	req.Header = reqHeaders
  3830  	googleapi.Expand(req.URL, map[string]string{
  3831  		"resource": c.resource,
  3832  	})
  3833  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3834  }
  3835  
  3836  // Do executes the "analyticshub.projects.locations.dataExchanges.listings.setIamPolicy" call.
  3837  // Any non-2xx status code is an error. Response headers are in either
  3838  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  3839  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3840  // whether the returned error was because http.StatusNotModified was returned.
  3841  func (c *ProjectsLocationsDataExchangesListingsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  3842  	gensupport.SetOptions(c.urlParams_, opts...)
  3843  	res, err := c.doRequest("json")
  3844  	if res != nil && res.StatusCode == http.StatusNotModified {
  3845  		if res.Body != nil {
  3846  			res.Body.Close()
  3847  		}
  3848  		return nil, gensupport.WrapError(&googleapi.Error{
  3849  			Code:   res.StatusCode,
  3850  			Header: res.Header,
  3851  		})
  3852  	}
  3853  	if err != nil {
  3854  		return nil, err
  3855  	}
  3856  	defer googleapi.CloseBody(res)
  3857  	if err := googleapi.CheckResponse(res); err != nil {
  3858  		return nil, gensupport.WrapError(err)
  3859  	}
  3860  	ret := &Policy{
  3861  		ServerResponse: googleapi.ServerResponse{
  3862  			Header:         res.Header,
  3863  			HTTPStatusCode: res.StatusCode,
  3864  		},
  3865  	}
  3866  	target := &ret
  3867  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3868  		return nil, err
  3869  	}
  3870  	return ret, nil
  3871  }
  3872  
  3873  type ProjectsLocationsDataExchangesListingsSubscribeCall struct {
  3874  	s                       *Service
  3875  	name                    string
  3876  	subscribelistingrequest *SubscribeListingRequest
  3877  	urlParams_              gensupport.URLParams
  3878  	ctx_                    context.Context
  3879  	header_                 http.Header
  3880  }
  3881  
  3882  // Subscribe: Subscribes to a listing. Currently, with Analytics Hub, you can
  3883  // create listings that reference only BigQuery datasets. Upon subscription to
  3884  // a listing for a BigQuery dataset, Analytics Hub creates a linked dataset in
  3885  // the subscriber's project.
  3886  //
  3887  //   - name: Resource name of the listing that you want to subscribe to. e.g.
  3888  //     `projects/myproject/locations/US/dataExchanges/123/listings/456`.
  3889  func (r *ProjectsLocationsDataExchangesListingsService) Subscribe(name string, subscribelistingrequest *SubscribeListingRequest) *ProjectsLocationsDataExchangesListingsSubscribeCall {
  3890  	c := &ProjectsLocationsDataExchangesListingsSubscribeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3891  	c.name = name
  3892  	c.subscribelistingrequest = subscribelistingrequest
  3893  	return c
  3894  }
  3895  
  3896  // Fields allows partial responses to be retrieved. See
  3897  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3898  // details.
  3899  func (c *ProjectsLocationsDataExchangesListingsSubscribeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsSubscribeCall {
  3900  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3901  	return c
  3902  }
  3903  
  3904  // Context sets the context to be used in this call's Do method.
  3905  func (c *ProjectsLocationsDataExchangesListingsSubscribeCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsSubscribeCall {
  3906  	c.ctx_ = ctx
  3907  	return c
  3908  }
  3909  
  3910  // Header returns a http.Header that can be modified by the caller to add
  3911  // headers to the request.
  3912  func (c *ProjectsLocationsDataExchangesListingsSubscribeCall) Header() http.Header {
  3913  	if c.header_ == nil {
  3914  		c.header_ = make(http.Header)
  3915  	}
  3916  	return c.header_
  3917  }
  3918  
  3919  func (c *ProjectsLocationsDataExchangesListingsSubscribeCall) doRequest(alt string) (*http.Response, error) {
  3920  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3921  	var body io.Reader = nil
  3922  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subscribelistingrequest)
  3923  	if err != nil {
  3924  		return nil, err
  3925  	}
  3926  	c.urlParams_.Set("alt", alt)
  3927  	c.urlParams_.Set("prettyPrint", "false")
  3928  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:subscribe")
  3929  	urls += "?" + c.urlParams_.Encode()
  3930  	req, err := http.NewRequest("POST", urls, body)
  3931  	if err != nil {
  3932  		return nil, err
  3933  	}
  3934  	req.Header = reqHeaders
  3935  	googleapi.Expand(req.URL, map[string]string{
  3936  		"name": c.name,
  3937  	})
  3938  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3939  }
  3940  
  3941  // Do executes the "analyticshub.projects.locations.dataExchanges.listings.subscribe" call.
  3942  // Any non-2xx status code is an error. Response headers are in either
  3943  // *SubscribeListingResponse.ServerResponse.Header or (if a response was
  3944  // returned at all) in error.(*googleapi.Error).Header. Use
  3945  // googleapi.IsNotModified to check whether the returned error was because
  3946  // http.StatusNotModified was returned.
  3947  func (c *ProjectsLocationsDataExchangesListingsSubscribeCall) Do(opts ...googleapi.CallOption) (*SubscribeListingResponse, error) {
  3948  	gensupport.SetOptions(c.urlParams_, opts...)
  3949  	res, err := c.doRequest("json")
  3950  	if res != nil && res.StatusCode == http.StatusNotModified {
  3951  		if res.Body != nil {
  3952  			res.Body.Close()
  3953  		}
  3954  		return nil, gensupport.WrapError(&googleapi.Error{
  3955  			Code:   res.StatusCode,
  3956  			Header: res.Header,
  3957  		})
  3958  	}
  3959  	if err != nil {
  3960  		return nil, err
  3961  	}
  3962  	defer googleapi.CloseBody(res)
  3963  	if err := googleapi.CheckResponse(res); err != nil {
  3964  		return nil, gensupport.WrapError(err)
  3965  	}
  3966  	ret := &SubscribeListingResponse{
  3967  		ServerResponse: googleapi.ServerResponse{
  3968  			Header:         res.Header,
  3969  			HTTPStatusCode: res.StatusCode,
  3970  		},
  3971  	}
  3972  	target := &ret
  3973  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3974  		return nil, err
  3975  	}
  3976  	return ret, nil
  3977  }
  3978  
  3979  type ProjectsLocationsDataExchangesListingsTestIamPermissionsCall struct {
  3980  	s                         *Service
  3981  	resource                  string
  3982  	testiampermissionsrequest *TestIamPermissionsRequest
  3983  	urlParams_                gensupport.URLParams
  3984  	ctx_                      context.Context
  3985  	header_                   http.Header
  3986  }
  3987  
  3988  // TestIamPermissions: Returns the permissions that a caller has.
  3989  //
  3990  //   - resource: REQUIRED: The resource for which the policy detail is being
  3991  //     requested. See Resource names
  3992  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  3993  //     value for this field.
  3994  func (r *ProjectsLocationsDataExchangesListingsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDataExchangesListingsTestIamPermissionsCall {
  3995  	c := &ProjectsLocationsDataExchangesListingsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3996  	c.resource = resource
  3997  	c.testiampermissionsrequest = testiampermissionsrequest
  3998  	return c
  3999  }
  4000  
  4001  // Fields allows partial responses to be retrieved. See
  4002  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4003  // details.
  4004  func (c *ProjectsLocationsDataExchangesListingsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsTestIamPermissionsCall {
  4005  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4006  	return c
  4007  }
  4008  
  4009  // Context sets the context to be used in this call's Do method.
  4010  func (c *ProjectsLocationsDataExchangesListingsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsTestIamPermissionsCall {
  4011  	c.ctx_ = ctx
  4012  	return c
  4013  }
  4014  
  4015  // Header returns a http.Header that can be modified by the caller to add
  4016  // headers to the request.
  4017  func (c *ProjectsLocationsDataExchangesListingsTestIamPermissionsCall) Header() http.Header {
  4018  	if c.header_ == nil {
  4019  		c.header_ = make(http.Header)
  4020  	}
  4021  	return c.header_
  4022  }
  4023  
  4024  func (c *ProjectsLocationsDataExchangesListingsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  4025  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4026  	var body io.Reader = nil
  4027  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  4028  	if err != nil {
  4029  		return nil, err
  4030  	}
  4031  	c.urlParams_.Set("alt", alt)
  4032  	c.urlParams_.Set("prettyPrint", "false")
  4033  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  4034  	urls += "?" + c.urlParams_.Encode()
  4035  	req, err := http.NewRequest("POST", urls, body)
  4036  	if err != nil {
  4037  		return nil, err
  4038  	}
  4039  	req.Header = reqHeaders
  4040  	googleapi.Expand(req.URL, map[string]string{
  4041  		"resource": c.resource,
  4042  	})
  4043  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4044  }
  4045  
  4046  // Do executes the "analyticshub.projects.locations.dataExchanges.listings.testIamPermissions" call.
  4047  // Any non-2xx status code is an error. Response headers are in either
  4048  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  4049  // returned at all) in error.(*googleapi.Error).Header. Use
  4050  // googleapi.IsNotModified to check whether the returned error was because
  4051  // http.StatusNotModified was returned.
  4052  func (c *ProjectsLocationsDataExchangesListingsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  4053  	gensupport.SetOptions(c.urlParams_, opts...)
  4054  	res, err := c.doRequest("json")
  4055  	if res != nil && res.StatusCode == http.StatusNotModified {
  4056  		if res.Body != nil {
  4057  			res.Body.Close()
  4058  		}
  4059  		return nil, gensupport.WrapError(&googleapi.Error{
  4060  			Code:   res.StatusCode,
  4061  			Header: res.Header,
  4062  		})
  4063  	}
  4064  	if err != nil {
  4065  		return nil, err
  4066  	}
  4067  	defer googleapi.CloseBody(res)
  4068  	if err := googleapi.CheckResponse(res); err != nil {
  4069  		return nil, gensupport.WrapError(err)
  4070  	}
  4071  	ret := &TestIamPermissionsResponse{
  4072  		ServerResponse: googleapi.ServerResponse{
  4073  			Header:         res.Header,
  4074  			HTTPStatusCode: res.StatusCode,
  4075  		},
  4076  	}
  4077  	target := &ret
  4078  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4079  		return nil, err
  4080  	}
  4081  	return ret, nil
  4082  }
  4083  
  4084  type ProjectsLocationsSubscriptionsDeleteCall struct {
  4085  	s          *Service
  4086  	name       string
  4087  	urlParams_ gensupport.URLParams
  4088  	ctx_       context.Context
  4089  	header_    http.Header
  4090  }
  4091  
  4092  // Delete: Deletes a subscription.
  4093  //
  4094  //   - name: Resource name of the subscription to delete. e.g.
  4095  //     projects/123/locations/US/subscriptions/456.
  4096  func (r *ProjectsLocationsSubscriptionsService) Delete(name string) *ProjectsLocationsSubscriptionsDeleteCall {
  4097  	c := &ProjectsLocationsSubscriptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4098  	c.name = name
  4099  	return c
  4100  }
  4101  
  4102  // Fields allows partial responses to be retrieved. See
  4103  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4104  // details.
  4105  func (c *ProjectsLocationsSubscriptionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSubscriptionsDeleteCall {
  4106  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4107  	return c
  4108  }
  4109  
  4110  // Context sets the context to be used in this call's Do method.
  4111  func (c *ProjectsLocationsSubscriptionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSubscriptionsDeleteCall {
  4112  	c.ctx_ = ctx
  4113  	return c
  4114  }
  4115  
  4116  // Header returns a http.Header that can be modified by the caller to add
  4117  // headers to the request.
  4118  func (c *ProjectsLocationsSubscriptionsDeleteCall) Header() http.Header {
  4119  	if c.header_ == nil {
  4120  		c.header_ = make(http.Header)
  4121  	}
  4122  	return c.header_
  4123  }
  4124  
  4125  func (c *ProjectsLocationsSubscriptionsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4126  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4127  	var body io.Reader = nil
  4128  	c.urlParams_.Set("alt", alt)
  4129  	c.urlParams_.Set("prettyPrint", "false")
  4130  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4131  	urls += "?" + c.urlParams_.Encode()
  4132  	req, err := http.NewRequest("DELETE", urls, body)
  4133  	if err != nil {
  4134  		return nil, err
  4135  	}
  4136  	req.Header = reqHeaders
  4137  	googleapi.Expand(req.URL, map[string]string{
  4138  		"name": c.name,
  4139  	})
  4140  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4141  }
  4142  
  4143  // Do executes the "analyticshub.projects.locations.subscriptions.delete" call.
  4144  // Any non-2xx status code is an error. Response headers are in either
  4145  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4146  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4147  // whether the returned error was because http.StatusNotModified was returned.
  4148  func (c *ProjectsLocationsSubscriptionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4149  	gensupport.SetOptions(c.urlParams_, opts...)
  4150  	res, err := c.doRequest("json")
  4151  	if res != nil && res.StatusCode == http.StatusNotModified {
  4152  		if res.Body != nil {
  4153  			res.Body.Close()
  4154  		}
  4155  		return nil, gensupport.WrapError(&googleapi.Error{
  4156  			Code:   res.StatusCode,
  4157  			Header: res.Header,
  4158  		})
  4159  	}
  4160  	if err != nil {
  4161  		return nil, err
  4162  	}
  4163  	defer googleapi.CloseBody(res)
  4164  	if err := googleapi.CheckResponse(res); err != nil {
  4165  		return nil, gensupport.WrapError(err)
  4166  	}
  4167  	ret := &Operation{
  4168  		ServerResponse: googleapi.ServerResponse{
  4169  			Header:         res.Header,
  4170  			HTTPStatusCode: res.StatusCode,
  4171  		},
  4172  	}
  4173  	target := &ret
  4174  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4175  		return nil, err
  4176  	}
  4177  	return ret, nil
  4178  }
  4179  
  4180  type ProjectsLocationsSubscriptionsGetCall struct {
  4181  	s            *Service
  4182  	name         string
  4183  	urlParams_   gensupport.URLParams
  4184  	ifNoneMatch_ string
  4185  	ctx_         context.Context
  4186  	header_      http.Header
  4187  }
  4188  
  4189  // Get: Gets the details of a Subscription.
  4190  //
  4191  //   - name: Resource name of the subscription. e.g.
  4192  //     projects/123/locations/US/subscriptions/456.
  4193  func (r *ProjectsLocationsSubscriptionsService) Get(name string) *ProjectsLocationsSubscriptionsGetCall {
  4194  	c := &ProjectsLocationsSubscriptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4195  	c.name = name
  4196  	return c
  4197  }
  4198  
  4199  // Fields allows partial responses to be retrieved. See
  4200  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4201  // details.
  4202  func (c *ProjectsLocationsSubscriptionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSubscriptionsGetCall {
  4203  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4204  	return c
  4205  }
  4206  
  4207  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4208  // object's ETag matches the given value. This is useful for getting updates
  4209  // only after the object has changed since the last request.
  4210  func (c *ProjectsLocationsSubscriptionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSubscriptionsGetCall {
  4211  	c.ifNoneMatch_ = entityTag
  4212  	return c
  4213  }
  4214  
  4215  // Context sets the context to be used in this call's Do method.
  4216  func (c *ProjectsLocationsSubscriptionsGetCall) Context(ctx context.Context) *ProjectsLocationsSubscriptionsGetCall {
  4217  	c.ctx_ = ctx
  4218  	return c
  4219  }
  4220  
  4221  // Header returns a http.Header that can be modified by the caller to add
  4222  // headers to the request.
  4223  func (c *ProjectsLocationsSubscriptionsGetCall) Header() http.Header {
  4224  	if c.header_ == nil {
  4225  		c.header_ = make(http.Header)
  4226  	}
  4227  	return c.header_
  4228  }
  4229  
  4230  func (c *ProjectsLocationsSubscriptionsGetCall) doRequest(alt string) (*http.Response, error) {
  4231  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4232  	if c.ifNoneMatch_ != "" {
  4233  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4234  	}
  4235  	var body io.Reader = nil
  4236  	c.urlParams_.Set("alt", alt)
  4237  	c.urlParams_.Set("prettyPrint", "false")
  4238  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4239  	urls += "?" + c.urlParams_.Encode()
  4240  	req, err := http.NewRequest("GET", urls, body)
  4241  	if err != nil {
  4242  		return nil, err
  4243  	}
  4244  	req.Header = reqHeaders
  4245  	googleapi.Expand(req.URL, map[string]string{
  4246  		"name": c.name,
  4247  	})
  4248  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4249  }
  4250  
  4251  // Do executes the "analyticshub.projects.locations.subscriptions.get" call.
  4252  // Any non-2xx status code is an error. Response headers are in either
  4253  // *Subscription.ServerResponse.Header or (if a response was returned at all)
  4254  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4255  // whether the returned error was because http.StatusNotModified was returned.
  4256  func (c *ProjectsLocationsSubscriptionsGetCall) Do(opts ...googleapi.CallOption) (*Subscription, error) {
  4257  	gensupport.SetOptions(c.urlParams_, opts...)
  4258  	res, err := c.doRequest("json")
  4259  	if res != nil && res.StatusCode == http.StatusNotModified {
  4260  		if res.Body != nil {
  4261  			res.Body.Close()
  4262  		}
  4263  		return nil, gensupport.WrapError(&googleapi.Error{
  4264  			Code:   res.StatusCode,
  4265  			Header: res.Header,
  4266  		})
  4267  	}
  4268  	if err != nil {
  4269  		return nil, err
  4270  	}
  4271  	defer googleapi.CloseBody(res)
  4272  	if err := googleapi.CheckResponse(res); err != nil {
  4273  		return nil, gensupport.WrapError(err)
  4274  	}
  4275  	ret := &Subscription{
  4276  		ServerResponse: googleapi.ServerResponse{
  4277  			Header:         res.Header,
  4278  			HTTPStatusCode: res.StatusCode,
  4279  		},
  4280  	}
  4281  	target := &ret
  4282  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4283  		return nil, err
  4284  	}
  4285  	return ret, nil
  4286  }
  4287  
  4288  type ProjectsLocationsSubscriptionsGetIamPolicyCall struct {
  4289  	s                   *Service
  4290  	resource            string
  4291  	getiampolicyrequest *GetIamPolicyRequest
  4292  	urlParams_          gensupport.URLParams
  4293  	ctx_                context.Context
  4294  	header_             http.Header
  4295  }
  4296  
  4297  // GetIamPolicy: Gets the IAM policy.
  4298  //
  4299  //   - resource: REQUIRED: The resource for which the policy is being requested.
  4300  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  4301  //     for the appropriate value for this field.
  4302  func (r *ProjectsLocationsSubscriptionsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsSubscriptionsGetIamPolicyCall {
  4303  	c := &ProjectsLocationsSubscriptionsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4304  	c.resource = resource
  4305  	c.getiampolicyrequest = getiampolicyrequest
  4306  	return c
  4307  }
  4308  
  4309  // Fields allows partial responses to be retrieved. See
  4310  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4311  // details.
  4312  func (c *ProjectsLocationsSubscriptionsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsSubscriptionsGetIamPolicyCall {
  4313  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4314  	return c
  4315  }
  4316  
  4317  // Context sets the context to be used in this call's Do method.
  4318  func (c *ProjectsLocationsSubscriptionsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsSubscriptionsGetIamPolicyCall {
  4319  	c.ctx_ = ctx
  4320  	return c
  4321  }
  4322  
  4323  // Header returns a http.Header that can be modified by the caller to add
  4324  // headers to the request.
  4325  func (c *ProjectsLocationsSubscriptionsGetIamPolicyCall) Header() http.Header {
  4326  	if c.header_ == nil {
  4327  		c.header_ = make(http.Header)
  4328  	}
  4329  	return c.header_
  4330  }
  4331  
  4332  func (c *ProjectsLocationsSubscriptionsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4333  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4334  	var body io.Reader = nil
  4335  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
  4336  	if err != nil {
  4337  		return nil, err
  4338  	}
  4339  	c.urlParams_.Set("alt", alt)
  4340  	c.urlParams_.Set("prettyPrint", "false")
  4341  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  4342  	urls += "?" + c.urlParams_.Encode()
  4343  	req, err := http.NewRequest("POST", urls, body)
  4344  	if err != nil {
  4345  		return nil, err
  4346  	}
  4347  	req.Header = reqHeaders
  4348  	googleapi.Expand(req.URL, map[string]string{
  4349  		"resource": c.resource,
  4350  	})
  4351  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4352  }
  4353  
  4354  // Do executes the "analyticshub.projects.locations.subscriptions.getIamPolicy" call.
  4355  // Any non-2xx status code is an error. Response headers are in either
  4356  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  4357  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4358  // whether the returned error was because http.StatusNotModified was returned.
  4359  func (c *ProjectsLocationsSubscriptionsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4360  	gensupport.SetOptions(c.urlParams_, opts...)
  4361  	res, err := c.doRequest("json")
  4362  	if res != nil && res.StatusCode == http.StatusNotModified {
  4363  		if res.Body != nil {
  4364  			res.Body.Close()
  4365  		}
  4366  		return nil, gensupport.WrapError(&googleapi.Error{
  4367  			Code:   res.StatusCode,
  4368  			Header: res.Header,
  4369  		})
  4370  	}
  4371  	if err != nil {
  4372  		return nil, err
  4373  	}
  4374  	defer googleapi.CloseBody(res)
  4375  	if err := googleapi.CheckResponse(res); err != nil {
  4376  		return nil, gensupport.WrapError(err)
  4377  	}
  4378  	ret := &Policy{
  4379  		ServerResponse: googleapi.ServerResponse{
  4380  			Header:         res.Header,
  4381  			HTTPStatusCode: res.StatusCode,
  4382  		},
  4383  	}
  4384  	target := &ret
  4385  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4386  		return nil, err
  4387  	}
  4388  	return ret, nil
  4389  }
  4390  
  4391  type ProjectsLocationsSubscriptionsListCall struct {
  4392  	s            *Service
  4393  	parent       string
  4394  	urlParams_   gensupport.URLParams
  4395  	ifNoneMatch_ string
  4396  	ctx_         context.Context
  4397  	header_      http.Header
  4398  }
  4399  
  4400  // List: Lists all subscriptions in a given project and location.
  4401  //
  4402  //   - parent: The parent resource path of the subscription. e.g.
  4403  //     projects/myproject/locations/US.
  4404  func (r *ProjectsLocationsSubscriptionsService) List(parent string) *ProjectsLocationsSubscriptionsListCall {
  4405  	c := &ProjectsLocationsSubscriptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4406  	c.parent = parent
  4407  	return c
  4408  }
  4409  
  4410  // Filter sets the optional parameter "filter": An expression for filtering the
  4411  // results of the request. Eligible fields for filtering are: + `listing` +
  4412  // `data_exchange` Alternatively, a literal wrapped in double quotes may be
  4413  // provided. This will be checked for an exact match against both fields above.
  4414  // In all cases, the full Data Exchange or Listing resource name must be
  4415  // provided. Some example of using filters: +
  4416  // data_exchange="projects/myproject/locations/us/dataExchanges/123" +
  4417  // listing="projects/123/locations/us/dataExchanges/456/listings/789" +
  4418  // "projects/myproject/locations/us/dataExchanges/123"
  4419  func (c *ProjectsLocationsSubscriptionsListCall) Filter(filter string) *ProjectsLocationsSubscriptionsListCall {
  4420  	c.urlParams_.Set("filter", filter)
  4421  	return c
  4422  }
  4423  
  4424  // PageSize sets the optional parameter "pageSize": The maximum number of
  4425  // results to return in a single response page.
  4426  func (c *ProjectsLocationsSubscriptionsListCall) PageSize(pageSize int64) *ProjectsLocationsSubscriptionsListCall {
  4427  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4428  	return c
  4429  }
  4430  
  4431  // PageToken sets the optional parameter "pageToken": Page token, returned by a
  4432  // previous call.
  4433  func (c *ProjectsLocationsSubscriptionsListCall) PageToken(pageToken string) *ProjectsLocationsSubscriptionsListCall {
  4434  	c.urlParams_.Set("pageToken", pageToken)
  4435  	return c
  4436  }
  4437  
  4438  // Fields allows partial responses to be retrieved. See
  4439  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4440  // details.
  4441  func (c *ProjectsLocationsSubscriptionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSubscriptionsListCall {
  4442  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4443  	return c
  4444  }
  4445  
  4446  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4447  // object's ETag matches the given value. This is useful for getting updates
  4448  // only after the object has changed since the last request.
  4449  func (c *ProjectsLocationsSubscriptionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSubscriptionsListCall {
  4450  	c.ifNoneMatch_ = entityTag
  4451  	return c
  4452  }
  4453  
  4454  // Context sets the context to be used in this call's Do method.
  4455  func (c *ProjectsLocationsSubscriptionsListCall) Context(ctx context.Context) *ProjectsLocationsSubscriptionsListCall {
  4456  	c.ctx_ = ctx
  4457  	return c
  4458  }
  4459  
  4460  // Header returns a http.Header that can be modified by the caller to add
  4461  // headers to the request.
  4462  func (c *ProjectsLocationsSubscriptionsListCall) Header() http.Header {
  4463  	if c.header_ == nil {
  4464  		c.header_ = make(http.Header)
  4465  	}
  4466  	return c.header_
  4467  }
  4468  
  4469  func (c *ProjectsLocationsSubscriptionsListCall) doRequest(alt string) (*http.Response, error) {
  4470  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4471  	if c.ifNoneMatch_ != "" {
  4472  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4473  	}
  4474  	var body io.Reader = nil
  4475  	c.urlParams_.Set("alt", alt)
  4476  	c.urlParams_.Set("prettyPrint", "false")
  4477  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/subscriptions")
  4478  	urls += "?" + c.urlParams_.Encode()
  4479  	req, err := http.NewRequest("GET", urls, body)
  4480  	if err != nil {
  4481  		return nil, err
  4482  	}
  4483  	req.Header = reqHeaders
  4484  	googleapi.Expand(req.URL, map[string]string{
  4485  		"parent": c.parent,
  4486  	})
  4487  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4488  }
  4489  
  4490  // Do executes the "analyticshub.projects.locations.subscriptions.list" call.
  4491  // Any non-2xx status code is an error. Response headers are in either
  4492  // *ListSubscriptionsResponse.ServerResponse.Header or (if a response was
  4493  // returned at all) in error.(*googleapi.Error).Header. Use
  4494  // googleapi.IsNotModified to check whether the returned error was because
  4495  // http.StatusNotModified was returned.
  4496  func (c *ProjectsLocationsSubscriptionsListCall) Do(opts ...googleapi.CallOption) (*ListSubscriptionsResponse, error) {
  4497  	gensupport.SetOptions(c.urlParams_, opts...)
  4498  	res, err := c.doRequest("json")
  4499  	if res != nil && res.StatusCode == http.StatusNotModified {
  4500  		if res.Body != nil {
  4501  			res.Body.Close()
  4502  		}
  4503  		return nil, gensupport.WrapError(&googleapi.Error{
  4504  			Code:   res.StatusCode,
  4505  			Header: res.Header,
  4506  		})
  4507  	}
  4508  	if err != nil {
  4509  		return nil, err
  4510  	}
  4511  	defer googleapi.CloseBody(res)
  4512  	if err := googleapi.CheckResponse(res); err != nil {
  4513  		return nil, gensupport.WrapError(err)
  4514  	}
  4515  	ret := &ListSubscriptionsResponse{
  4516  		ServerResponse: googleapi.ServerResponse{
  4517  			Header:         res.Header,
  4518  			HTTPStatusCode: res.StatusCode,
  4519  		},
  4520  	}
  4521  	target := &ret
  4522  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4523  		return nil, err
  4524  	}
  4525  	return ret, nil
  4526  }
  4527  
  4528  // Pages invokes f for each page of results.
  4529  // A non-nil error returned from f will halt the iteration.
  4530  // The provided context supersedes any context provided to the Context method.
  4531  func (c *ProjectsLocationsSubscriptionsListCall) Pages(ctx context.Context, f func(*ListSubscriptionsResponse) error) error {
  4532  	c.ctx_ = ctx
  4533  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4534  	for {
  4535  		x, err := c.Do()
  4536  		if err != nil {
  4537  			return err
  4538  		}
  4539  		if err := f(x); err != nil {
  4540  			return err
  4541  		}
  4542  		if x.NextPageToken == "" {
  4543  			return nil
  4544  		}
  4545  		c.PageToken(x.NextPageToken)
  4546  	}
  4547  }
  4548  
  4549  type ProjectsLocationsSubscriptionsRefreshCall struct {
  4550  	s                          *Service
  4551  	name                       string
  4552  	refreshsubscriptionrequest *RefreshSubscriptionRequest
  4553  	urlParams_                 gensupport.URLParams
  4554  	ctx_                       context.Context
  4555  	header_                    http.Header
  4556  }
  4557  
  4558  // Refresh: Refreshes a Subscription to a Data Exchange. A Data Exchange can
  4559  // become stale when a publisher adds or removes data. This is a long-running
  4560  // operation as it may create many linked datasets.
  4561  //
  4562  //   - name: Resource name of the Subscription to refresh. e.g.
  4563  //     `projects/subscriberproject/locations/US/subscriptions/123`.
  4564  func (r *ProjectsLocationsSubscriptionsService) Refresh(name string, refreshsubscriptionrequest *RefreshSubscriptionRequest) *ProjectsLocationsSubscriptionsRefreshCall {
  4565  	c := &ProjectsLocationsSubscriptionsRefreshCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4566  	c.name = name
  4567  	c.refreshsubscriptionrequest = refreshsubscriptionrequest
  4568  	return c
  4569  }
  4570  
  4571  // Fields allows partial responses to be retrieved. See
  4572  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4573  // details.
  4574  func (c *ProjectsLocationsSubscriptionsRefreshCall) Fields(s ...googleapi.Field) *ProjectsLocationsSubscriptionsRefreshCall {
  4575  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4576  	return c
  4577  }
  4578  
  4579  // Context sets the context to be used in this call's Do method.
  4580  func (c *ProjectsLocationsSubscriptionsRefreshCall) Context(ctx context.Context) *ProjectsLocationsSubscriptionsRefreshCall {
  4581  	c.ctx_ = ctx
  4582  	return c
  4583  }
  4584  
  4585  // Header returns a http.Header that can be modified by the caller to add
  4586  // headers to the request.
  4587  func (c *ProjectsLocationsSubscriptionsRefreshCall) Header() http.Header {
  4588  	if c.header_ == nil {
  4589  		c.header_ = make(http.Header)
  4590  	}
  4591  	return c.header_
  4592  }
  4593  
  4594  func (c *ProjectsLocationsSubscriptionsRefreshCall) doRequest(alt string) (*http.Response, error) {
  4595  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4596  	var body io.Reader = nil
  4597  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.refreshsubscriptionrequest)
  4598  	if err != nil {
  4599  		return nil, err
  4600  	}
  4601  	c.urlParams_.Set("alt", alt)
  4602  	c.urlParams_.Set("prettyPrint", "false")
  4603  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:refresh")
  4604  	urls += "?" + c.urlParams_.Encode()
  4605  	req, err := http.NewRequest("POST", urls, body)
  4606  	if err != nil {
  4607  		return nil, err
  4608  	}
  4609  	req.Header = reqHeaders
  4610  	googleapi.Expand(req.URL, map[string]string{
  4611  		"name": c.name,
  4612  	})
  4613  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4614  }
  4615  
  4616  // Do executes the "analyticshub.projects.locations.subscriptions.refresh" call.
  4617  // Any non-2xx status code is an error. Response headers are in either
  4618  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4619  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4620  // whether the returned error was because http.StatusNotModified was returned.
  4621  func (c *ProjectsLocationsSubscriptionsRefreshCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4622  	gensupport.SetOptions(c.urlParams_, opts...)
  4623  	res, err := c.doRequest("json")
  4624  	if res != nil && res.StatusCode == http.StatusNotModified {
  4625  		if res.Body != nil {
  4626  			res.Body.Close()
  4627  		}
  4628  		return nil, gensupport.WrapError(&googleapi.Error{
  4629  			Code:   res.StatusCode,
  4630  			Header: res.Header,
  4631  		})
  4632  	}
  4633  	if err != nil {
  4634  		return nil, err
  4635  	}
  4636  	defer googleapi.CloseBody(res)
  4637  	if err := googleapi.CheckResponse(res); err != nil {
  4638  		return nil, gensupport.WrapError(err)
  4639  	}
  4640  	ret := &Operation{
  4641  		ServerResponse: googleapi.ServerResponse{
  4642  			Header:         res.Header,
  4643  			HTTPStatusCode: res.StatusCode,
  4644  		},
  4645  	}
  4646  	target := &ret
  4647  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4648  		return nil, err
  4649  	}
  4650  	return ret, nil
  4651  }
  4652  
  4653  type ProjectsLocationsSubscriptionsRevokeCall struct {
  4654  	s                         *Service
  4655  	name                      string
  4656  	revokesubscriptionrequest *RevokeSubscriptionRequest
  4657  	urlParams_                gensupport.URLParams
  4658  	ctx_                      context.Context
  4659  	header_                   http.Header
  4660  }
  4661  
  4662  // Revoke: Revokes a given subscription.
  4663  //
  4664  //   - name: Resource name of the subscription to revoke. e.g.
  4665  //     projects/123/locations/US/subscriptions/456.
  4666  func (r *ProjectsLocationsSubscriptionsService) Revoke(name string, revokesubscriptionrequest *RevokeSubscriptionRequest) *ProjectsLocationsSubscriptionsRevokeCall {
  4667  	c := &ProjectsLocationsSubscriptionsRevokeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4668  	c.name = name
  4669  	c.revokesubscriptionrequest = revokesubscriptionrequest
  4670  	return c
  4671  }
  4672  
  4673  // Fields allows partial responses to be retrieved. See
  4674  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4675  // details.
  4676  func (c *ProjectsLocationsSubscriptionsRevokeCall) Fields(s ...googleapi.Field) *ProjectsLocationsSubscriptionsRevokeCall {
  4677  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4678  	return c
  4679  }
  4680  
  4681  // Context sets the context to be used in this call's Do method.
  4682  func (c *ProjectsLocationsSubscriptionsRevokeCall) Context(ctx context.Context) *ProjectsLocationsSubscriptionsRevokeCall {
  4683  	c.ctx_ = ctx
  4684  	return c
  4685  }
  4686  
  4687  // Header returns a http.Header that can be modified by the caller to add
  4688  // headers to the request.
  4689  func (c *ProjectsLocationsSubscriptionsRevokeCall) Header() http.Header {
  4690  	if c.header_ == nil {
  4691  		c.header_ = make(http.Header)
  4692  	}
  4693  	return c.header_
  4694  }
  4695  
  4696  func (c *ProjectsLocationsSubscriptionsRevokeCall) doRequest(alt string) (*http.Response, error) {
  4697  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4698  	var body io.Reader = nil
  4699  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.revokesubscriptionrequest)
  4700  	if err != nil {
  4701  		return nil, err
  4702  	}
  4703  	c.urlParams_.Set("alt", alt)
  4704  	c.urlParams_.Set("prettyPrint", "false")
  4705  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:revoke")
  4706  	urls += "?" + c.urlParams_.Encode()
  4707  	req, err := http.NewRequest("POST", urls, body)
  4708  	if err != nil {
  4709  		return nil, err
  4710  	}
  4711  	req.Header = reqHeaders
  4712  	googleapi.Expand(req.URL, map[string]string{
  4713  		"name": c.name,
  4714  	})
  4715  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4716  }
  4717  
  4718  // Do executes the "analyticshub.projects.locations.subscriptions.revoke" call.
  4719  // Any non-2xx status code is an error. Response headers are in either
  4720  // *RevokeSubscriptionResponse.ServerResponse.Header or (if a response was
  4721  // returned at all) in error.(*googleapi.Error).Header. Use
  4722  // googleapi.IsNotModified to check whether the returned error was because
  4723  // http.StatusNotModified was returned.
  4724  func (c *ProjectsLocationsSubscriptionsRevokeCall) Do(opts ...googleapi.CallOption) (*RevokeSubscriptionResponse, error) {
  4725  	gensupport.SetOptions(c.urlParams_, opts...)
  4726  	res, err := c.doRequest("json")
  4727  	if res != nil && res.StatusCode == http.StatusNotModified {
  4728  		if res.Body != nil {
  4729  			res.Body.Close()
  4730  		}
  4731  		return nil, gensupport.WrapError(&googleapi.Error{
  4732  			Code:   res.StatusCode,
  4733  			Header: res.Header,
  4734  		})
  4735  	}
  4736  	if err != nil {
  4737  		return nil, err
  4738  	}
  4739  	defer googleapi.CloseBody(res)
  4740  	if err := googleapi.CheckResponse(res); err != nil {
  4741  		return nil, gensupport.WrapError(err)
  4742  	}
  4743  	ret := &RevokeSubscriptionResponse{
  4744  		ServerResponse: googleapi.ServerResponse{
  4745  			Header:         res.Header,
  4746  			HTTPStatusCode: res.StatusCode,
  4747  		},
  4748  	}
  4749  	target := &ret
  4750  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4751  		return nil, err
  4752  	}
  4753  	return ret, nil
  4754  }
  4755  
  4756  type ProjectsLocationsSubscriptionsSetIamPolicyCall struct {
  4757  	s                   *Service
  4758  	resource            string
  4759  	setiampolicyrequest *SetIamPolicyRequest
  4760  	urlParams_          gensupport.URLParams
  4761  	ctx_                context.Context
  4762  	header_             http.Header
  4763  }
  4764  
  4765  // SetIamPolicy: Sets the IAM policy.
  4766  //
  4767  //   - resource: REQUIRED: The resource for which the policy is being specified.
  4768  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  4769  //     for the appropriate value for this field.
  4770  func (r *ProjectsLocationsSubscriptionsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsSubscriptionsSetIamPolicyCall {
  4771  	c := &ProjectsLocationsSubscriptionsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4772  	c.resource = resource
  4773  	c.setiampolicyrequest = setiampolicyrequest
  4774  	return c
  4775  }
  4776  
  4777  // Fields allows partial responses to be retrieved. See
  4778  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4779  // details.
  4780  func (c *ProjectsLocationsSubscriptionsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsSubscriptionsSetIamPolicyCall {
  4781  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4782  	return c
  4783  }
  4784  
  4785  // Context sets the context to be used in this call's Do method.
  4786  func (c *ProjectsLocationsSubscriptionsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsSubscriptionsSetIamPolicyCall {
  4787  	c.ctx_ = ctx
  4788  	return c
  4789  }
  4790  
  4791  // Header returns a http.Header that can be modified by the caller to add
  4792  // headers to the request.
  4793  func (c *ProjectsLocationsSubscriptionsSetIamPolicyCall) Header() http.Header {
  4794  	if c.header_ == nil {
  4795  		c.header_ = make(http.Header)
  4796  	}
  4797  	return c.header_
  4798  }
  4799  
  4800  func (c *ProjectsLocationsSubscriptionsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4801  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4802  	var body io.Reader = nil
  4803  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  4804  	if err != nil {
  4805  		return nil, err
  4806  	}
  4807  	c.urlParams_.Set("alt", alt)
  4808  	c.urlParams_.Set("prettyPrint", "false")
  4809  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  4810  	urls += "?" + c.urlParams_.Encode()
  4811  	req, err := http.NewRequest("POST", urls, body)
  4812  	if err != nil {
  4813  		return nil, err
  4814  	}
  4815  	req.Header = reqHeaders
  4816  	googleapi.Expand(req.URL, map[string]string{
  4817  		"resource": c.resource,
  4818  	})
  4819  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4820  }
  4821  
  4822  // Do executes the "analyticshub.projects.locations.subscriptions.setIamPolicy" call.
  4823  // Any non-2xx status code is an error. Response headers are in either
  4824  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  4825  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4826  // whether the returned error was because http.StatusNotModified was returned.
  4827  func (c *ProjectsLocationsSubscriptionsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4828  	gensupport.SetOptions(c.urlParams_, opts...)
  4829  	res, err := c.doRequest("json")
  4830  	if res != nil && res.StatusCode == http.StatusNotModified {
  4831  		if res.Body != nil {
  4832  			res.Body.Close()
  4833  		}
  4834  		return nil, gensupport.WrapError(&googleapi.Error{
  4835  			Code:   res.StatusCode,
  4836  			Header: res.Header,
  4837  		})
  4838  	}
  4839  	if err != nil {
  4840  		return nil, err
  4841  	}
  4842  	defer googleapi.CloseBody(res)
  4843  	if err := googleapi.CheckResponse(res); err != nil {
  4844  		return nil, gensupport.WrapError(err)
  4845  	}
  4846  	ret := &Policy{
  4847  		ServerResponse: googleapi.ServerResponse{
  4848  			Header:         res.Header,
  4849  			HTTPStatusCode: res.StatusCode,
  4850  		},
  4851  	}
  4852  	target := &ret
  4853  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4854  		return nil, err
  4855  	}
  4856  	return ret, nil
  4857  }
  4858  

View as plain text