...

Source file src/google.golang.org/api/healthcare/v1alpha/healthcare-gen.go

Documentation: google.golang.org/api/healthcare/v1alpha

     1  // Copyright 2020 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 healthcare provides access to the Cloud Healthcare API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/healthcare
    10  //
    11  // # Creating a client
    12  //
    13  // Usage example:
    14  //
    15  //	import "google.golang.org/api/healthcare/v1alpha"
    16  //	...
    17  //	ctx := context.Background()
    18  //	healthcareService, err := healthcare.NewService(ctx)
    19  //
    20  // In this example, Google Application Default Credentials are used for authentication.
    21  //
    22  // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    23  //
    24  // # Other authentication options
    25  //
    26  // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
    27  //
    28  //	healthcareService, err := healthcare.NewService(ctx, option.WithAPIKey("AIza..."))
    29  //
    30  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
    31  //
    32  //	config := &oauth2.Config{...}
    33  //	// ...
    34  //	token, err := config.Exchange(ctx, ...)
    35  //	healthcareService, err := healthcare.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    36  //
    37  // See https://godoc.org/google.golang.org/api/option/ for details on options.
    38  package healthcare // import "google.golang.org/api/healthcare/v1alpha"
    39  
    40  import (
    41  	"bytes"
    42  	"context"
    43  	"encoding/json"
    44  	"errors"
    45  	"fmt"
    46  	"io"
    47  	"net/http"
    48  	"net/url"
    49  	"strconv"
    50  	"strings"
    51  
    52  	googleapi "google.golang.org/api/googleapi"
    53  	gensupport "google.golang.org/api/internal/gensupport"
    54  	option "google.golang.org/api/option"
    55  	htransport "google.golang.org/api/transport/http"
    56  )
    57  
    58  // Always reference these packages, just in case the auto-generated code
    59  // below doesn't.
    60  var _ = bytes.NewBuffer
    61  var _ = strconv.Itoa
    62  var _ = fmt.Sprintf
    63  var _ = json.NewDecoder
    64  var _ = io.Copy
    65  var _ = url.Parse
    66  var _ = gensupport.MarshalJSON
    67  var _ = googleapi.Version
    68  var _ = errors.New
    69  var _ = strings.Replace
    70  var _ = context.Canceled
    71  
    72  const apiId = "healthcare:v1alpha"
    73  const apiName = "healthcare"
    74  const apiVersion = "v1alpha"
    75  const basePath = "https://healthcare.googleapis.com/"
    76  
    77  // OAuth2 scopes used by this API.
    78  const (
    79  	// View and manage your data across Google Cloud Platform services
    80  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
    81  )
    82  
    83  // NewService creates a new Service.
    84  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
    85  	scopesOption := option.WithScopes(
    86  		"https://www.googleapis.com/auth/cloud-platform",
    87  	)
    88  	// NOTE: prepend, so we don't override user-specified scopes.
    89  	opts = append([]option.ClientOption{scopesOption}, opts...)
    90  	client, endpoint, err := htransport.NewClient(ctx, opts...)
    91  	if err != nil {
    92  		return nil, err
    93  	}
    94  	s, err := New(client)
    95  	if err != nil {
    96  		return nil, err
    97  	}
    98  	if endpoint != "" {
    99  		s.BasePath = endpoint
   100  	}
   101  	return s, nil
   102  }
   103  
   104  // New creates a new Service. It uses the provided http.Client for requests.
   105  //
   106  // Deprecated: please use NewService instead.
   107  // To provide a custom HTTP client, use option.WithHTTPClient.
   108  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   109  func New(client *http.Client) (*Service, error) {
   110  	if client == nil {
   111  		return nil, errors.New("client is nil")
   112  	}
   113  	s := &Service{client: client, BasePath: basePath}
   114  	s.Projects = NewProjectsService(s)
   115  	return s, nil
   116  }
   117  
   118  type Service struct {
   119  	client    *http.Client
   120  	BasePath  string // API endpoint base URL
   121  	UserAgent string // optional additional User-Agent fragment
   122  
   123  	Projects *ProjectsService
   124  }
   125  
   126  func (s *Service) userAgent() string {
   127  	if s.UserAgent == "" {
   128  		return googleapi.UserAgent
   129  	}
   130  	return googleapi.UserAgent + " " + s.UserAgent
   131  }
   132  
   133  func NewProjectsService(s *Service) *ProjectsService {
   134  	rs := &ProjectsService{s: s}
   135  	rs.Locations = NewProjectsLocationsService(s)
   136  	return rs
   137  }
   138  
   139  type ProjectsService struct {
   140  	s *Service
   141  
   142  	Locations *ProjectsLocationsService
   143  }
   144  
   145  func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
   146  	rs := &ProjectsLocationsService{s: s}
   147  	rs.Datasets = NewProjectsLocationsDatasetsService(s)
   148  	return rs
   149  }
   150  
   151  type ProjectsLocationsService struct {
   152  	s *Service
   153  
   154  	Datasets *ProjectsLocationsDatasetsService
   155  }
   156  
   157  func NewProjectsLocationsDatasetsService(s *Service) *ProjectsLocationsDatasetsService {
   158  	rs := &ProjectsLocationsDatasetsService{s: s}
   159  	rs.DicomStores = NewProjectsLocationsDatasetsDicomStoresService(s)
   160  	rs.Hl7V2Stores = NewProjectsLocationsDatasetsHl7V2StoresService(s)
   161  	rs.Operations = NewProjectsLocationsDatasetsOperationsService(s)
   162  	return rs
   163  }
   164  
   165  type ProjectsLocationsDatasetsService struct {
   166  	s *Service
   167  
   168  	DicomStores *ProjectsLocationsDatasetsDicomStoresService
   169  
   170  	Hl7V2Stores *ProjectsLocationsDatasetsHl7V2StoresService
   171  
   172  	Operations *ProjectsLocationsDatasetsOperationsService
   173  }
   174  
   175  func NewProjectsLocationsDatasetsDicomStoresService(s *Service) *ProjectsLocationsDatasetsDicomStoresService {
   176  	rs := &ProjectsLocationsDatasetsDicomStoresService{s: s}
   177  	return rs
   178  }
   179  
   180  type ProjectsLocationsDatasetsDicomStoresService struct {
   181  	s *Service
   182  }
   183  
   184  func NewProjectsLocationsDatasetsHl7V2StoresService(s *Service) *ProjectsLocationsDatasetsHl7V2StoresService {
   185  	rs := &ProjectsLocationsDatasetsHl7V2StoresService{s: s}
   186  	return rs
   187  }
   188  
   189  type ProjectsLocationsDatasetsHl7V2StoresService struct {
   190  	s *Service
   191  }
   192  
   193  func NewProjectsLocationsDatasetsOperationsService(s *Service) *ProjectsLocationsDatasetsOperationsService {
   194  	rs := &ProjectsLocationsDatasetsOperationsService{s: s}
   195  	return rs
   196  }
   197  
   198  type ProjectsLocationsDatasetsOperationsService struct {
   199  	s *Service
   200  }
   201  
   202  // AuditConfig: Specifies the audit configuration for a service.
   203  // The configuration determines which permission types are logged, and
   204  // what
   205  // identities, if any, are exempted from logging.
   206  // An AuditConfig must have one or more AuditLogConfigs.
   207  //
   208  // If there are AuditConfigs for both `allServices` and a specific
   209  // service,
   210  // the union of the two AuditConfigs is used for that service: the
   211  // log_types
   212  // specified in each AuditConfig are enabled, and the exempted_members
   213  // in each
   214  // AuditLogConfig are exempted.
   215  //
   216  // Example Policy with multiple AuditConfigs:
   217  //
   218  //	{
   219  //	  "audit_configs": [
   220  //	    {
   221  //	      "service": "allServices"
   222  //	      "audit_log_configs": [
   223  //	        {
   224  //	          "log_type": "DATA_READ",
   225  //	          "exempted_members": [
   226  //	            "user:foo@gmail.com"
   227  //	          ]
   228  //	        },
   229  //	        {
   230  //	          "log_type": "DATA_WRITE",
   231  //	        },
   232  //	        {
   233  //	          "log_type": "ADMIN_READ",
   234  //	        }
   235  //	      ]
   236  //	    },
   237  //	    {
   238  //	      "service": "fooservice.googleapis.com"
   239  //	      "audit_log_configs": [
   240  //	        {
   241  //	          "log_type": "DATA_READ",
   242  //	        },
   243  //	        {
   244  //	          "log_type": "DATA_WRITE",
   245  //	          "exempted_members": [
   246  //	            "user:bar@gmail.com"
   247  //	          ]
   248  //	        }
   249  //	      ]
   250  //	    }
   251  //	  ]
   252  //	}
   253  //
   254  // For fooservice, this policy enables DATA_READ, DATA_WRITE and
   255  // ADMIN_READ
   256  // logging. It also exempts foo@gmail.com from DATA_READ logging,
   257  // and
   258  // bar@gmail.com from DATA_WRITE logging.
   259  type AuditConfig struct {
   260  	// AuditLogConfigs: The configuration for logging of each type of
   261  	// permission.
   262  	AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
   263  
   264  	// Service: Specifies a service that will be enabled for audit
   265  	// logging.
   266  	// For example, `storage.googleapis.com`,
   267  	// `cloudsql.googleapis.com`.
   268  	// `allServices` is a special value that covers all services.
   269  	Service string `json:"service,omitempty"`
   270  
   271  	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
   272  	// unconditionally include in API requests. By default, fields with
   273  	// empty values are omitted from API requests. However, any non-pointer,
   274  	// non-interface field appearing in ForceSendFields will be sent to the
   275  	// server regardless of whether the field is empty or not. This may be
   276  	// used to include empty fields in Patch requests.
   277  	ForceSendFields []string `json:"-"`
   278  
   279  	// NullFields is a list of field names (e.g. "AuditLogConfigs") to
   280  	// include in API requests with the JSON null value. By default, fields
   281  	// with empty values are omitted from API requests. However, any field
   282  	// with an empty value appearing in NullFields will be sent to the
   283  	// server as null. It is an error if a field in this list has a
   284  	// non-empty value. This may be used to include null fields in Patch
   285  	// requests.
   286  	NullFields []string `json:"-"`
   287  }
   288  
   289  func (s *AuditConfig) MarshalJSON() ([]byte, error) {
   290  	type NoMethod AuditConfig
   291  	raw := NoMethod(*s)
   292  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   293  }
   294  
   295  // AuditLogConfig: Provides the configuration for logging a type of
   296  // permissions.
   297  // Example:
   298  //
   299  //	{
   300  //	  "audit_log_configs": [
   301  //	    {
   302  //	      "log_type": "DATA_READ",
   303  //	      "exempted_members": [
   304  //	        "user:foo@gmail.com"
   305  //	      ]
   306  //	    },
   307  //	    {
   308  //	      "log_type": "DATA_WRITE",
   309  //	    }
   310  //	  ]
   311  //	}
   312  //
   313  // This enables 'DATA_READ' and 'DATA_WRITE' logging, while
   314  // exempting
   315  // foo@gmail.com from DATA_READ logging.
   316  type AuditLogConfig struct {
   317  	// ExemptedMembers: Specifies the identities that do not cause logging
   318  	// for this type of
   319  	// permission.
   320  	// Follows the same format of Binding.members.
   321  	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
   322  
   323  	// LogType: The log type that this config enables.
   324  	//
   325  	// Possible values:
   326  	//   "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
   327  	//   "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
   328  	//   "DATA_WRITE" - Data writes. Example: CloudSQL Users create
   329  	//   "DATA_READ" - Data reads. Example: CloudSQL Users list
   330  	LogType string `json:"logType,omitempty"`
   331  
   332  	// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
   333  	// unconditionally include in API requests. By default, fields with
   334  	// empty values are omitted from API requests. However, any non-pointer,
   335  	// non-interface field appearing in ForceSendFields will be sent to the
   336  	// server regardless of whether the field is empty or not. This may be
   337  	// used to include empty fields in Patch requests.
   338  	ForceSendFields []string `json:"-"`
   339  
   340  	// NullFields is a list of field names (e.g. "ExemptedMembers") to
   341  	// include in API requests with the JSON null value. By default, fields
   342  	// with empty values are omitted from API requests. However, any field
   343  	// with an empty value appearing in NullFields will be sent to the
   344  	// server as null. It is an error if a field in this list has a
   345  	// non-empty value. This may be used to include null fields in Patch
   346  	// requests.
   347  	NullFields []string `json:"-"`
   348  }
   349  
   350  func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
   351  	type NoMethod AuditLogConfig
   352  	raw := NoMethod(*s)
   353  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   354  }
   355  
   356  // Binding: Associates `members` with a `role`.
   357  type Binding struct {
   358  	// Condition: The condition that is associated with this binding.
   359  	// NOTE: An unsatisfied condition will not allow user access via
   360  	// current
   361  	// binding. Different bindings, including their conditions, are
   362  	// examined
   363  	// independently.
   364  	Condition *Expr `json:"condition,omitempty"`
   365  
   366  	// Members: Specifies the identities requesting access for a Cloud
   367  	// Platform resource.
   368  	// `members` can have the following values:
   369  	//
   370  	// * `allUsers`: A special identifier that represents anyone who is
   371  	//    on the internet; with or without a Google account.
   372  	//
   373  	// * `allAuthenticatedUsers`: A special identifier that represents
   374  	// anyone
   375  	//    who is authenticated with a Google account or a service
   376  	// account.
   377  	//
   378  	// * `user:{emailid}`: An email address that represents a specific
   379  	// Google
   380  	//    account. For example, `alice@gmail.com` .
   381  	//
   382  	//
   383  	// * `serviceAccount:{emailid}`: An email address that represents a
   384  	// service
   385  	//    account. For example,
   386  	// `my-other-app@appspot.gserviceaccount.com`.
   387  	//
   388  	// * `group:{emailid}`: An email address that represents a Google
   389  	// group.
   390  	//    For example, `admins@example.com`.
   391  	//
   392  	//
   393  	// * `domain:{domain}`: The G Suite domain (primary) that represents all
   394  	// the
   395  	//    users of that domain. For example, `google.com` or
   396  	// `example.com`.
   397  	//
   398  	//
   399  	Members []string `json:"members,omitempty"`
   400  
   401  	// Role: Role that is assigned to `members`.
   402  	// For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
   403  	Role string `json:"role,omitempty"`
   404  
   405  	// ForceSendFields is a list of field names (e.g. "Condition") to
   406  	// unconditionally include in API requests. By default, fields with
   407  	// empty values are omitted from API requests. However, any non-pointer,
   408  	// non-interface field appearing in ForceSendFields will be sent to the
   409  	// server regardless of whether the field is empty or not. This may be
   410  	// used to include empty fields in Patch requests.
   411  	ForceSendFields []string `json:"-"`
   412  
   413  	// NullFields is a list of field names (e.g. "Condition") to include in
   414  	// API requests with the JSON null value. By default, fields with empty
   415  	// values are omitted from API requests. However, any field with an
   416  	// empty value appearing in NullFields will be sent to the server as
   417  	// null. It is an error if a field in this list has a non-empty value.
   418  	// This may be used to include null fields in Patch requests.
   419  	NullFields []string `json:"-"`
   420  }
   421  
   422  func (s *Binding) MarshalJSON() ([]byte, error) {
   423  	type NoMethod Binding
   424  	raw := NoMethod(*s)
   425  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   426  }
   427  
   428  // Expr: Represents an expression text. Example:
   429  //
   430  //	title: "User account presence"
   431  //	description: "Determines whether the request has a user account"
   432  //	expression: "size(request.user) > 0"
   433  type Expr struct {
   434  	// Description: An optional description of the expression. This is a
   435  	// longer text which
   436  	// describes the expression, e.g. when hovered over it in a UI.
   437  	Description string `json:"description,omitempty"`
   438  
   439  	// Expression: Textual representation of an expression in
   440  	// Common Expression Language syntax.
   441  	//
   442  	// The application context of the containing message determines
   443  	// which
   444  	// well-known feature set of CEL is supported.
   445  	Expression string `json:"expression,omitempty"`
   446  
   447  	// Location: An optional string indicating the location of the
   448  	// expression for error
   449  	// reporting, e.g. a file name and a position in the file.
   450  	Location string `json:"location,omitempty"`
   451  
   452  	// Title: An optional title for the expression, i.e. a short string
   453  	// describing
   454  	// its purpose. This can be used e.g. in UIs which allow to enter
   455  	// the
   456  	// expression.
   457  	Title string `json:"title,omitempty"`
   458  
   459  	// ForceSendFields is a list of field names (e.g. "Description") to
   460  	// unconditionally include in API requests. By default, fields with
   461  	// empty values are omitted from API requests. However, any non-pointer,
   462  	// non-interface field appearing in ForceSendFields will be sent to the
   463  	// server regardless of whether the field is empty or not. This may be
   464  	// used to include empty fields in Patch requests.
   465  	ForceSendFields []string `json:"-"`
   466  
   467  	// NullFields is a list of field names (e.g. "Description") to include
   468  	// in API requests with the JSON null value. By default, fields with
   469  	// empty values are omitted from API requests. However, any field with
   470  	// an empty value appearing in NullFields will be sent to the server as
   471  	// null. It is an error if a field in this list has a non-empty value.
   472  	// This may be used to include null fields in Patch requests.
   473  	NullFields []string `json:"-"`
   474  }
   475  
   476  func (s *Expr) MarshalJSON() ([]byte, error) {
   477  	type NoMethod Expr
   478  	raw := NoMethod(*s)
   479  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   480  }
   481  
   482  // ListLocationsResponse: The response message for
   483  // Locations.ListLocations.
   484  type ListLocationsResponse struct {
   485  	// Locations: A list of locations that matches the specified filter in
   486  	// the request.
   487  	Locations []*Location `json:"locations,omitempty"`
   488  
   489  	// NextPageToken: The standard List next-page token.
   490  	NextPageToken string `json:"nextPageToken,omitempty"`
   491  
   492  	// ServerResponse contains the HTTP response code and headers from the
   493  	// server.
   494  	googleapi.ServerResponse `json:"-"`
   495  
   496  	// ForceSendFields is a list of field names (e.g. "Locations") to
   497  	// unconditionally include in API requests. By default, fields with
   498  	// empty values are omitted from API requests. However, any non-pointer,
   499  	// non-interface field appearing in ForceSendFields will be sent to the
   500  	// server regardless of whether the field is empty or not. This may be
   501  	// used to include empty fields in Patch requests.
   502  	ForceSendFields []string `json:"-"`
   503  
   504  	// NullFields is a list of field names (e.g. "Locations") to include in
   505  	// API requests with the JSON null value. By default, fields with empty
   506  	// values are omitted from API requests. However, any field with an
   507  	// empty value appearing in NullFields will be sent to the server as
   508  	// null. It is an error if a field in this list has a non-empty value.
   509  	// This may be used to include null fields in Patch requests.
   510  	NullFields []string `json:"-"`
   511  }
   512  
   513  func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
   514  	type NoMethod ListLocationsResponse
   515  	raw := NoMethod(*s)
   516  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   517  }
   518  
   519  // ListOperationsResponse: The response message for
   520  // Operations.ListOperations.
   521  type ListOperationsResponse struct {
   522  	// NextPageToken: The standard List next-page token.
   523  	NextPageToken string `json:"nextPageToken,omitempty"`
   524  
   525  	// Operations: A list of operations that matches the specified filter in
   526  	// the request.
   527  	Operations []*Operation `json:"operations,omitempty"`
   528  
   529  	// ServerResponse contains the HTTP response code and headers from the
   530  	// server.
   531  	googleapi.ServerResponse `json:"-"`
   532  
   533  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   534  	// unconditionally include in API requests. By default, fields with
   535  	// empty values are omitted from API requests. However, any non-pointer,
   536  	// non-interface field appearing in ForceSendFields will be sent to the
   537  	// server regardless of whether the field is empty or not. This may be
   538  	// used to include empty fields in Patch requests.
   539  	ForceSendFields []string `json:"-"`
   540  
   541  	// NullFields is a list of field names (e.g. "NextPageToken") to include
   542  	// in API requests with the JSON null value. By default, fields with
   543  	// empty values are omitted from API requests. However, any field with
   544  	// an empty value appearing in NullFields will be sent to the server as
   545  	// null. It is an error if a field in this list has a non-empty value.
   546  	// This may be used to include null fields in Patch requests.
   547  	NullFields []string `json:"-"`
   548  }
   549  
   550  func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
   551  	type NoMethod ListOperationsResponse
   552  	raw := NoMethod(*s)
   553  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   554  }
   555  
   556  // Location: A resource that represents Google Cloud Platform location.
   557  type Location struct {
   558  	// DisplayName: The friendly name for this location, typically a nearby
   559  	// city name.
   560  	// For example, "Tokyo".
   561  	DisplayName string `json:"displayName,omitempty"`
   562  
   563  	// Labels: Cross-service attributes for the location. For example
   564  	//
   565  	//     {"cloud.googleapis.com/region": "us-east1"}
   566  	Labels map[string]string `json:"labels,omitempty"`
   567  
   568  	// LocationId: The canonical id for this location. For example:
   569  	// "us-east1".
   570  	LocationId string `json:"locationId,omitempty"`
   571  
   572  	// Metadata: Service-specific metadata. For example the available
   573  	// capacity at the given
   574  	// location.
   575  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
   576  
   577  	// Name: Resource name for the location, which may vary between
   578  	// implementations.
   579  	// For example: "projects/example-project/locations/us-east1"
   580  	Name string `json:"name,omitempty"`
   581  
   582  	// ServerResponse contains the HTTP response code and headers from the
   583  	// server.
   584  	googleapi.ServerResponse `json:"-"`
   585  
   586  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
   587  	// unconditionally include in API requests. By default, fields with
   588  	// empty values are omitted from API requests. However, any non-pointer,
   589  	// non-interface field appearing in ForceSendFields will be sent to the
   590  	// server regardless of whether the field is empty or not. This may be
   591  	// used to include empty fields in Patch requests.
   592  	ForceSendFields []string `json:"-"`
   593  
   594  	// NullFields is a list of field names (e.g. "DisplayName") to include
   595  	// in API requests with the JSON null value. By default, fields with
   596  	// empty values are omitted from API requests. However, any field with
   597  	// an empty value appearing in NullFields will be sent to the server as
   598  	// null. It is an error if a field in this list has a non-empty value.
   599  	// This may be used to include null fields in Patch requests.
   600  	NullFields []string `json:"-"`
   601  }
   602  
   603  func (s *Location) MarshalJSON() ([]byte, error) {
   604  	type NoMethod Location
   605  	raw := NoMethod(*s)
   606  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   607  }
   608  
   609  // Operation: This resource represents a long-running operation that is
   610  // the result of a
   611  // network API call.
   612  type Operation struct {
   613  	// Done: If the value is `false`, it means the operation is still in
   614  	// progress.
   615  	// If `true`, the operation is completed, and either `error` or
   616  	// `response` is
   617  	// available.
   618  	Done bool `json:"done,omitempty"`
   619  
   620  	// Error: The error result of the operation in case of failure or
   621  	// cancellation.
   622  	Error *Status `json:"error,omitempty"`
   623  
   624  	// Metadata: Service-specific metadata associated with the operation.
   625  	// It typically
   626  	// contains progress information and common metadata such as create
   627  	// time.
   628  	// Some services might not provide such metadata.  Any method that
   629  	// returns a
   630  	// long-running operation should document the metadata type, if any.
   631  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
   632  
   633  	// Name: The server-assigned name, which is only unique within the same
   634  	// service that
   635  	// originally returns it. If you use the default HTTP mapping,
   636  	// the
   637  	// `name` should have the format of `operations/some/unique/name`.
   638  	Name string `json:"name,omitempty"`
   639  
   640  	// Response: The normal response of the operation in case of success.
   641  	// If the original
   642  	// method returns no data on success, such as `Delete`, the response
   643  	// is
   644  	// `google.protobuf.Empty`.  If the original method is
   645  	// standard
   646  	// `Get`/`Create`/`Update`, the response should be the resource.  For
   647  	// other
   648  	// methods, the response should have the type `XxxResponse`, where
   649  	// `Xxx`
   650  	// is the original method name.  For example, if the original method
   651  	// name
   652  	// is `TakeSnapshot()`, the inferred response type
   653  	// is
   654  	// `TakeSnapshotResponse`.
   655  	Response googleapi.RawMessage `json:"response,omitempty"`
   656  
   657  	// ServerResponse contains the HTTP response code and headers from the
   658  	// server.
   659  	googleapi.ServerResponse `json:"-"`
   660  
   661  	// ForceSendFields is a list of field names (e.g. "Done") to
   662  	// unconditionally include in API requests. By default, fields with
   663  	// empty values are omitted from API requests. However, any non-pointer,
   664  	// non-interface field appearing in ForceSendFields will be sent to the
   665  	// server regardless of whether the field is empty or not. This may be
   666  	// used to include empty fields in Patch requests.
   667  	ForceSendFields []string `json:"-"`
   668  
   669  	// NullFields is a list of field names (e.g. "Done") to include in API
   670  	// requests with the JSON null value. By default, fields with empty
   671  	// values are omitted from API requests. However, any field with an
   672  	// empty value appearing in NullFields will be sent to the server as
   673  	// null. It is an error if a field in this list has a non-empty value.
   674  	// This may be used to include null fields in Patch requests.
   675  	NullFields []string `json:"-"`
   676  }
   677  
   678  func (s *Operation) MarshalJSON() ([]byte, error) {
   679  	type NoMethod Operation
   680  	raw := NoMethod(*s)
   681  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   682  }
   683  
   684  // Policy: Defines an Identity and Access Management (IAM) policy. It is
   685  // used to
   686  // specify access control policies for Cloud Platform resources.
   687  //
   688  // A `Policy` consists of a list of `bindings`. A `binding` binds a list
   689  // of
   690  // `members` to a `role`, where the members can be user accounts, Google
   691  // groups,
   692  // Google domains, and service accounts. A `role` is a named list of
   693  // permissions
   694  // defined by IAM.
   695  //
   696  // **JSON Example**
   697  //
   698  //	{
   699  //	  "bindings": [
   700  //	    {
   701  //	      "role": "roles/owner",
   702  //	      "members": [
   703  //	        "user:mike@example.com",
   704  //	        "group:admins@example.com",
   705  //	        "domain:google.com",
   706  //
   707  // "serviceAccount:my-other-app@appspot.gserviceaccount.com"
   708  //
   709  //	      ]
   710  //	    },
   711  //	    {
   712  //	      "role": "roles/viewer",
   713  //	      "members": ["user:sean@example.com"]
   714  //	    }
   715  //	  ]
   716  //	}
   717  //
   718  // **YAML Example**
   719  //
   720  //	bindings:
   721  //	- members:
   722  //	  - user:mike@example.com
   723  //	  - group:admins@example.com
   724  //	  - domain:google.com
   725  //	  - serviceAccount:my-other-app@appspot.gserviceaccount.com
   726  //	  role: roles/owner
   727  //	- members:
   728  //	  - user:sean@example.com
   729  //	  role: roles/viewer
   730  //
   731  // For a description of IAM and its features, see the
   732  // [IAM developer's guide](https://cloud.google.com/iam/docs).
   733  type Policy struct {
   734  	// AuditConfigs: Specifies cloud audit logging configuration for this
   735  	// policy.
   736  	AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
   737  
   738  	// Bindings: Associates a list of `members` to a `role`.
   739  	// `bindings` with no members will result in an error.
   740  	Bindings []*Binding `json:"bindings,omitempty"`
   741  
   742  	// Etag: `etag` is used for optimistic concurrency control as a way to
   743  	// help
   744  	// prevent simultaneous updates of a policy from overwriting each
   745  	// other.
   746  	// It is strongly suggested that systems make use of the `etag` in
   747  	// the
   748  	// read-modify-write cycle to perform policy updates in order to avoid
   749  	// race
   750  	// conditions: An `etag` is returned in the response to `getIamPolicy`,
   751  	// and
   752  	// systems are expected to put that etag in the request to
   753  	// `setIamPolicy` to
   754  	// ensure that their change will be applied to the same version of the
   755  	// policy.
   756  	//
   757  	// If no `etag` is provided in the call to `setIamPolicy`, then the
   758  	// existing
   759  	// policy is overwritten blindly.
   760  	Etag string `json:"etag,omitempty"`
   761  
   762  	// Version: Deprecated.
   763  	Version int64 `json:"version,omitempty"`
   764  
   765  	// ServerResponse contains the HTTP response code and headers from the
   766  	// server.
   767  	googleapi.ServerResponse `json:"-"`
   768  
   769  	// ForceSendFields is a list of field names (e.g. "AuditConfigs") to
   770  	// unconditionally include in API requests. By default, fields with
   771  	// empty values are omitted from API requests. However, any non-pointer,
   772  	// non-interface field appearing in ForceSendFields will be sent to the
   773  	// server regardless of whether the field is empty or not. This may be
   774  	// used to include empty fields in Patch requests.
   775  	ForceSendFields []string `json:"-"`
   776  
   777  	// NullFields is a list of field names (e.g. "AuditConfigs") to include
   778  	// in API requests with the JSON null value. By default, fields with
   779  	// empty values are omitted from API requests. However, any field with
   780  	// an empty value appearing in NullFields will be sent to the server as
   781  	// null. It is an error if a field in this list has a non-empty value.
   782  	// This may be used to include null fields in Patch requests.
   783  	NullFields []string `json:"-"`
   784  }
   785  
   786  func (s *Policy) MarshalJSON() ([]byte, error) {
   787  	type NoMethod Policy
   788  	raw := NoMethod(*s)
   789  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   790  }
   791  
   792  // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
   793  type SetIamPolicyRequest struct {
   794  	// Policy: REQUIRED: The complete policy to be applied to the
   795  	// `resource`. The size of
   796  	// the policy is limited to a few 10s of KB. An empty policy is a
   797  	// valid policy but certain Cloud Platform services (such as
   798  	// Projects)
   799  	// might reject them.
   800  	Policy *Policy `json:"policy,omitempty"`
   801  
   802  	// UpdateMask: OPTIONAL: A FieldMask specifying which fields of the
   803  	// policy to modify. Only
   804  	// the fields in the mask will be modified. If no mask is provided,
   805  	// the
   806  	// following default mask is used:
   807  	// paths: "bindings, etag"
   808  	// This field is only used by Cloud IAM.
   809  	UpdateMask string `json:"updateMask,omitempty"`
   810  
   811  	// ForceSendFields is a list of field names (e.g. "Policy") to
   812  	// unconditionally include in API requests. By default, fields with
   813  	// empty values are omitted from API requests. However, any non-pointer,
   814  	// non-interface field appearing in ForceSendFields will be sent to the
   815  	// server regardless of whether the field is empty or not. This may be
   816  	// used to include empty fields in Patch requests.
   817  	ForceSendFields []string `json:"-"`
   818  
   819  	// NullFields is a list of field names (e.g. "Policy") to include in API
   820  	// requests with the JSON null value. By default, fields with empty
   821  	// values are omitted from API requests. However, any field with an
   822  	// empty value appearing in NullFields will be sent to the server as
   823  	// null. It is an error if a field in this list has a non-empty value.
   824  	// This may be used to include null fields in Patch requests.
   825  	NullFields []string `json:"-"`
   826  }
   827  
   828  func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
   829  	type NoMethod SetIamPolicyRequest
   830  	raw := NoMethod(*s)
   831  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   832  }
   833  
   834  // Status: The `Status` type defines a logical error model that is
   835  // suitable for
   836  // different programming environments, including REST APIs and RPC APIs.
   837  // It is
   838  // used by [gRPC](https://github.com/grpc). The error model is designed
   839  // to be:
   840  //
   841  // - Simple to use and understand for most users
   842  // - Flexible enough to meet unexpected needs
   843  //
   844  // # Overview
   845  //
   846  // The `Status` message contains three pieces of data: error code,
   847  // error
   848  // message, and error details. The error code should be an enum value
   849  // of
   850  // google.rpc.Code, but it may accept additional error codes if needed.
   851  // The
   852  // error message should be a developer-facing English message that
   853  // helps
   854  // developers *understand* and *resolve* the error. If a localized
   855  // user-facing
   856  // error message is needed, put the localized message in the error
   857  // details or
   858  // localize it in the client. The optional error details may contain
   859  // arbitrary
   860  // information about the error. There is a predefined set of error
   861  // detail types
   862  // in the package `google.rpc` that can be used for common error
   863  // conditions.
   864  //
   865  // # Language mapping
   866  //
   867  // The `Status` message is the logical representation of the error
   868  // model, but it
   869  // is not necessarily the actual wire format. When the `Status` message
   870  // is
   871  // exposed in different client libraries and different wire protocols,
   872  // it can be
   873  // mapped differently. For example, it will likely be mapped to some
   874  // exceptions
   875  // in Java, but more likely mapped to some error codes in C.
   876  //
   877  // # Other uses
   878  //
   879  // The error model and the `Status` message can be used in a variety
   880  // of
   881  // environments, either with or without APIs, to provide a
   882  // consistent developer experience across different
   883  // environments.
   884  //
   885  // Example uses of this error model include:
   886  //
   887  // - Partial errors. If a service needs to return partial errors to the
   888  // client,
   889  //
   890  //	it may embed the `Status` in the normal response to indicate the
   891  //
   892  // partial
   893  //
   894  //	errors.
   895  //
   896  // - Workflow errors. A typical workflow has multiple steps. Each step
   897  // may
   898  //
   899  //	have a `Status` message for error reporting.
   900  //
   901  // - Batch operations. If a client uses batch request and batch
   902  // response, the
   903  //
   904  //	`Status` message should be used directly inside batch response,
   905  //
   906  // one for
   907  //
   908  //	each error sub-response.
   909  //
   910  // - Asynchronous operations. If an API call embeds asynchronous
   911  // operation
   912  //
   913  //	results in its response, the status of those operations should
   914  //
   915  // be
   916  //
   917  //	represented directly using the `Status` message.
   918  //
   919  // - Logging. If some API errors are stored in logs, the message
   920  // `Status` could
   921  //
   922  //	be used directly after any stripping needed for security/privacy
   923  //
   924  // reasons.
   925  type Status struct {
   926  	// Code: The status code, which should be an enum value of
   927  	// google.rpc.Code.
   928  	Code int64 `json:"code,omitempty"`
   929  
   930  	// Details: A list of messages that carry the error details.  There is a
   931  	// common set of
   932  	// message types for APIs to use.
   933  	Details []googleapi.RawMessage `json:"details,omitempty"`
   934  
   935  	// Message: A developer-facing error message, which should be in
   936  	// English. Any
   937  	// user-facing error message should be localized and sent in
   938  	// the
   939  	// google.rpc.Status.details field, or localized by the client.
   940  	Message string `json:"message,omitempty"`
   941  
   942  	// ForceSendFields is a list of field names (e.g. "Code") to
   943  	// unconditionally include in API requests. By default, fields with
   944  	// empty values are omitted from API requests. However, any non-pointer,
   945  	// non-interface field appearing in ForceSendFields will be sent to the
   946  	// server regardless of whether the field is empty or not. This may be
   947  	// used to include empty fields in Patch requests.
   948  	ForceSendFields []string `json:"-"`
   949  
   950  	// NullFields is a list of field names (e.g. "Code") to include in API
   951  	// requests with the JSON null value. By default, fields with empty
   952  	// values are omitted from API requests. However, any field with an
   953  	// empty value appearing in NullFields will be sent to the server as
   954  	// null. It is an error if a field in this list has a non-empty value.
   955  	// This may be used to include null fields in Patch requests.
   956  	NullFields []string `json:"-"`
   957  }
   958  
   959  func (s *Status) MarshalJSON() ([]byte, error) {
   960  	type NoMethod Status
   961  	raw := NoMethod(*s)
   962  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   963  }
   964  
   965  // TestIamPermissionsRequest: Request message for `TestIamPermissions`
   966  // method.
   967  type TestIamPermissionsRequest struct {
   968  	// Permissions: The set of permissions to check for the `resource`.
   969  	// Permissions with
   970  	// wildcards (such as '*' or 'storage.*') are not allowed. For
   971  	// more
   972  	// information see
   973  	// [IAM
   974  	// Overview](https://cloud.google.com/iam/docs/overview#permissions).
   975  	Permissions []string `json:"permissions,omitempty"`
   976  
   977  	// ForceSendFields is a list of field names (e.g. "Permissions") to
   978  	// unconditionally include in API requests. By default, fields with
   979  	// empty values are omitted from API requests. However, any non-pointer,
   980  	// non-interface field appearing in ForceSendFields will be sent to the
   981  	// server regardless of whether the field is empty or not. This may be
   982  	// used to include empty fields in Patch requests.
   983  	ForceSendFields []string `json:"-"`
   984  
   985  	// NullFields is a list of field names (e.g. "Permissions") to include
   986  	// in API requests with the JSON null value. By default, fields with
   987  	// empty values are omitted from API requests. However, any field with
   988  	// an empty value appearing in NullFields will be sent to the server as
   989  	// null. It is an error if a field in this list has a non-empty value.
   990  	// This may be used to include null fields in Patch requests.
   991  	NullFields []string `json:"-"`
   992  }
   993  
   994  func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
   995  	type NoMethod TestIamPermissionsRequest
   996  	raw := NoMethod(*s)
   997  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   998  }
   999  
  1000  // TestIamPermissionsResponse: Response message for `TestIamPermissions`
  1001  // method.
  1002  type TestIamPermissionsResponse struct {
  1003  	// Permissions: A subset of `TestPermissionsRequest.permissions` that
  1004  	// the caller is
  1005  	// allowed.
  1006  	Permissions []string `json:"permissions,omitempty"`
  1007  
  1008  	// ServerResponse contains the HTTP response code and headers from the
  1009  	// server.
  1010  	googleapi.ServerResponse `json:"-"`
  1011  
  1012  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  1013  	// unconditionally include in API requests. By default, fields with
  1014  	// empty values are omitted from API requests. However, any non-pointer,
  1015  	// non-interface field appearing in ForceSendFields will be sent to the
  1016  	// server regardless of whether the field is empty or not. This may be
  1017  	// used to include empty fields in Patch requests.
  1018  	ForceSendFields []string `json:"-"`
  1019  
  1020  	// NullFields is a list of field names (e.g. "Permissions") to include
  1021  	// in API requests with the JSON null value. By default, fields with
  1022  	// empty values are omitted from API requests. However, any field with
  1023  	// an empty value appearing in NullFields will be sent to the server as
  1024  	// null. It is an error if a field in this list has a non-empty value.
  1025  	// This may be used to include null fields in Patch requests.
  1026  	NullFields []string `json:"-"`
  1027  }
  1028  
  1029  func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  1030  	type NoMethod TestIamPermissionsResponse
  1031  	raw := NoMethod(*s)
  1032  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1033  }
  1034  
  1035  // method id "healthcare.projects.locations.get":
  1036  
  1037  type ProjectsLocationsGetCall struct {
  1038  	s            *Service
  1039  	name         string
  1040  	urlParams_   gensupport.URLParams
  1041  	ifNoneMatch_ string
  1042  	ctx_         context.Context
  1043  	header_      http.Header
  1044  }
  1045  
  1046  // Get: Gets information about a location.
  1047  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  1048  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1049  	c.name = name
  1050  	return c
  1051  }
  1052  
  1053  // Fields allows partial responses to be retrieved. See
  1054  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1055  // for more information.
  1056  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  1057  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1058  	return c
  1059  }
  1060  
  1061  // IfNoneMatch sets the optional parameter which makes the operation
  1062  // fail if the object's ETag matches the given value. This is useful for
  1063  // getting updates only after the object has changed since the last
  1064  // request. Use googleapi.IsNotModified to check whether the response
  1065  // error from Do is the result of In-None-Match.
  1066  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  1067  	c.ifNoneMatch_ = entityTag
  1068  	return c
  1069  }
  1070  
  1071  // Context sets the context to be used in this call's Do method. Any
  1072  // pending HTTP request will be aborted if the provided context is
  1073  // canceled.
  1074  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  1075  	c.ctx_ = ctx
  1076  	return c
  1077  }
  1078  
  1079  // Header returns an http.Header that can be modified by the caller to
  1080  // add HTTP headers to the request.
  1081  func (c *ProjectsLocationsGetCall) Header() http.Header {
  1082  	if c.header_ == nil {
  1083  		c.header_ = make(http.Header)
  1084  	}
  1085  	return c.header_
  1086  }
  1087  
  1088  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  1089  	reqHeaders := make(http.Header)
  1090  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  1091  	for k, v := range c.header_ {
  1092  		reqHeaders[k] = v
  1093  	}
  1094  	reqHeaders.Set("User-Agent", c.s.userAgent())
  1095  	if c.ifNoneMatch_ != "" {
  1096  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1097  	}
  1098  	var body io.Reader = nil
  1099  	c.urlParams_.Set("alt", alt)
  1100  	c.urlParams_.Set("prettyPrint", "false")
  1101  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  1102  	urls += "?" + c.urlParams_.Encode()
  1103  	req, err := http.NewRequest("GET", urls, body)
  1104  	if err != nil {
  1105  		return nil, err
  1106  	}
  1107  	req.Header = reqHeaders
  1108  	googleapi.Expand(req.URL, map[string]string{
  1109  		"name": c.name,
  1110  	})
  1111  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1112  }
  1113  
  1114  // Do executes the "healthcare.projects.locations.get" call.
  1115  // Exactly one of *Location or error will be non-nil. Any non-2xx status
  1116  // code is an error. Response headers are in either
  1117  // *Location.ServerResponse.Header or (if a response was returned at
  1118  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  1119  // to check whether the returned error was because
  1120  // http.StatusNotModified was returned.
  1121  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  1122  	gensupport.SetOptions(c.urlParams_, opts...)
  1123  	res, err := c.doRequest("json")
  1124  	if res != nil && res.StatusCode == http.StatusNotModified {
  1125  		if res.Body != nil {
  1126  			res.Body.Close()
  1127  		}
  1128  		return nil, &googleapi.Error{
  1129  			Code:   res.StatusCode,
  1130  			Header: res.Header,
  1131  		}
  1132  	}
  1133  	if err != nil {
  1134  		return nil, err
  1135  	}
  1136  	defer googleapi.CloseBody(res)
  1137  	if err := googleapi.CheckResponse(res); err != nil {
  1138  		return nil, err
  1139  	}
  1140  	ret := &Location{
  1141  		ServerResponse: googleapi.ServerResponse{
  1142  			Header:         res.Header,
  1143  			HTTPStatusCode: res.StatusCode,
  1144  		},
  1145  	}
  1146  	target := &ret
  1147  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1148  		return nil, err
  1149  	}
  1150  	return ret, nil
  1151  	// {
  1152  	//   "description": "Gets information about a location.",
  1153  	//   "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}",
  1154  	//   "httpMethod": "GET",
  1155  	//   "id": "healthcare.projects.locations.get",
  1156  	//   "parameterOrder": [
  1157  	//     "name"
  1158  	//   ],
  1159  	//   "parameters": {
  1160  	//     "name": {
  1161  	//       "description": "Resource name for the location.",
  1162  	//       "location": "path",
  1163  	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
  1164  	//       "required": true,
  1165  	//       "type": "string"
  1166  	//     }
  1167  	//   },
  1168  	//   "path": "v1alpha/{+name}",
  1169  	//   "response": {
  1170  	//     "$ref": "Location"
  1171  	//   },
  1172  	//   "scopes": [
  1173  	//     "https://www.googleapis.com/auth/cloud-platform"
  1174  	//   ]
  1175  	// }
  1176  
  1177  }
  1178  
  1179  // method id "healthcare.projects.locations.list":
  1180  
  1181  type ProjectsLocationsListCall struct {
  1182  	s            *Service
  1183  	name         string
  1184  	urlParams_   gensupport.URLParams
  1185  	ifNoneMatch_ string
  1186  	ctx_         context.Context
  1187  	header_      http.Header
  1188  }
  1189  
  1190  // List: Lists information about the supported locations for this
  1191  // service.
  1192  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  1193  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1194  	c.name = name
  1195  	return c
  1196  }
  1197  
  1198  // Filter sets the optional parameter "filter": The standard list
  1199  // filter.
  1200  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  1201  	c.urlParams_.Set("filter", filter)
  1202  	return c
  1203  }
  1204  
  1205  // PageSize sets the optional parameter "pageSize": The standard list
  1206  // page size.
  1207  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  1208  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1209  	return c
  1210  }
  1211  
  1212  // PageToken sets the optional parameter "pageToken": The standard list
  1213  // page token.
  1214  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  1215  	c.urlParams_.Set("pageToken", pageToken)
  1216  	return c
  1217  }
  1218  
  1219  // Fields allows partial responses to be retrieved. See
  1220  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1221  // for more information.
  1222  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  1223  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1224  	return c
  1225  }
  1226  
  1227  // IfNoneMatch sets the optional parameter which makes the operation
  1228  // fail if the object's ETag matches the given value. This is useful for
  1229  // getting updates only after the object has changed since the last
  1230  // request. Use googleapi.IsNotModified to check whether the response
  1231  // error from Do is the result of In-None-Match.
  1232  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  1233  	c.ifNoneMatch_ = entityTag
  1234  	return c
  1235  }
  1236  
  1237  // Context sets the context to be used in this call's Do method. Any
  1238  // pending HTTP request will be aborted if the provided context is
  1239  // canceled.
  1240  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  1241  	c.ctx_ = ctx
  1242  	return c
  1243  }
  1244  
  1245  // Header returns an http.Header that can be modified by the caller to
  1246  // add HTTP headers to the request.
  1247  func (c *ProjectsLocationsListCall) Header() http.Header {
  1248  	if c.header_ == nil {
  1249  		c.header_ = make(http.Header)
  1250  	}
  1251  	return c.header_
  1252  }
  1253  
  1254  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  1255  	reqHeaders := make(http.Header)
  1256  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  1257  	for k, v := range c.header_ {
  1258  		reqHeaders[k] = v
  1259  	}
  1260  	reqHeaders.Set("User-Agent", c.s.userAgent())
  1261  	if c.ifNoneMatch_ != "" {
  1262  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1263  	}
  1264  	var body io.Reader = nil
  1265  	c.urlParams_.Set("alt", alt)
  1266  	c.urlParams_.Set("prettyPrint", "false")
  1267  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/locations")
  1268  	urls += "?" + c.urlParams_.Encode()
  1269  	req, err := http.NewRequest("GET", urls, body)
  1270  	if err != nil {
  1271  		return nil, err
  1272  	}
  1273  	req.Header = reqHeaders
  1274  	googleapi.Expand(req.URL, map[string]string{
  1275  		"name": c.name,
  1276  	})
  1277  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1278  }
  1279  
  1280  // Do executes the "healthcare.projects.locations.list" call.
  1281  // Exactly one of *ListLocationsResponse or error will be non-nil. Any
  1282  // non-2xx status code is an error. Response headers are in either
  1283  // *ListLocationsResponse.ServerResponse.Header or (if a response was
  1284  // returned at all) in error.(*googleapi.Error).Header. Use
  1285  // googleapi.IsNotModified to check whether the returned error was
  1286  // because http.StatusNotModified was returned.
  1287  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  1288  	gensupport.SetOptions(c.urlParams_, opts...)
  1289  	res, err := c.doRequest("json")
  1290  	if res != nil && res.StatusCode == http.StatusNotModified {
  1291  		if res.Body != nil {
  1292  			res.Body.Close()
  1293  		}
  1294  		return nil, &googleapi.Error{
  1295  			Code:   res.StatusCode,
  1296  			Header: res.Header,
  1297  		}
  1298  	}
  1299  	if err != nil {
  1300  		return nil, err
  1301  	}
  1302  	defer googleapi.CloseBody(res)
  1303  	if err := googleapi.CheckResponse(res); err != nil {
  1304  		return nil, err
  1305  	}
  1306  	ret := &ListLocationsResponse{
  1307  		ServerResponse: googleapi.ServerResponse{
  1308  			Header:         res.Header,
  1309  			HTTPStatusCode: res.StatusCode,
  1310  		},
  1311  	}
  1312  	target := &ret
  1313  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1314  		return nil, err
  1315  	}
  1316  	return ret, nil
  1317  	// {
  1318  	//   "description": "Lists information about the supported locations for this service.",
  1319  	//   "flatPath": "v1alpha/projects/{projectsId}/locations",
  1320  	//   "httpMethod": "GET",
  1321  	//   "id": "healthcare.projects.locations.list",
  1322  	//   "parameterOrder": [
  1323  	//     "name"
  1324  	//   ],
  1325  	//   "parameters": {
  1326  	//     "filter": {
  1327  	//       "description": "The standard list filter.",
  1328  	//       "location": "query",
  1329  	//       "type": "string"
  1330  	//     },
  1331  	//     "name": {
  1332  	//       "description": "The resource that owns the locations collection, if applicable.",
  1333  	//       "location": "path",
  1334  	//       "pattern": "^projects/[^/]+$",
  1335  	//       "required": true,
  1336  	//       "type": "string"
  1337  	//     },
  1338  	//     "pageSize": {
  1339  	//       "description": "The standard list page size.",
  1340  	//       "format": "int32",
  1341  	//       "location": "query",
  1342  	//       "type": "integer"
  1343  	//     },
  1344  	//     "pageToken": {
  1345  	//       "description": "The standard list page token.",
  1346  	//       "location": "query",
  1347  	//       "type": "string"
  1348  	//     }
  1349  	//   },
  1350  	//   "path": "v1alpha/{+name}/locations",
  1351  	//   "response": {
  1352  	//     "$ref": "ListLocationsResponse"
  1353  	//   },
  1354  	//   "scopes": [
  1355  	//     "https://www.googleapis.com/auth/cloud-platform"
  1356  	//   ]
  1357  	// }
  1358  
  1359  }
  1360  
  1361  // Pages invokes f for each page of results.
  1362  // A non-nil error returned from f will halt the iteration.
  1363  // The provided context supersedes any context provided to the Context method.
  1364  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  1365  	c.ctx_ = ctx
  1366  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  1367  	for {
  1368  		x, err := c.Do()
  1369  		if err != nil {
  1370  			return err
  1371  		}
  1372  		if err := f(x); err != nil {
  1373  			return err
  1374  		}
  1375  		if x.NextPageToken == "" {
  1376  			return nil
  1377  		}
  1378  		c.PageToken(x.NextPageToken)
  1379  	}
  1380  }
  1381  
  1382  // method id "healthcare.projects.locations.datasets.getIamPolicy":
  1383  
  1384  type ProjectsLocationsDatasetsGetIamPolicyCall struct {
  1385  	s            *Service
  1386  	resource     string
  1387  	urlParams_   gensupport.URLParams
  1388  	ifNoneMatch_ string
  1389  	ctx_         context.Context
  1390  	header_      http.Header
  1391  }
  1392  
  1393  // GetIamPolicy: Gets the access control policy for a resource.
  1394  // Returns an empty policy if the resource exists and does not have a
  1395  // policy
  1396  // set.
  1397  func (r *ProjectsLocationsDatasetsService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsGetIamPolicyCall {
  1398  	c := &ProjectsLocationsDatasetsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1399  	c.resource = resource
  1400  	return c
  1401  }
  1402  
  1403  // Fields allows partial responses to be retrieved. See
  1404  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1405  // for more information.
  1406  func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsGetIamPolicyCall {
  1407  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1408  	return c
  1409  }
  1410  
  1411  // IfNoneMatch sets the optional parameter which makes the operation
  1412  // fail if the object's ETag matches the given value. This is useful for
  1413  // getting updates only after the object has changed since the last
  1414  // request. Use googleapi.IsNotModified to check whether the response
  1415  // error from Do is the result of In-None-Match.
  1416  func (c *ProjectsLocationsDatasetsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsGetIamPolicyCall {
  1417  	c.ifNoneMatch_ = entityTag
  1418  	return c
  1419  }
  1420  
  1421  // Context sets the context to be used in this call's Do method. Any
  1422  // pending HTTP request will be aborted if the provided context is
  1423  // canceled.
  1424  func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsGetIamPolicyCall {
  1425  	c.ctx_ = ctx
  1426  	return c
  1427  }
  1428  
  1429  // Header returns an http.Header that can be modified by the caller to
  1430  // add HTTP headers to the request.
  1431  func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Header() http.Header {
  1432  	if c.header_ == nil {
  1433  		c.header_ = make(http.Header)
  1434  	}
  1435  	return c.header_
  1436  }
  1437  
  1438  func (c *ProjectsLocationsDatasetsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  1439  	reqHeaders := make(http.Header)
  1440  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  1441  	for k, v := range c.header_ {
  1442  		reqHeaders[k] = v
  1443  	}
  1444  	reqHeaders.Set("User-Agent", c.s.userAgent())
  1445  	if c.ifNoneMatch_ != "" {
  1446  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1447  	}
  1448  	var body io.Reader = nil
  1449  	c.urlParams_.Set("alt", alt)
  1450  	c.urlParams_.Set("prettyPrint", "false")
  1451  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy")
  1452  	urls += "?" + c.urlParams_.Encode()
  1453  	req, err := http.NewRequest("GET", urls, body)
  1454  	if err != nil {
  1455  		return nil, err
  1456  	}
  1457  	req.Header = reqHeaders
  1458  	googleapi.Expand(req.URL, map[string]string{
  1459  		"resource": c.resource,
  1460  	})
  1461  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1462  }
  1463  
  1464  // Do executes the "healthcare.projects.locations.datasets.getIamPolicy" call.
  1465  // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  1466  // code is an error. Response headers are in either
  1467  // *Policy.ServerResponse.Header or (if a response was returned at all)
  1468  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1469  // check whether the returned error was because http.StatusNotModified
  1470  // was returned.
  1471  func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  1472  	gensupport.SetOptions(c.urlParams_, opts...)
  1473  	res, err := c.doRequest("json")
  1474  	if res != nil && res.StatusCode == http.StatusNotModified {
  1475  		if res.Body != nil {
  1476  			res.Body.Close()
  1477  		}
  1478  		return nil, &googleapi.Error{
  1479  			Code:   res.StatusCode,
  1480  			Header: res.Header,
  1481  		}
  1482  	}
  1483  	if err != nil {
  1484  		return nil, err
  1485  	}
  1486  	defer googleapi.CloseBody(res)
  1487  	if err := googleapi.CheckResponse(res); err != nil {
  1488  		return nil, err
  1489  	}
  1490  	ret := &Policy{
  1491  		ServerResponse: googleapi.ServerResponse{
  1492  			Header:         res.Header,
  1493  			HTTPStatusCode: res.StatusCode,
  1494  		},
  1495  	}
  1496  	target := &ret
  1497  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1498  		return nil, err
  1499  	}
  1500  	return ret, nil
  1501  	// {
  1502  	//   "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.",
  1503  	//   "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}:getIamPolicy",
  1504  	//   "httpMethod": "GET",
  1505  	//   "id": "healthcare.projects.locations.datasets.getIamPolicy",
  1506  	//   "parameterOrder": [
  1507  	//     "resource"
  1508  	//   ],
  1509  	//   "parameters": {
  1510  	//     "resource": {
  1511  	//       "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
  1512  	//       "location": "path",
  1513  	//       "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  1514  	//       "required": true,
  1515  	//       "type": "string"
  1516  	//     }
  1517  	//   },
  1518  	//   "path": "v1alpha/{+resource}:getIamPolicy",
  1519  	//   "response": {
  1520  	//     "$ref": "Policy"
  1521  	//   },
  1522  	//   "scopes": [
  1523  	//     "https://www.googleapis.com/auth/cloud-platform"
  1524  	//   ]
  1525  	// }
  1526  
  1527  }
  1528  
  1529  // method id "healthcare.projects.locations.datasets.setIamPolicy":
  1530  
  1531  type ProjectsLocationsDatasetsSetIamPolicyCall struct {
  1532  	s                   *Service
  1533  	resource            string
  1534  	setiampolicyrequest *SetIamPolicyRequest
  1535  	urlParams_          gensupport.URLParams
  1536  	ctx_                context.Context
  1537  	header_             http.Header
  1538  }
  1539  
  1540  // SetIamPolicy: Sets the access control policy on the specified
  1541  // resource. Replaces any
  1542  // existing policy.
  1543  func (r *ProjectsLocationsDatasetsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsSetIamPolicyCall {
  1544  	c := &ProjectsLocationsDatasetsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1545  	c.resource = resource
  1546  	c.setiampolicyrequest = setiampolicyrequest
  1547  	return c
  1548  }
  1549  
  1550  // Fields allows partial responses to be retrieved. See
  1551  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1552  // for more information.
  1553  func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSetIamPolicyCall {
  1554  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1555  	return c
  1556  }
  1557  
  1558  // Context sets the context to be used in this call's Do method. Any
  1559  // pending HTTP request will be aborted if the provided context is
  1560  // canceled.
  1561  func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSetIamPolicyCall {
  1562  	c.ctx_ = ctx
  1563  	return c
  1564  }
  1565  
  1566  // Header returns an http.Header that can be modified by the caller to
  1567  // add HTTP headers to the request.
  1568  func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Header() http.Header {
  1569  	if c.header_ == nil {
  1570  		c.header_ = make(http.Header)
  1571  	}
  1572  	return c.header_
  1573  }
  1574  
  1575  func (c *ProjectsLocationsDatasetsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  1576  	reqHeaders := make(http.Header)
  1577  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  1578  	for k, v := range c.header_ {
  1579  		reqHeaders[k] = v
  1580  	}
  1581  	reqHeaders.Set("User-Agent", c.s.userAgent())
  1582  	var body io.Reader = nil
  1583  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  1584  	if err != nil {
  1585  		return nil, err
  1586  	}
  1587  	reqHeaders.Set("Content-Type", "application/json")
  1588  	c.urlParams_.Set("alt", alt)
  1589  	c.urlParams_.Set("prettyPrint", "false")
  1590  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy")
  1591  	urls += "?" + c.urlParams_.Encode()
  1592  	req, err := http.NewRequest("POST", urls, body)
  1593  	if err != nil {
  1594  		return nil, err
  1595  	}
  1596  	req.Header = reqHeaders
  1597  	googleapi.Expand(req.URL, map[string]string{
  1598  		"resource": c.resource,
  1599  	})
  1600  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1601  }
  1602  
  1603  // Do executes the "healthcare.projects.locations.datasets.setIamPolicy" call.
  1604  // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  1605  // code is an error. Response headers are in either
  1606  // *Policy.ServerResponse.Header or (if a response was returned at all)
  1607  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1608  // check whether the returned error was because http.StatusNotModified
  1609  // was returned.
  1610  func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  1611  	gensupport.SetOptions(c.urlParams_, opts...)
  1612  	res, err := c.doRequest("json")
  1613  	if res != nil && res.StatusCode == http.StatusNotModified {
  1614  		if res.Body != nil {
  1615  			res.Body.Close()
  1616  		}
  1617  		return nil, &googleapi.Error{
  1618  			Code:   res.StatusCode,
  1619  			Header: res.Header,
  1620  		}
  1621  	}
  1622  	if err != nil {
  1623  		return nil, err
  1624  	}
  1625  	defer googleapi.CloseBody(res)
  1626  	if err := googleapi.CheckResponse(res); err != nil {
  1627  		return nil, err
  1628  	}
  1629  	ret := &Policy{
  1630  		ServerResponse: googleapi.ServerResponse{
  1631  			Header:         res.Header,
  1632  			HTTPStatusCode: res.StatusCode,
  1633  		},
  1634  	}
  1635  	target := &ret
  1636  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1637  		return nil, err
  1638  	}
  1639  	return ret, nil
  1640  	// {
  1641  	//   "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.",
  1642  	//   "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}:setIamPolicy",
  1643  	//   "httpMethod": "POST",
  1644  	//   "id": "healthcare.projects.locations.datasets.setIamPolicy",
  1645  	//   "parameterOrder": [
  1646  	//     "resource"
  1647  	//   ],
  1648  	//   "parameters": {
  1649  	//     "resource": {
  1650  	//       "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
  1651  	//       "location": "path",
  1652  	//       "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  1653  	//       "required": true,
  1654  	//       "type": "string"
  1655  	//     }
  1656  	//   },
  1657  	//   "path": "v1alpha/{+resource}:setIamPolicy",
  1658  	//   "request": {
  1659  	//     "$ref": "SetIamPolicyRequest"
  1660  	//   },
  1661  	//   "response": {
  1662  	//     "$ref": "Policy"
  1663  	//   },
  1664  	//   "scopes": [
  1665  	//     "https://www.googleapis.com/auth/cloud-platform"
  1666  	//   ]
  1667  	// }
  1668  
  1669  }
  1670  
  1671  // method id "healthcare.projects.locations.datasets.testIamPermissions":
  1672  
  1673  type ProjectsLocationsDatasetsTestIamPermissionsCall struct {
  1674  	s                         *Service
  1675  	resource                  string
  1676  	testiampermissionsrequest *TestIamPermissionsRequest
  1677  	urlParams_                gensupport.URLParams
  1678  	ctx_                      context.Context
  1679  	header_                   http.Header
  1680  }
  1681  
  1682  // TestIamPermissions: Returns permissions that a caller has on the
  1683  // specified resource.
  1684  // If the resource does not exist, this will return an empty set
  1685  // of
  1686  // permissions, not a NOT_FOUND error.
  1687  //
  1688  // Note: This operation is designed to be used for building
  1689  // permission-aware
  1690  // UIs and command-line tools, not for authorization checking. This
  1691  // operation
  1692  // may "fail open" without warning.
  1693  func (r *ProjectsLocationsDatasetsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsTestIamPermissionsCall {
  1694  	c := &ProjectsLocationsDatasetsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1695  	c.resource = resource
  1696  	c.testiampermissionsrequest = testiampermissionsrequest
  1697  	return c
  1698  }
  1699  
  1700  // Fields allows partial responses to be retrieved. See
  1701  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1702  // for more information.
  1703  func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsTestIamPermissionsCall {
  1704  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1705  	return c
  1706  }
  1707  
  1708  // Context sets the context to be used in this call's Do method. Any
  1709  // pending HTTP request will be aborted if the provided context is
  1710  // canceled.
  1711  func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsTestIamPermissionsCall {
  1712  	c.ctx_ = ctx
  1713  	return c
  1714  }
  1715  
  1716  // Header returns an http.Header that can be modified by the caller to
  1717  // add HTTP headers to the request.
  1718  func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Header() http.Header {
  1719  	if c.header_ == nil {
  1720  		c.header_ = make(http.Header)
  1721  	}
  1722  	return c.header_
  1723  }
  1724  
  1725  func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  1726  	reqHeaders := make(http.Header)
  1727  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  1728  	for k, v := range c.header_ {
  1729  		reqHeaders[k] = v
  1730  	}
  1731  	reqHeaders.Set("User-Agent", c.s.userAgent())
  1732  	var body io.Reader = nil
  1733  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  1734  	if err != nil {
  1735  		return nil, err
  1736  	}
  1737  	reqHeaders.Set("Content-Type", "application/json")
  1738  	c.urlParams_.Set("alt", alt)
  1739  	c.urlParams_.Set("prettyPrint", "false")
  1740  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions")
  1741  	urls += "?" + c.urlParams_.Encode()
  1742  	req, err := http.NewRequest("POST", urls, body)
  1743  	if err != nil {
  1744  		return nil, err
  1745  	}
  1746  	req.Header = reqHeaders
  1747  	googleapi.Expand(req.URL, map[string]string{
  1748  		"resource": c.resource,
  1749  	})
  1750  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1751  }
  1752  
  1753  // Do executes the "healthcare.projects.locations.datasets.testIamPermissions" call.
  1754  // Exactly one of *TestIamPermissionsResponse or error will be non-nil.
  1755  // Any non-2xx status code is an error. Response headers are in either
  1756  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response
  1757  // was returned at all) in error.(*googleapi.Error).Header. Use
  1758  // googleapi.IsNotModified to check whether the returned error was
  1759  // because http.StatusNotModified was returned.
  1760  func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  1761  	gensupport.SetOptions(c.urlParams_, opts...)
  1762  	res, err := c.doRequest("json")
  1763  	if res != nil && res.StatusCode == http.StatusNotModified {
  1764  		if res.Body != nil {
  1765  			res.Body.Close()
  1766  		}
  1767  		return nil, &googleapi.Error{
  1768  			Code:   res.StatusCode,
  1769  			Header: res.Header,
  1770  		}
  1771  	}
  1772  	if err != nil {
  1773  		return nil, err
  1774  	}
  1775  	defer googleapi.CloseBody(res)
  1776  	if err := googleapi.CheckResponse(res); err != nil {
  1777  		return nil, err
  1778  	}
  1779  	ret := &TestIamPermissionsResponse{
  1780  		ServerResponse: googleapi.ServerResponse{
  1781  			Header:         res.Header,
  1782  			HTTPStatusCode: res.StatusCode,
  1783  		},
  1784  	}
  1785  	target := &ret
  1786  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1787  		return nil, err
  1788  	}
  1789  	return ret, nil
  1790  	// {
  1791  	//   "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.",
  1792  	//   "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}:testIamPermissions",
  1793  	//   "httpMethod": "POST",
  1794  	//   "id": "healthcare.projects.locations.datasets.testIamPermissions",
  1795  	//   "parameterOrder": [
  1796  	//     "resource"
  1797  	//   ],
  1798  	//   "parameters": {
  1799  	//     "resource": {
  1800  	//       "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
  1801  	//       "location": "path",
  1802  	//       "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  1803  	//       "required": true,
  1804  	//       "type": "string"
  1805  	//     }
  1806  	//   },
  1807  	//   "path": "v1alpha/{+resource}:testIamPermissions",
  1808  	//   "request": {
  1809  	//     "$ref": "TestIamPermissionsRequest"
  1810  	//   },
  1811  	//   "response": {
  1812  	//     "$ref": "TestIamPermissionsResponse"
  1813  	//   },
  1814  	//   "scopes": [
  1815  	//     "https://www.googleapis.com/auth/cloud-platform"
  1816  	//   ]
  1817  	// }
  1818  
  1819  }
  1820  
  1821  // method id "healthcare.projects.locations.datasets.dicomStores.getIamPolicy":
  1822  
  1823  type ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall struct {
  1824  	s            *Service
  1825  	resource     string
  1826  	urlParams_   gensupport.URLParams
  1827  	ifNoneMatch_ string
  1828  	ctx_         context.Context
  1829  	header_      http.Header
  1830  }
  1831  
  1832  // GetIamPolicy: Gets the access control policy for a resource.
  1833  // Returns an empty policy if the resource exists and does not have a
  1834  // policy
  1835  // set.
  1836  func (r *ProjectsLocationsDatasetsDicomStoresService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall {
  1837  	c := &ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1838  	c.resource = resource
  1839  	return c
  1840  }
  1841  
  1842  // Fields allows partial responses to be retrieved. See
  1843  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1844  // for more information.
  1845  func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall {
  1846  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1847  	return c
  1848  }
  1849  
  1850  // IfNoneMatch sets the optional parameter which makes the operation
  1851  // fail if the object's ETag matches the given value. This is useful for
  1852  // getting updates only after the object has changed since the last
  1853  // request. Use googleapi.IsNotModified to check whether the response
  1854  // error from Do is the result of In-None-Match.
  1855  func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall {
  1856  	c.ifNoneMatch_ = entityTag
  1857  	return c
  1858  }
  1859  
  1860  // Context sets the context to be used in this call's Do method. Any
  1861  // pending HTTP request will be aborted if the provided context is
  1862  // canceled.
  1863  func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall {
  1864  	c.ctx_ = ctx
  1865  	return c
  1866  }
  1867  
  1868  // Header returns an http.Header that can be modified by the caller to
  1869  // add HTTP headers to the request.
  1870  func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Header() http.Header {
  1871  	if c.header_ == nil {
  1872  		c.header_ = make(http.Header)
  1873  	}
  1874  	return c.header_
  1875  }
  1876  
  1877  func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  1878  	reqHeaders := make(http.Header)
  1879  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  1880  	for k, v := range c.header_ {
  1881  		reqHeaders[k] = v
  1882  	}
  1883  	reqHeaders.Set("User-Agent", c.s.userAgent())
  1884  	if c.ifNoneMatch_ != "" {
  1885  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1886  	}
  1887  	var body io.Reader = nil
  1888  	c.urlParams_.Set("alt", alt)
  1889  	c.urlParams_.Set("prettyPrint", "false")
  1890  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy")
  1891  	urls += "?" + c.urlParams_.Encode()
  1892  	req, err := http.NewRequest("GET", urls, body)
  1893  	if err != nil {
  1894  		return nil, err
  1895  	}
  1896  	req.Header = reqHeaders
  1897  	googleapi.Expand(req.URL, map[string]string{
  1898  		"resource": c.resource,
  1899  	})
  1900  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1901  }
  1902  
  1903  // Do executes the "healthcare.projects.locations.datasets.dicomStores.getIamPolicy" call.
  1904  // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  1905  // code is an error. Response headers are in either
  1906  // *Policy.ServerResponse.Header or (if a response was returned at all)
  1907  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1908  // check whether the returned error was because http.StatusNotModified
  1909  // was returned.
  1910  func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  1911  	gensupport.SetOptions(c.urlParams_, opts...)
  1912  	res, err := c.doRequest("json")
  1913  	if res != nil && res.StatusCode == http.StatusNotModified {
  1914  		if res.Body != nil {
  1915  			res.Body.Close()
  1916  		}
  1917  		return nil, &googleapi.Error{
  1918  			Code:   res.StatusCode,
  1919  			Header: res.Header,
  1920  		}
  1921  	}
  1922  	if err != nil {
  1923  		return nil, err
  1924  	}
  1925  	defer googleapi.CloseBody(res)
  1926  	if err := googleapi.CheckResponse(res); err != nil {
  1927  		return nil, err
  1928  	}
  1929  	ret := &Policy{
  1930  		ServerResponse: googleapi.ServerResponse{
  1931  			Header:         res.Header,
  1932  			HTTPStatusCode: res.StatusCode,
  1933  		},
  1934  	}
  1935  	target := &ret
  1936  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1937  		return nil, err
  1938  	}
  1939  	return ret, nil
  1940  	// {
  1941  	//   "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.",
  1942  	//   "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}:getIamPolicy",
  1943  	//   "httpMethod": "GET",
  1944  	//   "id": "healthcare.projects.locations.datasets.dicomStores.getIamPolicy",
  1945  	//   "parameterOrder": [
  1946  	//     "resource"
  1947  	//   ],
  1948  	//   "parameters": {
  1949  	//     "resource": {
  1950  	//       "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
  1951  	//       "location": "path",
  1952  	//       "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  1953  	//       "required": true,
  1954  	//       "type": "string"
  1955  	//     }
  1956  	//   },
  1957  	//   "path": "v1alpha/{+resource}:getIamPolicy",
  1958  	//   "response": {
  1959  	//     "$ref": "Policy"
  1960  	//   },
  1961  	//   "scopes": [
  1962  	//     "https://www.googleapis.com/auth/cloud-platform"
  1963  	//   ]
  1964  	// }
  1965  
  1966  }
  1967  
  1968  // method id "healthcare.projects.locations.datasets.dicomStores.setIamPolicy":
  1969  
  1970  type ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall struct {
  1971  	s                   *Service
  1972  	resource            string
  1973  	setiampolicyrequest *SetIamPolicyRequest
  1974  	urlParams_          gensupport.URLParams
  1975  	ctx_                context.Context
  1976  	header_             http.Header
  1977  }
  1978  
  1979  // SetIamPolicy: Sets the access control policy on the specified
  1980  // resource. Replaces any
  1981  // existing policy.
  1982  func (r *ProjectsLocationsDatasetsDicomStoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall {
  1983  	c := &ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1984  	c.resource = resource
  1985  	c.setiampolicyrequest = setiampolicyrequest
  1986  	return c
  1987  }
  1988  
  1989  // Fields allows partial responses to be retrieved. See
  1990  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1991  // for more information.
  1992  func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall {
  1993  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1994  	return c
  1995  }
  1996  
  1997  // Context sets the context to be used in this call's Do method. Any
  1998  // pending HTTP request will be aborted if the provided context is
  1999  // canceled.
  2000  func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall {
  2001  	c.ctx_ = ctx
  2002  	return c
  2003  }
  2004  
  2005  // Header returns an http.Header that can be modified by the caller to
  2006  // add HTTP headers to the request.
  2007  func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Header() http.Header {
  2008  	if c.header_ == nil {
  2009  		c.header_ = make(http.Header)
  2010  	}
  2011  	return c.header_
  2012  }
  2013  
  2014  func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  2015  	reqHeaders := make(http.Header)
  2016  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  2017  	for k, v := range c.header_ {
  2018  		reqHeaders[k] = v
  2019  	}
  2020  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2021  	var body io.Reader = nil
  2022  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  2023  	if err != nil {
  2024  		return nil, err
  2025  	}
  2026  	reqHeaders.Set("Content-Type", "application/json")
  2027  	c.urlParams_.Set("alt", alt)
  2028  	c.urlParams_.Set("prettyPrint", "false")
  2029  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy")
  2030  	urls += "?" + c.urlParams_.Encode()
  2031  	req, err := http.NewRequest("POST", urls, body)
  2032  	if err != nil {
  2033  		return nil, err
  2034  	}
  2035  	req.Header = reqHeaders
  2036  	googleapi.Expand(req.URL, map[string]string{
  2037  		"resource": c.resource,
  2038  	})
  2039  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2040  }
  2041  
  2042  // Do executes the "healthcare.projects.locations.datasets.dicomStores.setIamPolicy" call.
  2043  // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  2044  // code is an error. Response headers are in either
  2045  // *Policy.ServerResponse.Header or (if a response was returned at all)
  2046  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2047  // check whether the returned error was because http.StatusNotModified
  2048  // was returned.
  2049  func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  2050  	gensupport.SetOptions(c.urlParams_, opts...)
  2051  	res, err := c.doRequest("json")
  2052  	if res != nil && res.StatusCode == http.StatusNotModified {
  2053  		if res.Body != nil {
  2054  			res.Body.Close()
  2055  		}
  2056  		return nil, &googleapi.Error{
  2057  			Code:   res.StatusCode,
  2058  			Header: res.Header,
  2059  		}
  2060  	}
  2061  	if err != nil {
  2062  		return nil, err
  2063  	}
  2064  	defer googleapi.CloseBody(res)
  2065  	if err := googleapi.CheckResponse(res); err != nil {
  2066  		return nil, err
  2067  	}
  2068  	ret := &Policy{
  2069  		ServerResponse: googleapi.ServerResponse{
  2070  			Header:         res.Header,
  2071  			HTTPStatusCode: res.StatusCode,
  2072  		},
  2073  	}
  2074  	target := &ret
  2075  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2076  		return nil, err
  2077  	}
  2078  	return ret, nil
  2079  	// {
  2080  	//   "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.",
  2081  	//   "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}:setIamPolicy",
  2082  	//   "httpMethod": "POST",
  2083  	//   "id": "healthcare.projects.locations.datasets.dicomStores.setIamPolicy",
  2084  	//   "parameterOrder": [
  2085  	//     "resource"
  2086  	//   ],
  2087  	//   "parameters": {
  2088  	//     "resource": {
  2089  	//       "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
  2090  	//       "location": "path",
  2091  	//       "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  2092  	//       "required": true,
  2093  	//       "type": "string"
  2094  	//     }
  2095  	//   },
  2096  	//   "path": "v1alpha/{+resource}:setIamPolicy",
  2097  	//   "request": {
  2098  	//     "$ref": "SetIamPolicyRequest"
  2099  	//   },
  2100  	//   "response": {
  2101  	//     "$ref": "Policy"
  2102  	//   },
  2103  	//   "scopes": [
  2104  	//     "https://www.googleapis.com/auth/cloud-platform"
  2105  	//   ]
  2106  	// }
  2107  
  2108  }
  2109  
  2110  // method id "healthcare.projects.locations.datasets.dicomStores.testIamPermissions":
  2111  
  2112  type ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall struct {
  2113  	s                         *Service
  2114  	resource                  string
  2115  	testiampermissionsrequest *TestIamPermissionsRequest
  2116  	urlParams_                gensupport.URLParams
  2117  	ctx_                      context.Context
  2118  	header_                   http.Header
  2119  }
  2120  
  2121  // TestIamPermissions: Returns permissions that a caller has on the
  2122  // specified resource.
  2123  // If the resource does not exist, this will return an empty set
  2124  // of
  2125  // permissions, not a NOT_FOUND error.
  2126  //
  2127  // Note: This operation is designed to be used for building
  2128  // permission-aware
  2129  // UIs and command-line tools, not for authorization checking. This
  2130  // operation
  2131  // may "fail open" without warning.
  2132  func (r *ProjectsLocationsDatasetsDicomStoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall {
  2133  	c := &ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2134  	c.resource = resource
  2135  	c.testiampermissionsrequest = testiampermissionsrequest
  2136  	return c
  2137  }
  2138  
  2139  // Fields allows partial responses to be retrieved. See
  2140  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2141  // for more information.
  2142  func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall {
  2143  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2144  	return c
  2145  }
  2146  
  2147  // Context sets the context to be used in this call's Do method. Any
  2148  // pending HTTP request will be aborted if the provided context is
  2149  // canceled.
  2150  func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall {
  2151  	c.ctx_ = ctx
  2152  	return c
  2153  }
  2154  
  2155  // Header returns an http.Header that can be modified by the caller to
  2156  // add HTTP headers to the request.
  2157  func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Header() http.Header {
  2158  	if c.header_ == nil {
  2159  		c.header_ = make(http.Header)
  2160  	}
  2161  	return c.header_
  2162  }
  2163  
  2164  func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  2165  	reqHeaders := make(http.Header)
  2166  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  2167  	for k, v := range c.header_ {
  2168  		reqHeaders[k] = v
  2169  	}
  2170  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2171  	var body io.Reader = nil
  2172  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  2173  	if err != nil {
  2174  		return nil, err
  2175  	}
  2176  	reqHeaders.Set("Content-Type", "application/json")
  2177  	c.urlParams_.Set("alt", alt)
  2178  	c.urlParams_.Set("prettyPrint", "false")
  2179  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions")
  2180  	urls += "?" + c.urlParams_.Encode()
  2181  	req, err := http.NewRequest("POST", urls, body)
  2182  	if err != nil {
  2183  		return nil, err
  2184  	}
  2185  	req.Header = reqHeaders
  2186  	googleapi.Expand(req.URL, map[string]string{
  2187  		"resource": c.resource,
  2188  	})
  2189  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2190  }
  2191  
  2192  // Do executes the "healthcare.projects.locations.datasets.dicomStores.testIamPermissions" call.
  2193  // Exactly one of *TestIamPermissionsResponse or error will be non-nil.
  2194  // Any non-2xx status code is an error. Response headers are in either
  2195  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response
  2196  // was returned at all) in error.(*googleapi.Error).Header. Use
  2197  // googleapi.IsNotModified to check whether the returned error was
  2198  // because http.StatusNotModified was returned.
  2199  func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  2200  	gensupport.SetOptions(c.urlParams_, opts...)
  2201  	res, err := c.doRequest("json")
  2202  	if res != nil && res.StatusCode == http.StatusNotModified {
  2203  		if res.Body != nil {
  2204  			res.Body.Close()
  2205  		}
  2206  		return nil, &googleapi.Error{
  2207  			Code:   res.StatusCode,
  2208  			Header: res.Header,
  2209  		}
  2210  	}
  2211  	if err != nil {
  2212  		return nil, err
  2213  	}
  2214  	defer googleapi.CloseBody(res)
  2215  	if err := googleapi.CheckResponse(res); err != nil {
  2216  		return nil, err
  2217  	}
  2218  	ret := &TestIamPermissionsResponse{
  2219  		ServerResponse: googleapi.ServerResponse{
  2220  			Header:         res.Header,
  2221  			HTTPStatusCode: res.StatusCode,
  2222  		},
  2223  	}
  2224  	target := &ret
  2225  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2226  		return nil, err
  2227  	}
  2228  	return ret, nil
  2229  	// {
  2230  	//   "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.",
  2231  	//   "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}:testIamPermissions",
  2232  	//   "httpMethod": "POST",
  2233  	//   "id": "healthcare.projects.locations.datasets.dicomStores.testIamPermissions",
  2234  	//   "parameterOrder": [
  2235  	//     "resource"
  2236  	//   ],
  2237  	//   "parameters": {
  2238  	//     "resource": {
  2239  	//       "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
  2240  	//       "location": "path",
  2241  	//       "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  2242  	//       "required": true,
  2243  	//       "type": "string"
  2244  	//     }
  2245  	//   },
  2246  	//   "path": "v1alpha/{+resource}:testIamPermissions",
  2247  	//   "request": {
  2248  	//     "$ref": "TestIamPermissionsRequest"
  2249  	//   },
  2250  	//   "response": {
  2251  	//     "$ref": "TestIamPermissionsResponse"
  2252  	//   },
  2253  	//   "scopes": [
  2254  	//     "https://www.googleapis.com/auth/cloud-platform"
  2255  	//   ]
  2256  	// }
  2257  
  2258  }
  2259  
  2260  // method id "healthcare.projects.locations.datasets.hl7V2Stores.getIamPolicy":
  2261  
  2262  type ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall struct {
  2263  	s            *Service
  2264  	resource     string
  2265  	urlParams_   gensupport.URLParams
  2266  	ifNoneMatch_ string
  2267  	ctx_         context.Context
  2268  	header_      http.Header
  2269  }
  2270  
  2271  // GetIamPolicy: Gets the access control policy for a resource.
  2272  // Returns an empty policy if the resource exists and does not have a
  2273  // policy
  2274  // set.
  2275  func (r *ProjectsLocationsDatasetsHl7V2StoresService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall {
  2276  	c := &ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2277  	c.resource = resource
  2278  	return c
  2279  }
  2280  
  2281  // Fields allows partial responses to be retrieved. See
  2282  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2283  // for more information.
  2284  func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall {
  2285  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2286  	return c
  2287  }
  2288  
  2289  // IfNoneMatch sets the optional parameter which makes the operation
  2290  // fail if the object's ETag matches the given value. This is useful for
  2291  // getting updates only after the object has changed since the last
  2292  // request. Use googleapi.IsNotModified to check whether the response
  2293  // error from Do is the result of In-None-Match.
  2294  func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall {
  2295  	c.ifNoneMatch_ = entityTag
  2296  	return c
  2297  }
  2298  
  2299  // Context sets the context to be used in this call's Do method. Any
  2300  // pending HTTP request will be aborted if the provided context is
  2301  // canceled.
  2302  func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall {
  2303  	c.ctx_ = ctx
  2304  	return c
  2305  }
  2306  
  2307  // Header returns an http.Header that can be modified by the caller to
  2308  // add HTTP headers to the request.
  2309  func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Header() http.Header {
  2310  	if c.header_ == nil {
  2311  		c.header_ = make(http.Header)
  2312  	}
  2313  	return c.header_
  2314  }
  2315  
  2316  func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  2317  	reqHeaders := make(http.Header)
  2318  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  2319  	for k, v := range c.header_ {
  2320  		reqHeaders[k] = v
  2321  	}
  2322  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2323  	if c.ifNoneMatch_ != "" {
  2324  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2325  	}
  2326  	var body io.Reader = nil
  2327  	c.urlParams_.Set("alt", alt)
  2328  	c.urlParams_.Set("prettyPrint", "false")
  2329  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy")
  2330  	urls += "?" + c.urlParams_.Encode()
  2331  	req, err := http.NewRequest("GET", urls, body)
  2332  	if err != nil {
  2333  		return nil, err
  2334  	}
  2335  	req.Header = reqHeaders
  2336  	googleapi.Expand(req.URL, map[string]string{
  2337  		"resource": c.resource,
  2338  	})
  2339  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2340  }
  2341  
  2342  // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.getIamPolicy" call.
  2343  // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  2344  // code is an error. Response headers are in either
  2345  // *Policy.ServerResponse.Header or (if a response was returned at all)
  2346  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2347  // check whether the returned error was because http.StatusNotModified
  2348  // was returned.
  2349  func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  2350  	gensupport.SetOptions(c.urlParams_, opts...)
  2351  	res, err := c.doRequest("json")
  2352  	if res != nil && res.StatusCode == http.StatusNotModified {
  2353  		if res.Body != nil {
  2354  			res.Body.Close()
  2355  		}
  2356  		return nil, &googleapi.Error{
  2357  			Code:   res.StatusCode,
  2358  			Header: res.Header,
  2359  		}
  2360  	}
  2361  	if err != nil {
  2362  		return nil, err
  2363  	}
  2364  	defer googleapi.CloseBody(res)
  2365  	if err := googleapi.CheckResponse(res); err != nil {
  2366  		return nil, err
  2367  	}
  2368  	ret := &Policy{
  2369  		ServerResponse: googleapi.ServerResponse{
  2370  			Header:         res.Header,
  2371  			HTTPStatusCode: res.StatusCode,
  2372  		},
  2373  	}
  2374  	target := &ret
  2375  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2376  		return nil, err
  2377  	}
  2378  	return ret, nil
  2379  	// {
  2380  	//   "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.",
  2381  	//   "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}:getIamPolicy",
  2382  	//   "httpMethod": "GET",
  2383  	//   "id": "healthcare.projects.locations.datasets.hl7V2Stores.getIamPolicy",
  2384  	//   "parameterOrder": [
  2385  	//     "resource"
  2386  	//   ],
  2387  	//   "parameters": {
  2388  	//     "resource": {
  2389  	//       "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
  2390  	//       "location": "path",
  2391  	//       "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$",
  2392  	//       "required": true,
  2393  	//       "type": "string"
  2394  	//     }
  2395  	//   },
  2396  	//   "path": "v1alpha/{+resource}:getIamPolicy",
  2397  	//   "response": {
  2398  	//     "$ref": "Policy"
  2399  	//   },
  2400  	//   "scopes": [
  2401  	//     "https://www.googleapis.com/auth/cloud-platform"
  2402  	//   ]
  2403  	// }
  2404  
  2405  }
  2406  
  2407  // method id "healthcare.projects.locations.datasets.hl7V2Stores.setIamPolicy":
  2408  
  2409  type ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall struct {
  2410  	s                   *Service
  2411  	resource            string
  2412  	setiampolicyrequest *SetIamPolicyRequest
  2413  	urlParams_          gensupport.URLParams
  2414  	ctx_                context.Context
  2415  	header_             http.Header
  2416  }
  2417  
  2418  // SetIamPolicy: Sets the access control policy on the specified
  2419  // resource. Replaces any
  2420  // existing policy.
  2421  func (r *ProjectsLocationsDatasetsHl7V2StoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall {
  2422  	c := &ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2423  	c.resource = resource
  2424  	c.setiampolicyrequest = setiampolicyrequest
  2425  	return c
  2426  }
  2427  
  2428  // Fields allows partial responses to be retrieved. See
  2429  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2430  // for more information.
  2431  func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall {
  2432  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2433  	return c
  2434  }
  2435  
  2436  // Context sets the context to be used in this call's Do method. Any
  2437  // pending HTTP request will be aborted if the provided context is
  2438  // canceled.
  2439  func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall {
  2440  	c.ctx_ = ctx
  2441  	return c
  2442  }
  2443  
  2444  // Header returns an http.Header that can be modified by the caller to
  2445  // add HTTP headers to the request.
  2446  func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Header() http.Header {
  2447  	if c.header_ == nil {
  2448  		c.header_ = make(http.Header)
  2449  	}
  2450  	return c.header_
  2451  }
  2452  
  2453  func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  2454  	reqHeaders := make(http.Header)
  2455  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  2456  	for k, v := range c.header_ {
  2457  		reqHeaders[k] = v
  2458  	}
  2459  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2460  	var body io.Reader = nil
  2461  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  2462  	if err != nil {
  2463  		return nil, err
  2464  	}
  2465  	reqHeaders.Set("Content-Type", "application/json")
  2466  	c.urlParams_.Set("alt", alt)
  2467  	c.urlParams_.Set("prettyPrint", "false")
  2468  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy")
  2469  	urls += "?" + c.urlParams_.Encode()
  2470  	req, err := http.NewRequest("POST", urls, body)
  2471  	if err != nil {
  2472  		return nil, err
  2473  	}
  2474  	req.Header = reqHeaders
  2475  	googleapi.Expand(req.URL, map[string]string{
  2476  		"resource": c.resource,
  2477  	})
  2478  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2479  }
  2480  
  2481  // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.setIamPolicy" call.
  2482  // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  2483  // code is an error. Response headers are in either
  2484  // *Policy.ServerResponse.Header or (if a response was returned at all)
  2485  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2486  // check whether the returned error was because http.StatusNotModified
  2487  // was returned.
  2488  func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  2489  	gensupport.SetOptions(c.urlParams_, opts...)
  2490  	res, err := c.doRequest("json")
  2491  	if res != nil && res.StatusCode == http.StatusNotModified {
  2492  		if res.Body != nil {
  2493  			res.Body.Close()
  2494  		}
  2495  		return nil, &googleapi.Error{
  2496  			Code:   res.StatusCode,
  2497  			Header: res.Header,
  2498  		}
  2499  	}
  2500  	if err != nil {
  2501  		return nil, err
  2502  	}
  2503  	defer googleapi.CloseBody(res)
  2504  	if err := googleapi.CheckResponse(res); err != nil {
  2505  		return nil, err
  2506  	}
  2507  	ret := &Policy{
  2508  		ServerResponse: googleapi.ServerResponse{
  2509  			Header:         res.Header,
  2510  			HTTPStatusCode: res.StatusCode,
  2511  		},
  2512  	}
  2513  	target := &ret
  2514  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2515  		return nil, err
  2516  	}
  2517  	return ret, nil
  2518  	// {
  2519  	//   "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.",
  2520  	//   "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}:setIamPolicy",
  2521  	//   "httpMethod": "POST",
  2522  	//   "id": "healthcare.projects.locations.datasets.hl7V2Stores.setIamPolicy",
  2523  	//   "parameterOrder": [
  2524  	//     "resource"
  2525  	//   ],
  2526  	//   "parameters": {
  2527  	//     "resource": {
  2528  	//       "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
  2529  	//       "location": "path",
  2530  	//       "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$",
  2531  	//       "required": true,
  2532  	//       "type": "string"
  2533  	//     }
  2534  	//   },
  2535  	//   "path": "v1alpha/{+resource}:setIamPolicy",
  2536  	//   "request": {
  2537  	//     "$ref": "SetIamPolicyRequest"
  2538  	//   },
  2539  	//   "response": {
  2540  	//     "$ref": "Policy"
  2541  	//   },
  2542  	//   "scopes": [
  2543  	//     "https://www.googleapis.com/auth/cloud-platform"
  2544  	//   ]
  2545  	// }
  2546  
  2547  }
  2548  
  2549  // method id "healthcare.projects.locations.datasets.hl7V2Stores.testIamPermissions":
  2550  
  2551  type ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall struct {
  2552  	s                         *Service
  2553  	resource                  string
  2554  	testiampermissionsrequest *TestIamPermissionsRequest
  2555  	urlParams_                gensupport.URLParams
  2556  	ctx_                      context.Context
  2557  	header_                   http.Header
  2558  }
  2559  
  2560  // TestIamPermissions: Returns permissions that a caller has on the
  2561  // specified resource.
  2562  // If the resource does not exist, this will return an empty set
  2563  // of
  2564  // permissions, not a NOT_FOUND error.
  2565  //
  2566  // Note: This operation is designed to be used for building
  2567  // permission-aware
  2568  // UIs and command-line tools, not for authorization checking. This
  2569  // operation
  2570  // may "fail open" without warning.
  2571  func (r *ProjectsLocationsDatasetsHl7V2StoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall {
  2572  	c := &ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2573  	c.resource = resource
  2574  	c.testiampermissionsrequest = testiampermissionsrequest
  2575  	return c
  2576  }
  2577  
  2578  // Fields allows partial responses to be retrieved. See
  2579  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2580  // for more information.
  2581  func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall {
  2582  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2583  	return c
  2584  }
  2585  
  2586  // Context sets the context to be used in this call's Do method. Any
  2587  // pending HTTP request will be aborted if the provided context is
  2588  // canceled.
  2589  func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall {
  2590  	c.ctx_ = ctx
  2591  	return c
  2592  }
  2593  
  2594  // Header returns an http.Header that can be modified by the caller to
  2595  // add HTTP headers to the request.
  2596  func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Header() http.Header {
  2597  	if c.header_ == nil {
  2598  		c.header_ = make(http.Header)
  2599  	}
  2600  	return c.header_
  2601  }
  2602  
  2603  func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  2604  	reqHeaders := make(http.Header)
  2605  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  2606  	for k, v := range c.header_ {
  2607  		reqHeaders[k] = v
  2608  	}
  2609  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2610  	var body io.Reader = nil
  2611  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  2612  	if err != nil {
  2613  		return nil, err
  2614  	}
  2615  	reqHeaders.Set("Content-Type", "application/json")
  2616  	c.urlParams_.Set("alt", alt)
  2617  	c.urlParams_.Set("prettyPrint", "false")
  2618  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions")
  2619  	urls += "?" + c.urlParams_.Encode()
  2620  	req, err := http.NewRequest("POST", urls, body)
  2621  	if err != nil {
  2622  		return nil, err
  2623  	}
  2624  	req.Header = reqHeaders
  2625  	googleapi.Expand(req.URL, map[string]string{
  2626  		"resource": c.resource,
  2627  	})
  2628  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2629  }
  2630  
  2631  // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.testIamPermissions" call.
  2632  // Exactly one of *TestIamPermissionsResponse or error will be non-nil.
  2633  // Any non-2xx status code is an error. Response headers are in either
  2634  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response
  2635  // was returned at all) in error.(*googleapi.Error).Header. Use
  2636  // googleapi.IsNotModified to check whether the returned error was
  2637  // because http.StatusNotModified was returned.
  2638  func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  2639  	gensupport.SetOptions(c.urlParams_, opts...)
  2640  	res, err := c.doRequest("json")
  2641  	if res != nil && res.StatusCode == http.StatusNotModified {
  2642  		if res.Body != nil {
  2643  			res.Body.Close()
  2644  		}
  2645  		return nil, &googleapi.Error{
  2646  			Code:   res.StatusCode,
  2647  			Header: res.Header,
  2648  		}
  2649  	}
  2650  	if err != nil {
  2651  		return nil, err
  2652  	}
  2653  	defer googleapi.CloseBody(res)
  2654  	if err := googleapi.CheckResponse(res); err != nil {
  2655  		return nil, err
  2656  	}
  2657  	ret := &TestIamPermissionsResponse{
  2658  		ServerResponse: googleapi.ServerResponse{
  2659  			Header:         res.Header,
  2660  			HTTPStatusCode: res.StatusCode,
  2661  		},
  2662  	}
  2663  	target := &ret
  2664  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2665  		return nil, err
  2666  	}
  2667  	return ret, nil
  2668  	// {
  2669  	//   "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.",
  2670  	//   "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}:testIamPermissions",
  2671  	//   "httpMethod": "POST",
  2672  	//   "id": "healthcare.projects.locations.datasets.hl7V2Stores.testIamPermissions",
  2673  	//   "parameterOrder": [
  2674  	//     "resource"
  2675  	//   ],
  2676  	//   "parameters": {
  2677  	//     "resource": {
  2678  	//       "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
  2679  	//       "location": "path",
  2680  	//       "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$",
  2681  	//       "required": true,
  2682  	//       "type": "string"
  2683  	//     }
  2684  	//   },
  2685  	//   "path": "v1alpha/{+resource}:testIamPermissions",
  2686  	//   "request": {
  2687  	//     "$ref": "TestIamPermissionsRequest"
  2688  	//   },
  2689  	//   "response": {
  2690  	//     "$ref": "TestIamPermissionsResponse"
  2691  	//   },
  2692  	//   "scopes": [
  2693  	//     "https://www.googleapis.com/auth/cloud-platform"
  2694  	//   ]
  2695  	// }
  2696  
  2697  }
  2698  
  2699  // method id "healthcare.projects.locations.datasets.operations.get":
  2700  
  2701  type ProjectsLocationsDatasetsOperationsGetCall struct {
  2702  	s            *Service
  2703  	name         string
  2704  	urlParams_   gensupport.URLParams
  2705  	ifNoneMatch_ string
  2706  	ctx_         context.Context
  2707  	header_      http.Header
  2708  }
  2709  
  2710  // Get: Gets the latest state of a long-running operation.  Clients can
  2711  // use this
  2712  // method to poll the operation result at intervals as recommended by
  2713  // the API
  2714  // service.
  2715  func (r *ProjectsLocationsDatasetsOperationsService) Get(name string) *ProjectsLocationsDatasetsOperationsGetCall {
  2716  	c := &ProjectsLocationsDatasetsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2717  	c.name = name
  2718  	return c
  2719  }
  2720  
  2721  // Fields allows partial responses to be retrieved. See
  2722  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2723  // for more information.
  2724  func (c *ProjectsLocationsDatasetsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsGetCall {
  2725  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2726  	return c
  2727  }
  2728  
  2729  // IfNoneMatch sets the optional parameter which makes the operation
  2730  // fail if the object's ETag matches the given value. This is useful for
  2731  // getting updates only after the object has changed since the last
  2732  // request. Use googleapi.IsNotModified to check whether the response
  2733  // error from Do is the result of In-None-Match.
  2734  func (c *ProjectsLocationsDatasetsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsOperationsGetCall {
  2735  	c.ifNoneMatch_ = entityTag
  2736  	return c
  2737  }
  2738  
  2739  // Context sets the context to be used in this call's Do method. Any
  2740  // pending HTTP request will be aborted if the provided context is
  2741  // canceled.
  2742  func (c *ProjectsLocationsDatasetsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsGetCall {
  2743  	c.ctx_ = ctx
  2744  	return c
  2745  }
  2746  
  2747  // Header returns an http.Header that can be modified by the caller to
  2748  // add HTTP headers to the request.
  2749  func (c *ProjectsLocationsDatasetsOperationsGetCall) Header() http.Header {
  2750  	if c.header_ == nil {
  2751  		c.header_ = make(http.Header)
  2752  	}
  2753  	return c.header_
  2754  }
  2755  
  2756  func (c *ProjectsLocationsDatasetsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  2757  	reqHeaders := make(http.Header)
  2758  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  2759  	for k, v := range c.header_ {
  2760  		reqHeaders[k] = v
  2761  	}
  2762  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2763  	if c.ifNoneMatch_ != "" {
  2764  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2765  	}
  2766  	var body io.Reader = nil
  2767  	c.urlParams_.Set("alt", alt)
  2768  	c.urlParams_.Set("prettyPrint", "false")
  2769  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  2770  	urls += "?" + c.urlParams_.Encode()
  2771  	req, err := http.NewRequest("GET", urls, body)
  2772  	if err != nil {
  2773  		return nil, err
  2774  	}
  2775  	req.Header = reqHeaders
  2776  	googleapi.Expand(req.URL, map[string]string{
  2777  		"name": c.name,
  2778  	})
  2779  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2780  }
  2781  
  2782  // Do executes the "healthcare.projects.locations.datasets.operations.get" call.
  2783  // Exactly one of *Operation or error will be non-nil. Any non-2xx
  2784  // status code is an error. Response headers are in either
  2785  // *Operation.ServerResponse.Header or (if a response was returned at
  2786  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2787  // to check whether the returned error was because
  2788  // http.StatusNotModified was returned.
  2789  func (c *ProjectsLocationsDatasetsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2790  	gensupport.SetOptions(c.urlParams_, opts...)
  2791  	res, err := c.doRequest("json")
  2792  	if res != nil && res.StatusCode == http.StatusNotModified {
  2793  		if res.Body != nil {
  2794  			res.Body.Close()
  2795  		}
  2796  		return nil, &googleapi.Error{
  2797  			Code:   res.StatusCode,
  2798  			Header: res.Header,
  2799  		}
  2800  	}
  2801  	if err != nil {
  2802  		return nil, err
  2803  	}
  2804  	defer googleapi.CloseBody(res)
  2805  	if err := googleapi.CheckResponse(res); err != nil {
  2806  		return nil, err
  2807  	}
  2808  	ret := &Operation{
  2809  		ServerResponse: googleapi.ServerResponse{
  2810  			Header:         res.Header,
  2811  			HTTPStatusCode: res.StatusCode,
  2812  		},
  2813  	}
  2814  	target := &ret
  2815  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2816  		return nil, err
  2817  	}
  2818  	return ret, nil
  2819  	// {
  2820  	//   "description": "Gets the latest state of a long-running operation.  Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.",
  2821  	//   "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/operations/{operationsId}",
  2822  	//   "httpMethod": "GET",
  2823  	//   "id": "healthcare.projects.locations.datasets.operations.get",
  2824  	//   "parameterOrder": [
  2825  	//     "name"
  2826  	//   ],
  2827  	//   "parameters": {
  2828  	//     "name": {
  2829  	//       "description": "The name of the operation resource.",
  2830  	//       "location": "path",
  2831  	//       "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/operations/[^/]+$",
  2832  	//       "required": true,
  2833  	//       "type": "string"
  2834  	//     }
  2835  	//   },
  2836  	//   "path": "v1alpha/{+name}",
  2837  	//   "response": {
  2838  	//     "$ref": "Operation"
  2839  	//   },
  2840  	//   "scopes": [
  2841  	//     "https://www.googleapis.com/auth/cloud-platform"
  2842  	//   ]
  2843  	// }
  2844  
  2845  }
  2846  
  2847  // method id "healthcare.projects.locations.datasets.operations.list":
  2848  
  2849  type ProjectsLocationsDatasetsOperationsListCall struct {
  2850  	s            *Service
  2851  	name         string
  2852  	urlParams_   gensupport.URLParams
  2853  	ifNoneMatch_ string
  2854  	ctx_         context.Context
  2855  	header_      http.Header
  2856  }
  2857  
  2858  // List: Lists operations that match the specified filter in the
  2859  // request. If the
  2860  // server doesn't support this method, it returns
  2861  // `UNIMPLEMENTED`.
  2862  //
  2863  // NOTE: the `name` binding allows API services to override the
  2864  // binding
  2865  // to use different resource name schemes, such as `users/*/operations`.
  2866  // To
  2867  // override the binding, API services can add a binding such
  2868  // as
  2869  // "/v1/{name=users/*}/operations" to their service configuration.
  2870  // For backwards compatibility, the default name includes the
  2871  // operations
  2872  // collection id, however overriding users must ensure the name
  2873  // binding
  2874  // is the parent resource, without the operations collection id.
  2875  func (r *ProjectsLocationsDatasetsOperationsService) List(name string) *ProjectsLocationsDatasetsOperationsListCall {
  2876  	c := &ProjectsLocationsDatasetsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2877  	c.name = name
  2878  	return c
  2879  }
  2880  
  2881  // Filter sets the optional parameter "filter": The standard list
  2882  // filter.
  2883  func (c *ProjectsLocationsDatasetsOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsOperationsListCall {
  2884  	c.urlParams_.Set("filter", filter)
  2885  	return c
  2886  }
  2887  
  2888  // PageSize sets the optional parameter "pageSize": The standard list
  2889  // page size.
  2890  func (c *ProjectsLocationsDatasetsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsOperationsListCall {
  2891  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2892  	return c
  2893  }
  2894  
  2895  // PageToken sets the optional parameter "pageToken": The standard list
  2896  // page token.
  2897  func (c *ProjectsLocationsDatasetsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsOperationsListCall {
  2898  	c.urlParams_.Set("pageToken", pageToken)
  2899  	return c
  2900  }
  2901  
  2902  // Fields allows partial responses to be retrieved. See
  2903  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2904  // for more information.
  2905  func (c *ProjectsLocationsDatasetsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsListCall {
  2906  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2907  	return c
  2908  }
  2909  
  2910  // IfNoneMatch sets the optional parameter which makes the operation
  2911  // fail if the object's ETag matches the given value. This is useful for
  2912  // getting updates only after the object has changed since the last
  2913  // request. Use googleapi.IsNotModified to check whether the response
  2914  // error from Do is the result of In-None-Match.
  2915  func (c *ProjectsLocationsDatasetsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsOperationsListCall {
  2916  	c.ifNoneMatch_ = entityTag
  2917  	return c
  2918  }
  2919  
  2920  // Context sets the context to be used in this call's Do method. Any
  2921  // pending HTTP request will be aborted if the provided context is
  2922  // canceled.
  2923  func (c *ProjectsLocationsDatasetsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsListCall {
  2924  	c.ctx_ = ctx
  2925  	return c
  2926  }
  2927  
  2928  // Header returns an http.Header that can be modified by the caller to
  2929  // add HTTP headers to the request.
  2930  func (c *ProjectsLocationsDatasetsOperationsListCall) Header() http.Header {
  2931  	if c.header_ == nil {
  2932  		c.header_ = make(http.Header)
  2933  	}
  2934  	return c.header_
  2935  }
  2936  
  2937  func (c *ProjectsLocationsDatasetsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  2938  	reqHeaders := make(http.Header)
  2939  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  2940  	for k, v := range c.header_ {
  2941  		reqHeaders[k] = v
  2942  	}
  2943  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2944  	if c.ifNoneMatch_ != "" {
  2945  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2946  	}
  2947  	var body io.Reader = nil
  2948  	c.urlParams_.Set("alt", alt)
  2949  	c.urlParams_.Set("prettyPrint", "false")
  2950  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations")
  2951  	urls += "?" + c.urlParams_.Encode()
  2952  	req, err := http.NewRequest("GET", urls, body)
  2953  	if err != nil {
  2954  		return nil, err
  2955  	}
  2956  	req.Header = reqHeaders
  2957  	googleapi.Expand(req.URL, map[string]string{
  2958  		"name": c.name,
  2959  	})
  2960  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2961  }
  2962  
  2963  // Do executes the "healthcare.projects.locations.datasets.operations.list" call.
  2964  // Exactly one of *ListOperationsResponse or error will be non-nil. Any
  2965  // non-2xx status code is an error. Response headers are in either
  2966  // *ListOperationsResponse.ServerResponse.Header or (if a response was
  2967  // returned at all) in error.(*googleapi.Error).Header. Use
  2968  // googleapi.IsNotModified to check whether the returned error was
  2969  // because http.StatusNotModified was returned.
  2970  func (c *ProjectsLocationsDatasetsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  2971  	gensupport.SetOptions(c.urlParams_, opts...)
  2972  	res, err := c.doRequest("json")
  2973  	if res != nil && res.StatusCode == http.StatusNotModified {
  2974  		if res.Body != nil {
  2975  			res.Body.Close()
  2976  		}
  2977  		return nil, &googleapi.Error{
  2978  			Code:   res.StatusCode,
  2979  			Header: res.Header,
  2980  		}
  2981  	}
  2982  	if err != nil {
  2983  		return nil, err
  2984  	}
  2985  	defer googleapi.CloseBody(res)
  2986  	if err := googleapi.CheckResponse(res); err != nil {
  2987  		return nil, err
  2988  	}
  2989  	ret := &ListOperationsResponse{
  2990  		ServerResponse: googleapi.ServerResponse{
  2991  			Header:         res.Header,
  2992  			HTTPStatusCode: res.StatusCode,
  2993  		},
  2994  	}
  2995  	target := &ret
  2996  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2997  		return nil, err
  2998  	}
  2999  	return ret, nil
  3000  	// {
  3001  	//   "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.",
  3002  	//   "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/operations",
  3003  	//   "httpMethod": "GET",
  3004  	//   "id": "healthcare.projects.locations.datasets.operations.list",
  3005  	//   "parameterOrder": [
  3006  	//     "name"
  3007  	//   ],
  3008  	//   "parameters": {
  3009  	//     "filter": {
  3010  	//       "description": "The standard list filter.",
  3011  	//       "location": "query",
  3012  	//       "type": "string"
  3013  	//     },
  3014  	//     "name": {
  3015  	//       "description": "The name of the operation's parent resource.",
  3016  	//       "location": "path",
  3017  	//       "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  3018  	//       "required": true,
  3019  	//       "type": "string"
  3020  	//     },
  3021  	//     "pageSize": {
  3022  	//       "description": "The standard list page size.",
  3023  	//       "format": "int32",
  3024  	//       "location": "query",
  3025  	//       "type": "integer"
  3026  	//     },
  3027  	//     "pageToken": {
  3028  	//       "description": "The standard list page token.",
  3029  	//       "location": "query",
  3030  	//       "type": "string"
  3031  	//     }
  3032  	//   },
  3033  	//   "path": "v1alpha/{+name}/operations",
  3034  	//   "response": {
  3035  	//     "$ref": "ListOperationsResponse"
  3036  	//   },
  3037  	//   "scopes": [
  3038  	//     "https://www.googleapis.com/auth/cloud-platform"
  3039  	//   ]
  3040  	// }
  3041  
  3042  }
  3043  
  3044  // Pages invokes f for each page of results.
  3045  // A non-nil error returned from f will halt the iteration.
  3046  // The provided context supersedes any context provided to the Context method.
  3047  func (c *ProjectsLocationsDatasetsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  3048  	c.ctx_ = ctx
  3049  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  3050  	for {
  3051  		x, err := c.Do()
  3052  		if err != nil {
  3053  			return err
  3054  		}
  3055  		if err := f(x); err != nil {
  3056  			return err
  3057  		}
  3058  		if x.NextPageToken == "" {
  3059  			return nil
  3060  		}
  3061  		c.PageToken(x.NextPageToken)
  3062  	}
  3063  }
  3064  

View as plain text