...

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

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

     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/v1beta1"
    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/v1beta1"
    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:v1beta1"
    95  const apiName = "analyticshub"
    96  const apiVersion = "v1beta1"
    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  	return rs
   219  }
   220  
   221  type ProjectsLocationsService struct {
   222  	s *Service
   223  
   224  	DataExchanges *ProjectsLocationsDataExchangesService
   225  }
   226  
   227  func NewProjectsLocationsDataExchangesService(s *Service) *ProjectsLocationsDataExchangesService {
   228  	rs := &ProjectsLocationsDataExchangesService{s: s}
   229  	rs.Listings = NewProjectsLocationsDataExchangesListingsService(s)
   230  	return rs
   231  }
   232  
   233  type ProjectsLocationsDataExchangesService struct {
   234  	s *Service
   235  
   236  	Listings *ProjectsLocationsDataExchangesListingsService
   237  }
   238  
   239  func NewProjectsLocationsDataExchangesListingsService(s *Service) *ProjectsLocationsDataExchangesListingsService {
   240  	rs := &ProjectsLocationsDataExchangesListingsService{s: s}
   241  	return rs
   242  }
   243  
   244  type ProjectsLocationsDataExchangesListingsService struct {
   245  	s *Service
   246  }
   247  
   248  // AuditConfig: Specifies the audit configuration for a service. The
   249  // configuration determines which permission types are logged, and what
   250  // identities, if any, are exempted from logging. An AuditConfig must have one
   251  // or more AuditLogConfigs. If there are AuditConfigs for both `allServices`
   252  // and a specific service, the union of the two AuditConfigs is used for that
   253  // service: the log_types specified in each AuditConfig are enabled, and the
   254  // exempted_members in each AuditLogConfig are exempted. Example Policy with
   255  // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices",
   256  // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [
   257  // "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type":
   258  // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com",
   259  // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type":
   260  // "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For
   261  // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
   262  // logging. It also exempts `jose@example.com` from DATA_READ logging, and
   263  // `aliya@example.com` from DATA_WRITE logging.
   264  type AuditConfig struct {
   265  	// AuditLogConfigs: The configuration for logging of each type of permission.
   266  	AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
   267  	// Service: Specifies a service that will be enabled for audit logging. For
   268  	// example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices`
   269  	// is a special value that covers all services.
   270  	Service string `json:"service,omitempty"`
   271  	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
   272  	// unconditionally include in API requests. By default, fields with empty or
   273  	// default values are omitted from API requests. See
   274  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   275  	// details.
   276  	ForceSendFields []string `json:"-"`
   277  	// NullFields is a list of field names (e.g. "AuditLogConfigs") to include in
   278  	// API requests with the JSON null value. By default, fields with empty values
   279  	// are omitted from API requests. See
   280  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   281  	NullFields []string `json:"-"`
   282  }
   283  
   284  func (s *AuditConfig) MarshalJSON() ([]byte, error) {
   285  	type NoMethod AuditConfig
   286  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   287  }
   288  
   289  // AuditLogConfig: Provides the configuration for logging a type of
   290  // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ",
   291  // "exempted_members": [ "user:jose@example.com" ] }, { "log_type":
   292  // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while
   293  // exempting jose@example.com from DATA_READ logging.
   294  type AuditLogConfig struct {
   295  	// ExemptedMembers: Specifies the identities that do not cause logging for this
   296  	// type of permission. Follows the same format of Binding.members.
   297  	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
   298  	// LogType: The log type that this config enables.
   299  	//
   300  	// Possible values:
   301  	//   "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
   302  	//   "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
   303  	//   "DATA_WRITE" - Data writes. Example: CloudSQL Users create
   304  	//   "DATA_READ" - Data reads. Example: CloudSQL Users list
   305  	LogType string `json:"logType,omitempty"`
   306  	// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
   307  	// unconditionally include in API requests. By default, fields with empty or
   308  	// default values are omitted from API requests. See
   309  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   310  	// details.
   311  	ForceSendFields []string `json:"-"`
   312  	// NullFields is a list of field names (e.g. "ExemptedMembers") to include in
   313  	// API requests with the JSON null value. By default, fields with empty values
   314  	// are omitted from API requests. See
   315  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   316  	NullFields []string `json:"-"`
   317  }
   318  
   319  func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
   320  	type NoMethod AuditLogConfig
   321  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   322  }
   323  
   324  // BigQueryDatasetSource: A reference to a shared dataset. It is an existing
   325  // BigQuery dataset with a collection of objects such as tables and views that
   326  // you want to share with subscribers. When subscriber's subscribe to a
   327  // listing, Analytics Hub creates a linked dataset in the subscriber's project.
   328  // A Linked dataset is an opaque, read-only BigQuery dataset that serves as a
   329  // _symbolic link_ to a shared dataset.
   330  type BigQueryDatasetSource struct {
   331  	// Dataset: Resource name of the dataset source for this listing. e.g.
   332  	// `projects/myproject/datasets/123`
   333  	Dataset string `json:"dataset,omitempty"`
   334  	// ForceSendFields is a list of field names (e.g. "Dataset") to unconditionally
   335  	// include in API requests. By default, fields with empty or default values are
   336  	// omitted from API requests. See
   337  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   338  	// details.
   339  	ForceSendFields []string `json:"-"`
   340  	// NullFields is a list of field names (e.g. "Dataset") to include in API
   341  	// requests with the JSON null value. By default, fields with empty values are
   342  	// omitted from API requests. See
   343  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   344  	NullFields []string `json:"-"`
   345  }
   346  
   347  func (s *BigQueryDatasetSource) MarshalJSON() ([]byte, error) {
   348  	type NoMethod BigQueryDatasetSource
   349  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   350  }
   351  
   352  // Binding: Associates `members`, or principals, with a `role`.
   353  type Binding struct {
   354  	// Condition: The condition that is associated with this binding. If the
   355  	// condition evaluates to `true`, then this binding applies to the current
   356  	// request. If the condition evaluates to `false`, then this binding does not
   357  	// apply to the current request. However, a different role binding might grant
   358  	// the same role to one or more of the principals in this binding. To learn
   359  	// which resources support conditions in their IAM policies, see the IAM
   360  	// documentation
   361  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
   362  	Condition *Expr `json:"condition,omitempty"`
   363  	// Members: Specifies the principals requesting access for a Google Cloud
   364  	// resource. `members` can have the following values: * `allUsers`: A special
   365  	// identifier that represents anyone who is on the internet; with or without a
   366  	// Google account. * `allAuthenticatedUsers`: A special identifier that
   367  	// represents anyone who is authenticated with a Google account or a service
   368  	// account. Does not include identities that come from external identity
   369  	// providers (IdPs) through identity federation. * `user:{emailid}`: An email
   370  	// address that represents a specific Google account. For example,
   371  	// `alice@example.com` . * `serviceAccount:{emailid}`: An email address that
   372  	// represents a Google service account. For example,
   373  	// `my-other-app@appspot.gserviceaccount.com`. *
   374  	// `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
   375  	// identifier for a Kubernetes service account
   376  	// (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
   377  	// For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
   378  	// `group:{emailid}`: An email address that represents a Google group. For
   379  	// example, `admins@example.com`. * `domain:{domain}`: The G Suite domain
   380  	// (primary) that represents all the users of that domain. For example,
   381  	// `google.com` or `example.com`. *
   382  	// `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub
   383  	// ject/{subject_attribute_value}`: A single identity in a workforce identity
   384  	// pool. *
   385  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   386  	// group/{group_id}`: All workforce identities in a group. *
   387  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   388  	// attribute.{attribute_name}/{attribute_value}`: All workforce identities with
   389  	// a specific attribute value. *
   390  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   391  	// *`: All identities in a workforce identity pool. *
   392  	// `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo
   393  	// rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single
   394  	// identity in a workload identity pool. *
   395  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   396  	// /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool
   397  	// group. *
   398  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   399  	// /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}
   400  	// `: All identities in a workload identity pool with a certain attribute. *
   401  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   402  	// /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity
   403  	// pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus
   404  	// unique identifier) representing a user that has been recently deleted. For
   405  	// example, `alice@example.com?uid=123456789012345678901`. If the user is
   406  	// recovered, this value reverts to `user:{emailid}` and the recovered user
   407  	// retains the role in the binding. *
   408  	// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
   409  	// unique identifier) representing a service account that has been recently
   410  	// deleted. For example,
   411  	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the
   412  	// service account is undeleted, this value reverts to
   413  	// `serviceAccount:{emailid}` and the undeleted service account retains the
   414  	// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
   415  	// address (plus unique identifier) representing a Google group that has been
   416  	// recently deleted. For example,
   417  	// `admins@example.com?uid=123456789012345678901`. If the group is recovered,
   418  	// this value reverts to `group:{emailid}` and the recovered group retains the
   419  	// role in the binding. *
   420  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool
   421  	// _id}/subject/{subject_attribute_value}`: Deleted single identity in a
   422  	// workforce identity pool. For example,
   423  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po
   424  	// ol-id/subject/my-subject-attribute-value`.
   425  	Members []string `json:"members,omitempty"`
   426  	// Role: Role that is assigned to the list of `members`, or principals. For
   427  	// example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview
   428  	// of the IAM roles and permissions, see the IAM documentation
   429  	// (https://cloud.google.com/iam/docs/roles-overview). For a list of the
   430  	// available pre-defined roles, see here
   431  	// (https://cloud.google.com/iam/docs/understanding-roles).
   432  	Role string `json:"role,omitempty"`
   433  	// ForceSendFields is a list of field names (e.g. "Condition") to
   434  	// unconditionally include in API requests. By default, fields with empty or
   435  	// default values are omitted from API requests. See
   436  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   437  	// details.
   438  	ForceSendFields []string `json:"-"`
   439  	// NullFields is a list of field names (e.g. "Condition") to include in API
   440  	// requests with the JSON null value. By default, fields with empty values are
   441  	// omitted from API requests. See
   442  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   443  	NullFields []string `json:"-"`
   444  }
   445  
   446  func (s *Binding) MarshalJSON() ([]byte, error) {
   447  	type NoMethod Binding
   448  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   449  }
   450  
   451  // DataExchange: A data exchange is a container that lets you share data. Along
   452  // with the descriptive information about the data exchange, it contains
   453  // listings that reference shared datasets.
   454  type DataExchange struct {
   455  	// Description: Optional. Description of the data exchange. The description
   456  	// must not contain Unicode non-characters as well as C0 and C1 control codes
   457  	// except tabs (HT), new lines (LF), carriage returns (CR), and page breaks
   458  	// (FF). Default value is an empty string. Max length: 2000 bytes.
   459  	Description string `json:"description,omitempty"`
   460  	// DisplayName: Required. Human-readable display name of the data exchange. The
   461  	// display name must contain only Unicode letters, numbers (0-9), underscores
   462  	// (_), dashes (-), spaces ( ), ampersands (&) and must not start or end with
   463  	// spaces. Default value is an empty string. Max length: 63 bytes.
   464  	DisplayName string `json:"displayName,omitempty"`
   465  	// Documentation: Optional. Documentation describing the data exchange.
   466  	Documentation string `json:"documentation,omitempty"`
   467  	// Icon: Optional. Base64 encoded image representing the data exchange. Max
   468  	// Size: 3.0MiB Expected image dimensions are 512x512 pixels, however the API
   469  	// only performs validation on size of the encoded data. Note: For byte fields,
   470  	// the content of the fields are base64-encoded (which increases the size of
   471  	// the data by 33-36%) when using JSON on the wire.
   472  	Icon string `json:"icon,omitempty"`
   473  	// ListingCount: Output only. Number of listings contained in the data
   474  	// exchange.
   475  	ListingCount int64 `json:"listingCount,omitempty"`
   476  	// Name: Output only. The resource name of the data exchange. e.g.
   477  	// `projects/myproject/locations/US/dataExchanges/123`.
   478  	Name string `json:"name,omitempty"`
   479  	// PrimaryContact: Optional. Email or URL of the primary point of contact of
   480  	// the data exchange. Max Length: 1000 bytes.
   481  	PrimaryContact string `json:"primaryContact,omitempty"`
   482  
   483  	// ServerResponse contains the HTTP response code and headers from the server.
   484  	googleapi.ServerResponse `json:"-"`
   485  	// ForceSendFields is a list of field names (e.g. "Description") to
   486  	// unconditionally include in API requests. By default, fields with empty or
   487  	// default values are omitted from API requests. See
   488  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   489  	// details.
   490  	ForceSendFields []string `json:"-"`
   491  	// NullFields is a list of field names (e.g. "Description") to include in API
   492  	// requests with the JSON null value. By default, fields with empty values are
   493  	// omitted from API requests. See
   494  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   495  	NullFields []string `json:"-"`
   496  }
   497  
   498  func (s *DataExchange) MarshalJSON() ([]byte, error) {
   499  	type NoMethod DataExchange
   500  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   501  }
   502  
   503  // DataProvider: Contains details of the data provider.
   504  type DataProvider struct {
   505  	// Name: Optional. Name of the data provider.
   506  	Name string `json:"name,omitempty"`
   507  	// PrimaryContact: Optional. Email or URL of the data provider. Max Length:
   508  	// 1000 bytes.
   509  	PrimaryContact string `json:"primaryContact,omitempty"`
   510  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
   511  	// include in API requests. By default, fields with empty or default values are
   512  	// omitted from API requests. See
   513  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   514  	// details.
   515  	ForceSendFields []string `json:"-"`
   516  	// NullFields is a list of field names (e.g. "Name") to include in API requests
   517  	// with the JSON null value. By default, fields with empty values are omitted
   518  	// from API requests. See
   519  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   520  	NullFields []string `json:"-"`
   521  }
   522  
   523  func (s *DataProvider) MarshalJSON() ([]byte, error) {
   524  	type NoMethod DataProvider
   525  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   526  }
   527  
   528  // DestinationDataset: Defines the destination bigquery dataset.
   529  type DestinationDataset struct {
   530  	// DatasetReference: Required. A reference that identifies the destination
   531  	// dataset.
   532  	DatasetReference *DestinationDatasetReference `json:"datasetReference,omitempty"`
   533  	// Description: Optional. A user-friendly description of the dataset.
   534  	Description string `json:"description,omitempty"`
   535  	// FriendlyName: Optional. A descriptive name for the dataset.
   536  	FriendlyName string `json:"friendlyName,omitempty"`
   537  	// Labels: Optional. The labels associated with this dataset. You can use these
   538  	// to organize and group your datasets. You can set this property when
   539  	// inserting or updating a dataset. See
   540  	// https://cloud.google.com/resource-manager/docs/creating-managing-labels for
   541  	// more information.
   542  	Labels map[string]string `json:"labels,omitempty"`
   543  	// Location: Required. The geographic location where the dataset should reside.
   544  	// See https://cloud.google.com/bigquery/docs/locations for supported
   545  	// locations.
   546  	Location string `json:"location,omitempty"`
   547  	// ForceSendFields is a list of field names (e.g. "DatasetReference") to
   548  	// unconditionally include in API requests. By default, fields with empty or
   549  	// default values are omitted from API requests. See
   550  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   551  	// details.
   552  	ForceSendFields []string `json:"-"`
   553  	// NullFields is a list of field names (e.g. "DatasetReference") to include in
   554  	// API requests with the JSON null value. By default, fields with empty values
   555  	// are omitted from API requests. See
   556  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   557  	NullFields []string `json:"-"`
   558  }
   559  
   560  func (s *DestinationDataset) MarshalJSON() ([]byte, error) {
   561  	type NoMethod DestinationDataset
   562  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   563  }
   564  
   565  // DestinationDatasetReference: Contains the reference that identifies a
   566  // destination bigquery dataset.
   567  type DestinationDatasetReference struct {
   568  	// DatasetId: Required. A unique ID for this dataset, without the project name.
   569  	// The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores
   570  	// (_). The maximum length is 1,024 characters.
   571  	DatasetId string `json:"datasetId,omitempty"`
   572  	// ProjectId: Required. The ID of the project containing this dataset.
   573  	ProjectId string `json:"projectId,omitempty"`
   574  	// ForceSendFields is a list of field names (e.g. "DatasetId") to
   575  	// unconditionally include in API requests. By default, fields with empty or
   576  	// default values are omitted from API requests. See
   577  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   578  	// details.
   579  	ForceSendFields []string `json:"-"`
   580  	// NullFields is a list of field names (e.g. "DatasetId") to include in API
   581  	// requests with the JSON null value. By default, fields with empty values are
   582  	// omitted from API requests. See
   583  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   584  	NullFields []string `json:"-"`
   585  }
   586  
   587  func (s *DestinationDatasetReference) MarshalJSON() ([]byte, error) {
   588  	type NoMethod DestinationDatasetReference
   589  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   590  }
   591  
   592  // Empty: A generic empty message that you can re-use to avoid defining
   593  // duplicated empty messages in your APIs. A typical example is to use it as
   594  // the request or the response type of an API method. For instance: service Foo
   595  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
   596  type Empty struct {
   597  	// ServerResponse contains the HTTP response code and headers from the server.
   598  	googleapi.ServerResponse `json:"-"`
   599  }
   600  
   601  // Expr: Represents a textual expression in the Common Expression Language
   602  // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
   603  // of CEL are documented at https://github.com/google/cel-spec. Example
   604  // (Comparison): title: "Summary size limit" description: "Determines if a
   605  // summary is less than 100 chars" expression: "document.summary.size() < 100"
   606  // Example (Equality): title: "Requestor is owner" description: "Determines if
   607  // requestor is the document owner" expression: "document.owner ==
   608  // request.auth.claims.email" Example (Logic): title: "Public documents"
   609  // description: "Determine whether the document should be publicly visible"
   610  // expression: "document.type != 'private' && document.type != 'internal'"
   611  // Example (Data Manipulation): title: "Notification string" description:
   612  // "Create a notification string with a timestamp." expression: "'New message
   613  // received at ' + string(document.create_time)" The exact variables and
   614  // functions that may be referenced within an expression are determined by the
   615  // service that evaluates it. See the service documentation for additional
   616  // information.
   617  type Expr struct {
   618  	// Description: Optional. Description of the expression. This is a longer text
   619  	// which describes the expression, e.g. when hovered over it in a UI.
   620  	Description string `json:"description,omitempty"`
   621  	// Expression: Textual representation of an expression in Common Expression
   622  	// Language syntax.
   623  	Expression string `json:"expression,omitempty"`
   624  	// Location: Optional. String indicating the location of the expression for
   625  	// error reporting, e.g. a file name and a position in the file.
   626  	Location string `json:"location,omitempty"`
   627  	// Title: Optional. Title for the expression, i.e. a short string describing
   628  	// its purpose. This can be used e.g. in UIs which allow to enter the
   629  	// expression.
   630  	Title string `json:"title,omitempty"`
   631  	// ForceSendFields is a list of field names (e.g. "Description") to
   632  	// unconditionally include in API requests. By default, fields with empty or
   633  	// default values are omitted from API requests. See
   634  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   635  	// details.
   636  	ForceSendFields []string `json:"-"`
   637  	// NullFields is a list of field names (e.g. "Description") to include in API
   638  	// requests with the JSON null value. By default, fields with empty values are
   639  	// omitted from API requests. See
   640  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   641  	NullFields []string `json:"-"`
   642  }
   643  
   644  func (s *Expr) MarshalJSON() ([]byte, error) {
   645  	type NoMethod Expr
   646  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   647  }
   648  
   649  // GetIamPolicyRequest: Request message for `GetIamPolicy` method.
   650  type GetIamPolicyRequest struct {
   651  	// Options: OPTIONAL: A `GetPolicyOptions` object for specifying options to
   652  	// `GetIamPolicy`.
   653  	Options *GetPolicyOptions `json:"options,omitempty"`
   654  	// ForceSendFields is a list of field names (e.g. "Options") to unconditionally
   655  	// include in API requests. By default, fields with empty or default values are
   656  	// omitted from API requests. See
   657  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   658  	// details.
   659  	ForceSendFields []string `json:"-"`
   660  	// NullFields is a list of field names (e.g. "Options") to include in API
   661  	// requests with the JSON null value. By default, fields with empty values are
   662  	// omitted from API requests. See
   663  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   664  	NullFields []string `json:"-"`
   665  }
   666  
   667  func (s *GetIamPolicyRequest) MarshalJSON() ([]byte, error) {
   668  	type NoMethod GetIamPolicyRequest
   669  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   670  }
   671  
   672  // GetPolicyOptions: Encapsulates settings provided to GetIamPolicy.
   673  type GetPolicyOptions struct {
   674  	// RequestedPolicyVersion: Optional. The maximum policy version that will be
   675  	// used to format the policy. Valid values are 0, 1, and 3. Requests specifying
   676  	// an invalid value will be rejected. Requests for policies with any
   677  	// conditional role bindings must specify version 3. Policies with no
   678  	// conditional role bindings may specify any valid value or leave the field
   679  	// unset. The policy in the response might use the policy version that you
   680  	// specified, or it might use a lower policy version. For example, if you
   681  	// specify version 3, but the policy has no conditional role bindings, the
   682  	// response uses version 1. To learn which resources support conditions in
   683  	// their IAM policies, see the IAM documentation
   684  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
   685  	RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"`
   686  	// ForceSendFields is a list of field names (e.g. "RequestedPolicyVersion") to
   687  	// unconditionally include in API requests. By default, fields with empty or
   688  	// default values are omitted from API requests. See
   689  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   690  	// details.
   691  	ForceSendFields []string `json:"-"`
   692  	// NullFields is a list of field names (e.g. "RequestedPolicyVersion") to
   693  	// include in API requests with the JSON null value. By default, fields with
   694  	// empty values are omitted from API requests. See
   695  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   696  	NullFields []string `json:"-"`
   697  }
   698  
   699  func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) {
   700  	type NoMethod GetPolicyOptions
   701  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   702  }
   703  
   704  // LinkedResource: Reference to a linked resource tracked by this Subscription.
   705  type LinkedResource struct {
   706  	// LinkedDataset: Output only. Name of the linked dataset, e.g.
   707  	// projects/subscriberproject/datasets/linked_dataset
   708  	LinkedDataset string `json:"linkedDataset,omitempty"`
   709  	// ForceSendFields is a list of field names (e.g. "LinkedDataset") to
   710  	// unconditionally include in API requests. By default, fields with empty or
   711  	// default values are omitted from API requests. See
   712  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   713  	// details.
   714  	ForceSendFields []string `json:"-"`
   715  	// NullFields is a list of field names (e.g. "LinkedDataset") to include in API
   716  	// requests with the JSON null value. By default, fields with empty values are
   717  	// omitted from API requests. See
   718  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   719  	NullFields []string `json:"-"`
   720  }
   721  
   722  func (s *LinkedResource) MarshalJSON() ([]byte, error) {
   723  	type NoMethod LinkedResource
   724  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   725  }
   726  
   727  // ListDataExchangesResponse: Message for response to the list of data
   728  // exchanges.
   729  type ListDataExchangesResponse struct {
   730  	// DataExchanges: The list of data exchanges.
   731  	DataExchanges []*DataExchange `json:"dataExchanges,omitempty"`
   732  	// NextPageToken: A token to request the next page of results.
   733  	NextPageToken string `json:"nextPageToken,omitempty"`
   734  
   735  	// ServerResponse contains the HTTP response code and headers from the server.
   736  	googleapi.ServerResponse `json:"-"`
   737  	// ForceSendFields is a list of field names (e.g. "DataExchanges") to
   738  	// unconditionally include in API requests. By default, fields with empty or
   739  	// default values are omitted from API requests. See
   740  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   741  	// details.
   742  	ForceSendFields []string `json:"-"`
   743  	// NullFields is a list of field names (e.g. "DataExchanges") to include in API
   744  	// requests with the JSON null value. By default, fields with empty values are
   745  	// omitted from API requests. See
   746  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   747  	NullFields []string `json:"-"`
   748  }
   749  
   750  func (s *ListDataExchangesResponse) MarshalJSON() ([]byte, error) {
   751  	type NoMethod ListDataExchangesResponse
   752  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   753  }
   754  
   755  // ListListingsResponse: Message for response to the list of Listings.
   756  type ListListingsResponse struct {
   757  	// Listings: The list of Listing.
   758  	Listings []*Listing `json:"listings,omitempty"`
   759  	// NextPageToken: A token to request the next page of results.
   760  	NextPageToken string `json:"nextPageToken,omitempty"`
   761  
   762  	// ServerResponse contains the HTTP response code and headers from the server.
   763  	googleapi.ServerResponse `json:"-"`
   764  	// ForceSendFields is a list of field names (e.g. "Listings") to
   765  	// unconditionally include in API requests. By default, fields with empty or
   766  	// default values are omitted from API requests. See
   767  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   768  	// details.
   769  	ForceSendFields []string `json:"-"`
   770  	// NullFields is a list of field names (e.g. "Listings") to include in API
   771  	// requests with the JSON null value. By default, fields with empty values are
   772  	// omitted from API requests. See
   773  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   774  	NullFields []string `json:"-"`
   775  }
   776  
   777  func (s *ListListingsResponse) MarshalJSON() ([]byte, error) {
   778  	type NoMethod ListListingsResponse
   779  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   780  }
   781  
   782  // ListOrgDataExchangesResponse: Message for response to listing data exchanges
   783  // in an organization and location.
   784  type ListOrgDataExchangesResponse struct {
   785  	// DataExchanges: The list of data exchanges.
   786  	DataExchanges []*DataExchange `json:"dataExchanges,omitempty"`
   787  	// NextPageToken: A token to request the next page of results.
   788  	NextPageToken string `json:"nextPageToken,omitempty"`
   789  
   790  	// ServerResponse contains the HTTP response code and headers from the server.
   791  	googleapi.ServerResponse `json:"-"`
   792  	// ForceSendFields is a list of field names (e.g. "DataExchanges") to
   793  	// unconditionally include in API requests. By default, fields with empty or
   794  	// default values are omitted from API requests. See
   795  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   796  	// details.
   797  	ForceSendFields []string `json:"-"`
   798  	// NullFields is a list of field names (e.g. "DataExchanges") to include in API
   799  	// requests with the JSON null value. By default, fields with empty values are
   800  	// omitted from API requests. See
   801  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   802  	NullFields []string `json:"-"`
   803  }
   804  
   805  func (s *ListOrgDataExchangesResponse) MarshalJSON() ([]byte, error) {
   806  	type NoMethod ListOrgDataExchangesResponse
   807  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   808  }
   809  
   810  // Listing: A listing is what gets published into a data exchange that a
   811  // subscriber can subscribe to. It contains a reference to the data source
   812  // along with descriptive information that will help subscribers find and
   813  // subscribe the data.
   814  type Listing struct {
   815  	// BigqueryDataset: Required. Shared dataset i.e. BigQuery dataset source.
   816  	BigqueryDataset *BigQueryDatasetSource `json:"bigqueryDataset,omitempty"`
   817  	// Categories: Optional. Categories of the listing. Up to two categories are
   818  	// allowed.
   819  	//
   820  	// Possible values:
   821  	//   "CATEGORY_UNSPECIFIED"
   822  	//   "CATEGORY_OTHERS"
   823  	//   "CATEGORY_ADVERTISING_AND_MARKETING"
   824  	//   "CATEGORY_COMMERCE"
   825  	//   "CATEGORY_CLIMATE_AND_ENVIRONMENT"
   826  	//   "CATEGORY_DEMOGRAPHICS"
   827  	//   "CATEGORY_ECONOMICS"
   828  	//   "CATEGORY_EDUCATION"
   829  	//   "CATEGORY_ENERGY"
   830  	//   "CATEGORY_FINANCIAL"
   831  	//   "CATEGORY_GAMING"
   832  	//   "CATEGORY_GEOSPATIAL"
   833  	//   "CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE"
   834  	//   "CATEGORY_MEDIA"
   835  	//   "CATEGORY_PUBLIC_SECTOR"
   836  	//   "CATEGORY_RETAIL"
   837  	//   "CATEGORY_SPORTS"
   838  	//   "CATEGORY_SCIENCE_AND_RESEARCH"
   839  	//   "CATEGORY_TRANSPORTATION_AND_LOGISTICS"
   840  	//   "CATEGORY_TRAVEL_AND_TOURISM"
   841  	Categories []string `json:"categories,omitempty"`
   842  	// DataProvider: Optional. Details of the data provider who owns the source
   843  	// data.
   844  	DataProvider *DataProvider `json:"dataProvider,omitempty"`
   845  	// Description: Optional. Short description of the listing. The description
   846  	// must not contain Unicode non-characters and C0 and C1 control codes except
   847  	// tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF).
   848  	// Default value is an empty string. Max length: 2000 bytes.
   849  	Description string `json:"description,omitempty"`
   850  	// DisplayName: Required. Human-readable display name of the listing. The
   851  	// display name must contain only Unicode letters, numbers (0-9), underscores
   852  	// (_), dashes (-), spaces ( ), ampersands (&) and can't start or end with
   853  	// spaces. Default value is an empty string. Max length: 63 bytes.
   854  	DisplayName string `json:"displayName,omitempty"`
   855  	// Documentation: Optional. Documentation describing the listing.
   856  	Documentation string `json:"documentation,omitempty"`
   857  	// Icon: Optional. Base64 encoded image representing the listing. Max Size:
   858  	// 3.0MiB Expected image dimensions are 512x512 pixels, however the API only
   859  	// performs validation on size of the encoded data. Note: For byte fields, the
   860  	// contents of the field are base64-encoded (which increases the size of the
   861  	// data by 33-36%) when using JSON on the wire.
   862  	Icon string `json:"icon,omitempty"`
   863  	// Name: Output only. The resource name of the listing. e.g.
   864  	// `projects/myproject/locations/US/dataExchanges/123/listings/456`
   865  	Name string `json:"name,omitempty"`
   866  	// PrimaryContact: Optional. Email or URL of the primary point of contact of
   867  	// the listing. Max Length: 1000 bytes.
   868  	PrimaryContact string `json:"primaryContact,omitempty"`
   869  	// Publisher: Optional. Details of the publisher who owns the listing and who
   870  	// can share the source data.
   871  	Publisher *Publisher `json:"publisher,omitempty"`
   872  	// RequestAccess: Optional. Email or URL of the request access of the listing.
   873  	// Subscribers can use this reference to request access. Max Length: 1000
   874  	// bytes.
   875  	RequestAccess string `json:"requestAccess,omitempty"`
   876  	// RestrictedExportConfig: Optional. If set, restricted export configuration
   877  	// will be propagated and enforced on the linked dataset.
   878  	RestrictedExportConfig *RestrictedExportConfig `json:"restrictedExportConfig,omitempty"`
   879  	// State: Output only. Current state of the listing.
   880  	//
   881  	// Possible values:
   882  	//   "STATE_UNSPECIFIED" - Default value. This value is unused.
   883  	//   "ACTIVE" - Subscribable state. Users with dataexchange.listings.subscribe
   884  	// permission can subscribe to this listing.
   885  	State string `json:"state,omitempty"`
   886  
   887  	// ServerResponse contains the HTTP response code and headers from the server.
   888  	googleapi.ServerResponse `json:"-"`
   889  	// ForceSendFields is a list of field names (e.g. "BigqueryDataset") to
   890  	// unconditionally include in API requests. By default, fields with empty or
   891  	// default values are omitted from API requests. See
   892  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   893  	// details.
   894  	ForceSendFields []string `json:"-"`
   895  	// NullFields is a list of field names (e.g. "BigqueryDataset") to include in
   896  	// API requests with the JSON null value. By default, fields with empty values
   897  	// are omitted from API requests. See
   898  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   899  	NullFields []string `json:"-"`
   900  }
   901  
   902  func (s *Listing) MarshalJSON() ([]byte, error) {
   903  	type NoMethod Listing
   904  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   905  }
   906  
   907  // OperationMetadata: Represents the metadata of a long-running operation in
   908  // Analytics Hub.
   909  type OperationMetadata struct {
   910  	// ApiVersion: Output only. API version used to start the operation.
   911  	ApiVersion string `json:"apiVersion,omitempty"`
   912  	// CreateTime: Output only. The time the operation was created.
   913  	CreateTime string `json:"createTime,omitempty"`
   914  	// EndTime: Output only. The time the operation finished running.
   915  	EndTime string `json:"endTime,omitempty"`
   916  	// RequestedCancellation: Output only. Identifies whether the user has
   917  	// requested cancellation of the operation. Operations that have successfully
   918  	// been cancelled have Operation.error value with a google.rpc.Status.code of
   919  	// 1, corresponding to `Code.CANCELLED`.
   920  	RequestedCancellation bool `json:"requestedCancellation,omitempty"`
   921  	// StatusMessage: Output only. Human-readable status of the operation, if any.
   922  	StatusMessage string `json:"statusMessage,omitempty"`
   923  	// Target: Output only. Server-defined resource path for the target of the
   924  	// operation.
   925  	Target string `json:"target,omitempty"`
   926  	// Verb: Output only. Name of the verb executed by the operation.
   927  	Verb string `json:"verb,omitempty"`
   928  	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
   929  	// unconditionally include in API requests. By default, fields with empty or
   930  	// default values are omitted from API requests. See
   931  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   932  	// details.
   933  	ForceSendFields []string `json:"-"`
   934  	// NullFields is a list of field names (e.g. "ApiVersion") to include in API
   935  	// requests with the JSON null value. By default, fields with empty values are
   936  	// omitted from API requests. See
   937  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   938  	NullFields []string `json:"-"`
   939  }
   940  
   941  func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
   942  	type NoMethod OperationMetadata
   943  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   944  }
   945  
   946  // Policy: An Identity and Access Management (IAM) policy, which specifies
   947  // access controls for Google Cloud resources. A `Policy` is a collection of
   948  // `bindings`. A `binding` binds one or more `members`, or principals, to a
   949  // single `role`. Principals can be user accounts, service accounts, Google
   950  // groups, and domains (such as G Suite). A `role` is a named list of
   951  // permissions; each `role` can be an IAM predefined role or a user-created
   952  // custom role. For some types of Google Cloud resources, a `binding` can also
   953  // specify a `condition`, which is a logical expression that allows access to a
   954  // resource only if the expression evaluates to `true`. A condition can add
   955  // constraints based on attributes of the request, the resource, or both. To
   956  // learn which resources support conditions in their IAM policies, see the IAM
   957  // documentation
   958  // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
   959  // example:** ``` { "bindings": [ { "role":
   960  // "roles/resourcemanager.organizationAdmin", "members": [
   961  // "user:mike@example.com", "group:admins@example.com", "domain:google.com",
   962  // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role":
   963  // "roles/resourcemanager.organizationViewer", "members": [
   964  // "user:eve@example.com" ], "condition": { "title": "expirable access",
   965  // "description": "Does not grant access after Sep 2020", "expression":
   966  // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
   967  // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
   968  // members: - user:mike@example.com - group:admins@example.com -
   969  // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
   970  // role: roles/resourcemanager.organizationAdmin - members: -
   971  // user:eve@example.com role: roles/resourcemanager.organizationViewer
   972  // condition: title: expirable access description: Does not grant access after
   973  // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
   974  // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
   975  // see the IAM documentation (https://cloud.google.com/iam/docs/).
   976  type Policy struct {
   977  	// AuditConfigs: Specifies cloud audit logging configuration for this policy.
   978  	AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
   979  	// Bindings: Associates a list of `members`, or principals, with a `role`.
   980  	// Optionally, may specify a `condition` that determines how and when the
   981  	// `bindings` are applied. Each of the `bindings` must contain at least one
   982  	// principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
   983  	// up to 250 of these principals can be Google groups. Each occurrence of a
   984  	// principal counts towards these limits. For example, if the `bindings` grant
   985  	// 50 different roles to `user:alice@example.com`, and not to any other
   986  	// principal, then you can add another 1,450 principals to the `bindings` in
   987  	// the `Policy`.
   988  	Bindings []*Binding `json:"bindings,omitempty"`
   989  	// Etag: `etag` is used for optimistic concurrency control as a way to help
   990  	// prevent simultaneous updates of a policy from overwriting each other. It is
   991  	// strongly suggested that systems make use of the `etag` in the
   992  	// read-modify-write cycle to perform policy updates in order to avoid race
   993  	// conditions: An `etag` is returned in the response to `getIamPolicy`, and
   994  	// systems are expected to put that etag in the request to `setIamPolicy` to
   995  	// ensure that their change will be applied to the same version of the policy.
   996  	// **Important:** If you use IAM Conditions, you must include the `etag` field
   997  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
   998  	// you to overwrite a version `3` policy with a version `1` policy, and all of
   999  	// the conditions in the version `3` policy are lost.
  1000  	Etag string `json:"etag,omitempty"`
  1001  	// Version: Specifies the format of the policy. Valid values are `0`, `1`, and
  1002  	// `3`. Requests that specify an invalid value are rejected. Any operation that
  1003  	// affects conditional role bindings must specify version `3`. This requirement
  1004  	// applies to the following operations: * Getting a policy that includes a
  1005  	// conditional role binding * Adding a conditional role binding to a policy *
  1006  	// Changing a conditional role binding in a policy * Removing any role binding,
  1007  	// with or without a condition, from a policy that includes conditions
  1008  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  1009  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  1010  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  1011  	// the conditions in the version `3` policy are lost. If a policy does not
  1012  	// include any conditions, operations on that policy may specify any valid
  1013  	// version or leave the field unset. To learn which resources support
  1014  	// conditions in their IAM policies, see the IAM documentation
  1015  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  1016  	Version int64 `json:"version,omitempty"`
  1017  
  1018  	// ServerResponse contains the HTTP response code and headers from the server.
  1019  	googleapi.ServerResponse `json:"-"`
  1020  	// ForceSendFields is a list of field names (e.g. "AuditConfigs") to
  1021  	// unconditionally include in API requests. By default, fields with empty or
  1022  	// default values are omitted from API requests. See
  1023  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1024  	// details.
  1025  	ForceSendFields []string `json:"-"`
  1026  	// NullFields is a list of field names (e.g. "AuditConfigs") to include in API
  1027  	// requests with the JSON null value. By default, fields with empty values are
  1028  	// omitted from API requests. See
  1029  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1030  	NullFields []string `json:"-"`
  1031  }
  1032  
  1033  func (s *Policy) MarshalJSON() ([]byte, error) {
  1034  	type NoMethod Policy
  1035  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1036  }
  1037  
  1038  // Publisher: Contains details of the listing publisher.
  1039  type Publisher struct {
  1040  	// Name: Optional. Name of the listing publisher.
  1041  	Name string `json:"name,omitempty"`
  1042  	// PrimaryContact: Optional. Email or URL of the listing publisher. Max Length:
  1043  	// 1000 bytes.
  1044  	PrimaryContact string `json:"primaryContact,omitempty"`
  1045  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  1046  	// include in API requests. By default, fields with empty or default values are
  1047  	// omitted from API requests. See
  1048  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1049  	// details.
  1050  	ForceSendFields []string `json:"-"`
  1051  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  1052  	// with the JSON null value. By default, fields with empty values are omitted
  1053  	// from API requests. See
  1054  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1055  	NullFields []string `json:"-"`
  1056  }
  1057  
  1058  func (s *Publisher) MarshalJSON() ([]byte, error) {
  1059  	type NoMethod Publisher
  1060  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1061  }
  1062  
  1063  // RefreshSubscriptionResponse: Message for response when you refresh a
  1064  // subscription.
  1065  type RefreshSubscriptionResponse struct {
  1066  	// Subscription: The refreshed subscription resource.
  1067  	Subscription *Subscription `json:"subscription,omitempty"`
  1068  	// ForceSendFields is a list of field names (e.g. "Subscription") to
  1069  	// unconditionally include in API requests. By default, fields with empty or
  1070  	// default values are omitted from API requests. See
  1071  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1072  	// details.
  1073  	ForceSendFields []string `json:"-"`
  1074  	// NullFields is a list of field names (e.g. "Subscription") to include in API
  1075  	// requests with the JSON null value. By default, fields with empty values are
  1076  	// omitted from API requests. See
  1077  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1078  	NullFields []string `json:"-"`
  1079  }
  1080  
  1081  func (s *RefreshSubscriptionResponse) MarshalJSON() ([]byte, error) {
  1082  	type NoMethod RefreshSubscriptionResponse
  1083  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1084  }
  1085  
  1086  // RestrictedExportConfig: Restricted export config, used to configure
  1087  // restricted export on linked dataset.
  1088  type RestrictedExportConfig struct {
  1089  	// Enabled: Optional. If true, enable restricted export.
  1090  	Enabled bool `json:"enabled,omitempty"`
  1091  	// RestrictDirectTableAccess: Output only. If true, restrict direct table
  1092  	// access(read api/tabledata.list) on linked table.
  1093  	RestrictDirectTableAccess bool `json:"restrictDirectTableAccess,omitempty"`
  1094  	// RestrictQueryResult: Optional. If true, restrict export of query result
  1095  	// derived from restricted linked dataset table.
  1096  	RestrictQueryResult bool `json:"restrictQueryResult,omitempty"`
  1097  	// ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
  1098  	// include in API requests. By default, fields with empty or default values are
  1099  	// omitted from API requests. See
  1100  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1101  	// details.
  1102  	ForceSendFields []string `json:"-"`
  1103  	// NullFields is a list of field names (e.g. "Enabled") to include in API
  1104  	// requests with the JSON null value. By default, fields with empty values are
  1105  	// omitted from API requests. See
  1106  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1107  	NullFields []string `json:"-"`
  1108  }
  1109  
  1110  func (s *RestrictedExportConfig) MarshalJSON() ([]byte, error) {
  1111  	type NoMethod RestrictedExportConfig
  1112  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1113  }
  1114  
  1115  // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
  1116  type SetIamPolicyRequest struct {
  1117  	// Policy: REQUIRED: The complete policy to be applied to the `resource`. The
  1118  	// size of the policy is limited to a few 10s of KB. An empty policy is a valid
  1119  	// policy but certain Google Cloud services (such as Projects) might reject
  1120  	// them.
  1121  	Policy *Policy `json:"policy,omitempty"`
  1122  	// UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to
  1123  	// modify. Only the fields in the mask will be modified. If no mask is
  1124  	// provided, the following default mask is used: `paths: "bindings, etag"
  1125  	UpdateMask string `json:"updateMask,omitempty"`
  1126  	// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
  1127  	// include in API requests. By default, fields with empty or default values are
  1128  	// omitted from API requests. See
  1129  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1130  	// details.
  1131  	ForceSendFields []string `json:"-"`
  1132  	// NullFields is a list of field names (e.g. "Policy") to include in API
  1133  	// requests with the JSON null value. By default, fields with empty values are
  1134  	// omitted from API requests. See
  1135  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1136  	NullFields []string `json:"-"`
  1137  }
  1138  
  1139  func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  1140  	type NoMethod SetIamPolicyRequest
  1141  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1142  }
  1143  
  1144  // SubscribeDataExchangeResponse: Message for response when you subscribe to a
  1145  // Data Exchange.
  1146  type SubscribeDataExchangeResponse struct {
  1147  	// Subscription: Subscription object created from this subscribe action.
  1148  	Subscription *Subscription `json:"subscription,omitempty"`
  1149  	// ForceSendFields is a list of field names (e.g. "Subscription") to
  1150  	// unconditionally include in API requests. By default, fields with empty or
  1151  	// default values are omitted from API requests. See
  1152  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1153  	// details.
  1154  	ForceSendFields []string `json:"-"`
  1155  	// NullFields is a list of field names (e.g. "Subscription") to include in API
  1156  	// requests with the JSON null value. By default, fields with empty values are
  1157  	// omitted from API requests. See
  1158  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1159  	NullFields []string `json:"-"`
  1160  }
  1161  
  1162  func (s *SubscribeDataExchangeResponse) MarshalJSON() ([]byte, error) {
  1163  	type NoMethod SubscribeDataExchangeResponse
  1164  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1165  }
  1166  
  1167  // SubscribeListingRequest: Message for subscribing to a listing.
  1168  type SubscribeListingRequest struct {
  1169  	// DestinationDataset: BigQuery destination dataset to create for the
  1170  	// subscriber.
  1171  	DestinationDataset *DestinationDataset `json:"destinationDataset,omitempty"`
  1172  	// ForceSendFields is a list of field names (e.g. "DestinationDataset") to
  1173  	// unconditionally include in API requests. By default, fields with empty or
  1174  	// default values are omitted from API requests. See
  1175  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1176  	// details.
  1177  	ForceSendFields []string `json:"-"`
  1178  	// NullFields is a list of field names (e.g. "DestinationDataset") to include
  1179  	// in API requests with the JSON null value. By default, fields with empty
  1180  	// values are omitted from API requests. See
  1181  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1182  	NullFields []string `json:"-"`
  1183  }
  1184  
  1185  func (s *SubscribeListingRequest) MarshalJSON() ([]byte, error) {
  1186  	type NoMethod SubscribeListingRequest
  1187  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1188  }
  1189  
  1190  // SubscribeListingResponse: Message for response when you subscribe to a
  1191  // listing.
  1192  type SubscribeListingResponse struct {
  1193  	// ServerResponse contains the HTTP response code and headers from the server.
  1194  	googleapi.ServerResponse `json:"-"`
  1195  }
  1196  
  1197  // Subscription: A subscription represents a subscribers' access to a
  1198  // particular set of published data. It contains references to associated
  1199  // listings, data exchanges, and linked datasets.
  1200  type Subscription struct {
  1201  	// CreationTime: Output only. Timestamp when the subscription was created.
  1202  	CreationTime string `json:"creationTime,omitempty"`
  1203  	// DataExchange: Output only. Resource name of the source Data Exchange. e.g.
  1204  	// projects/123/locations/US/dataExchanges/456
  1205  	DataExchange string `json:"dataExchange,omitempty"`
  1206  	// LastModifyTime: Output only. Timestamp when the subscription was last
  1207  	// modified.
  1208  	LastModifyTime string `json:"lastModifyTime,omitempty"`
  1209  	// LinkedDatasetMap: Output only. Map of listing resource names to associated
  1210  	// linked resource, e.g.
  1211  	// projects/123/locations/US/dataExchanges/456/listings/789 ->
  1212  	// projects/123/datasets/my_dataset For listing-level subscriptions, this is a
  1213  	// map of size 1. Only contains values if state == STATE_ACTIVE.
  1214  	LinkedDatasetMap map[string]LinkedResource `json:"linkedDatasetMap,omitempty"`
  1215  	// Listing: Output only. Resource name of the source Listing. e.g.
  1216  	// projects/123/locations/US/dataExchanges/456/listings/789
  1217  	Listing string `json:"listing,omitempty"`
  1218  	// Name: Output only. The resource name of the subscription. e.g.
  1219  	// `projects/myproject/locations/US/subscriptions/123`.
  1220  	Name string `json:"name,omitempty"`
  1221  	// OrganizationDisplayName: Output only. Display name of the project of this
  1222  	// subscription.
  1223  	OrganizationDisplayName string `json:"organizationDisplayName,omitempty"`
  1224  	// OrganizationId: Output only. Organization of the project this subscription
  1225  	// belongs to.
  1226  	OrganizationId string `json:"organizationId,omitempty"`
  1227  	// State: Output only. Current state of the subscription.
  1228  	//
  1229  	// Possible values:
  1230  	//   "STATE_UNSPECIFIED" - Default value. This value is unused.
  1231  	//   "STATE_ACTIVE" - This subscription is active and the data is accessible.
  1232  	//   "STATE_STALE" - The data referenced by this subscription is out of date
  1233  	// and should be refreshed. This can happen when a data provider adds or
  1234  	// removes datasets.
  1235  	//   "STATE_INACTIVE" - This subscription has been cancelled or revoked and the
  1236  	// data is no longer accessible.
  1237  	State string `json:"state,omitempty"`
  1238  	// SubscriberContact: Output only. Email of the subscriber.
  1239  	SubscriberContact string `json:"subscriberContact,omitempty"`
  1240  	// ForceSendFields is a list of field names (e.g. "CreationTime") to
  1241  	// unconditionally include in API requests. By default, fields with empty or
  1242  	// default values are omitted from API requests. See
  1243  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1244  	// details.
  1245  	ForceSendFields []string `json:"-"`
  1246  	// NullFields is a list of field names (e.g. "CreationTime") to include in API
  1247  	// requests with the JSON null value. By default, fields with empty values are
  1248  	// omitted from API requests. See
  1249  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1250  	NullFields []string `json:"-"`
  1251  }
  1252  
  1253  func (s *Subscription) MarshalJSON() ([]byte, error) {
  1254  	type NoMethod Subscription
  1255  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1256  }
  1257  
  1258  // TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
  1259  type TestIamPermissionsRequest struct {
  1260  	// Permissions: The set of permissions to check for the `resource`. Permissions
  1261  	// with wildcards (such as `*` or `storage.*`) are not allowed. For more
  1262  	// information see IAM Overview
  1263  	// (https://cloud.google.com/iam/docs/overview#permissions).
  1264  	Permissions []string `json:"permissions,omitempty"`
  1265  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  1266  	// unconditionally include in API requests. By default, fields with empty or
  1267  	// default values are omitted from API requests. See
  1268  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1269  	// details.
  1270  	ForceSendFields []string `json:"-"`
  1271  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  1272  	// requests with the JSON null value. By default, fields with empty values are
  1273  	// omitted from API requests. See
  1274  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1275  	NullFields []string `json:"-"`
  1276  }
  1277  
  1278  func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  1279  	type NoMethod TestIamPermissionsRequest
  1280  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1281  }
  1282  
  1283  // TestIamPermissionsResponse: Response message for `TestIamPermissions`
  1284  // method.
  1285  type TestIamPermissionsResponse struct {
  1286  	// Permissions: A subset of `TestPermissionsRequest.permissions` that the
  1287  	// caller is allowed.
  1288  	Permissions []string `json:"permissions,omitempty"`
  1289  
  1290  	// ServerResponse contains the HTTP response code and headers from the server.
  1291  	googleapi.ServerResponse `json:"-"`
  1292  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  1293  	// unconditionally include in API requests. By default, fields with empty or
  1294  	// default values are omitted from API requests. See
  1295  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1296  	// details.
  1297  	ForceSendFields []string `json:"-"`
  1298  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  1299  	// requests with the JSON null value. By default, fields with empty values are
  1300  	// omitted from API requests. See
  1301  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1302  	NullFields []string `json:"-"`
  1303  }
  1304  
  1305  func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  1306  	type NoMethod TestIamPermissionsResponse
  1307  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1308  }
  1309  
  1310  type OrganizationsLocationsDataExchangesListCall struct {
  1311  	s            *Service
  1312  	organization string
  1313  	urlParams_   gensupport.URLParams
  1314  	ifNoneMatch_ string
  1315  	ctx_         context.Context
  1316  	header_      http.Header
  1317  }
  1318  
  1319  // List: Lists all data exchanges from projects in a given organization and
  1320  // location.
  1321  //
  1322  //   - organization: The organization resource path of the projects containing
  1323  //     DataExchanges. e.g. `organizations/myorg/locations/US`.
  1324  func (r *OrganizationsLocationsDataExchangesService) List(organization string) *OrganizationsLocationsDataExchangesListCall {
  1325  	c := &OrganizationsLocationsDataExchangesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1326  	c.organization = organization
  1327  	return c
  1328  }
  1329  
  1330  // PageSize sets the optional parameter "pageSize": The maximum number of
  1331  // results to return in a single response page. Leverage the page tokens to
  1332  // iterate through the entire collection.
  1333  func (c *OrganizationsLocationsDataExchangesListCall) PageSize(pageSize int64) *OrganizationsLocationsDataExchangesListCall {
  1334  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1335  	return c
  1336  }
  1337  
  1338  // PageToken sets the optional parameter "pageToken": Page token, returned by a
  1339  // previous call, to request the next page of results.
  1340  func (c *OrganizationsLocationsDataExchangesListCall) PageToken(pageToken string) *OrganizationsLocationsDataExchangesListCall {
  1341  	c.urlParams_.Set("pageToken", pageToken)
  1342  	return c
  1343  }
  1344  
  1345  // Fields allows partial responses to be retrieved. See
  1346  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1347  // details.
  1348  func (c *OrganizationsLocationsDataExchangesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDataExchangesListCall {
  1349  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1350  	return c
  1351  }
  1352  
  1353  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1354  // object's ETag matches the given value. This is useful for getting updates
  1355  // only after the object has changed since the last request.
  1356  func (c *OrganizationsLocationsDataExchangesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsDataExchangesListCall {
  1357  	c.ifNoneMatch_ = entityTag
  1358  	return c
  1359  }
  1360  
  1361  // Context sets the context to be used in this call's Do method.
  1362  func (c *OrganizationsLocationsDataExchangesListCall) Context(ctx context.Context) *OrganizationsLocationsDataExchangesListCall {
  1363  	c.ctx_ = ctx
  1364  	return c
  1365  }
  1366  
  1367  // Header returns a http.Header that can be modified by the caller to add
  1368  // headers to the request.
  1369  func (c *OrganizationsLocationsDataExchangesListCall) Header() http.Header {
  1370  	if c.header_ == nil {
  1371  		c.header_ = make(http.Header)
  1372  	}
  1373  	return c.header_
  1374  }
  1375  
  1376  func (c *OrganizationsLocationsDataExchangesListCall) doRequest(alt string) (*http.Response, error) {
  1377  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1378  	if c.ifNoneMatch_ != "" {
  1379  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1380  	}
  1381  	var body io.Reader = nil
  1382  	c.urlParams_.Set("alt", alt)
  1383  	c.urlParams_.Set("prettyPrint", "false")
  1384  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+organization}/dataExchanges")
  1385  	urls += "?" + c.urlParams_.Encode()
  1386  	req, err := http.NewRequest("GET", urls, body)
  1387  	if err != nil {
  1388  		return nil, err
  1389  	}
  1390  	req.Header = reqHeaders
  1391  	googleapi.Expand(req.URL, map[string]string{
  1392  		"organization": c.organization,
  1393  	})
  1394  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1395  }
  1396  
  1397  // Do executes the "analyticshub.organizations.locations.dataExchanges.list" call.
  1398  // Any non-2xx status code is an error. Response headers are in either
  1399  // *ListOrgDataExchangesResponse.ServerResponse.Header or (if a response was
  1400  // returned at all) in error.(*googleapi.Error).Header. Use
  1401  // googleapi.IsNotModified to check whether the returned error was because
  1402  // http.StatusNotModified was returned.
  1403  func (c *OrganizationsLocationsDataExchangesListCall) Do(opts ...googleapi.CallOption) (*ListOrgDataExchangesResponse, error) {
  1404  	gensupport.SetOptions(c.urlParams_, opts...)
  1405  	res, err := c.doRequest("json")
  1406  	if res != nil && res.StatusCode == http.StatusNotModified {
  1407  		if res.Body != nil {
  1408  			res.Body.Close()
  1409  		}
  1410  		return nil, gensupport.WrapError(&googleapi.Error{
  1411  			Code:   res.StatusCode,
  1412  			Header: res.Header,
  1413  		})
  1414  	}
  1415  	if err != nil {
  1416  		return nil, err
  1417  	}
  1418  	defer googleapi.CloseBody(res)
  1419  	if err := googleapi.CheckResponse(res); err != nil {
  1420  		return nil, gensupport.WrapError(err)
  1421  	}
  1422  	ret := &ListOrgDataExchangesResponse{
  1423  		ServerResponse: googleapi.ServerResponse{
  1424  			Header:         res.Header,
  1425  			HTTPStatusCode: res.StatusCode,
  1426  		},
  1427  	}
  1428  	target := &ret
  1429  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1430  		return nil, err
  1431  	}
  1432  	return ret, nil
  1433  }
  1434  
  1435  // Pages invokes f for each page of results.
  1436  // A non-nil error returned from f will halt the iteration.
  1437  // The provided context supersedes any context provided to the Context method.
  1438  func (c *OrganizationsLocationsDataExchangesListCall) Pages(ctx context.Context, f func(*ListOrgDataExchangesResponse) error) error {
  1439  	c.ctx_ = ctx
  1440  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  1441  	for {
  1442  		x, err := c.Do()
  1443  		if err != nil {
  1444  			return err
  1445  		}
  1446  		if err := f(x); err != nil {
  1447  			return err
  1448  		}
  1449  		if x.NextPageToken == "" {
  1450  			return nil
  1451  		}
  1452  		c.PageToken(x.NextPageToken)
  1453  	}
  1454  }
  1455  
  1456  type ProjectsLocationsDataExchangesCreateCall struct {
  1457  	s            *Service
  1458  	parent       string
  1459  	dataexchange *DataExchange
  1460  	urlParams_   gensupport.URLParams
  1461  	ctx_         context.Context
  1462  	header_      http.Header
  1463  }
  1464  
  1465  // Create: Creates a new data exchange.
  1466  //
  1467  //   - parent: The parent resource path of the data exchange. e.g.
  1468  //     `projects/myproject/locations/US`.
  1469  func (r *ProjectsLocationsDataExchangesService) Create(parent string, dataexchange *DataExchange) *ProjectsLocationsDataExchangesCreateCall {
  1470  	c := &ProjectsLocationsDataExchangesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1471  	c.parent = parent
  1472  	c.dataexchange = dataexchange
  1473  	return c
  1474  }
  1475  
  1476  // DataExchangeId sets the optional parameter "dataExchangeId": Required. The
  1477  // ID of the data exchange. Must contain only Unicode letters, numbers (0-9),
  1478  // underscores (_). Should not use characters that require URL-escaping, or
  1479  // characters outside of ASCII, spaces. Max length: 100 bytes.
  1480  func (c *ProjectsLocationsDataExchangesCreateCall) DataExchangeId(dataExchangeId string) *ProjectsLocationsDataExchangesCreateCall {
  1481  	c.urlParams_.Set("dataExchangeId", dataExchangeId)
  1482  	return c
  1483  }
  1484  
  1485  // Fields allows partial responses to be retrieved. See
  1486  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1487  // details.
  1488  func (c *ProjectsLocationsDataExchangesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesCreateCall {
  1489  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1490  	return c
  1491  }
  1492  
  1493  // Context sets the context to be used in this call's Do method.
  1494  func (c *ProjectsLocationsDataExchangesCreateCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesCreateCall {
  1495  	c.ctx_ = ctx
  1496  	return c
  1497  }
  1498  
  1499  // Header returns a http.Header that can be modified by the caller to add
  1500  // headers to the request.
  1501  func (c *ProjectsLocationsDataExchangesCreateCall) Header() http.Header {
  1502  	if c.header_ == nil {
  1503  		c.header_ = make(http.Header)
  1504  	}
  1505  	return c.header_
  1506  }
  1507  
  1508  func (c *ProjectsLocationsDataExchangesCreateCall) doRequest(alt string) (*http.Response, error) {
  1509  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1510  	var body io.Reader = nil
  1511  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataexchange)
  1512  	if err != nil {
  1513  		return nil, err
  1514  	}
  1515  	c.urlParams_.Set("alt", alt)
  1516  	c.urlParams_.Set("prettyPrint", "false")
  1517  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dataExchanges")
  1518  	urls += "?" + c.urlParams_.Encode()
  1519  	req, err := http.NewRequest("POST", urls, body)
  1520  	if err != nil {
  1521  		return nil, err
  1522  	}
  1523  	req.Header = reqHeaders
  1524  	googleapi.Expand(req.URL, map[string]string{
  1525  		"parent": c.parent,
  1526  	})
  1527  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1528  }
  1529  
  1530  // Do executes the "analyticshub.projects.locations.dataExchanges.create" call.
  1531  // Any non-2xx status code is an error. Response headers are in either
  1532  // *DataExchange.ServerResponse.Header or (if a response was returned at all)
  1533  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1534  // whether the returned error was because http.StatusNotModified was returned.
  1535  func (c *ProjectsLocationsDataExchangesCreateCall) Do(opts ...googleapi.CallOption) (*DataExchange, error) {
  1536  	gensupport.SetOptions(c.urlParams_, opts...)
  1537  	res, err := c.doRequest("json")
  1538  	if res != nil && res.StatusCode == http.StatusNotModified {
  1539  		if res.Body != nil {
  1540  			res.Body.Close()
  1541  		}
  1542  		return nil, gensupport.WrapError(&googleapi.Error{
  1543  			Code:   res.StatusCode,
  1544  			Header: res.Header,
  1545  		})
  1546  	}
  1547  	if err != nil {
  1548  		return nil, err
  1549  	}
  1550  	defer googleapi.CloseBody(res)
  1551  	if err := googleapi.CheckResponse(res); err != nil {
  1552  		return nil, gensupport.WrapError(err)
  1553  	}
  1554  	ret := &DataExchange{
  1555  		ServerResponse: googleapi.ServerResponse{
  1556  			Header:         res.Header,
  1557  			HTTPStatusCode: res.StatusCode,
  1558  		},
  1559  	}
  1560  	target := &ret
  1561  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1562  		return nil, err
  1563  	}
  1564  	return ret, nil
  1565  }
  1566  
  1567  type ProjectsLocationsDataExchangesDeleteCall struct {
  1568  	s          *Service
  1569  	name       string
  1570  	urlParams_ gensupport.URLParams
  1571  	ctx_       context.Context
  1572  	header_    http.Header
  1573  }
  1574  
  1575  // Delete: Deletes an existing data exchange.
  1576  //
  1577  //   - name: The full name of the data exchange resource that you want to delete.
  1578  //     For example, `projects/myproject/locations/US/dataExchanges/123`.
  1579  func (r *ProjectsLocationsDataExchangesService) Delete(name string) *ProjectsLocationsDataExchangesDeleteCall {
  1580  	c := &ProjectsLocationsDataExchangesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1581  	c.name = name
  1582  	return c
  1583  }
  1584  
  1585  // Fields allows partial responses to be retrieved. See
  1586  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1587  // details.
  1588  func (c *ProjectsLocationsDataExchangesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesDeleteCall {
  1589  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1590  	return c
  1591  }
  1592  
  1593  // Context sets the context to be used in this call's Do method.
  1594  func (c *ProjectsLocationsDataExchangesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesDeleteCall {
  1595  	c.ctx_ = ctx
  1596  	return c
  1597  }
  1598  
  1599  // Header returns a http.Header that can be modified by the caller to add
  1600  // headers to the request.
  1601  func (c *ProjectsLocationsDataExchangesDeleteCall) Header() http.Header {
  1602  	if c.header_ == nil {
  1603  		c.header_ = make(http.Header)
  1604  	}
  1605  	return c.header_
  1606  }
  1607  
  1608  func (c *ProjectsLocationsDataExchangesDeleteCall) doRequest(alt string) (*http.Response, error) {
  1609  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1610  	var body io.Reader = nil
  1611  	c.urlParams_.Set("alt", alt)
  1612  	c.urlParams_.Set("prettyPrint", "false")
  1613  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  1614  	urls += "?" + c.urlParams_.Encode()
  1615  	req, err := http.NewRequest("DELETE", urls, body)
  1616  	if err != nil {
  1617  		return nil, err
  1618  	}
  1619  	req.Header = reqHeaders
  1620  	googleapi.Expand(req.URL, map[string]string{
  1621  		"name": c.name,
  1622  	})
  1623  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1624  }
  1625  
  1626  // Do executes the "analyticshub.projects.locations.dataExchanges.delete" call.
  1627  // Any non-2xx status code is an error. Response headers are in either
  1628  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  1629  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1630  // whether the returned error was because http.StatusNotModified was returned.
  1631  func (c *ProjectsLocationsDataExchangesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  1632  	gensupport.SetOptions(c.urlParams_, opts...)
  1633  	res, err := c.doRequest("json")
  1634  	if res != nil && res.StatusCode == http.StatusNotModified {
  1635  		if res.Body != nil {
  1636  			res.Body.Close()
  1637  		}
  1638  		return nil, gensupport.WrapError(&googleapi.Error{
  1639  			Code:   res.StatusCode,
  1640  			Header: res.Header,
  1641  		})
  1642  	}
  1643  	if err != nil {
  1644  		return nil, err
  1645  	}
  1646  	defer googleapi.CloseBody(res)
  1647  	if err := googleapi.CheckResponse(res); err != nil {
  1648  		return nil, gensupport.WrapError(err)
  1649  	}
  1650  	ret := &Empty{
  1651  		ServerResponse: googleapi.ServerResponse{
  1652  			Header:         res.Header,
  1653  			HTTPStatusCode: res.StatusCode,
  1654  		},
  1655  	}
  1656  	target := &ret
  1657  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1658  		return nil, err
  1659  	}
  1660  	return ret, nil
  1661  }
  1662  
  1663  type ProjectsLocationsDataExchangesGetCall struct {
  1664  	s            *Service
  1665  	name         string
  1666  	urlParams_   gensupport.URLParams
  1667  	ifNoneMatch_ string
  1668  	ctx_         context.Context
  1669  	header_      http.Header
  1670  }
  1671  
  1672  // Get: Gets the details of a data exchange.
  1673  //
  1674  //   - name: The resource name of the data exchange. e.g.
  1675  //     `projects/myproject/locations/US/dataExchanges/123`.
  1676  func (r *ProjectsLocationsDataExchangesService) Get(name string) *ProjectsLocationsDataExchangesGetCall {
  1677  	c := &ProjectsLocationsDataExchangesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1678  	c.name = name
  1679  	return c
  1680  }
  1681  
  1682  // Fields allows partial responses to be retrieved. See
  1683  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1684  // details.
  1685  func (c *ProjectsLocationsDataExchangesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesGetCall {
  1686  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1687  	return c
  1688  }
  1689  
  1690  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1691  // object's ETag matches the given value. This is useful for getting updates
  1692  // only after the object has changed since the last request.
  1693  func (c *ProjectsLocationsDataExchangesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataExchangesGetCall {
  1694  	c.ifNoneMatch_ = entityTag
  1695  	return c
  1696  }
  1697  
  1698  // Context sets the context to be used in this call's Do method.
  1699  func (c *ProjectsLocationsDataExchangesGetCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesGetCall {
  1700  	c.ctx_ = ctx
  1701  	return c
  1702  }
  1703  
  1704  // Header returns a http.Header that can be modified by the caller to add
  1705  // headers to the request.
  1706  func (c *ProjectsLocationsDataExchangesGetCall) Header() http.Header {
  1707  	if c.header_ == nil {
  1708  		c.header_ = make(http.Header)
  1709  	}
  1710  	return c.header_
  1711  }
  1712  
  1713  func (c *ProjectsLocationsDataExchangesGetCall) doRequest(alt string) (*http.Response, error) {
  1714  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1715  	if c.ifNoneMatch_ != "" {
  1716  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1717  	}
  1718  	var body io.Reader = nil
  1719  	c.urlParams_.Set("alt", alt)
  1720  	c.urlParams_.Set("prettyPrint", "false")
  1721  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  1722  	urls += "?" + c.urlParams_.Encode()
  1723  	req, err := http.NewRequest("GET", urls, body)
  1724  	if err != nil {
  1725  		return nil, err
  1726  	}
  1727  	req.Header = reqHeaders
  1728  	googleapi.Expand(req.URL, map[string]string{
  1729  		"name": c.name,
  1730  	})
  1731  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1732  }
  1733  
  1734  // Do executes the "analyticshub.projects.locations.dataExchanges.get" call.
  1735  // Any non-2xx status code is an error. Response headers are in either
  1736  // *DataExchange.ServerResponse.Header or (if a response was returned at all)
  1737  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1738  // whether the returned error was because http.StatusNotModified was returned.
  1739  func (c *ProjectsLocationsDataExchangesGetCall) Do(opts ...googleapi.CallOption) (*DataExchange, error) {
  1740  	gensupport.SetOptions(c.urlParams_, opts...)
  1741  	res, err := c.doRequest("json")
  1742  	if res != nil && res.StatusCode == http.StatusNotModified {
  1743  		if res.Body != nil {
  1744  			res.Body.Close()
  1745  		}
  1746  		return nil, gensupport.WrapError(&googleapi.Error{
  1747  			Code:   res.StatusCode,
  1748  			Header: res.Header,
  1749  		})
  1750  	}
  1751  	if err != nil {
  1752  		return nil, err
  1753  	}
  1754  	defer googleapi.CloseBody(res)
  1755  	if err := googleapi.CheckResponse(res); err != nil {
  1756  		return nil, gensupport.WrapError(err)
  1757  	}
  1758  	ret := &DataExchange{
  1759  		ServerResponse: googleapi.ServerResponse{
  1760  			Header:         res.Header,
  1761  			HTTPStatusCode: res.StatusCode,
  1762  		},
  1763  	}
  1764  	target := &ret
  1765  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1766  		return nil, err
  1767  	}
  1768  	return ret, nil
  1769  }
  1770  
  1771  type ProjectsLocationsDataExchangesGetIamPolicyCall struct {
  1772  	s                   *Service
  1773  	resource            string
  1774  	getiampolicyrequest *GetIamPolicyRequest
  1775  	urlParams_          gensupport.URLParams
  1776  	ctx_                context.Context
  1777  	header_             http.Header
  1778  }
  1779  
  1780  // GetIamPolicy: Gets the IAM policy.
  1781  //
  1782  //   - resource: REQUIRED: The resource for which the policy is being requested.
  1783  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  1784  //     for the appropriate value for this field.
  1785  func (r *ProjectsLocationsDataExchangesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsDataExchangesGetIamPolicyCall {
  1786  	c := &ProjectsLocationsDataExchangesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1787  	c.resource = resource
  1788  	c.getiampolicyrequest = getiampolicyrequest
  1789  	return c
  1790  }
  1791  
  1792  // Fields allows partial responses to be retrieved. See
  1793  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1794  // details.
  1795  func (c *ProjectsLocationsDataExchangesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesGetIamPolicyCall {
  1796  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1797  	return c
  1798  }
  1799  
  1800  // Context sets the context to be used in this call's Do method.
  1801  func (c *ProjectsLocationsDataExchangesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesGetIamPolicyCall {
  1802  	c.ctx_ = ctx
  1803  	return c
  1804  }
  1805  
  1806  // Header returns a http.Header that can be modified by the caller to add
  1807  // headers to the request.
  1808  func (c *ProjectsLocationsDataExchangesGetIamPolicyCall) Header() http.Header {
  1809  	if c.header_ == nil {
  1810  		c.header_ = make(http.Header)
  1811  	}
  1812  	return c.header_
  1813  }
  1814  
  1815  func (c *ProjectsLocationsDataExchangesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  1816  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1817  	var body io.Reader = nil
  1818  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
  1819  	if err != nil {
  1820  		return nil, err
  1821  	}
  1822  	c.urlParams_.Set("alt", alt)
  1823  	c.urlParams_.Set("prettyPrint", "false")
  1824  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy")
  1825  	urls += "?" + c.urlParams_.Encode()
  1826  	req, err := http.NewRequest("POST", urls, body)
  1827  	if err != nil {
  1828  		return nil, err
  1829  	}
  1830  	req.Header = reqHeaders
  1831  	googleapi.Expand(req.URL, map[string]string{
  1832  		"resource": c.resource,
  1833  	})
  1834  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1835  }
  1836  
  1837  // Do executes the "analyticshub.projects.locations.dataExchanges.getIamPolicy" call.
  1838  // Any non-2xx status code is an error. Response headers are in either
  1839  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  1840  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1841  // whether the returned error was because http.StatusNotModified was returned.
  1842  func (c *ProjectsLocationsDataExchangesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  1843  	gensupport.SetOptions(c.urlParams_, opts...)
  1844  	res, err := c.doRequest("json")
  1845  	if res != nil && res.StatusCode == http.StatusNotModified {
  1846  		if res.Body != nil {
  1847  			res.Body.Close()
  1848  		}
  1849  		return nil, gensupport.WrapError(&googleapi.Error{
  1850  			Code:   res.StatusCode,
  1851  			Header: res.Header,
  1852  		})
  1853  	}
  1854  	if err != nil {
  1855  		return nil, err
  1856  	}
  1857  	defer googleapi.CloseBody(res)
  1858  	if err := googleapi.CheckResponse(res); err != nil {
  1859  		return nil, gensupport.WrapError(err)
  1860  	}
  1861  	ret := &Policy{
  1862  		ServerResponse: googleapi.ServerResponse{
  1863  			Header:         res.Header,
  1864  			HTTPStatusCode: res.StatusCode,
  1865  		},
  1866  	}
  1867  	target := &ret
  1868  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1869  		return nil, err
  1870  	}
  1871  	return ret, nil
  1872  }
  1873  
  1874  type ProjectsLocationsDataExchangesListCall struct {
  1875  	s            *Service
  1876  	parent       string
  1877  	urlParams_   gensupport.URLParams
  1878  	ifNoneMatch_ string
  1879  	ctx_         context.Context
  1880  	header_      http.Header
  1881  }
  1882  
  1883  // List: Lists all data exchanges in a given project and location.
  1884  //
  1885  //   - parent: The parent resource path of the data exchanges. e.g.
  1886  //     `projects/myproject/locations/US`.
  1887  func (r *ProjectsLocationsDataExchangesService) List(parent string) *ProjectsLocationsDataExchangesListCall {
  1888  	c := &ProjectsLocationsDataExchangesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1889  	c.parent = parent
  1890  	return c
  1891  }
  1892  
  1893  // PageSize sets the optional parameter "pageSize": The maximum number of
  1894  // results to return in a single response page. Leverage the page tokens to
  1895  // iterate through the entire collection.
  1896  func (c *ProjectsLocationsDataExchangesListCall) PageSize(pageSize int64) *ProjectsLocationsDataExchangesListCall {
  1897  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1898  	return c
  1899  }
  1900  
  1901  // PageToken sets the optional parameter "pageToken": Page token, returned by a
  1902  // previous call, to request the next page of results.
  1903  func (c *ProjectsLocationsDataExchangesListCall) PageToken(pageToken string) *ProjectsLocationsDataExchangesListCall {
  1904  	c.urlParams_.Set("pageToken", pageToken)
  1905  	return c
  1906  }
  1907  
  1908  // Fields allows partial responses to be retrieved. See
  1909  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1910  // details.
  1911  func (c *ProjectsLocationsDataExchangesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListCall {
  1912  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1913  	return c
  1914  }
  1915  
  1916  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1917  // object's ETag matches the given value. This is useful for getting updates
  1918  // only after the object has changed since the last request.
  1919  func (c *ProjectsLocationsDataExchangesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataExchangesListCall {
  1920  	c.ifNoneMatch_ = entityTag
  1921  	return c
  1922  }
  1923  
  1924  // Context sets the context to be used in this call's Do method.
  1925  func (c *ProjectsLocationsDataExchangesListCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListCall {
  1926  	c.ctx_ = ctx
  1927  	return c
  1928  }
  1929  
  1930  // Header returns a http.Header that can be modified by the caller to add
  1931  // headers to the request.
  1932  func (c *ProjectsLocationsDataExchangesListCall) Header() http.Header {
  1933  	if c.header_ == nil {
  1934  		c.header_ = make(http.Header)
  1935  	}
  1936  	return c.header_
  1937  }
  1938  
  1939  func (c *ProjectsLocationsDataExchangesListCall) doRequest(alt string) (*http.Response, error) {
  1940  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1941  	if c.ifNoneMatch_ != "" {
  1942  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1943  	}
  1944  	var body io.Reader = nil
  1945  	c.urlParams_.Set("alt", alt)
  1946  	c.urlParams_.Set("prettyPrint", "false")
  1947  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/dataExchanges")
  1948  	urls += "?" + c.urlParams_.Encode()
  1949  	req, err := http.NewRequest("GET", urls, body)
  1950  	if err != nil {
  1951  		return nil, err
  1952  	}
  1953  	req.Header = reqHeaders
  1954  	googleapi.Expand(req.URL, map[string]string{
  1955  		"parent": c.parent,
  1956  	})
  1957  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1958  }
  1959  
  1960  // Do executes the "analyticshub.projects.locations.dataExchanges.list" call.
  1961  // Any non-2xx status code is an error. Response headers are in either
  1962  // *ListDataExchangesResponse.ServerResponse.Header or (if a response was
  1963  // returned at all) in error.(*googleapi.Error).Header. Use
  1964  // googleapi.IsNotModified to check whether the returned error was because
  1965  // http.StatusNotModified was returned.
  1966  func (c *ProjectsLocationsDataExchangesListCall) Do(opts ...googleapi.CallOption) (*ListDataExchangesResponse, error) {
  1967  	gensupport.SetOptions(c.urlParams_, opts...)
  1968  	res, err := c.doRequest("json")
  1969  	if res != nil && res.StatusCode == http.StatusNotModified {
  1970  		if res.Body != nil {
  1971  			res.Body.Close()
  1972  		}
  1973  		return nil, gensupport.WrapError(&googleapi.Error{
  1974  			Code:   res.StatusCode,
  1975  			Header: res.Header,
  1976  		})
  1977  	}
  1978  	if err != nil {
  1979  		return nil, err
  1980  	}
  1981  	defer googleapi.CloseBody(res)
  1982  	if err := googleapi.CheckResponse(res); err != nil {
  1983  		return nil, gensupport.WrapError(err)
  1984  	}
  1985  	ret := &ListDataExchangesResponse{
  1986  		ServerResponse: googleapi.ServerResponse{
  1987  			Header:         res.Header,
  1988  			HTTPStatusCode: res.StatusCode,
  1989  		},
  1990  	}
  1991  	target := &ret
  1992  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1993  		return nil, err
  1994  	}
  1995  	return ret, nil
  1996  }
  1997  
  1998  // Pages invokes f for each page of results.
  1999  // A non-nil error returned from f will halt the iteration.
  2000  // The provided context supersedes any context provided to the Context method.
  2001  func (c *ProjectsLocationsDataExchangesListCall) Pages(ctx context.Context, f func(*ListDataExchangesResponse) error) error {
  2002  	c.ctx_ = ctx
  2003  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2004  	for {
  2005  		x, err := c.Do()
  2006  		if err != nil {
  2007  			return err
  2008  		}
  2009  		if err := f(x); err != nil {
  2010  			return err
  2011  		}
  2012  		if x.NextPageToken == "" {
  2013  			return nil
  2014  		}
  2015  		c.PageToken(x.NextPageToken)
  2016  	}
  2017  }
  2018  
  2019  type ProjectsLocationsDataExchangesPatchCall struct {
  2020  	s            *Service
  2021  	name         string
  2022  	dataexchange *DataExchange
  2023  	urlParams_   gensupport.URLParams
  2024  	ctx_         context.Context
  2025  	header_      http.Header
  2026  }
  2027  
  2028  // Patch: Updates an existing data exchange.
  2029  //
  2030  //   - name: Output only. The resource name of the data exchange. e.g.
  2031  //     `projects/myproject/locations/US/dataExchanges/123`.
  2032  func (r *ProjectsLocationsDataExchangesService) Patch(name string, dataexchange *DataExchange) *ProjectsLocationsDataExchangesPatchCall {
  2033  	c := &ProjectsLocationsDataExchangesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2034  	c.name = name
  2035  	c.dataexchange = dataexchange
  2036  	return c
  2037  }
  2038  
  2039  // UpdateMask sets the optional parameter "updateMask": Required. Field mask
  2040  // specifies the fields to update in the data exchange resource. The fields
  2041  // specified in the `updateMask` are relative to the resource and are not a
  2042  // full request.
  2043  func (c *ProjectsLocationsDataExchangesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataExchangesPatchCall {
  2044  	c.urlParams_.Set("updateMask", updateMask)
  2045  	return c
  2046  }
  2047  
  2048  // Fields allows partial responses to be retrieved. See
  2049  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2050  // details.
  2051  func (c *ProjectsLocationsDataExchangesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesPatchCall {
  2052  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2053  	return c
  2054  }
  2055  
  2056  // Context sets the context to be used in this call's Do method.
  2057  func (c *ProjectsLocationsDataExchangesPatchCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesPatchCall {
  2058  	c.ctx_ = ctx
  2059  	return c
  2060  }
  2061  
  2062  // Header returns a http.Header that can be modified by the caller to add
  2063  // headers to the request.
  2064  func (c *ProjectsLocationsDataExchangesPatchCall) Header() http.Header {
  2065  	if c.header_ == nil {
  2066  		c.header_ = make(http.Header)
  2067  	}
  2068  	return c.header_
  2069  }
  2070  
  2071  func (c *ProjectsLocationsDataExchangesPatchCall) doRequest(alt string) (*http.Response, error) {
  2072  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2073  	var body io.Reader = nil
  2074  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataexchange)
  2075  	if err != nil {
  2076  		return nil, err
  2077  	}
  2078  	c.urlParams_.Set("alt", alt)
  2079  	c.urlParams_.Set("prettyPrint", "false")
  2080  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  2081  	urls += "?" + c.urlParams_.Encode()
  2082  	req, err := http.NewRequest("PATCH", urls, body)
  2083  	if err != nil {
  2084  		return nil, err
  2085  	}
  2086  	req.Header = reqHeaders
  2087  	googleapi.Expand(req.URL, map[string]string{
  2088  		"name": c.name,
  2089  	})
  2090  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2091  }
  2092  
  2093  // Do executes the "analyticshub.projects.locations.dataExchanges.patch" call.
  2094  // Any non-2xx status code is an error. Response headers are in either
  2095  // *DataExchange.ServerResponse.Header or (if a response was returned at all)
  2096  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2097  // whether the returned error was because http.StatusNotModified was returned.
  2098  func (c *ProjectsLocationsDataExchangesPatchCall) Do(opts ...googleapi.CallOption) (*DataExchange, error) {
  2099  	gensupport.SetOptions(c.urlParams_, opts...)
  2100  	res, err := c.doRequest("json")
  2101  	if res != nil && res.StatusCode == http.StatusNotModified {
  2102  		if res.Body != nil {
  2103  			res.Body.Close()
  2104  		}
  2105  		return nil, gensupport.WrapError(&googleapi.Error{
  2106  			Code:   res.StatusCode,
  2107  			Header: res.Header,
  2108  		})
  2109  	}
  2110  	if err != nil {
  2111  		return nil, err
  2112  	}
  2113  	defer googleapi.CloseBody(res)
  2114  	if err := googleapi.CheckResponse(res); err != nil {
  2115  		return nil, gensupport.WrapError(err)
  2116  	}
  2117  	ret := &DataExchange{
  2118  		ServerResponse: googleapi.ServerResponse{
  2119  			Header:         res.Header,
  2120  			HTTPStatusCode: res.StatusCode,
  2121  		},
  2122  	}
  2123  	target := &ret
  2124  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2125  		return nil, err
  2126  	}
  2127  	return ret, nil
  2128  }
  2129  
  2130  type ProjectsLocationsDataExchangesSetIamPolicyCall struct {
  2131  	s                   *Service
  2132  	resource            string
  2133  	setiampolicyrequest *SetIamPolicyRequest
  2134  	urlParams_          gensupport.URLParams
  2135  	ctx_                context.Context
  2136  	header_             http.Header
  2137  }
  2138  
  2139  // SetIamPolicy: Sets the IAM policy.
  2140  //
  2141  //   - resource: REQUIRED: The resource for which the policy is being specified.
  2142  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  2143  //     for the appropriate value for this field.
  2144  func (r *ProjectsLocationsDataExchangesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDataExchangesSetIamPolicyCall {
  2145  	c := &ProjectsLocationsDataExchangesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2146  	c.resource = resource
  2147  	c.setiampolicyrequest = setiampolicyrequest
  2148  	return c
  2149  }
  2150  
  2151  // Fields allows partial responses to be retrieved. See
  2152  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2153  // details.
  2154  func (c *ProjectsLocationsDataExchangesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesSetIamPolicyCall {
  2155  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2156  	return c
  2157  }
  2158  
  2159  // Context sets the context to be used in this call's Do method.
  2160  func (c *ProjectsLocationsDataExchangesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesSetIamPolicyCall {
  2161  	c.ctx_ = ctx
  2162  	return c
  2163  }
  2164  
  2165  // Header returns a http.Header that can be modified by the caller to add
  2166  // headers to the request.
  2167  func (c *ProjectsLocationsDataExchangesSetIamPolicyCall) Header() http.Header {
  2168  	if c.header_ == nil {
  2169  		c.header_ = make(http.Header)
  2170  	}
  2171  	return c.header_
  2172  }
  2173  
  2174  func (c *ProjectsLocationsDataExchangesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  2175  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2176  	var body io.Reader = nil
  2177  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  2178  	if err != nil {
  2179  		return nil, err
  2180  	}
  2181  	c.urlParams_.Set("alt", alt)
  2182  	c.urlParams_.Set("prettyPrint", "false")
  2183  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy")
  2184  	urls += "?" + c.urlParams_.Encode()
  2185  	req, err := http.NewRequest("POST", urls, body)
  2186  	if err != nil {
  2187  		return nil, err
  2188  	}
  2189  	req.Header = reqHeaders
  2190  	googleapi.Expand(req.URL, map[string]string{
  2191  		"resource": c.resource,
  2192  	})
  2193  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2194  }
  2195  
  2196  // Do executes the "analyticshub.projects.locations.dataExchanges.setIamPolicy" call.
  2197  // Any non-2xx status code is an error. Response headers are in either
  2198  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  2199  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2200  // whether the returned error was because http.StatusNotModified was returned.
  2201  func (c *ProjectsLocationsDataExchangesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  2202  	gensupport.SetOptions(c.urlParams_, opts...)
  2203  	res, err := c.doRequest("json")
  2204  	if res != nil && res.StatusCode == http.StatusNotModified {
  2205  		if res.Body != nil {
  2206  			res.Body.Close()
  2207  		}
  2208  		return nil, gensupport.WrapError(&googleapi.Error{
  2209  			Code:   res.StatusCode,
  2210  			Header: res.Header,
  2211  		})
  2212  	}
  2213  	if err != nil {
  2214  		return nil, err
  2215  	}
  2216  	defer googleapi.CloseBody(res)
  2217  	if err := googleapi.CheckResponse(res); err != nil {
  2218  		return nil, gensupport.WrapError(err)
  2219  	}
  2220  	ret := &Policy{
  2221  		ServerResponse: googleapi.ServerResponse{
  2222  			Header:         res.Header,
  2223  			HTTPStatusCode: res.StatusCode,
  2224  		},
  2225  	}
  2226  	target := &ret
  2227  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2228  		return nil, err
  2229  	}
  2230  	return ret, nil
  2231  }
  2232  
  2233  type ProjectsLocationsDataExchangesTestIamPermissionsCall struct {
  2234  	s                         *Service
  2235  	resource                  string
  2236  	testiampermissionsrequest *TestIamPermissionsRequest
  2237  	urlParams_                gensupport.URLParams
  2238  	ctx_                      context.Context
  2239  	header_                   http.Header
  2240  }
  2241  
  2242  // TestIamPermissions: Returns the permissions that a caller has.
  2243  //
  2244  //   - resource: REQUIRED: The resource for which the policy detail is being
  2245  //     requested. See Resource names
  2246  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  2247  //     value for this field.
  2248  func (r *ProjectsLocationsDataExchangesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDataExchangesTestIamPermissionsCall {
  2249  	c := &ProjectsLocationsDataExchangesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2250  	c.resource = resource
  2251  	c.testiampermissionsrequest = testiampermissionsrequest
  2252  	return c
  2253  }
  2254  
  2255  // Fields allows partial responses to be retrieved. See
  2256  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2257  // details.
  2258  func (c *ProjectsLocationsDataExchangesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesTestIamPermissionsCall {
  2259  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2260  	return c
  2261  }
  2262  
  2263  // Context sets the context to be used in this call's Do method.
  2264  func (c *ProjectsLocationsDataExchangesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesTestIamPermissionsCall {
  2265  	c.ctx_ = ctx
  2266  	return c
  2267  }
  2268  
  2269  // Header returns a http.Header that can be modified by the caller to add
  2270  // headers to the request.
  2271  func (c *ProjectsLocationsDataExchangesTestIamPermissionsCall) Header() http.Header {
  2272  	if c.header_ == nil {
  2273  		c.header_ = make(http.Header)
  2274  	}
  2275  	return c.header_
  2276  }
  2277  
  2278  func (c *ProjectsLocationsDataExchangesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  2279  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2280  	var body io.Reader = nil
  2281  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  2282  	if err != nil {
  2283  		return nil, err
  2284  	}
  2285  	c.urlParams_.Set("alt", alt)
  2286  	c.urlParams_.Set("prettyPrint", "false")
  2287  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions")
  2288  	urls += "?" + c.urlParams_.Encode()
  2289  	req, err := http.NewRequest("POST", urls, body)
  2290  	if err != nil {
  2291  		return nil, err
  2292  	}
  2293  	req.Header = reqHeaders
  2294  	googleapi.Expand(req.URL, map[string]string{
  2295  		"resource": c.resource,
  2296  	})
  2297  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2298  }
  2299  
  2300  // Do executes the "analyticshub.projects.locations.dataExchanges.testIamPermissions" call.
  2301  // Any non-2xx status code is an error. Response headers are in either
  2302  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  2303  // returned at all) in error.(*googleapi.Error).Header. Use
  2304  // googleapi.IsNotModified to check whether the returned error was because
  2305  // http.StatusNotModified was returned.
  2306  func (c *ProjectsLocationsDataExchangesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  2307  	gensupport.SetOptions(c.urlParams_, opts...)
  2308  	res, err := c.doRequest("json")
  2309  	if res != nil && res.StatusCode == http.StatusNotModified {
  2310  		if res.Body != nil {
  2311  			res.Body.Close()
  2312  		}
  2313  		return nil, gensupport.WrapError(&googleapi.Error{
  2314  			Code:   res.StatusCode,
  2315  			Header: res.Header,
  2316  		})
  2317  	}
  2318  	if err != nil {
  2319  		return nil, err
  2320  	}
  2321  	defer googleapi.CloseBody(res)
  2322  	if err := googleapi.CheckResponse(res); err != nil {
  2323  		return nil, gensupport.WrapError(err)
  2324  	}
  2325  	ret := &TestIamPermissionsResponse{
  2326  		ServerResponse: googleapi.ServerResponse{
  2327  			Header:         res.Header,
  2328  			HTTPStatusCode: res.StatusCode,
  2329  		},
  2330  	}
  2331  	target := &ret
  2332  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2333  		return nil, err
  2334  	}
  2335  	return ret, nil
  2336  }
  2337  
  2338  type ProjectsLocationsDataExchangesListingsCreateCall struct {
  2339  	s          *Service
  2340  	parent     string
  2341  	listing    *Listing
  2342  	urlParams_ gensupport.URLParams
  2343  	ctx_       context.Context
  2344  	header_    http.Header
  2345  }
  2346  
  2347  // Create: Creates a new listing.
  2348  //
  2349  //   - parent: The parent resource path of the listing. e.g.
  2350  //     `projects/myproject/locations/US/dataExchanges/123`.
  2351  func (r *ProjectsLocationsDataExchangesListingsService) Create(parent string, listing *Listing) *ProjectsLocationsDataExchangesListingsCreateCall {
  2352  	c := &ProjectsLocationsDataExchangesListingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2353  	c.parent = parent
  2354  	c.listing = listing
  2355  	return c
  2356  }
  2357  
  2358  // ListingId sets the optional parameter "listingId": Required. The ID of the
  2359  // listing to create. Must contain only Unicode letters, numbers (0-9),
  2360  // underscores (_). Should not use characters that require URL-escaping, or
  2361  // characters outside of ASCII, spaces. Max length: 100 bytes.
  2362  func (c *ProjectsLocationsDataExchangesListingsCreateCall) ListingId(listingId string) *ProjectsLocationsDataExchangesListingsCreateCall {
  2363  	c.urlParams_.Set("listingId", listingId)
  2364  	return c
  2365  }
  2366  
  2367  // Fields allows partial responses to be retrieved. See
  2368  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2369  // details.
  2370  func (c *ProjectsLocationsDataExchangesListingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsCreateCall {
  2371  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2372  	return c
  2373  }
  2374  
  2375  // Context sets the context to be used in this call's Do method.
  2376  func (c *ProjectsLocationsDataExchangesListingsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsCreateCall {
  2377  	c.ctx_ = ctx
  2378  	return c
  2379  }
  2380  
  2381  // Header returns a http.Header that can be modified by the caller to add
  2382  // headers to the request.
  2383  func (c *ProjectsLocationsDataExchangesListingsCreateCall) Header() http.Header {
  2384  	if c.header_ == nil {
  2385  		c.header_ = make(http.Header)
  2386  	}
  2387  	return c.header_
  2388  }
  2389  
  2390  func (c *ProjectsLocationsDataExchangesListingsCreateCall) doRequest(alt string) (*http.Response, error) {
  2391  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2392  	var body io.Reader = nil
  2393  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.listing)
  2394  	if err != nil {
  2395  		return nil, err
  2396  	}
  2397  	c.urlParams_.Set("alt", alt)
  2398  	c.urlParams_.Set("prettyPrint", "false")
  2399  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/listings")
  2400  	urls += "?" + c.urlParams_.Encode()
  2401  	req, err := http.NewRequest("POST", urls, body)
  2402  	if err != nil {
  2403  		return nil, err
  2404  	}
  2405  	req.Header = reqHeaders
  2406  	googleapi.Expand(req.URL, map[string]string{
  2407  		"parent": c.parent,
  2408  	})
  2409  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2410  }
  2411  
  2412  // Do executes the "analyticshub.projects.locations.dataExchanges.listings.create" call.
  2413  // Any non-2xx status code is an error. Response headers are in either
  2414  // *Listing.ServerResponse.Header or (if a response was returned at all) in
  2415  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2416  // whether the returned error was because http.StatusNotModified was returned.
  2417  func (c *ProjectsLocationsDataExchangesListingsCreateCall) Do(opts ...googleapi.CallOption) (*Listing, error) {
  2418  	gensupport.SetOptions(c.urlParams_, opts...)
  2419  	res, err := c.doRequest("json")
  2420  	if res != nil && res.StatusCode == http.StatusNotModified {
  2421  		if res.Body != nil {
  2422  			res.Body.Close()
  2423  		}
  2424  		return nil, gensupport.WrapError(&googleapi.Error{
  2425  			Code:   res.StatusCode,
  2426  			Header: res.Header,
  2427  		})
  2428  	}
  2429  	if err != nil {
  2430  		return nil, err
  2431  	}
  2432  	defer googleapi.CloseBody(res)
  2433  	if err := googleapi.CheckResponse(res); err != nil {
  2434  		return nil, gensupport.WrapError(err)
  2435  	}
  2436  	ret := &Listing{
  2437  		ServerResponse: googleapi.ServerResponse{
  2438  			Header:         res.Header,
  2439  			HTTPStatusCode: res.StatusCode,
  2440  		},
  2441  	}
  2442  	target := &ret
  2443  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2444  		return nil, err
  2445  	}
  2446  	return ret, nil
  2447  }
  2448  
  2449  type ProjectsLocationsDataExchangesListingsDeleteCall struct {
  2450  	s          *Service
  2451  	name       string
  2452  	urlParams_ gensupport.URLParams
  2453  	ctx_       context.Context
  2454  	header_    http.Header
  2455  }
  2456  
  2457  // Delete: Deletes a listing.
  2458  //
  2459  //   - name: Resource name of the listing to delete. e.g.
  2460  //     `projects/myproject/locations/US/dataExchanges/123/listings/456`.
  2461  func (r *ProjectsLocationsDataExchangesListingsService) Delete(name string) *ProjectsLocationsDataExchangesListingsDeleteCall {
  2462  	c := &ProjectsLocationsDataExchangesListingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2463  	c.name = name
  2464  	return c
  2465  }
  2466  
  2467  // Fields allows partial responses to be retrieved. See
  2468  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2469  // details.
  2470  func (c *ProjectsLocationsDataExchangesListingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsDeleteCall {
  2471  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2472  	return c
  2473  }
  2474  
  2475  // Context sets the context to be used in this call's Do method.
  2476  func (c *ProjectsLocationsDataExchangesListingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsDeleteCall {
  2477  	c.ctx_ = ctx
  2478  	return c
  2479  }
  2480  
  2481  // Header returns a http.Header that can be modified by the caller to add
  2482  // headers to the request.
  2483  func (c *ProjectsLocationsDataExchangesListingsDeleteCall) Header() http.Header {
  2484  	if c.header_ == nil {
  2485  		c.header_ = make(http.Header)
  2486  	}
  2487  	return c.header_
  2488  }
  2489  
  2490  func (c *ProjectsLocationsDataExchangesListingsDeleteCall) doRequest(alt string) (*http.Response, error) {
  2491  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2492  	var body io.Reader = nil
  2493  	c.urlParams_.Set("alt", alt)
  2494  	c.urlParams_.Set("prettyPrint", "false")
  2495  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  2496  	urls += "?" + c.urlParams_.Encode()
  2497  	req, err := http.NewRequest("DELETE", urls, body)
  2498  	if err != nil {
  2499  		return nil, err
  2500  	}
  2501  	req.Header = reqHeaders
  2502  	googleapi.Expand(req.URL, map[string]string{
  2503  		"name": c.name,
  2504  	})
  2505  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2506  }
  2507  
  2508  // Do executes the "analyticshub.projects.locations.dataExchanges.listings.delete" call.
  2509  // Any non-2xx status code is an error. Response headers are in either
  2510  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  2511  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2512  // whether the returned error was because http.StatusNotModified was returned.
  2513  func (c *ProjectsLocationsDataExchangesListingsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  2514  	gensupport.SetOptions(c.urlParams_, opts...)
  2515  	res, err := c.doRequest("json")
  2516  	if res != nil && res.StatusCode == http.StatusNotModified {
  2517  		if res.Body != nil {
  2518  			res.Body.Close()
  2519  		}
  2520  		return nil, gensupport.WrapError(&googleapi.Error{
  2521  			Code:   res.StatusCode,
  2522  			Header: res.Header,
  2523  		})
  2524  	}
  2525  	if err != nil {
  2526  		return nil, err
  2527  	}
  2528  	defer googleapi.CloseBody(res)
  2529  	if err := googleapi.CheckResponse(res); err != nil {
  2530  		return nil, gensupport.WrapError(err)
  2531  	}
  2532  	ret := &Empty{
  2533  		ServerResponse: googleapi.ServerResponse{
  2534  			Header:         res.Header,
  2535  			HTTPStatusCode: res.StatusCode,
  2536  		},
  2537  	}
  2538  	target := &ret
  2539  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2540  		return nil, err
  2541  	}
  2542  	return ret, nil
  2543  }
  2544  
  2545  type ProjectsLocationsDataExchangesListingsGetCall struct {
  2546  	s            *Service
  2547  	name         string
  2548  	urlParams_   gensupport.URLParams
  2549  	ifNoneMatch_ string
  2550  	ctx_         context.Context
  2551  	header_      http.Header
  2552  }
  2553  
  2554  // Get: Gets the details of a listing.
  2555  //
  2556  //   - name: The resource name of the listing. e.g.
  2557  //     `projects/myproject/locations/US/dataExchanges/123/listings/456`.
  2558  func (r *ProjectsLocationsDataExchangesListingsService) Get(name string) *ProjectsLocationsDataExchangesListingsGetCall {
  2559  	c := &ProjectsLocationsDataExchangesListingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2560  	c.name = name
  2561  	return c
  2562  }
  2563  
  2564  // Fields allows partial responses to be retrieved. See
  2565  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2566  // details.
  2567  func (c *ProjectsLocationsDataExchangesListingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsGetCall {
  2568  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2569  	return c
  2570  }
  2571  
  2572  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2573  // object's ETag matches the given value. This is useful for getting updates
  2574  // only after the object has changed since the last request.
  2575  func (c *ProjectsLocationsDataExchangesListingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataExchangesListingsGetCall {
  2576  	c.ifNoneMatch_ = entityTag
  2577  	return c
  2578  }
  2579  
  2580  // Context sets the context to be used in this call's Do method.
  2581  func (c *ProjectsLocationsDataExchangesListingsGetCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsGetCall {
  2582  	c.ctx_ = ctx
  2583  	return c
  2584  }
  2585  
  2586  // Header returns a http.Header that can be modified by the caller to add
  2587  // headers to the request.
  2588  func (c *ProjectsLocationsDataExchangesListingsGetCall) Header() http.Header {
  2589  	if c.header_ == nil {
  2590  		c.header_ = make(http.Header)
  2591  	}
  2592  	return c.header_
  2593  }
  2594  
  2595  func (c *ProjectsLocationsDataExchangesListingsGetCall) doRequest(alt string) (*http.Response, error) {
  2596  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2597  	if c.ifNoneMatch_ != "" {
  2598  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2599  	}
  2600  	var body io.Reader = nil
  2601  	c.urlParams_.Set("alt", alt)
  2602  	c.urlParams_.Set("prettyPrint", "false")
  2603  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  2604  	urls += "?" + c.urlParams_.Encode()
  2605  	req, err := http.NewRequest("GET", urls, body)
  2606  	if err != nil {
  2607  		return nil, err
  2608  	}
  2609  	req.Header = reqHeaders
  2610  	googleapi.Expand(req.URL, map[string]string{
  2611  		"name": c.name,
  2612  	})
  2613  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2614  }
  2615  
  2616  // Do executes the "analyticshub.projects.locations.dataExchanges.listings.get" call.
  2617  // Any non-2xx status code is an error. Response headers are in either
  2618  // *Listing.ServerResponse.Header or (if a response was returned at all) in
  2619  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2620  // whether the returned error was because http.StatusNotModified was returned.
  2621  func (c *ProjectsLocationsDataExchangesListingsGetCall) Do(opts ...googleapi.CallOption) (*Listing, error) {
  2622  	gensupport.SetOptions(c.urlParams_, opts...)
  2623  	res, err := c.doRequest("json")
  2624  	if res != nil && res.StatusCode == http.StatusNotModified {
  2625  		if res.Body != nil {
  2626  			res.Body.Close()
  2627  		}
  2628  		return nil, gensupport.WrapError(&googleapi.Error{
  2629  			Code:   res.StatusCode,
  2630  			Header: res.Header,
  2631  		})
  2632  	}
  2633  	if err != nil {
  2634  		return nil, err
  2635  	}
  2636  	defer googleapi.CloseBody(res)
  2637  	if err := googleapi.CheckResponse(res); err != nil {
  2638  		return nil, gensupport.WrapError(err)
  2639  	}
  2640  	ret := &Listing{
  2641  		ServerResponse: googleapi.ServerResponse{
  2642  			Header:         res.Header,
  2643  			HTTPStatusCode: res.StatusCode,
  2644  		},
  2645  	}
  2646  	target := &ret
  2647  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2648  		return nil, err
  2649  	}
  2650  	return ret, nil
  2651  }
  2652  
  2653  type ProjectsLocationsDataExchangesListingsGetIamPolicyCall struct {
  2654  	s                   *Service
  2655  	resource            string
  2656  	getiampolicyrequest *GetIamPolicyRequest
  2657  	urlParams_          gensupport.URLParams
  2658  	ctx_                context.Context
  2659  	header_             http.Header
  2660  }
  2661  
  2662  // GetIamPolicy: Gets the IAM policy.
  2663  //
  2664  //   - resource: REQUIRED: The resource for which the policy is being requested.
  2665  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  2666  //     for the appropriate value for this field.
  2667  func (r *ProjectsLocationsDataExchangesListingsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsDataExchangesListingsGetIamPolicyCall {
  2668  	c := &ProjectsLocationsDataExchangesListingsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2669  	c.resource = resource
  2670  	c.getiampolicyrequest = getiampolicyrequest
  2671  	return c
  2672  }
  2673  
  2674  // Fields allows partial responses to be retrieved. See
  2675  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2676  // details.
  2677  func (c *ProjectsLocationsDataExchangesListingsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsGetIamPolicyCall {
  2678  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2679  	return c
  2680  }
  2681  
  2682  // Context sets the context to be used in this call's Do method.
  2683  func (c *ProjectsLocationsDataExchangesListingsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsGetIamPolicyCall {
  2684  	c.ctx_ = ctx
  2685  	return c
  2686  }
  2687  
  2688  // Header returns a http.Header that can be modified by the caller to add
  2689  // headers to the request.
  2690  func (c *ProjectsLocationsDataExchangesListingsGetIamPolicyCall) Header() http.Header {
  2691  	if c.header_ == nil {
  2692  		c.header_ = make(http.Header)
  2693  	}
  2694  	return c.header_
  2695  }
  2696  
  2697  func (c *ProjectsLocationsDataExchangesListingsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  2698  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2699  	var body io.Reader = nil
  2700  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
  2701  	if err != nil {
  2702  		return nil, err
  2703  	}
  2704  	c.urlParams_.Set("alt", alt)
  2705  	c.urlParams_.Set("prettyPrint", "false")
  2706  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy")
  2707  	urls += "?" + c.urlParams_.Encode()
  2708  	req, err := http.NewRequest("POST", urls, body)
  2709  	if err != nil {
  2710  		return nil, err
  2711  	}
  2712  	req.Header = reqHeaders
  2713  	googleapi.Expand(req.URL, map[string]string{
  2714  		"resource": c.resource,
  2715  	})
  2716  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2717  }
  2718  
  2719  // Do executes the "analyticshub.projects.locations.dataExchanges.listings.getIamPolicy" call.
  2720  // Any non-2xx status code is an error. Response headers are in either
  2721  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  2722  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2723  // whether the returned error was because http.StatusNotModified was returned.
  2724  func (c *ProjectsLocationsDataExchangesListingsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  2725  	gensupport.SetOptions(c.urlParams_, opts...)
  2726  	res, err := c.doRequest("json")
  2727  	if res != nil && res.StatusCode == http.StatusNotModified {
  2728  		if res.Body != nil {
  2729  			res.Body.Close()
  2730  		}
  2731  		return nil, gensupport.WrapError(&googleapi.Error{
  2732  			Code:   res.StatusCode,
  2733  			Header: res.Header,
  2734  		})
  2735  	}
  2736  	if err != nil {
  2737  		return nil, err
  2738  	}
  2739  	defer googleapi.CloseBody(res)
  2740  	if err := googleapi.CheckResponse(res); err != nil {
  2741  		return nil, gensupport.WrapError(err)
  2742  	}
  2743  	ret := &Policy{
  2744  		ServerResponse: googleapi.ServerResponse{
  2745  			Header:         res.Header,
  2746  			HTTPStatusCode: res.StatusCode,
  2747  		},
  2748  	}
  2749  	target := &ret
  2750  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2751  		return nil, err
  2752  	}
  2753  	return ret, nil
  2754  }
  2755  
  2756  type ProjectsLocationsDataExchangesListingsListCall struct {
  2757  	s            *Service
  2758  	parent       string
  2759  	urlParams_   gensupport.URLParams
  2760  	ifNoneMatch_ string
  2761  	ctx_         context.Context
  2762  	header_      http.Header
  2763  }
  2764  
  2765  // List: Lists all listings in a given project and location.
  2766  //
  2767  //   - parent: The parent resource path of the listing. e.g.
  2768  //     `projects/myproject/locations/US/dataExchanges/123`.
  2769  func (r *ProjectsLocationsDataExchangesListingsService) List(parent string) *ProjectsLocationsDataExchangesListingsListCall {
  2770  	c := &ProjectsLocationsDataExchangesListingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2771  	c.parent = parent
  2772  	return c
  2773  }
  2774  
  2775  // PageSize sets the optional parameter "pageSize": The maximum number of
  2776  // results to return in a single response page. Leverage the page tokens to
  2777  // iterate through the entire collection.
  2778  func (c *ProjectsLocationsDataExchangesListingsListCall) PageSize(pageSize int64) *ProjectsLocationsDataExchangesListingsListCall {
  2779  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2780  	return c
  2781  }
  2782  
  2783  // PageToken sets the optional parameter "pageToken": Page token, returned by a
  2784  // previous call, to request the next page of results.
  2785  func (c *ProjectsLocationsDataExchangesListingsListCall) PageToken(pageToken string) *ProjectsLocationsDataExchangesListingsListCall {
  2786  	c.urlParams_.Set("pageToken", pageToken)
  2787  	return c
  2788  }
  2789  
  2790  // Fields allows partial responses to be retrieved. See
  2791  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2792  // details.
  2793  func (c *ProjectsLocationsDataExchangesListingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsListCall {
  2794  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2795  	return c
  2796  }
  2797  
  2798  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2799  // object's ETag matches the given value. This is useful for getting updates
  2800  // only after the object has changed since the last request.
  2801  func (c *ProjectsLocationsDataExchangesListingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataExchangesListingsListCall {
  2802  	c.ifNoneMatch_ = entityTag
  2803  	return c
  2804  }
  2805  
  2806  // Context sets the context to be used in this call's Do method.
  2807  func (c *ProjectsLocationsDataExchangesListingsListCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsListCall {
  2808  	c.ctx_ = ctx
  2809  	return c
  2810  }
  2811  
  2812  // Header returns a http.Header that can be modified by the caller to add
  2813  // headers to the request.
  2814  func (c *ProjectsLocationsDataExchangesListingsListCall) Header() http.Header {
  2815  	if c.header_ == nil {
  2816  		c.header_ = make(http.Header)
  2817  	}
  2818  	return c.header_
  2819  }
  2820  
  2821  func (c *ProjectsLocationsDataExchangesListingsListCall) doRequest(alt string) (*http.Response, error) {
  2822  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2823  	if c.ifNoneMatch_ != "" {
  2824  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2825  	}
  2826  	var body io.Reader = nil
  2827  	c.urlParams_.Set("alt", alt)
  2828  	c.urlParams_.Set("prettyPrint", "false")
  2829  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/listings")
  2830  	urls += "?" + c.urlParams_.Encode()
  2831  	req, err := http.NewRequest("GET", urls, body)
  2832  	if err != nil {
  2833  		return nil, err
  2834  	}
  2835  	req.Header = reqHeaders
  2836  	googleapi.Expand(req.URL, map[string]string{
  2837  		"parent": c.parent,
  2838  	})
  2839  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2840  }
  2841  
  2842  // Do executes the "analyticshub.projects.locations.dataExchanges.listings.list" call.
  2843  // Any non-2xx status code is an error. Response headers are in either
  2844  // *ListListingsResponse.ServerResponse.Header or (if a response was returned
  2845  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2846  // check whether the returned error was because http.StatusNotModified was
  2847  // returned.
  2848  func (c *ProjectsLocationsDataExchangesListingsListCall) Do(opts ...googleapi.CallOption) (*ListListingsResponse, error) {
  2849  	gensupport.SetOptions(c.urlParams_, opts...)
  2850  	res, err := c.doRequest("json")
  2851  	if res != nil && res.StatusCode == http.StatusNotModified {
  2852  		if res.Body != nil {
  2853  			res.Body.Close()
  2854  		}
  2855  		return nil, gensupport.WrapError(&googleapi.Error{
  2856  			Code:   res.StatusCode,
  2857  			Header: res.Header,
  2858  		})
  2859  	}
  2860  	if err != nil {
  2861  		return nil, err
  2862  	}
  2863  	defer googleapi.CloseBody(res)
  2864  	if err := googleapi.CheckResponse(res); err != nil {
  2865  		return nil, gensupport.WrapError(err)
  2866  	}
  2867  	ret := &ListListingsResponse{
  2868  		ServerResponse: googleapi.ServerResponse{
  2869  			Header:         res.Header,
  2870  			HTTPStatusCode: res.StatusCode,
  2871  		},
  2872  	}
  2873  	target := &ret
  2874  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2875  		return nil, err
  2876  	}
  2877  	return ret, nil
  2878  }
  2879  
  2880  // Pages invokes f for each page of results.
  2881  // A non-nil error returned from f will halt the iteration.
  2882  // The provided context supersedes any context provided to the Context method.
  2883  func (c *ProjectsLocationsDataExchangesListingsListCall) Pages(ctx context.Context, f func(*ListListingsResponse) error) error {
  2884  	c.ctx_ = ctx
  2885  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2886  	for {
  2887  		x, err := c.Do()
  2888  		if err != nil {
  2889  			return err
  2890  		}
  2891  		if err := f(x); err != nil {
  2892  			return err
  2893  		}
  2894  		if x.NextPageToken == "" {
  2895  			return nil
  2896  		}
  2897  		c.PageToken(x.NextPageToken)
  2898  	}
  2899  }
  2900  
  2901  type ProjectsLocationsDataExchangesListingsPatchCall struct {
  2902  	s          *Service
  2903  	name       string
  2904  	listing    *Listing
  2905  	urlParams_ gensupport.URLParams
  2906  	ctx_       context.Context
  2907  	header_    http.Header
  2908  }
  2909  
  2910  // Patch: Updates an existing listing.
  2911  //
  2912  //   - name: Output only. The resource name of the listing. e.g.
  2913  //     `projects/myproject/locations/US/dataExchanges/123/listings/456`.
  2914  func (r *ProjectsLocationsDataExchangesListingsService) Patch(name string, listing *Listing) *ProjectsLocationsDataExchangesListingsPatchCall {
  2915  	c := &ProjectsLocationsDataExchangesListingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2916  	c.name = name
  2917  	c.listing = listing
  2918  	return c
  2919  }
  2920  
  2921  // UpdateMask sets the optional parameter "updateMask": Required. Field mask
  2922  // specifies the fields to update in the listing resource. The fields specified
  2923  // in the `updateMask` are relative to the resource and are not a full request.
  2924  func (c *ProjectsLocationsDataExchangesListingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataExchangesListingsPatchCall {
  2925  	c.urlParams_.Set("updateMask", updateMask)
  2926  	return c
  2927  }
  2928  
  2929  // Fields allows partial responses to be retrieved. See
  2930  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2931  // details.
  2932  func (c *ProjectsLocationsDataExchangesListingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsPatchCall {
  2933  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2934  	return c
  2935  }
  2936  
  2937  // Context sets the context to be used in this call's Do method.
  2938  func (c *ProjectsLocationsDataExchangesListingsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsPatchCall {
  2939  	c.ctx_ = ctx
  2940  	return c
  2941  }
  2942  
  2943  // Header returns a http.Header that can be modified by the caller to add
  2944  // headers to the request.
  2945  func (c *ProjectsLocationsDataExchangesListingsPatchCall) Header() http.Header {
  2946  	if c.header_ == nil {
  2947  		c.header_ = make(http.Header)
  2948  	}
  2949  	return c.header_
  2950  }
  2951  
  2952  func (c *ProjectsLocationsDataExchangesListingsPatchCall) doRequest(alt string) (*http.Response, error) {
  2953  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2954  	var body io.Reader = nil
  2955  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.listing)
  2956  	if err != nil {
  2957  		return nil, err
  2958  	}
  2959  	c.urlParams_.Set("alt", alt)
  2960  	c.urlParams_.Set("prettyPrint", "false")
  2961  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  2962  	urls += "?" + c.urlParams_.Encode()
  2963  	req, err := http.NewRequest("PATCH", urls, body)
  2964  	if err != nil {
  2965  		return nil, err
  2966  	}
  2967  	req.Header = reqHeaders
  2968  	googleapi.Expand(req.URL, map[string]string{
  2969  		"name": c.name,
  2970  	})
  2971  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2972  }
  2973  
  2974  // Do executes the "analyticshub.projects.locations.dataExchanges.listings.patch" call.
  2975  // Any non-2xx status code is an error. Response headers are in either
  2976  // *Listing.ServerResponse.Header or (if a response was returned at all) in
  2977  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2978  // whether the returned error was because http.StatusNotModified was returned.
  2979  func (c *ProjectsLocationsDataExchangesListingsPatchCall) Do(opts ...googleapi.CallOption) (*Listing, error) {
  2980  	gensupport.SetOptions(c.urlParams_, opts...)
  2981  	res, err := c.doRequest("json")
  2982  	if res != nil && res.StatusCode == http.StatusNotModified {
  2983  		if res.Body != nil {
  2984  			res.Body.Close()
  2985  		}
  2986  		return nil, gensupport.WrapError(&googleapi.Error{
  2987  			Code:   res.StatusCode,
  2988  			Header: res.Header,
  2989  		})
  2990  	}
  2991  	if err != nil {
  2992  		return nil, err
  2993  	}
  2994  	defer googleapi.CloseBody(res)
  2995  	if err := googleapi.CheckResponse(res); err != nil {
  2996  		return nil, gensupport.WrapError(err)
  2997  	}
  2998  	ret := &Listing{
  2999  		ServerResponse: googleapi.ServerResponse{
  3000  			Header:         res.Header,
  3001  			HTTPStatusCode: res.StatusCode,
  3002  		},
  3003  	}
  3004  	target := &ret
  3005  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3006  		return nil, err
  3007  	}
  3008  	return ret, nil
  3009  }
  3010  
  3011  type ProjectsLocationsDataExchangesListingsSetIamPolicyCall struct {
  3012  	s                   *Service
  3013  	resource            string
  3014  	setiampolicyrequest *SetIamPolicyRequest
  3015  	urlParams_          gensupport.URLParams
  3016  	ctx_                context.Context
  3017  	header_             http.Header
  3018  }
  3019  
  3020  // SetIamPolicy: Sets the IAM policy.
  3021  //
  3022  //   - resource: REQUIRED: The resource for which the policy is being specified.
  3023  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  3024  //     for the appropriate value for this field.
  3025  func (r *ProjectsLocationsDataExchangesListingsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDataExchangesListingsSetIamPolicyCall {
  3026  	c := &ProjectsLocationsDataExchangesListingsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3027  	c.resource = resource
  3028  	c.setiampolicyrequest = setiampolicyrequest
  3029  	return c
  3030  }
  3031  
  3032  // Fields allows partial responses to be retrieved. See
  3033  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3034  // details.
  3035  func (c *ProjectsLocationsDataExchangesListingsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsSetIamPolicyCall {
  3036  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3037  	return c
  3038  }
  3039  
  3040  // Context sets the context to be used in this call's Do method.
  3041  func (c *ProjectsLocationsDataExchangesListingsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsSetIamPolicyCall {
  3042  	c.ctx_ = ctx
  3043  	return c
  3044  }
  3045  
  3046  // Header returns a http.Header that can be modified by the caller to add
  3047  // headers to the request.
  3048  func (c *ProjectsLocationsDataExchangesListingsSetIamPolicyCall) Header() http.Header {
  3049  	if c.header_ == nil {
  3050  		c.header_ = make(http.Header)
  3051  	}
  3052  	return c.header_
  3053  }
  3054  
  3055  func (c *ProjectsLocationsDataExchangesListingsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  3056  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3057  	var body io.Reader = nil
  3058  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  3059  	if err != nil {
  3060  		return nil, err
  3061  	}
  3062  	c.urlParams_.Set("alt", alt)
  3063  	c.urlParams_.Set("prettyPrint", "false")
  3064  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy")
  3065  	urls += "?" + c.urlParams_.Encode()
  3066  	req, err := http.NewRequest("POST", urls, body)
  3067  	if err != nil {
  3068  		return nil, err
  3069  	}
  3070  	req.Header = reqHeaders
  3071  	googleapi.Expand(req.URL, map[string]string{
  3072  		"resource": c.resource,
  3073  	})
  3074  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3075  }
  3076  
  3077  // Do executes the "analyticshub.projects.locations.dataExchanges.listings.setIamPolicy" call.
  3078  // Any non-2xx status code is an error. Response headers are in either
  3079  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  3080  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3081  // whether the returned error was because http.StatusNotModified was returned.
  3082  func (c *ProjectsLocationsDataExchangesListingsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  3083  	gensupport.SetOptions(c.urlParams_, opts...)
  3084  	res, err := c.doRequest("json")
  3085  	if res != nil && res.StatusCode == http.StatusNotModified {
  3086  		if res.Body != nil {
  3087  			res.Body.Close()
  3088  		}
  3089  		return nil, gensupport.WrapError(&googleapi.Error{
  3090  			Code:   res.StatusCode,
  3091  			Header: res.Header,
  3092  		})
  3093  	}
  3094  	if err != nil {
  3095  		return nil, err
  3096  	}
  3097  	defer googleapi.CloseBody(res)
  3098  	if err := googleapi.CheckResponse(res); err != nil {
  3099  		return nil, gensupport.WrapError(err)
  3100  	}
  3101  	ret := &Policy{
  3102  		ServerResponse: googleapi.ServerResponse{
  3103  			Header:         res.Header,
  3104  			HTTPStatusCode: res.StatusCode,
  3105  		},
  3106  	}
  3107  	target := &ret
  3108  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3109  		return nil, err
  3110  	}
  3111  	return ret, nil
  3112  }
  3113  
  3114  type ProjectsLocationsDataExchangesListingsSubscribeCall struct {
  3115  	s                       *Service
  3116  	name                    string
  3117  	subscribelistingrequest *SubscribeListingRequest
  3118  	urlParams_              gensupport.URLParams
  3119  	ctx_                    context.Context
  3120  	header_                 http.Header
  3121  }
  3122  
  3123  // Subscribe: Subscribes to a listing. Currently, with Analytics Hub, you can
  3124  // create listings that reference only BigQuery datasets. Upon subscription to
  3125  // a listing for a BigQuery dataset, Analytics Hub creates a linked dataset in
  3126  // the subscriber's project.
  3127  //
  3128  //   - name: Resource name of the listing that you want to subscribe to. e.g.
  3129  //     `projects/myproject/locations/US/dataExchanges/123/listings/456`.
  3130  func (r *ProjectsLocationsDataExchangesListingsService) Subscribe(name string, subscribelistingrequest *SubscribeListingRequest) *ProjectsLocationsDataExchangesListingsSubscribeCall {
  3131  	c := &ProjectsLocationsDataExchangesListingsSubscribeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3132  	c.name = name
  3133  	c.subscribelistingrequest = subscribelistingrequest
  3134  	return c
  3135  }
  3136  
  3137  // Fields allows partial responses to be retrieved. See
  3138  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3139  // details.
  3140  func (c *ProjectsLocationsDataExchangesListingsSubscribeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsSubscribeCall {
  3141  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3142  	return c
  3143  }
  3144  
  3145  // Context sets the context to be used in this call's Do method.
  3146  func (c *ProjectsLocationsDataExchangesListingsSubscribeCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsSubscribeCall {
  3147  	c.ctx_ = ctx
  3148  	return c
  3149  }
  3150  
  3151  // Header returns a http.Header that can be modified by the caller to add
  3152  // headers to the request.
  3153  func (c *ProjectsLocationsDataExchangesListingsSubscribeCall) Header() http.Header {
  3154  	if c.header_ == nil {
  3155  		c.header_ = make(http.Header)
  3156  	}
  3157  	return c.header_
  3158  }
  3159  
  3160  func (c *ProjectsLocationsDataExchangesListingsSubscribeCall) doRequest(alt string) (*http.Response, error) {
  3161  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3162  	var body io.Reader = nil
  3163  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subscribelistingrequest)
  3164  	if err != nil {
  3165  		return nil, err
  3166  	}
  3167  	c.urlParams_.Set("alt", alt)
  3168  	c.urlParams_.Set("prettyPrint", "false")
  3169  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:subscribe")
  3170  	urls += "?" + c.urlParams_.Encode()
  3171  	req, err := http.NewRequest("POST", urls, body)
  3172  	if err != nil {
  3173  		return nil, err
  3174  	}
  3175  	req.Header = reqHeaders
  3176  	googleapi.Expand(req.URL, map[string]string{
  3177  		"name": c.name,
  3178  	})
  3179  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3180  }
  3181  
  3182  // Do executes the "analyticshub.projects.locations.dataExchanges.listings.subscribe" call.
  3183  // Any non-2xx status code is an error. Response headers are in either
  3184  // *SubscribeListingResponse.ServerResponse.Header or (if a response was
  3185  // returned at all) in error.(*googleapi.Error).Header. Use
  3186  // googleapi.IsNotModified to check whether the returned error was because
  3187  // http.StatusNotModified was returned.
  3188  func (c *ProjectsLocationsDataExchangesListingsSubscribeCall) Do(opts ...googleapi.CallOption) (*SubscribeListingResponse, error) {
  3189  	gensupport.SetOptions(c.urlParams_, opts...)
  3190  	res, err := c.doRequest("json")
  3191  	if res != nil && res.StatusCode == http.StatusNotModified {
  3192  		if res.Body != nil {
  3193  			res.Body.Close()
  3194  		}
  3195  		return nil, gensupport.WrapError(&googleapi.Error{
  3196  			Code:   res.StatusCode,
  3197  			Header: res.Header,
  3198  		})
  3199  	}
  3200  	if err != nil {
  3201  		return nil, err
  3202  	}
  3203  	defer googleapi.CloseBody(res)
  3204  	if err := googleapi.CheckResponse(res); err != nil {
  3205  		return nil, gensupport.WrapError(err)
  3206  	}
  3207  	ret := &SubscribeListingResponse{
  3208  		ServerResponse: googleapi.ServerResponse{
  3209  			Header:         res.Header,
  3210  			HTTPStatusCode: res.StatusCode,
  3211  		},
  3212  	}
  3213  	target := &ret
  3214  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3215  		return nil, err
  3216  	}
  3217  	return ret, nil
  3218  }
  3219  
  3220  type ProjectsLocationsDataExchangesListingsTestIamPermissionsCall struct {
  3221  	s                         *Service
  3222  	resource                  string
  3223  	testiampermissionsrequest *TestIamPermissionsRequest
  3224  	urlParams_                gensupport.URLParams
  3225  	ctx_                      context.Context
  3226  	header_                   http.Header
  3227  }
  3228  
  3229  // TestIamPermissions: Returns the permissions that a caller has.
  3230  //
  3231  //   - resource: REQUIRED: The resource for which the policy detail is being
  3232  //     requested. See Resource names
  3233  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  3234  //     value for this field.
  3235  func (r *ProjectsLocationsDataExchangesListingsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDataExchangesListingsTestIamPermissionsCall {
  3236  	c := &ProjectsLocationsDataExchangesListingsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3237  	c.resource = resource
  3238  	c.testiampermissionsrequest = testiampermissionsrequest
  3239  	return c
  3240  }
  3241  
  3242  // Fields allows partial responses to be retrieved. See
  3243  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3244  // details.
  3245  func (c *ProjectsLocationsDataExchangesListingsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataExchangesListingsTestIamPermissionsCall {
  3246  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3247  	return c
  3248  }
  3249  
  3250  // Context sets the context to be used in this call's Do method.
  3251  func (c *ProjectsLocationsDataExchangesListingsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataExchangesListingsTestIamPermissionsCall {
  3252  	c.ctx_ = ctx
  3253  	return c
  3254  }
  3255  
  3256  // Header returns a http.Header that can be modified by the caller to add
  3257  // headers to the request.
  3258  func (c *ProjectsLocationsDataExchangesListingsTestIamPermissionsCall) Header() http.Header {
  3259  	if c.header_ == nil {
  3260  		c.header_ = make(http.Header)
  3261  	}
  3262  	return c.header_
  3263  }
  3264  
  3265  func (c *ProjectsLocationsDataExchangesListingsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  3266  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3267  	var body io.Reader = nil
  3268  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  3269  	if err != nil {
  3270  		return nil, err
  3271  	}
  3272  	c.urlParams_.Set("alt", alt)
  3273  	c.urlParams_.Set("prettyPrint", "false")
  3274  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions")
  3275  	urls += "?" + c.urlParams_.Encode()
  3276  	req, err := http.NewRequest("POST", urls, body)
  3277  	if err != nil {
  3278  		return nil, err
  3279  	}
  3280  	req.Header = reqHeaders
  3281  	googleapi.Expand(req.URL, map[string]string{
  3282  		"resource": c.resource,
  3283  	})
  3284  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3285  }
  3286  
  3287  // Do executes the "analyticshub.projects.locations.dataExchanges.listings.testIamPermissions" call.
  3288  // Any non-2xx status code is an error. Response headers are in either
  3289  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  3290  // returned at all) in error.(*googleapi.Error).Header. Use
  3291  // googleapi.IsNotModified to check whether the returned error was because
  3292  // http.StatusNotModified was returned.
  3293  func (c *ProjectsLocationsDataExchangesListingsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  3294  	gensupport.SetOptions(c.urlParams_, opts...)
  3295  	res, err := c.doRequest("json")
  3296  	if res != nil && res.StatusCode == http.StatusNotModified {
  3297  		if res.Body != nil {
  3298  			res.Body.Close()
  3299  		}
  3300  		return nil, gensupport.WrapError(&googleapi.Error{
  3301  			Code:   res.StatusCode,
  3302  			Header: res.Header,
  3303  		})
  3304  	}
  3305  	if err != nil {
  3306  		return nil, err
  3307  	}
  3308  	defer googleapi.CloseBody(res)
  3309  	if err := googleapi.CheckResponse(res); err != nil {
  3310  		return nil, gensupport.WrapError(err)
  3311  	}
  3312  	ret := &TestIamPermissionsResponse{
  3313  		ServerResponse: googleapi.ServerResponse{
  3314  			Header:         res.Header,
  3315  			HTTPStatusCode: res.StatusCode,
  3316  		},
  3317  	}
  3318  	target := &ret
  3319  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3320  		return nil, err
  3321  	}
  3322  	return ret, nil
  3323  }
  3324  

View as plain text