You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

16127 lines
580 KiB

  1. // Copyright 2019 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. // Code generated file. DO NOT EDIT.
  5. // Package healthcare provides access to the Cloud Healthcare API.
  6. //
  7. // For product documentation, see: https://cloud.google.com/healthcare
  8. //
  9. // Creating a client
  10. //
  11. // Usage example:
  12. //
  13. // import "google.golang.org/api/healthcare/v1alpha"
  14. // ...
  15. // ctx := context.Background()
  16. // healthcareService, err := healthcare.NewService(ctx)
  17. //
  18. // In this example, Google Application Default Credentials are used for authentication.
  19. //
  20. // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
  21. //
  22. // Other authentication options
  23. //
  24. // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
  25. //
  26. // healthcareService, err := healthcare.NewService(ctx, option.WithAPIKey("AIza..."))
  27. //
  28. // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
  29. //
  30. // config := &oauth2.Config{...}
  31. // // ...
  32. // token, err := config.Exchange(ctx, ...)
  33. // healthcareService, err := healthcare.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
  34. //
  35. // See https://godoc.org/google.golang.org/api/option/ for details on options.
  36. package healthcare // import "google.golang.org/api/healthcare/v1alpha"
  37. import (
  38. "bytes"
  39. "context"
  40. "encoding/json"
  41. "errors"
  42. "fmt"
  43. "io"
  44. "net/http"
  45. "net/url"
  46. "strconv"
  47. "strings"
  48. gensupport "google.golang.org/api/gensupport"
  49. googleapi "google.golang.org/api/googleapi"
  50. option "google.golang.org/api/option"
  51. htransport "google.golang.org/api/transport/http"
  52. )
  53. // Always reference these packages, just in case the auto-generated code
  54. // below doesn't.
  55. var _ = bytes.NewBuffer
  56. var _ = strconv.Itoa
  57. var _ = fmt.Sprintf
  58. var _ = json.NewDecoder
  59. var _ = io.Copy
  60. var _ = url.Parse
  61. var _ = gensupport.MarshalJSON
  62. var _ = googleapi.Version
  63. var _ = errors.New
  64. var _ = strings.Replace
  65. var _ = context.Canceled
  66. const apiId = "healthcare:v1alpha"
  67. const apiName = "healthcare"
  68. const apiVersion = "v1alpha"
  69. const basePath = "https://healthcare.googleapis.com/"
  70. // OAuth2 scopes used by this API.
  71. const (
  72. // View and manage your data across Google Cloud Platform services
  73. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
  74. )
  75. // NewService creates a new Service.
  76. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
  77. scopesOption := option.WithScopes(
  78. "https://www.googleapis.com/auth/cloud-platform",
  79. )
  80. // NOTE: prepend, so we don't override user-specified scopes.
  81. opts = append([]option.ClientOption{scopesOption}, opts...)
  82. client, endpoint, err := htransport.NewClient(ctx, opts...)
  83. if err != nil {
  84. return nil, err
  85. }
  86. s, err := New(client)
  87. if err != nil {
  88. return nil, err
  89. }
  90. if endpoint != "" {
  91. s.BasePath = endpoint
  92. }
  93. return s, nil
  94. }
  95. // New creates a new Service. It uses the provided http.Client for requests.
  96. //
  97. // Deprecated: please use NewService instead.
  98. // To provide a custom HTTP client, use option.WithHTTPClient.
  99. // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
  100. func New(client *http.Client) (*Service, error) {
  101. if client == nil {
  102. return nil, errors.New("client is nil")
  103. }
  104. s := &Service{client: client, BasePath: basePath}
  105. s.Projects = NewProjectsService(s)
  106. return s, nil
  107. }
  108. type Service struct {
  109. client *http.Client
  110. BasePath string // API endpoint base URL
  111. UserAgent string // optional additional User-Agent fragment
  112. Projects *ProjectsService
  113. }
  114. func (s *Service) userAgent() string {
  115. if s.UserAgent == "" {
  116. return googleapi.UserAgent
  117. }
  118. return googleapi.UserAgent + " " + s.UserAgent
  119. }
  120. func NewProjectsService(s *Service) *ProjectsService {
  121. rs := &ProjectsService{s: s}
  122. rs.Locations = NewProjectsLocationsService(s)
  123. return rs
  124. }
  125. type ProjectsService struct {
  126. s *Service
  127. Locations *ProjectsLocationsService
  128. }
  129. func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
  130. rs := &ProjectsLocationsService{s: s}
  131. rs.Datasets = NewProjectsLocationsDatasetsService(s)
  132. return rs
  133. }
  134. type ProjectsLocationsService struct {
  135. s *Service
  136. Datasets *ProjectsLocationsDatasetsService
  137. }
  138. func NewProjectsLocationsDatasetsService(s *Service) *ProjectsLocationsDatasetsService {
  139. rs := &ProjectsLocationsDatasetsService{s: s}
  140. rs.AnnotationStores = NewProjectsLocationsDatasetsAnnotationStoresService(s)
  141. rs.DicomStores = NewProjectsLocationsDatasetsDicomStoresService(s)
  142. rs.FhirStores = NewProjectsLocationsDatasetsFhirStoresService(s)
  143. rs.Hl7V2Stores = NewProjectsLocationsDatasetsHl7V2StoresService(s)
  144. rs.Operations = NewProjectsLocationsDatasetsOperationsService(s)
  145. return rs
  146. }
  147. type ProjectsLocationsDatasetsService struct {
  148. s *Service
  149. AnnotationStores *ProjectsLocationsDatasetsAnnotationStoresService
  150. DicomStores *ProjectsLocationsDatasetsDicomStoresService
  151. FhirStores *ProjectsLocationsDatasetsFhirStoresService
  152. Hl7V2Stores *ProjectsLocationsDatasetsHl7V2StoresService
  153. Operations *ProjectsLocationsDatasetsOperationsService
  154. }
  155. func NewProjectsLocationsDatasetsAnnotationStoresService(s *Service) *ProjectsLocationsDatasetsAnnotationStoresService {
  156. rs := &ProjectsLocationsDatasetsAnnotationStoresService{s: s}
  157. rs.Annotations = NewProjectsLocationsDatasetsAnnotationStoresAnnotationsService(s)
  158. return rs
  159. }
  160. type ProjectsLocationsDatasetsAnnotationStoresService struct {
  161. s *Service
  162. Annotations *ProjectsLocationsDatasetsAnnotationStoresAnnotationsService
  163. }
  164. func NewProjectsLocationsDatasetsAnnotationStoresAnnotationsService(s *Service) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsService {
  165. rs := &ProjectsLocationsDatasetsAnnotationStoresAnnotationsService{s: s}
  166. return rs
  167. }
  168. type ProjectsLocationsDatasetsAnnotationStoresAnnotationsService struct {
  169. s *Service
  170. }
  171. func NewProjectsLocationsDatasetsDicomStoresService(s *Service) *ProjectsLocationsDatasetsDicomStoresService {
  172. rs := &ProjectsLocationsDatasetsDicomStoresService{s: s}
  173. rs.DicomWeb = NewProjectsLocationsDatasetsDicomStoresDicomWebService(s)
  174. return rs
  175. }
  176. type ProjectsLocationsDatasetsDicomStoresService struct {
  177. s *Service
  178. DicomWeb *ProjectsLocationsDatasetsDicomStoresDicomWebService
  179. }
  180. func NewProjectsLocationsDatasetsDicomStoresDicomWebService(s *Service) *ProjectsLocationsDatasetsDicomStoresDicomWebService {
  181. rs := &ProjectsLocationsDatasetsDicomStoresDicomWebService{s: s}
  182. return rs
  183. }
  184. type ProjectsLocationsDatasetsDicomStoresDicomWebService struct {
  185. s *Service
  186. }
  187. func NewProjectsLocationsDatasetsFhirStoresService(s *Service) *ProjectsLocationsDatasetsFhirStoresService {
  188. rs := &ProjectsLocationsDatasetsFhirStoresService{s: s}
  189. rs.Resources = NewProjectsLocationsDatasetsFhirStoresResourcesService(s)
  190. rs.SecurityLabels = NewProjectsLocationsDatasetsFhirStoresSecurityLabelsService(s)
  191. return rs
  192. }
  193. type ProjectsLocationsDatasetsFhirStoresService struct {
  194. s *Service
  195. Resources *ProjectsLocationsDatasetsFhirStoresResourcesService
  196. SecurityLabels *ProjectsLocationsDatasetsFhirStoresSecurityLabelsService
  197. }
  198. func NewProjectsLocationsDatasetsFhirStoresResourcesService(s *Service) *ProjectsLocationsDatasetsFhirStoresResourcesService {
  199. rs := &ProjectsLocationsDatasetsFhirStoresResourcesService{s: s}
  200. rs.Patient = NewProjectsLocationsDatasetsFhirStoresResourcesPatientService(s)
  201. rs.History = NewProjectsLocationsDatasetsFhirStoresResourcesHistoryService(s)
  202. return rs
  203. }
  204. type ProjectsLocationsDatasetsFhirStoresResourcesService struct {
  205. s *Service
  206. Patient *ProjectsLocationsDatasetsFhirStoresResourcesPatientService
  207. History *ProjectsLocationsDatasetsFhirStoresResourcesHistoryService
  208. }
  209. func NewProjectsLocationsDatasetsFhirStoresResourcesPatientService(s *Service) *ProjectsLocationsDatasetsFhirStoresResourcesPatientService {
  210. rs := &ProjectsLocationsDatasetsFhirStoresResourcesPatientService{s: s}
  211. return rs
  212. }
  213. type ProjectsLocationsDatasetsFhirStoresResourcesPatientService struct {
  214. s *Service
  215. }
  216. func NewProjectsLocationsDatasetsFhirStoresResourcesHistoryService(s *Service) *ProjectsLocationsDatasetsFhirStoresResourcesHistoryService {
  217. rs := &ProjectsLocationsDatasetsFhirStoresResourcesHistoryService{s: s}
  218. return rs
  219. }
  220. type ProjectsLocationsDatasetsFhirStoresResourcesHistoryService struct {
  221. s *Service
  222. }
  223. func NewProjectsLocationsDatasetsFhirStoresSecurityLabelsService(s *Service) *ProjectsLocationsDatasetsFhirStoresSecurityLabelsService {
  224. rs := &ProjectsLocationsDatasetsFhirStoresSecurityLabelsService{s: s}
  225. return rs
  226. }
  227. type ProjectsLocationsDatasetsFhirStoresSecurityLabelsService struct {
  228. s *Service
  229. }
  230. func NewProjectsLocationsDatasetsHl7V2StoresService(s *Service) *ProjectsLocationsDatasetsHl7V2StoresService {
  231. rs := &ProjectsLocationsDatasetsHl7V2StoresService{s: s}
  232. rs.Messages = NewProjectsLocationsDatasetsHl7V2StoresMessagesService(s)
  233. return rs
  234. }
  235. type ProjectsLocationsDatasetsHl7V2StoresService struct {
  236. s *Service
  237. Messages *ProjectsLocationsDatasetsHl7V2StoresMessagesService
  238. }
  239. func NewProjectsLocationsDatasetsHl7V2StoresMessagesService(s *Service) *ProjectsLocationsDatasetsHl7V2StoresMessagesService {
  240. rs := &ProjectsLocationsDatasetsHl7V2StoresMessagesService{s: s}
  241. return rs
  242. }
  243. type ProjectsLocationsDatasetsHl7V2StoresMessagesService struct {
  244. s *Service
  245. }
  246. func NewProjectsLocationsDatasetsOperationsService(s *Service) *ProjectsLocationsDatasetsOperationsService {
  247. rs := &ProjectsLocationsDatasetsOperationsService{s: s}
  248. return rs
  249. }
  250. type ProjectsLocationsDatasetsOperationsService struct {
  251. s *Service
  252. }
  253. // Annotation: An annotation record.
  254. type Annotation struct {
  255. // AnnotationSource: Details of the source.
  256. AnnotationSource *AnnotationSource `json:"annotationSource,omitempty"`
  257. // ImageAnnotation: Annnotations for images, e.g., bounding polygons.
  258. ImageAnnotation *ImageAnnotation `json:"imageAnnotation,omitempty"`
  259. // Name: Output only. Resource name of the Annotation, of the
  260. // form
  261. // `projects/{project_id}/locations/{location_id}/datasets/{dataset_
  262. // id}/annotationStores/{annotation_store_id}/annotations/{annotation_id}
  263. // `.
  264. Name string `json:"name,omitempty"`
  265. // ResourceAnnotation: Annotations for resource, e.g., classification
  266. // tags.
  267. ResourceAnnotation *ResourceAnnotation `json:"resourceAnnotation,omitempty"`
  268. // TextAnnotation: Annotations for sentitive texts, e.g., range of such
  269. // texts.
  270. TextAnnotation *SensitiveTextAnnotation `json:"textAnnotation,omitempty"`
  271. // ServerResponse contains the HTTP response code and headers from the
  272. // server.
  273. googleapi.ServerResponse `json:"-"`
  274. // ForceSendFields is a list of field names (e.g. "AnnotationSource") to
  275. // unconditionally include in API requests. By default, fields with
  276. // empty values are omitted from API requests. However, any non-pointer,
  277. // non-interface field appearing in ForceSendFields will be sent to the
  278. // server regardless of whether the field is empty or not. This may be
  279. // used to include empty fields in Patch requests.
  280. ForceSendFields []string `json:"-"`
  281. // NullFields is a list of field names (e.g. "AnnotationSource") to
  282. // include in API requests with the JSON null value. By default, fields
  283. // with empty values are omitted from API requests. However, any field
  284. // with an empty value appearing in NullFields will be sent to the
  285. // server as null. It is an error if a field in this list has a
  286. // non-empty value. This may be used to include null fields in Patch
  287. // requests.
  288. NullFields []string `json:"-"`
  289. }
  290. func (s *Annotation) MarshalJSON() ([]byte, error) {
  291. type NoMethod Annotation
  292. raw := NoMethod(*s)
  293. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  294. }
  295. // AnnotationSource: AnnotationSource holds the source information of
  296. // the annotation.
  297. type AnnotationSource struct {
  298. // CloudHealthcareSource: Cloud Healthcare API resource.
  299. CloudHealthcareSource *CloudHealthcareSource `json:"cloudHealthcareSource,omitempty"`
  300. // ForceSendFields is a list of field names (e.g.
  301. // "CloudHealthcareSource") to unconditionally include in API requests.
  302. // By default, fields with empty values are omitted from API requests.
  303. // However, any non-pointer, non-interface field appearing in
  304. // ForceSendFields will be sent to the server regardless of whether the
  305. // field is empty or not. This may be used to include empty fields in
  306. // Patch requests.
  307. ForceSendFields []string `json:"-"`
  308. // NullFields is a list of field names (e.g. "CloudHealthcareSource") to
  309. // include in API requests with the JSON null value. By default, fields
  310. // with empty values are omitted from API requests. However, any field
  311. // with an empty value appearing in NullFields will be sent to the
  312. // server as null. It is an error if a field in this list has a
  313. // non-empty value. This may be used to include null fields in Patch
  314. // requests.
  315. NullFields []string `json:"-"`
  316. }
  317. func (s *AnnotationSource) MarshalJSON() ([]byte, error) {
  318. type NoMethod AnnotationSource
  319. raw := NoMethod(*s)
  320. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  321. }
  322. // AnnotationStore: An Annotation store that can store annotation
  323. // resources such as
  324. // labels and tags for text, image and audio.
  325. type AnnotationStore struct {
  326. // Labels: User-supplied key-value pairs used to organize Annotation
  327. // stores.
  328. //
  329. // Label keys must be between 1 and 63 characters long, have a UTF-8
  330. // encoding
  331. // of maximum 128 bytes, and must conform to the
  332. // following PCRE regular expression:
  333. // \p{Ll}\p{Lo}{0,62}
  334. //
  335. // Label values are optional, must be between 1 and 63 characters long,
  336. // have
  337. // a UTF-8 encoding of maximum 128 bytes, and must conform to
  338. // the
  339. // following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
  340. //
  341. // No more than 64 labels can be associated with a given store.
  342. Labels map[string]string `json:"labels,omitempty"`
  343. // Name: Output only. Resource name of the Annotation store, of the
  344. // form
  345. // `projects/{project_id}/locations/{location_id}/datasets/{dataset_
  346. // id}/annotationStores/{annotation_store_id}`.
  347. Name string `json:"name,omitempty"`
  348. // ServerResponse contains the HTTP response code and headers from the
  349. // server.
  350. googleapi.ServerResponse `json:"-"`
  351. // ForceSendFields is a list of field names (e.g. "Labels") to
  352. // unconditionally include in API requests. By default, fields with
  353. // empty values are omitted from API requests. However, any non-pointer,
  354. // non-interface field appearing in ForceSendFields will be sent to the
  355. // server regardless of whether the field is empty or not. This may be
  356. // used to include empty fields in Patch requests.
  357. ForceSendFields []string `json:"-"`
  358. // NullFields is a list of field names (e.g. "Labels") to include in API
  359. // requests with the JSON null value. By default, fields with empty
  360. // values are omitted from API requests. However, any field with an
  361. // empty value appearing in NullFields will be sent to the server as
  362. // null. It is an error if a field in this list has a non-empty value.
  363. // This may be used to include null fields in Patch requests.
  364. NullFields []string `json:"-"`
  365. }
  366. func (s *AnnotationStore) MarshalJSON() ([]byte, error) {
  367. type NoMethod AnnotationStore
  368. raw := NoMethod(*s)
  369. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  370. }
  371. // AuditConfig: Specifies the audit configuration for a service.
  372. // The configuration determines which permission types are logged, and
  373. // what
  374. // identities, if any, are exempted from logging.
  375. // An AuditConfig must have one or more AuditLogConfigs.
  376. //
  377. // If there are AuditConfigs for both `allServices` and a specific
  378. // service,
  379. // the union of the two AuditConfigs is used for that service: the
  380. // log_types
  381. // specified in each AuditConfig are enabled, and the exempted_members
  382. // in each
  383. // AuditLogConfig are exempted.
  384. //
  385. // Example Policy with multiple AuditConfigs:
  386. //
  387. // {
  388. // "audit_configs": [
  389. // {
  390. // "service": "allServices"
  391. // "audit_log_configs": [
  392. // {
  393. // "log_type": "DATA_READ",
  394. // "exempted_members": [
  395. // "user:foo@gmail.com"
  396. // ]
  397. // },
  398. // {
  399. // "log_type": "DATA_WRITE",
  400. // },
  401. // {
  402. // "log_type": "ADMIN_READ",
  403. // }
  404. // ]
  405. // },
  406. // {
  407. // "service": "fooservice.googleapis.com"
  408. // "audit_log_configs": [
  409. // {
  410. // "log_type": "DATA_READ",
  411. // },
  412. // {
  413. // "log_type": "DATA_WRITE",
  414. // "exempted_members": [
  415. // "user:bar@gmail.com"
  416. // ]
  417. // }
  418. // ]
  419. // }
  420. // ]
  421. // }
  422. //
  423. // For fooservice, this policy enables DATA_READ, DATA_WRITE and
  424. // ADMIN_READ
  425. // logging. It also exempts foo@gmail.com from DATA_READ logging,
  426. // and
  427. // bar@gmail.com from DATA_WRITE logging.
  428. type AuditConfig struct {
  429. // AuditLogConfigs: The configuration for logging of each type of
  430. // permission.
  431. AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
  432. // Service: Specifies a service that will be enabled for audit
  433. // logging.
  434. // For example, `storage.googleapis.com`,
  435. // `cloudsql.googleapis.com`.
  436. // `allServices` is a special value that covers all services.
  437. Service string `json:"service,omitempty"`
  438. // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
  439. // unconditionally include in API requests. By default, fields with
  440. // empty values are omitted from API requests. However, any non-pointer,
  441. // non-interface field appearing in ForceSendFields will be sent to the
  442. // server regardless of whether the field is empty or not. This may be
  443. // used to include empty fields in Patch requests.
  444. ForceSendFields []string `json:"-"`
  445. // NullFields is a list of field names (e.g. "AuditLogConfigs") to
  446. // include in API requests with the JSON null value. By default, fields
  447. // with empty values are omitted from API requests. However, any field
  448. // with an empty value appearing in NullFields will be sent to the
  449. // server as null. It is an error if a field in this list has a
  450. // non-empty value. This may be used to include null fields in Patch
  451. // requests.
  452. NullFields []string `json:"-"`
  453. }
  454. func (s *AuditConfig) MarshalJSON() ([]byte, error) {
  455. type NoMethod AuditConfig
  456. raw := NoMethod(*s)
  457. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  458. }
  459. // AuditLogConfig: Provides the configuration for logging a type of
  460. // permissions.
  461. // Example:
  462. //
  463. // {
  464. // "audit_log_configs": [
  465. // {
  466. // "log_type": "DATA_READ",
  467. // "exempted_members": [
  468. // "user:foo@gmail.com"
  469. // ]
  470. // },
  471. // {
  472. // "log_type": "DATA_WRITE",
  473. // }
  474. // ]
  475. // }
  476. //
  477. // This enables 'DATA_READ' and 'DATA_WRITE' logging, while
  478. // exempting
  479. // foo@gmail.com from DATA_READ logging.
  480. type AuditLogConfig struct {
  481. // ExemptedMembers: Specifies the identities that do not cause logging
  482. // for this type of
  483. // permission.
  484. // Follows the same format of Binding.members.
  485. ExemptedMembers []string `json:"exemptedMembers,omitempty"`
  486. // LogType: The log type that this config enables.
  487. //
  488. // Possible values:
  489. // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
  490. // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
  491. // "DATA_WRITE" - Data writes. Example: CloudSQL Users create
  492. // "DATA_READ" - Data reads. Example: CloudSQL Users list
  493. LogType string `json:"logType,omitempty"`
  494. // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
  495. // unconditionally include in API requests. By default, fields with
  496. // empty values are omitted from API requests. However, any non-pointer,
  497. // non-interface field appearing in ForceSendFields will be sent to the
  498. // server regardless of whether the field is empty or not. This may be
  499. // used to include empty fields in Patch requests.
  500. ForceSendFields []string `json:"-"`
  501. // NullFields is a list of field names (e.g. "ExemptedMembers") to
  502. // include in API requests with the JSON null value. By default, fields
  503. // with empty values are omitted from API requests. However, any field
  504. // with an empty value appearing in NullFields will be sent to the
  505. // server as null. It is an error if a field in this list has a
  506. // non-empty value. This may be used to include null fields in Patch
  507. // requests.
  508. NullFields []string `json:"-"`
  509. }
  510. func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
  511. type NoMethod AuditLogConfig
  512. raw := NoMethod(*s)
  513. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  514. }
  515. // BigQueryDestination: The BigQuery table to which the output should be
  516. // written.
  517. type BigQueryDestination struct {
  518. // Dataset: Required. The BigQuery dataset to which the DICOM store
  519. // should be exported.
  520. // If this dataset does not exist, the export call returns an error.
  521. Dataset string `json:"dataset,omitempty"`
  522. // OverwriteTable: If the destination table already exists and this flag
  523. // is `TRUE`, the table
  524. // will be overwritten by the contents of the DICOM store. If the flag
  525. // is not
  526. // set and the destination table already exists, the export call returns
  527. // an
  528. // error.
  529. OverwriteTable bool `json:"overwriteTable,omitempty"`
  530. // Table: Required. The BigQuery table to which the DICOM store should
  531. // be written. If
  532. // this table does not exist, a new table with the given name will be
  533. // created.
  534. Table string `json:"table,omitempty"`
  535. // ForceSendFields is a list of field names (e.g. "Dataset") to
  536. // unconditionally include in API requests. By default, fields with
  537. // empty values are omitted from API requests. However, any non-pointer,
  538. // non-interface field appearing in ForceSendFields will be sent to the
  539. // server regardless of whether the field is empty or not. This may be
  540. // used to include empty fields in Patch requests.
  541. ForceSendFields []string `json:"-"`
  542. // NullFields is a list of field names (e.g. "Dataset") to include in
  543. // API requests with the JSON null value. By default, fields with empty
  544. // values are omitted from API requests. However, any field with an
  545. // empty value appearing in NullFields will be sent to the server as
  546. // null. It is an error if a field in this list has a non-empty value.
  547. // This may be used to include null fields in Patch requests.
  548. NullFields []string `json:"-"`
  549. }
  550. func (s *BigQueryDestination) MarshalJSON() ([]byte, error) {
  551. type NoMethod BigQueryDestination
  552. raw := NoMethod(*s)
  553. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  554. }
  555. // BigQueryLocation: BigQuery dataset location.
  556. type BigQueryLocation struct {
  557. // DatasetId: ID of the dataset that houses the BigQuery tables.
  558. DatasetId string `json:"datasetId,omitempty"`
  559. // ProjectId: ID of the project that owns the BigQuery datasets.
  560. ProjectId string `json:"projectId,omitempty"`
  561. // SchemaConfig: The configuration for the exported BigQuery schema.
  562. SchemaConfig *SchemaConfig `json:"schemaConfig,omitempty"`
  563. // ForceSendFields is a list of field names (e.g. "DatasetId") to
  564. // unconditionally include in API requests. By default, fields with
  565. // empty values are omitted from API requests. However, any non-pointer,
  566. // non-interface field appearing in ForceSendFields will be sent to the
  567. // server regardless of whether the field is empty or not. This may be
  568. // used to include empty fields in Patch requests.
  569. ForceSendFields []string `json:"-"`
  570. // NullFields is a list of field names (e.g. "DatasetId") to include in
  571. // API requests with the JSON null value. By default, fields with empty
  572. // values are omitted from API requests. However, any field with an
  573. // empty value appearing in NullFields will be sent to the server as
  574. // null. It is an error if a field in this list has a non-empty value.
  575. // This may be used to include null fields in Patch requests.
  576. NullFields []string `json:"-"`
  577. }
  578. func (s *BigQueryLocation) MarshalJSON() ([]byte, error) {
  579. type NoMethod BigQueryLocation
  580. raw := NoMethod(*s)
  581. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  582. }
  583. // Binding: Associates `members` with a `role`.
  584. type Binding struct {
  585. // Condition: Unimplemented. The condition that is associated with this
  586. // binding.
  587. // NOTE: an unsatisfied condition will not allow user access via
  588. // current
  589. // binding. Different bindings, including their conditions, are
  590. // examined
  591. // independently.
  592. Condition *Expr `json:"condition,omitempty"`
  593. // Members: Specifies the identities requesting access for a Cloud
  594. // Platform resource.
  595. // `members` can have the following values:
  596. //
  597. // * `allUsers`: A special identifier that represents anyone who is
  598. // on the internet; with or without a Google account.
  599. //
  600. // * `allAuthenticatedUsers`: A special identifier that represents
  601. // anyone
  602. // who is authenticated with a Google account or a service
  603. // account.
  604. //
  605. // * `user:{emailid}`: An email address that represents a specific
  606. // Google
  607. // account. For example, `alice@gmail.com` .
  608. //
  609. //
  610. // * `serviceAccount:{emailid}`: An email address that represents a
  611. // service
  612. // account. For example,
  613. // `my-other-app@appspot.gserviceaccount.com`.
  614. //
  615. // * `group:{emailid}`: An email address that represents a Google
  616. // group.
  617. // For example, `admins@example.com`.
  618. //
  619. //
  620. // * `domain:{domain}`: The G Suite domain (primary) that represents all
  621. // the
  622. // users of that domain. For example, `google.com` or
  623. // `example.com`.
  624. //
  625. //
  626. Members []string `json:"members,omitempty"`
  627. // Role: Role that is assigned to `members`.
  628. // For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
  629. Role string `json:"role,omitempty"`
  630. // ForceSendFields is a list of field names (e.g. "Condition") to
  631. // unconditionally include in API requests. By default, fields with
  632. // empty values are omitted from API requests. However, any non-pointer,
  633. // non-interface field appearing in ForceSendFields will be sent to the
  634. // server regardless of whether the field is empty or not. This may be
  635. // used to include empty fields in Patch requests.
  636. ForceSendFields []string `json:"-"`
  637. // NullFields is a list of field names (e.g. "Condition") to include in
  638. // API requests with the JSON null value. By default, fields with empty
  639. // values are omitted from API requests. However, any field with an
  640. // empty value appearing in NullFields will be sent to the server as
  641. // null. It is an error if a field in this list has a non-empty value.
  642. // This may be used to include null fields in Patch requests.
  643. NullFields []string `json:"-"`
  644. }
  645. func (s *Binding) MarshalJSON() ([]byte, error) {
  646. type NoMethod Binding
  647. raw := NoMethod(*s)
  648. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  649. }
  650. // BoundingPoly: A bounding polygon for the detected image annotation.
  651. type BoundingPoly struct {
  652. Label string `json:"label,omitempty"`
  653. Vertices []*Vertex `json:"vertices,omitempty"`
  654. // ForceSendFields is a list of field names (e.g. "Label") to
  655. // unconditionally include in API requests. By default, fields with
  656. // empty values are omitted from API requests. However, any non-pointer,
  657. // non-interface field appearing in ForceSendFields will be sent to the
  658. // server regardless of whether the field is empty or not. This may be
  659. // used to include empty fields in Patch requests.
  660. ForceSendFields []string `json:"-"`
  661. // NullFields is a list of field names (e.g. "Label") to include in API
  662. // requests with the JSON null value. By default, fields with empty
  663. // values are omitted from API requests. However, any field with an
  664. // empty value appearing in NullFields will be sent to the server as
  665. // null. It is an error if a field in this list has a non-empty value.
  666. // This may be used to include null fields in Patch requests.
  667. NullFields []string `json:"-"`
  668. }
  669. func (s *BoundingPoly) MarshalJSON() ([]byte, error) {
  670. type NoMethod BoundingPoly
  671. raw := NoMethod(*s)
  672. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  673. }
  674. // CloudHealthcareSource: Cloud Healthcare API resource.
  675. type CloudHealthcareSource struct {
  676. // Name: Full path of a Cloud Healthcare API resource.
  677. Name string `json:"name,omitempty"`
  678. // ForceSendFields is a list of field names (e.g. "Name") to
  679. // unconditionally include in API requests. By default, fields with
  680. // empty values are omitted from API requests. However, any non-pointer,
  681. // non-interface field appearing in ForceSendFields will be sent to the
  682. // server regardless of whether the field is empty or not. This may be
  683. // used to include empty fields in Patch requests.
  684. ForceSendFields []string `json:"-"`
  685. // NullFields is a list of field names (e.g. "Name") to include in API
  686. // requests with the JSON null value. By default, fields with empty
  687. // values are omitted from API requests. However, any field with an
  688. // empty value appearing in NullFields will be sent to the server as
  689. // null. It is an error if a field in this list has a non-empty value.
  690. // This may be used to include null fields in Patch requests.
  691. NullFields []string `json:"-"`
  692. }
  693. func (s *CloudHealthcareSource) MarshalJSON() ([]byte, error) {
  694. type NoMethod CloudHealthcareSource
  695. raw := NoMethod(*s)
  696. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  697. }
  698. // CreateMessageRequest: Creates a new message.
  699. type CreateMessageRequest struct {
  700. // Message: HL7v2 message.
  701. Message *Message `json:"message,omitempty"`
  702. // ForceSendFields is a list of field names (e.g. "Message") to
  703. // unconditionally include in API requests. By default, fields with
  704. // empty values are omitted from API requests. However, any non-pointer,
  705. // non-interface field appearing in ForceSendFields will be sent to the
  706. // server regardless of whether the field is empty or not. This may be
  707. // used to include empty fields in Patch requests.
  708. ForceSendFields []string `json:"-"`
  709. // NullFields is a list of field names (e.g. "Message") to include in
  710. // API requests with the JSON null value. By default, fields with empty
  711. // values are omitted from API requests. However, any field with an
  712. // empty value appearing in NullFields will be sent to the server as
  713. // null. It is an error if a field in this list has a non-empty value.
  714. // This may be used to include null fields in Patch requests.
  715. NullFields []string `json:"-"`
  716. }
  717. func (s *CreateMessageRequest) MarshalJSON() ([]byte, error) {
  718. type NoMethod CreateMessageRequest
  719. raw := NoMethod(*s)
  720. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  721. }
  722. // Dataset: A message representing a health dataset.
  723. //
  724. // A health dataset represents a collection of healthcare data
  725. // pertaining to one
  726. // or more patients. This may include multiple modalities of healthcare
  727. // data,
  728. // such as electronic medical records or medical imaging data.
  729. type Dataset struct {
  730. // Name: Output only. Resource name of the dataset, of the
  731. // form
  732. // `projects/{project_id}/locations/{location_id}/datasets/{dataset_
  733. // id}`.
  734. Name string `json:"name,omitempty"`
  735. // TimeZone: The default timezone used by this dataset. Must be a either
  736. // a valid IANA
  737. // time zone name such as "America/New_York" or empty, which defaults to
  738. // UTC.
  739. // This is used for parsing times in resources (e.g., HL7 messages)
  740. // where no
  741. // explicit timezone is specified.
  742. TimeZone string `json:"timeZone,omitempty"`
  743. // ServerResponse contains the HTTP response code and headers from the
  744. // server.
  745. googleapi.ServerResponse `json:"-"`
  746. // ForceSendFields is a list of field names (e.g. "Name") to
  747. // unconditionally include in API requests. By default, fields with
  748. // empty values are omitted from API requests. However, any non-pointer,
  749. // non-interface field appearing in ForceSendFields will be sent to the
  750. // server regardless of whether the field is empty or not. This may be
  751. // used to include empty fields in Patch requests.
  752. ForceSendFields []string `json:"-"`
  753. // NullFields is a list of field names (e.g. "Name") to include in API
  754. // requests with the JSON null value. By default, fields with empty
  755. // values are omitted from API requests. However, any field with an
  756. // empty value appearing in NullFields will be sent to the server as
  757. // null. It is an error if a field in this list has a non-empty value.
  758. // This may be used to include null fields in Patch requests.
  759. NullFields []string `json:"-"`
  760. }
  761. func (s *Dataset) MarshalJSON() ([]byte, error) {
  762. type NoMethod Dataset
  763. raw := NoMethod(*s)
  764. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  765. }
  766. // DeidentifyConfig: Configures de-id options specific to different
  767. // types of content.
  768. // Each submessage customizes the handling of
  769. // an
  770. // https://tools.ietf.org/html/rfc6838 media type or subtype. Configs
  771. // are
  772. // applied in a nested manner at runtime.
  773. type DeidentifyConfig struct {
  774. // Dicom: Configures de-id of application/DICOM content.
  775. Dicom *DicomConfig `json:"dicom,omitempty"`
  776. // Fhir: Configures de-id of application/FHIR content.
  777. Fhir *FhirConfig `json:"fhir,omitempty"`
  778. // Image: Configures de-identification of image pixels wherever they are
  779. // found in the
  780. // source_dataset.
  781. Image *ImageConfig `json:"image,omitempty"`
  782. // ForceSendFields is a list of field names (e.g. "Dicom") to
  783. // unconditionally include in API requests. By default, fields with
  784. // empty values are omitted from API requests. However, any non-pointer,
  785. // non-interface field appearing in ForceSendFields will be sent to the
  786. // server regardless of whether the field is empty or not. This may be
  787. // used to include empty fields in Patch requests.
  788. ForceSendFields []string `json:"-"`
  789. // NullFields is a list of field names (e.g. "Dicom") to include in API
  790. // requests with the JSON null value. By default, fields with empty
  791. // values are omitted from API requests. However, any field with an
  792. // empty value appearing in NullFields will be sent to the server as
  793. // null. It is an error if a field in this list has a non-empty value.
  794. // This may be used to include null fields in Patch requests.
  795. NullFields []string `json:"-"`
  796. }
  797. func (s *DeidentifyConfig) MarshalJSON() ([]byte, error) {
  798. type NoMethod DeidentifyConfig
  799. raw := NoMethod(*s)
  800. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  801. }
  802. // DeidentifyDatasetRequest: Redacts identifying information from the
  803. // specified dataset.
  804. type DeidentifyDatasetRequest struct {
  805. // Config: Deidentify configuration
  806. Config *DeidentifyConfig `json:"config,omitempty"`
  807. // DestinationDataset: The name of the dataset resource to which the
  808. // redacted data should be
  809. // written
  810. // (e.g.,
  811. // `projects/{project_id}/locations/{location_id}/datasets/{datase
  812. // t_id}`).
  813. // The new dataset must not exist, or the request will fail.
  814. DestinationDataset string `json:"destinationDataset,omitempty"`
  815. // ForceSendFields is a list of field names (e.g. "Config") to
  816. // unconditionally include in API requests. By default, fields with
  817. // empty values are omitted from API requests. However, any non-pointer,
  818. // non-interface field appearing in ForceSendFields will be sent to the
  819. // server regardless of whether the field is empty or not. This may be
  820. // used to include empty fields in Patch requests.
  821. ForceSendFields []string `json:"-"`
  822. // NullFields is a list of field names (e.g. "Config") to include in API
  823. // requests with the JSON null value. By default, fields with empty
  824. // values are omitted from API requests. However, any field with an
  825. // empty value appearing in NullFields will be sent to the server as
  826. // null. It is an error if a field in this list has a non-empty value.
  827. // This may be used to include null fields in Patch requests.
  828. NullFields []string `json:"-"`
  829. }
  830. func (s *DeidentifyDatasetRequest) MarshalJSON() ([]byte, error) {
  831. type NoMethod DeidentifyDatasetRequest
  832. raw := NoMethod(*s)
  833. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  834. }
  835. // Detail: Contains multiple sensitive information findings for each
  836. // resource slice.
  837. type Detail struct {
  838. Findings []*Finding `json:"findings,omitempty"`
  839. // ForceSendFields is a list of field names (e.g. "Findings") to
  840. // unconditionally include in API requests. By default, fields with
  841. // empty values are omitted from API requests. However, any non-pointer,
  842. // non-interface field appearing in ForceSendFields will be sent to the
  843. // server regardless of whether the field is empty or not. This may be
  844. // used to include empty fields in Patch requests.
  845. ForceSendFields []string `json:"-"`
  846. // NullFields is a list of field names (e.g. "Findings") to include in
  847. // API requests with the JSON null value. By default, fields with empty
  848. // values are omitted from API requests. However, any field with an
  849. // empty value appearing in NullFields will be sent to the server as
  850. // null. It is an error if a field in this list has a non-empty value.
  851. // This may be used to include null fields in Patch requests.
  852. NullFields []string `json:"-"`
  853. }
  854. func (s *Detail) MarshalJSON() ([]byte, error) {
  855. type NoMethod Detail
  856. raw := NoMethod(*s)
  857. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  858. }
  859. // DicomConfig: Specifies the parameters needed for de-identification of
  860. // DICOM stores.
  861. type DicomConfig struct {
  862. // WhitelistTags: Tags to be whitelisted, for example "PatientID",
  863. // "0010,0010". Any tag
  864. // that is whitelisted will copied as is. All other tags will be
  865. // omitted.
  866. WhitelistTags []string `json:"whitelistTags,omitempty"`
  867. // ForceSendFields is a list of field names (e.g. "WhitelistTags") to
  868. // unconditionally include in API requests. By default, fields with
  869. // empty values are omitted from API requests. However, any non-pointer,
  870. // non-interface field appearing in ForceSendFields will be sent to the
  871. // server regardless of whether the field is empty or not. This may be
  872. // used to include empty fields in Patch requests.
  873. ForceSendFields []string `json:"-"`
  874. // NullFields is a list of field names (e.g. "WhitelistTags") to include
  875. // in API requests with the JSON null value. By default, fields with
  876. // empty values are omitted from API requests. However, any field with
  877. // an empty value appearing in NullFields will be sent to the server as
  878. // null. It is an error if a field in this list has a non-empty value.
  879. // This may be used to include null fields in Patch requests.
  880. NullFields []string `json:"-"`
  881. }
  882. func (s *DicomConfig) MarshalJSON() ([]byte, error) {
  883. type NoMethod DicomConfig
  884. raw := NoMethod(*s)
  885. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  886. }
  887. // DicomStore: Represents a DICOM store.
  888. type DicomStore struct {
  889. // Name: Output only. Resource name of the DICOM store, of the
  890. // form
  891. // `projects/{project_id}/locations/{location_id}/datasets/{dataset_
  892. // id}/dicomStores/{dicom_store_id}`.
  893. Name string `json:"name,omitempty"`
  894. // NotificationConfig: Notification destination for new DICOM
  895. // instances.
  896. // Supplied by the client.
  897. NotificationConfig *NotificationConfig `json:"notificationConfig,omitempty"`
  898. // ServerResponse contains the HTTP response code and headers from the
  899. // server.
  900. googleapi.ServerResponse `json:"-"`
  901. // ForceSendFields is a list of field names (e.g. "Name") to
  902. // unconditionally include in API requests. By default, fields with
  903. // empty values are omitted from API requests. However, any non-pointer,
  904. // non-interface field appearing in ForceSendFields will be sent to the
  905. // server regardless of whether the field is empty or not. This may be
  906. // used to include empty fields in Patch requests.
  907. ForceSendFields []string `json:"-"`
  908. // NullFields is a list of field names (e.g. "Name") to include in API
  909. // requests with the JSON null value. By default, fields with empty
  910. // values are omitted from API requests. However, any field with an
  911. // empty value appearing in NullFields will be sent to the server as
  912. // null. It is an error if a field in this list has a non-empty value.
  913. // This may be used to include null fields in Patch requests.
  914. NullFields []string `json:"-"`
  915. }
  916. func (s *DicomStore) MarshalJSON() ([]byte, error) {
  917. type NoMethod DicomStore
  918. raw := NoMethod(*s)
  919. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  920. }
  921. // Empty: A generic empty message that you can re-use to avoid defining
  922. // duplicated
  923. // empty messages in your APIs. A typical example is to use it as the
  924. // request
  925. // or the response type of an API method. For instance:
  926. //
  927. // service Foo {
  928. // rpc Bar(google.protobuf.Empty) returns
  929. // (google.protobuf.Empty);
  930. // }
  931. //
  932. // The JSON representation for `Empty` is empty JSON object `{}`.
  933. type Empty struct {
  934. // ServerResponse contains the HTTP response code and headers from the
  935. // server.
  936. googleapi.ServerResponse `json:"-"`
  937. }
  938. // ExportDicomDataRequest: Exports data from the specified DICOM
  939. // store.
  940. // If a given resource (e.g., a DICOM object with the same SOPInstance
  941. // UID)
  942. // already exists in the output, it is overwritten with the version
  943. // in the source dataset.
  944. // Exported DICOM data will persist when the DICOM store from which it
  945. // was
  946. // exported is deleted.
  947. type ExportDicomDataRequest struct {
  948. // OutputConfig: Specifies where the exported data should be placed.
  949. OutputConfig *OutputConfig `json:"outputConfig,omitempty"`
  950. // ForceSendFields is a list of field names (e.g. "OutputConfig") to
  951. // unconditionally include in API requests. By default, fields with
  952. // empty values are omitted from API requests. However, any non-pointer,
  953. // non-interface field appearing in ForceSendFields will be sent to the
  954. // server regardless of whether the field is empty or not. This may be
  955. // used to include empty fields in Patch requests.
  956. ForceSendFields []string `json:"-"`
  957. // NullFields is a list of field names (e.g. "OutputConfig") to include
  958. // in API requests with the JSON null value. By default, fields with
  959. // empty values are omitted from API requests. However, any field with
  960. // an empty value appearing in NullFields will be sent to the server as
  961. // null. It is an error if a field in this list has a non-empty value.
  962. // This may be used to include null fields in Patch requests.
  963. NullFields []string `json:"-"`
  964. }
  965. func (s *ExportDicomDataRequest) MarshalJSON() ([]byte, error) {
  966. type NoMethod ExportDicomDataRequest
  967. raw := NoMethod(*s)
  968. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  969. }
  970. // ExportResourcesRequest: Request to export resources.
  971. type ExportResourcesRequest struct {
  972. // BigqueryDestinationLocation: The BigQuery destination location.
  973. // The output will be one BigQuery table per resource type.
  974. BigqueryDestinationLocation *BigQueryLocation `json:"bigqueryDestinationLocation,omitempty"`
  975. // GcsDestinationLocation: The Cloud Storage destination
  976. // location.
  977. // Specify a path to a Cloud Storage bucket or folder rather
  978. // than a concrete object. The exported outputs are
  979. // organized by FHIR resource types. The server will create one object
  980. // per
  981. // resource type. Each object contains newline delimited JSON, and each
  982. // line
  983. // is a FHIR resource.
  984. GcsDestinationLocation *GcsDataLocation `json:"gcsDestinationLocation,omitempty"`
  985. // ForceSendFields is a list of field names (e.g.
  986. // "BigqueryDestinationLocation") to unconditionally include in API
  987. // requests. By default, fields with empty values are omitted from API
  988. // requests. However, any non-pointer, non-interface field appearing in
  989. // ForceSendFields will be sent to the server regardless of whether the
  990. // field is empty or not. This may be used to include empty fields in
  991. // Patch requests.
  992. ForceSendFields []string `json:"-"`
  993. // NullFields is a list of field names (e.g.
  994. // "BigqueryDestinationLocation") to include in API requests with the
  995. // JSON null value. By default, fields with empty values are omitted
  996. // from API requests. However, any field with an empty value appearing
  997. // in NullFields will be sent to the server as null. It is an error if a
  998. // field in this list has a non-empty value. This may be used to include
  999. // null fields in Patch requests.
  1000. NullFields []string `json:"-"`
  1001. }
  1002. func (s *ExportResourcesRequest) MarshalJSON() ([]byte, error) {
  1003. type NoMethod ExportResourcesRequest
  1004. raw := NoMethod(*s)
  1005. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1006. }
  1007. // Expr: Represents an expression text. Example:
  1008. //
  1009. // title: "User account presence"
  1010. // description: "Determines whether the request has a user account"
  1011. // expression: "size(request.user) > 0"
  1012. type Expr struct {
  1013. // Description: An optional description of the expression. This is a
  1014. // longer text which
  1015. // describes the expression, e.g. when hovered over it in a UI.
  1016. Description string `json:"description,omitempty"`
  1017. // Expression: Textual representation of an expression in
  1018. // Common Expression Language syntax.
  1019. //
  1020. // The application context of the containing message determines
  1021. // which
  1022. // well-known feature set of CEL is supported.
  1023. Expression string `json:"expression,omitempty"`
  1024. // Location: An optional string indicating the location of the
  1025. // expression for error
  1026. // reporting, e.g. a file name and a position in the file.
  1027. Location string `json:"location,omitempty"`
  1028. // Title: An optional title for the expression, i.e. a short string
  1029. // describing
  1030. // its purpose. This can be used e.g. in UIs which allow to enter
  1031. // the
  1032. // expression.
  1033. Title string `json:"title,omitempty"`
  1034. // ForceSendFields is a list of field names (e.g. "Description") to
  1035. // unconditionally include in API requests. By default, fields with
  1036. // empty values are omitted from API requests. However, any non-pointer,
  1037. // non-interface field appearing in ForceSendFields will be sent to the
  1038. // server regardless of whether the field is empty or not. This may be
  1039. // used to include empty fields in Patch requests.
  1040. ForceSendFields []string `json:"-"`
  1041. // NullFields is a list of field names (e.g. "Description") to include
  1042. // in API requests with the JSON null value. By default, fields with
  1043. // empty values are omitted from API requests. However, any field with
  1044. // an empty value appearing in NullFields will be sent to the server as
  1045. // null. It is an error if a field in this list has a non-empty value.
  1046. // This may be used to include null fields in Patch requests.
  1047. NullFields []string `json:"-"`
  1048. }
  1049. func (s *Expr) MarshalJSON() ([]byte, error) {
  1050. type NoMethod Expr
  1051. raw := NoMethod(*s)
  1052. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1053. }
  1054. // FhirConfig: Specifies how de-identification of a FHIR store should be
  1055. // handled.
  1056. type FhirConfig struct {
  1057. }
  1058. // FhirStore: Represents a FHIR store.
  1059. type FhirStore struct {
  1060. // DisableReferentialIntegrity: Whether to disable referential integrity
  1061. // in this FHIR store. This field is
  1062. // immutable after FHIR store creation.
  1063. // The default value is false, meaning that the API will enforce
  1064. // referential
  1065. // integrity and fail the requests that will result in inconsistent
  1066. // state in
  1067. // the FHIR store.
  1068. // When this field is set to true, the API will skip referential
  1069. // integrity
  1070. // check. Consequently, operations that rely on references, such
  1071. // as
  1072. // GetPatientEverything, will not return all the results if broken
  1073. // references
  1074. // exist.
  1075. DisableReferentialIntegrity bool `json:"disableReferentialIntegrity,omitempty"`
  1076. // DisableResourceVersioning: Whether to disable resource versioning for
  1077. // this FHIR store. This field can
  1078. // not be changed after the creation of FHIR store.
  1079. // If set to false, which is the default behavior, all write operations
  1080. // will
  1081. // cause historical versions to be recorded automatically. The
  1082. // historical
  1083. // versions can be fetched through the history APIs, but cannot be
  1084. // updated.
  1085. // If set to true, no historical versions will be kept. The server will
  1086. // send
  1087. // back errors for attempts to read the historical versions.
  1088. DisableResourceVersioning bool `json:"disableResourceVersioning,omitempty"`
  1089. // EnableUpdateCreate: Whether this FHIR store has the
  1090. // [updateCreate
  1091. // capability](https://www.hl7.org/fhir/capabilitystatement
  1092. // -definitions.html#CapabilityStatement.rest.resource.updateCreate).
  1093. // Thi
  1094. // s determines if the client can use an Update operation to create a
  1095. // new
  1096. // resource with a client-specified ID. If false, all IDs are
  1097. // server-assigned
  1098. // through the Create operation and attempts to Update a non-existent
  1099. // resource
  1100. // will return errors. Please treat the audit logs with appropriate
  1101. // levels of
  1102. // care if client-specified resource IDs contain sensitive data such
  1103. // as
  1104. // patient identifiers, those IDs will be part of the FHIR resource
  1105. // path
  1106. // recorded in Cloud audit logs and Cloud Pub/Sub notifications.
  1107. EnableUpdateCreate bool `json:"enableUpdateCreate,omitempty"`
  1108. // Name: Output only. Resource name of the FHIR store, of the
  1109. // form
  1110. // `projects/{project_id}/datasets/{dataset_id}/fhirStores/{fhir_sto
  1111. // re_id}`.
  1112. Name string `json:"name,omitempty"`
  1113. // NotificationConfig: If non-empty, publish all resource modifications
  1114. // of this FHIR store to
  1115. // this destination. The Cloud Pub/Sub message attributes will contain a
  1116. // map
  1117. // with a string describing the action that has triggered the
  1118. // notification,
  1119. // e.g. "action":"CreateResource".
  1120. NotificationConfig *NotificationConfig `json:"notificationConfig,omitempty"`
  1121. // ServerResponse contains the HTTP response code and headers from the
  1122. // server.
  1123. googleapi.ServerResponse `json:"-"`
  1124. // ForceSendFields is a list of field names (e.g.
  1125. // "DisableReferentialIntegrity") to unconditionally include in API
  1126. // requests. By default, fields with empty values are omitted from API
  1127. // requests. However, any non-pointer, non-interface field appearing in
  1128. // ForceSendFields will be sent to the server regardless of whether the
  1129. // field is empty or not. This may be used to include empty fields in
  1130. // Patch requests.
  1131. ForceSendFields []string `json:"-"`
  1132. // NullFields is a list of field names (e.g.
  1133. // "DisableReferentialIntegrity") to include in API requests with the
  1134. // JSON null value. By default, fields with empty values are omitted
  1135. // from API requests. However, any field with an empty value appearing
  1136. // in NullFields will be sent to the server as null. It is an error if a
  1137. // field in this list has a non-empty value. This may be used to include
  1138. // null fields in Patch requests.
  1139. NullFields []string `json:"-"`
  1140. }
  1141. func (s *FhirStore) MarshalJSON() ([]byte, error) {
  1142. type NoMethod FhirStore
  1143. raw := NoMethod(*s)
  1144. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1145. }
  1146. type Finding struct {
  1147. // End: Zero-based ending index of the found text, exclusively.
  1148. End int64 `json:"end,omitempty,string"`
  1149. // InfoType: The type of information stored in this text range (e.g.
  1150. // HumanName,
  1151. // BirthDate, Address, etc.)
  1152. InfoType string `json:"infoType,omitempty"`
  1153. // Start: Zero-based starting index of the found text, inclusively.
  1154. Start int64 `json:"start,omitempty,string"`
  1155. // ForceSendFields is a list of field names (e.g. "End") to
  1156. // unconditionally include in API requests. By default, fields with
  1157. // empty values are omitted from API requests. However, any non-pointer,
  1158. // non-interface field appearing in ForceSendFields will be sent to the
  1159. // server regardless of whether the field is empty or not. This may be
  1160. // used to include empty fields in Patch requests.
  1161. ForceSendFields []string `json:"-"`
  1162. // NullFields is a list of field names (e.g. "End") to include in API
  1163. // requests with the JSON null value. By default, fields with empty
  1164. // values are omitted from API requests. However, any field with an
  1165. // empty value appearing in NullFields will be sent to the server as
  1166. // null. It is an error if a field in this list has a non-empty value.
  1167. // This may be used to include null fields in Patch requests.
  1168. NullFields []string `json:"-"`
  1169. }
  1170. func (s *Finding) MarshalJSON() ([]byte, error) {
  1171. type NoMethod Finding
  1172. raw := NoMethod(*s)
  1173. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1174. }
  1175. // GcsDataLocation: Google Cloud Storage location.
  1176. type GcsDataLocation struct {
  1177. // GcsUri: The gcs_uri must be in the format
  1178. // "gs://bucket/path/to/object".
  1179. // The gcs_uri may include wildcards in the "path/to/object" part to
  1180. // to indicate potential matching of multiple objects.
  1181. // Supported wildcards:
  1182. // '*' to match 0 or more non-separator characters
  1183. // '**' to match 0 or more characters (including separators). Only
  1184. // supported at the end of a path and with no other wildcards.
  1185. // '?' to match 1 character.
  1186. GcsUri string `json:"gcsUri,omitempty"`
  1187. // ForceSendFields is a list of field names (e.g. "GcsUri") to
  1188. // unconditionally include in API requests. By default, fields with
  1189. // empty values are omitted from API requests. However, any non-pointer,
  1190. // non-interface field appearing in ForceSendFields will be sent to the
  1191. // server regardless of whether the field is empty or not. This may be
  1192. // used to include empty fields in Patch requests.
  1193. ForceSendFields []string `json:"-"`
  1194. // NullFields is a list of field names (e.g. "GcsUri") to include in API
  1195. // requests with the JSON null value. By default, fields with empty
  1196. // values are omitted from API requests. However, any field with an
  1197. // empty value appearing in NullFields will be sent to the server as
  1198. // null. It is an error if a field in this list has a non-empty value.
  1199. // This may be used to include null fields in Patch requests.
  1200. NullFields []string `json:"-"`
  1201. }
  1202. func (s *GcsDataLocation) MarshalJSON() ([]byte, error) {
  1203. type NoMethod GcsDataLocation
  1204. raw := NoMethod(*s)
  1205. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1206. }
  1207. // GcsDestination: The Google Cloud Storage location to which the output
  1208. // should be written.
  1209. type GcsDestination struct {
  1210. // MimeType: MIME types supported by DICOM spec.
  1211. // Each file will be written in the following
  1212. // format:
  1213. // `.../{study_id}/{series_id}/{instance_id}[/{frame_number}].{ex
  1214. // tension}`
  1215. // The frame_number component will exist only for multi-frame
  1216. // instances.
  1217. //
  1218. // Refer to the DICOM conformance statement for permissible MIME
  1219. // types:
  1220. // https://cloud.google.com/healthcare/docs/dicom#wado-rs
  1221. //
  1222. // The following extensions will be used for output files:
  1223. // application/dicom -> .dcm
  1224. // image/jpeg -> .jpg
  1225. // image/png -> .png
  1226. //
  1227. // If unspecified, the instances will be exported in their
  1228. // original
  1229. // DICOM format.
  1230. MimeType string `json:"mimeType,omitempty"`
  1231. // UriPrefix: URI for a Google Cloud Storage directory to which result
  1232. // files should be
  1233. // written (e.g., `gs://bucket-id/path/to/destination/dir`). If there is
  1234. // no
  1235. // trailing slash, the service will append one when composing the
  1236. // object
  1237. // path. The user is responsible for creating the Google Cloud Storage
  1238. // bucket
  1239. // referenced in `uri_prefix`.
  1240. UriPrefix string `json:"uriPrefix,omitempty"`
  1241. // ForceSendFields is a list of field names (e.g. "MimeType") to
  1242. // unconditionally include in API requests. By default, fields with
  1243. // empty values are omitted from API requests. However, any non-pointer,
  1244. // non-interface field appearing in ForceSendFields will be sent to the
  1245. // server regardless of whether the field is empty or not. This may be
  1246. // used to include empty fields in Patch requests.
  1247. ForceSendFields []string `json:"-"`
  1248. // NullFields is a list of field names (e.g. "MimeType") to include in
  1249. // API requests with the JSON null value. By default, fields with empty
  1250. // values are omitted from API requests. However, any field with an
  1251. // empty value appearing in NullFields will be sent to the server as
  1252. // null. It is an error if a field in this list has a non-empty value.
  1253. // This may be used to include null fields in Patch requests.
  1254. NullFields []string `json:"-"`
  1255. }
  1256. func (s *GcsDestination) MarshalJSON() ([]byte, error) {
  1257. type NoMethod GcsDestination
  1258. raw := NoMethod(*s)
  1259. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1260. }
  1261. // GetIamPolicyRequest: Request message for `GetIamPolicy` method.
  1262. type GetIamPolicyRequest struct {
  1263. }
  1264. // GoogleCloudHealthcareV1alphaFhirRestExportResourcesResponse: Final
  1265. // response of exporting resources.
  1266. // This structure will be included in the
  1267. // response to describe the detailed
  1268. // outcome. It will only be included when the operation finishes.
  1269. type GoogleCloudHealthcareV1alphaFhirRestExportResourcesResponse struct {
  1270. // Name: The FHIR store name of the resources that have been exported,
  1271. // in the
  1272. // format
  1273. // `projects/{project_id}/locations/{location_id}/datasets/{datase
  1274. // t_id}/fhirStores/{fhir_store_id}`.
  1275. Name string `json:"name,omitempty"`
  1276. // ResourceCount: The total number of resources exported from the
  1277. // requested FHIR store.
  1278. ResourceCount int64 `json:"resourceCount,omitempty,string"`
  1279. // ForceSendFields is a list of field names (e.g. "Name") to
  1280. // unconditionally include in API requests. By default, fields with
  1281. // empty values are omitted from API requests. However, any non-pointer,
  1282. // non-interface field appearing in ForceSendFields will be sent to the
  1283. // server regardless of whether the field is empty or not. This may be
  1284. // used to include empty fields in Patch requests.
  1285. ForceSendFields []string `json:"-"`
  1286. // NullFields is a list of field names (e.g. "Name") to include in API
  1287. // requests with the JSON null value. By default, fields with empty
  1288. // values are omitted from API requests. However, any field with an
  1289. // empty value appearing in NullFields will be sent to the server as
  1290. // null. It is an error if a field in this list has a non-empty value.
  1291. // This may be used to include null fields in Patch requests.
  1292. NullFields []string `json:"-"`
  1293. }
  1294. func (s *GoogleCloudHealthcareV1alphaFhirRestExportResourcesResponse) MarshalJSON() ([]byte, error) {
  1295. type NoMethod GoogleCloudHealthcareV1alphaFhirRestExportResourcesResponse
  1296. raw := NoMethod(*s)
  1297. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1298. }
  1299. // GoogleCloudHealthcareV1alphaFhirRestImportResourcesResponse: Final
  1300. // response of importing resources.
  1301. // This structure will be included in the
  1302. // response to describe the detailed
  1303. // outcome. It will only be included when the operation finishes.
  1304. type GoogleCloudHealthcareV1alphaFhirRestImportResourcesResponse struct {
  1305. // ErrorCount: The number of resources that had errors.
  1306. ErrorCount int64 `json:"errorCount,omitempty,string"`
  1307. // InputSize: The total number of resources included in the source data.
  1308. // This is the sum
  1309. // of the success and error counts.
  1310. InputSize int64 `json:"inputSize,omitempty,string"`
  1311. // Name: The FHIR store name the resources have been imported to, in
  1312. // the
  1313. // format
  1314. // `projects/{project_id}/locations/{location_id}/datasets/{da
  1315. // taset_id}/fhirStores/{fhir_store_id}`.
  1316. Name string `json:"name,omitempty"`
  1317. // SuccessCount: The number of resources that have been imported.
  1318. SuccessCount int64 `json:"successCount,omitempty,string"`
  1319. // ForceSendFields is a list of field names (e.g. "ErrorCount") to
  1320. // unconditionally include in API requests. By default, fields with
  1321. // empty values are omitted from API requests. However, any non-pointer,
  1322. // non-interface field appearing in ForceSendFields will be sent to the
  1323. // server regardless of whether the field is empty or not. This may be
  1324. // used to include empty fields in Patch requests.
  1325. ForceSendFields []string `json:"-"`
  1326. // NullFields is a list of field names (e.g. "ErrorCount") to include in
  1327. // API requests with the JSON null value. By default, fields with empty
  1328. // values are omitted from API requests. However, any field with an
  1329. // empty value appearing in NullFields will be sent to the server as
  1330. // null. It is an error if a field in this list has a non-empty value.
  1331. // This may be used to include null fields in Patch requests.
  1332. NullFields []string `json:"-"`
  1333. }
  1334. func (s *GoogleCloudHealthcareV1alphaFhirRestImportResourcesResponse) MarshalJSON() ([]byte, error) {
  1335. type NoMethod GoogleCloudHealthcareV1alphaFhirRestImportResourcesResponse
  1336. raw := NoMethod(*s)
  1337. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1338. }
  1339. // GoogleCloudHealthcareV1alphaGcsSource: The Google Cloud Storage
  1340. // location for the input content.
  1341. type GoogleCloudHealthcareV1alphaGcsSource struct {
  1342. // ContentUri: Points to a [Google Cloud
  1343. // Storage](https://cloud.google.com/storage/) URI
  1344. // containing file(s) with content only.
  1345. // The URI must be in the following format:
  1346. // `gs://bucket-id/object-id`.
  1347. // The URI can include wildcards in `object-id` and thus identify
  1348. // multiple
  1349. // files. Supported wildcards:
  1350. // '*' to match 0 or more non-separator characters
  1351. // '**' to match 0 or more characters (including separators). Must be
  1352. // used at
  1353. // the end of a path and with no other wildcards in the
  1354. // path. Can also be used with a file extension (such as .dcm),
  1355. // which
  1356. // imports all files with the extension in the specified directory
  1357. // and
  1358. // its sub-directories. For example,
  1359. // `gs://bucket-id/directory-id/**.dcm` imports all files with
  1360. // .dcm
  1361. // extensions in `directory-id/` and its sub-directories.
  1362. // '?' to match 1 character
  1363. // Returns [google.rpc.Code.INVALID_ARGUMENT] for all other URI
  1364. // formats.
  1365. // Files matching the wildcard are expected to contain content only,
  1366. // no
  1367. // metadata.
  1368. ContentUri string `json:"contentUri,omitempty"`
  1369. // ForceSendFields is a list of field names (e.g. "ContentUri") to
  1370. // unconditionally include in API requests. By default, fields with
  1371. // empty values are omitted from API requests. However, any non-pointer,
  1372. // non-interface field appearing in ForceSendFields will be sent to the
  1373. // server regardless of whether the field is empty or not. This may be
  1374. // used to include empty fields in Patch requests.
  1375. ForceSendFields []string `json:"-"`
  1376. // NullFields is a list of field names (e.g. "ContentUri") to include in
  1377. // API requests with the JSON null value. By default, fields with empty
  1378. // values are omitted from API requests. However, any field with an
  1379. // empty value appearing in NullFields will be sent to the server as
  1380. // null. It is an error if a field in this list has a non-empty value.
  1381. // This may be used to include null fields in Patch requests.
  1382. NullFields []string `json:"-"`
  1383. }
  1384. func (s *GoogleCloudHealthcareV1alphaGcsSource) MarshalJSON() ([]byte, error) {
  1385. type NoMethod GoogleCloudHealthcareV1alphaGcsSource
  1386. raw := NoMethod(*s)
  1387. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1388. }
  1389. // Hl7V2Store: Represents an HL7v2 store.
  1390. type Hl7V2Store struct {
  1391. // Name: Output only. Resource name of the HL7v2 store, of the
  1392. // form
  1393. // `projects/{project_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_s
  1394. // tore_id}`.
  1395. Name string `json:"name,omitempty"`
  1396. // NotificationConfig: The notification destination all messages (both
  1397. // Ingest & Create) are
  1398. // published on. Only the message name is sent as part of the
  1399. // notification. If
  1400. // this is unset, no notifications will be sent. Supplied by the client.
  1401. NotificationConfig *NotificationConfig `json:"notificationConfig,omitempty"`
  1402. // ParserConfig: The configuration for the parser. It determines how the
  1403. // server parses the
  1404. // messages.
  1405. ParserConfig *ParserConfig `json:"parserConfig,omitempty"`
  1406. // ServerResponse contains the HTTP response code and headers from the
  1407. // server.
  1408. googleapi.ServerResponse `json:"-"`
  1409. // ForceSendFields is a list of field names (e.g. "Name") to
  1410. // unconditionally include in API requests. By default, fields with
  1411. // empty values are omitted from API requests. However, any non-pointer,
  1412. // non-interface field appearing in ForceSendFields will be sent to the
  1413. // server regardless of whether the field is empty or not. This may be
  1414. // used to include empty fields in Patch requests.
  1415. ForceSendFields []string `json:"-"`
  1416. // NullFields is a list of field names (e.g. "Name") to include in API
  1417. // requests with the JSON null value. By default, fields with empty
  1418. // values are omitted from API requests. However, any field with an
  1419. // empty value appearing in NullFields will be sent to the server as
  1420. // null. It is an error if a field in this list has a non-empty value.
  1421. // This may be used to include null fields in Patch requests.
  1422. NullFields []string `json:"-"`
  1423. }
  1424. func (s *Hl7V2Store) MarshalJSON() ([]byte, error) {
  1425. type NoMethod Hl7V2Store
  1426. raw := NoMethod(*s)
  1427. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1428. }
  1429. // HttpBody: Message that represents an arbitrary HTTP body. It should
  1430. // only be used for
  1431. // payload formats that can't be represented as JSON, such as raw binary
  1432. // or
  1433. // an HTML page.
  1434. //
  1435. //
  1436. // This message can be used both in streaming and non-streaming API
  1437. // methods in
  1438. // the request as well as the response.
  1439. //
  1440. // It can be used as a top-level request field, which is convenient if
  1441. // one
  1442. // wants to extract parameters from either the URL or HTTP template into
  1443. // the
  1444. // request fields and also want access to the raw HTTP body.
  1445. //
  1446. // Example:
  1447. //
  1448. // message GetResourceRequest {
  1449. // // A unique request id.
  1450. // string request_id = 1;
  1451. //
  1452. // // The raw HTTP body is bound to this field.
  1453. // google.api.HttpBody http_body = 2;
  1454. // }
  1455. //
  1456. // service ResourceService {
  1457. // rpc GetResource(GetResourceRequest) returns
  1458. // (google.api.HttpBody);
  1459. // rpc UpdateResource(google.api.HttpBody) returns
  1460. // (google.protobuf.Empty);
  1461. // }
  1462. //
  1463. // Example with streaming methods:
  1464. //
  1465. // service CaldavService {
  1466. // rpc GetCalendar(stream google.api.HttpBody)
  1467. // returns (stream google.api.HttpBody);
  1468. // rpc UpdateCalendar(stream google.api.HttpBody)
  1469. // returns (stream google.api.HttpBody);
  1470. // }
  1471. //
  1472. // Use of this type only changes how the request and response bodies
  1473. // are
  1474. // handled, all other features will continue to work unchanged.
  1475. type HttpBody struct {
  1476. // ContentType: The HTTP Content-Type header value specifying the
  1477. // content type of the body.
  1478. ContentType string `json:"contentType,omitempty"`
  1479. // Data: The HTTP request/response body as raw binary.
  1480. Data string `json:"data,omitempty"`
  1481. // Extensions: Application specific response metadata. Must be set in
  1482. // the first response
  1483. // for streaming APIs.
  1484. Extensions []googleapi.RawMessage `json:"extensions,omitempty"`
  1485. // ServerResponse contains the HTTP response code and headers from the
  1486. // server.
  1487. googleapi.ServerResponse `json:"-"`
  1488. // ForceSendFields is a list of field names (e.g. "ContentType") to
  1489. // unconditionally include in API requests. By default, fields with
  1490. // empty values are omitted from API requests. However, any non-pointer,
  1491. // non-interface field appearing in ForceSendFields will be sent to the
  1492. // server regardless of whether the field is empty or not. This may be
  1493. // used to include empty fields in Patch requests.
  1494. ForceSendFields []string `json:"-"`
  1495. // NullFields is a list of field names (e.g. "ContentType") to include
  1496. // in API requests with the JSON null value. By default, fields with
  1497. // empty values are omitted from API requests. However, any field with
  1498. // an empty value appearing in NullFields will be sent to the server as
  1499. // null. It is an error if a field in this list has a non-empty value.
  1500. // This may be used to include null fields in Patch requests.
  1501. NullFields []string `json:"-"`
  1502. }
  1503. func (s *HttpBody) MarshalJSON() ([]byte, error) {
  1504. type NoMethod HttpBody
  1505. raw := NoMethod(*s)
  1506. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1507. }
  1508. // ImageAnnotation: Image annotation.
  1509. type ImageAnnotation struct {
  1510. // BoundingPolys: The list of polygons outlining the sensitive regions
  1511. // in the image.
  1512. BoundingPolys []*BoundingPoly `json:"boundingPolys,omitempty"`
  1513. // ForceSendFields is a list of field names (e.g. "BoundingPolys") to
  1514. // unconditionally include in API requests. By default, fields with
  1515. // empty values are omitted from API requests. However, any non-pointer,
  1516. // non-interface field appearing in ForceSendFields will be sent to the
  1517. // server regardless of whether the field is empty or not. This may be
  1518. // used to include empty fields in Patch requests.
  1519. ForceSendFields []string `json:"-"`
  1520. // NullFields is a list of field names (e.g. "BoundingPolys") to include
  1521. // in API requests with the JSON null value. By default, fields with
  1522. // empty values are omitted from API requests. However, any field with
  1523. // an empty value appearing in NullFields will be sent to the server as
  1524. // null. It is an error if a field in this list has a non-empty value.
  1525. // This may be used to include null fields in Patch requests.
  1526. NullFields []string `json:"-"`
  1527. }
  1528. func (s *ImageAnnotation) MarshalJSON() ([]byte, error) {
  1529. type NoMethod ImageAnnotation
  1530. raw := NoMethod(*s)
  1531. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1532. }
  1533. // ImageConfig: Specifies how de-identification of image pixel should be
  1534. // handled.
  1535. type ImageConfig struct {
  1536. // RedactAllText: If true, all text found in the image is redacted.
  1537. RedactAllText bool `json:"redactAllText,omitempty"`
  1538. // ForceSendFields is a list of field names (e.g. "RedactAllText") to
  1539. // unconditionally include in API requests. By default, fields with
  1540. // empty values are omitted from API requests. However, any non-pointer,
  1541. // non-interface field appearing in ForceSendFields will be sent to the
  1542. // server regardless of whether the field is empty or not. This may be
  1543. // used to include empty fields in Patch requests.
  1544. ForceSendFields []string `json:"-"`
  1545. // NullFields is a list of field names (e.g. "RedactAllText") to include
  1546. // in API requests with the JSON null value. By default, fields with
  1547. // empty values are omitted from API requests. However, any field with
  1548. // an empty value appearing in NullFields will be sent to the server as
  1549. // null. It is an error if a field in this list has a non-empty value.
  1550. // This may be used to include null fields in Patch requests.
  1551. NullFields []string `json:"-"`
  1552. }
  1553. func (s *ImageConfig) MarshalJSON() ([]byte, error) {
  1554. type NoMethod ImageConfig
  1555. raw := NoMethod(*s)
  1556. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1557. }
  1558. // ImportDicomDataErrorDetails: Returns the errors encountered during
  1559. // DICOM store import.
  1560. type ImportDicomDataErrorDetails struct {
  1561. // Errors: Contains errors encountered in imports of individual
  1562. // resources (e.g.,
  1563. // a Google Cloud Storage object).
  1564. Errors []*ImportError `json:"errors,omitempty"`
  1565. // ForceSendFields is a list of field names (e.g. "Errors") to
  1566. // unconditionally include in API requests. By default, fields with
  1567. // empty values are omitted from API requests. However, any non-pointer,
  1568. // non-interface field appearing in ForceSendFields will be sent to the
  1569. // server regardless of whether the field is empty or not. This may be
  1570. // used to include empty fields in Patch requests.
  1571. ForceSendFields []string `json:"-"`
  1572. // NullFields is a list of field names (e.g. "Errors") to include in API
  1573. // requests with the JSON null value. By default, fields with empty
  1574. // values are omitted from API requests. However, any field with an
  1575. // empty value appearing in NullFields will be sent to the server as
  1576. // null. It is an error if a field in this list has a non-empty value.
  1577. // This may be used to include null fields in Patch requests.
  1578. NullFields []string `json:"-"`
  1579. }
  1580. func (s *ImportDicomDataErrorDetails) MarshalJSON() ([]byte, error) {
  1581. type NoMethod ImportDicomDataErrorDetails
  1582. raw := NoMethod(*s)
  1583. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1584. }
  1585. // ImportDicomDataRequest: Imports data into the specified DICOM
  1586. // store.
  1587. // Returns an error if any of the files to import are not DICOM files.
  1588. // This
  1589. // API will accept duplicate DICOM instances, by simply ignoring the
  1590. // newly
  1591. // pushed instance (it will not overwrite).
  1592. type ImportDicomDataRequest struct {
  1593. // InputConfig: Specifies where the imported data resides.
  1594. InputConfig *InputConfig `json:"inputConfig,omitempty"`
  1595. // ForceSendFields is a list of field names (e.g. "InputConfig") to
  1596. // unconditionally include in API requests. By default, fields with
  1597. // empty values are omitted from API requests. However, any non-pointer,
  1598. // non-interface field appearing in ForceSendFields will be sent to the
  1599. // server regardless of whether the field is empty or not. This may be
  1600. // used to include empty fields in Patch requests.
  1601. ForceSendFields []string `json:"-"`
  1602. // NullFields is a list of field names (e.g. "InputConfig") to include
  1603. // in API requests with the JSON null value. By default, fields with
  1604. // empty values are omitted from API requests. However, any field with
  1605. // an empty value appearing in NullFields will be sent to the server as
  1606. // null. It is an error if a field in this list has a non-empty value.
  1607. // This may be used to include null fields in Patch requests.
  1608. NullFields []string `json:"-"`
  1609. }
  1610. func (s *ImportDicomDataRequest) MarshalJSON() ([]byte, error) {
  1611. type NoMethod ImportDicomDataRequest
  1612. raw := NoMethod(*s)
  1613. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1614. }
  1615. // ImportError: Contains error status for each import failure.
  1616. type ImportError struct {
  1617. // Resource: Resource name.
  1618. Resource string `json:"resource,omitempty"`
  1619. // Status: Error status associated with resource.
  1620. Status *Status `json:"status,omitempty"`
  1621. // ForceSendFields is a list of field names (e.g. "Resource") to
  1622. // unconditionally include in API requests. By default, fields with
  1623. // empty values are omitted from API requests. However, any non-pointer,
  1624. // non-interface field appearing in ForceSendFields will be sent to the
  1625. // server regardless of whether the field is empty or not. This may be
  1626. // used to include empty fields in Patch requests.
  1627. ForceSendFields []string `json:"-"`
  1628. // NullFields is a list of field names (e.g. "Resource") to include in
  1629. // API requests with the JSON null value. By default, fields with empty
  1630. // values are omitted from API requests. However, any field with an
  1631. // empty value appearing in NullFields will be sent to the server as
  1632. // null. It is an error if a field in this list has a non-empty value.
  1633. // This may be used to include null fields in Patch requests.
  1634. NullFields []string `json:"-"`
  1635. }
  1636. func (s *ImportError) MarshalJSON() ([]byte, error) {
  1637. type NoMethod ImportError
  1638. raw := NoMethod(*s)
  1639. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1640. }
  1641. // ImportResourcesRequest: Request to import resources.
  1642. // The FHIR resources to be imported must have client supplied IDs. The
  1643. // server
  1644. // will retain the resource IDs. The import operation is idempotent.
  1645. // Retry will
  1646. // overwrite existing data identified by client supplied IDs. The
  1647. // import
  1648. // operation is not transactional. The server will not roll back any
  1649. // committed
  1650. // changes upon partial failures.
  1651. type ImportResourcesRequest struct {
  1652. // ContentStructure: The content structure in the source location. The
  1653. // default is
  1654. // BUNDLE.
  1655. //
  1656. // Possible values:
  1657. // "CONTENT_STRUCTURE_UNSPECIFIED"
  1658. // "BUNDLE" - Each unit is a bundle, which contains one or more
  1659. // resources.
  1660. // "RESOURCE" - Each unit is a single resource.
  1661. ContentStructure string `json:"contentStructure,omitempty"`
  1662. // GcsErrorLocation: The Cloud Storage bucket/folder path to write files
  1663. // that contain error
  1664. // details.
  1665. GcsErrorLocation *GcsDataLocation `json:"gcsErrorLocation,omitempty"`
  1666. // GcsSourceLocation: Cloud Storage source data locations.
  1667. // Each Cloud Storage object should be a text file that contains
  1668. // newline
  1669. // delimited JSON structures conforming to FHIR standard.
  1670. GcsSourceLocation *GcsDataLocation `json:"gcsSourceLocation,omitempty"`
  1671. // ForceSendFields is a list of field names (e.g. "ContentStructure") to
  1672. // unconditionally include in API requests. By default, fields with
  1673. // empty values are omitted from API requests. However, any non-pointer,
  1674. // non-interface field appearing in ForceSendFields will be sent to the
  1675. // server regardless of whether the field is empty or not. This may be
  1676. // used to include empty fields in Patch requests.
  1677. ForceSendFields []string `json:"-"`
  1678. // NullFields is a list of field names (e.g. "ContentStructure") to
  1679. // include in API requests with the JSON null value. By default, fields
  1680. // with empty values are omitted from API requests. However, any field
  1681. // with an empty value appearing in NullFields will be sent to the
  1682. // server as null. It is an error if a field in this list has a
  1683. // non-empty value. This may be used to include null fields in Patch
  1684. // requests.
  1685. NullFields []string `json:"-"`
  1686. }
  1687. func (s *ImportResourcesRequest) MarshalJSON() ([]byte, error) {
  1688. type NoMethod ImportResourcesRequest
  1689. raw := NoMethod(*s)
  1690. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1691. }
  1692. // IngestMessageRequest: Ingests a message into the specified HL7v2
  1693. // store.
  1694. type IngestMessageRequest struct {
  1695. // Message: HL7v2 message to ingest.
  1696. Message *Message `json:"message,omitempty"`
  1697. // ForceSendFields is a list of field names (e.g. "Message") to
  1698. // unconditionally include in API requests. By default, fields with
  1699. // empty values are omitted from API requests. However, any non-pointer,
  1700. // non-interface field appearing in ForceSendFields will be sent to the
  1701. // server regardless of whether the field is empty or not. This may be
  1702. // used to include empty fields in Patch requests.
  1703. ForceSendFields []string `json:"-"`
  1704. // NullFields is a list of field names (e.g. "Message") to include in
  1705. // API requests with the JSON null value. By default, fields with empty
  1706. // values are omitted from API requests. However, any field with an
  1707. // empty value appearing in NullFields will be sent to the server as
  1708. // null. It is an error if a field in this list has a non-empty value.
  1709. // This may be used to include null fields in Patch requests.
  1710. NullFields []string `json:"-"`
  1711. }
  1712. func (s *IngestMessageRequest) MarshalJSON() ([]byte, error) {
  1713. type NoMethod IngestMessageRequest
  1714. raw := NoMethod(*s)
  1715. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1716. }
  1717. // IngestMessageResponse: Acknowledges that a message has been ingested
  1718. // into the specified
  1719. // HL7v2 store.
  1720. type IngestMessageResponse struct {
  1721. // Hl7Ack: HL7v2 ACK message.
  1722. Hl7Ack string `json:"hl7Ack,omitempty"`
  1723. // Message: Created message resource.
  1724. Message *Message `json:"message,omitempty"`
  1725. // ServerResponse contains the HTTP response code and headers from the
  1726. // server.
  1727. googleapi.ServerResponse `json:"-"`
  1728. // ForceSendFields is a list of field names (e.g. "Hl7Ack") to
  1729. // unconditionally include in API requests. By default, fields with
  1730. // empty values are omitted from API requests. However, any non-pointer,
  1731. // non-interface field appearing in ForceSendFields will be sent to the
  1732. // server regardless of whether the field is empty or not. This may be
  1733. // used to include empty fields in Patch requests.
  1734. ForceSendFields []string `json:"-"`
  1735. // NullFields is a list of field names (e.g. "Hl7Ack") to include in API
  1736. // requests with the JSON null value. By default, fields with empty
  1737. // values are omitted from API requests. However, any field with an
  1738. // empty value appearing in NullFields will be sent to the server as
  1739. // null. It is an error if a field in this list has a non-empty value.
  1740. // This may be used to include null fields in Patch requests.
  1741. NullFields []string `json:"-"`
  1742. }
  1743. func (s *IngestMessageResponse) MarshalJSON() ([]byte, error) {
  1744. type NoMethod IngestMessageResponse
  1745. raw := NoMethod(*s)
  1746. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1747. }
  1748. // InputConfig: Specifies the location(s) from which data should be
  1749. // imported.
  1750. type InputConfig struct {
  1751. // GcsSource: Files on Google Cloud Storage.
  1752. // To enable the Cloud Healthcare API to read from resources in
  1753. // your
  1754. // project (e.g. Google Cloud Storage buckets), you must give the
  1755. // consumer
  1756. // Cloud Healthcare API service account the proper permissions. The
  1757. // service
  1758. // account
  1759. // is:
  1760. // `service-{PROJECT_NUMBER}@gcp-sa-healthcare.iam.gserviceaccount.co
  1761. // m`.
  1762. // The PROJECT_NUMBER identifies the project that contains the source
  1763. // Google
  1764. // Cloud Storage bucket. To get the project number, go to the GCP
  1765. // Console
  1766. // Dashboard.
  1767. //
  1768. // GcsSource requires the `roles/storage.objectViewer` Cloud IAM role.
  1769. GcsSource *GoogleCloudHealthcareV1alphaGcsSource `json:"gcsSource,omitempty"`
  1770. // ForceSendFields is a list of field names (e.g. "GcsSource") to
  1771. // unconditionally include in API requests. By default, fields with
  1772. // empty values are omitted from API requests. However, any non-pointer,
  1773. // non-interface field appearing in ForceSendFields will be sent to the
  1774. // server regardless of whether the field is empty or not. This may be
  1775. // used to include empty fields in Patch requests.
  1776. ForceSendFields []string `json:"-"`
  1777. // NullFields is a list of field names (e.g. "GcsSource") to include in
  1778. // API requests with the JSON null value. By default, fields with empty
  1779. // values are omitted from API requests. However, any field with an
  1780. // empty value appearing in NullFields will be sent to the server as
  1781. // null. It is an error if a field in this list has a non-empty value.
  1782. // This may be used to include null fields in Patch requests.
  1783. NullFields []string `json:"-"`
  1784. }
  1785. func (s *InputConfig) MarshalJSON() ([]byte, error) {
  1786. type NoMethod InputConfig
  1787. raw := NoMethod(*s)
  1788. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1789. }
  1790. // ListAnnotationStoresResponse: Lists the Annotation stores
  1791. // in the given dataset.
  1792. type ListAnnotationStoresResponse struct {
  1793. // AnnotationStores: The returned Annotation stores. Won't be more
  1794. // Annotation stores than the
  1795. // value of page_size in the request.
  1796. AnnotationStores []*AnnotationStore `json:"annotationStores,omitempty"`
  1797. // NextPageToken: Token to retrieve the next page of results or empty if
  1798. // there are no more
  1799. // results in the list.
  1800. NextPageToken string `json:"nextPageToken,omitempty"`
  1801. // ServerResponse contains the HTTP response code and headers from the
  1802. // server.
  1803. googleapi.ServerResponse `json:"-"`
  1804. // ForceSendFields is a list of field names (e.g. "AnnotationStores") to
  1805. // unconditionally include in API requests. By default, fields with
  1806. // empty values are omitted from API requests. However, any non-pointer,
  1807. // non-interface field appearing in ForceSendFields will be sent to the
  1808. // server regardless of whether the field is empty or not. This may be
  1809. // used to include empty fields in Patch requests.
  1810. ForceSendFields []string `json:"-"`
  1811. // NullFields is a list of field names (e.g. "AnnotationStores") to
  1812. // include in API requests with the JSON null value. By default, fields
  1813. // with empty values are omitted from API requests. However, any field
  1814. // with an empty value appearing in NullFields will be sent to the
  1815. // server as null. It is an error if a field in this list has a
  1816. // non-empty value. This may be used to include null fields in Patch
  1817. // requests.
  1818. NullFields []string `json:"-"`
  1819. }
  1820. func (s *ListAnnotationStoresResponse) MarshalJSON() ([]byte, error) {
  1821. type NoMethod ListAnnotationStoresResponse
  1822. raw := NoMethod(*s)
  1823. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1824. }
  1825. // ListAnnotationsResponse: Lists the Annotations in the
  1826. // specified Annotation store.
  1827. type ListAnnotationsResponse struct {
  1828. // Annotations: The returned Annotations names. Won't be more values
  1829. // than the value of
  1830. // page_size in the request.
  1831. Annotations []string `json:"annotations,omitempty"`
  1832. // NextPageToken: Token to retrieve the next page of results or empty if
  1833. // there are no more
  1834. // results in the list.
  1835. NextPageToken string `json:"nextPageToken,omitempty"`
  1836. // ServerResponse contains the HTTP response code and headers from the
  1837. // server.
  1838. googleapi.ServerResponse `json:"-"`
  1839. // ForceSendFields is a list of field names (e.g. "Annotations") to
  1840. // unconditionally include in API requests. By default, fields with
  1841. // empty values are omitted from API requests. However, any non-pointer,
  1842. // non-interface field appearing in ForceSendFields will be sent to the
  1843. // server regardless of whether the field is empty or not. This may be
  1844. // used to include empty fields in Patch requests.
  1845. ForceSendFields []string `json:"-"`
  1846. // NullFields is a list of field names (e.g. "Annotations") to include
  1847. // in API requests with the JSON null value. By default, fields with
  1848. // empty values are omitted from API requests. However, any field with
  1849. // an empty value appearing in NullFields will be sent to the server as
  1850. // null. It is an error if a field in this list has a non-empty value.
  1851. // This may be used to include null fields in Patch requests.
  1852. NullFields []string `json:"-"`
  1853. }
  1854. func (s *ListAnnotationsResponse) MarshalJSON() ([]byte, error) {
  1855. type NoMethod ListAnnotationsResponse
  1856. raw := NoMethod(*s)
  1857. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1858. }
  1859. // ListDatasetsResponse: Lists the available datasets.
  1860. type ListDatasetsResponse struct {
  1861. // Datasets: The first page of datasets.
  1862. Datasets []*Dataset `json:"datasets,omitempty"`
  1863. // NextPageToken: Token to retrieve the next page of results, or empty
  1864. // if there are no
  1865. // more results in the list.
  1866. NextPageToken string `json:"nextPageToken,omitempty"`
  1867. // ServerResponse contains the HTTP response code and headers from the
  1868. // server.
  1869. googleapi.ServerResponse `json:"-"`
  1870. // ForceSendFields is a list of field names (e.g. "Datasets") to
  1871. // unconditionally include in API requests. By default, fields with
  1872. // empty values are omitted from API requests. However, any non-pointer,
  1873. // non-interface field appearing in ForceSendFields will be sent to the
  1874. // server regardless of whether the field is empty or not. This may be
  1875. // used to include empty fields in Patch requests.
  1876. ForceSendFields []string `json:"-"`
  1877. // NullFields is a list of field names (e.g. "Datasets") to include in
  1878. // API requests with the JSON null value. By default, fields with empty
  1879. // values are omitted from API requests. However, any field with an
  1880. // empty value appearing in NullFields will be sent to the server as
  1881. // null. It is an error if a field in this list has a non-empty value.
  1882. // This may be used to include null fields in Patch requests.
  1883. NullFields []string `json:"-"`
  1884. }
  1885. func (s *ListDatasetsResponse) MarshalJSON() ([]byte, error) {
  1886. type NoMethod ListDatasetsResponse
  1887. raw := NoMethod(*s)
  1888. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1889. }
  1890. // ListDicomStoresResponse: Lists the DICOM stores in the given dataset.
  1891. type ListDicomStoresResponse struct {
  1892. // DicomStores: The returned DICOM stores. Won't be more DICOM stores
  1893. // than the value of
  1894. // page_size in the request.
  1895. DicomStores []*DicomStore `json:"dicomStores,omitempty"`
  1896. // NextPageToken: Token to retrieve the next page of results or empty if
  1897. // there are no more
  1898. // results in the list.
  1899. NextPageToken string `json:"nextPageToken,omitempty"`
  1900. // ServerResponse contains the HTTP response code and headers from the
  1901. // server.
  1902. googleapi.ServerResponse `json:"-"`
  1903. // ForceSendFields is a list of field names (e.g. "DicomStores") to
  1904. // unconditionally include in API requests. By default, fields with
  1905. // empty values are omitted from API requests. However, any non-pointer,
  1906. // non-interface field appearing in ForceSendFields will be sent to the
  1907. // server regardless of whether the field is empty or not. This may be
  1908. // used to include empty fields in Patch requests.
  1909. ForceSendFields []string `json:"-"`
  1910. // NullFields is a list of field names (e.g. "DicomStores") to include
  1911. // in API requests with the JSON null value. By default, fields with
  1912. // empty values are omitted from API requests. However, any field with
  1913. // an empty value appearing in NullFields will be sent to the server as
  1914. // null. It is an error if a field in this list has a non-empty value.
  1915. // This may be used to include null fields in Patch requests.
  1916. NullFields []string `json:"-"`
  1917. }
  1918. func (s *ListDicomStoresResponse) MarshalJSON() ([]byte, error) {
  1919. type NoMethod ListDicomStoresResponse
  1920. raw := NoMethod(*s)
  1921. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1922. }
  1923. // ListFhirStoresResponse: Lists the FHIR stores in the given dataset.
  1924. type ListFhirStoresResponse struct {
  1925. // FhirStores: The returned FHIR stores. Won't be more FHIR stores than
  1926. // the value of
  1927. // page_size in the request.
  1928. FhirStores []*FhirStore `json:"fhirStores,omitempty"`
  1929. // NextPageToken: Token to retrieve the next page of results or empty if
  1930. // there are no more
  1931. // results in the list.
  1932. NextPageToken string `json:"nextPageToken,omitempty"`
  1933. // ServerResponse contains the HTTP response code and headers from the
  1934. // server.
  1935. googleapi.ServerResponse `json:"-"`
  1936. // ForceSendFields is a list of field names (e.g. "FhirStores") to
  1937. // unconditionally include in API requests. By default, fields with
  1938. // empty values are omitted from API requests. However, any non-pointer,
  1939. // non-interface field appearing in ForceSendFields will be sent to the
  1940. // server regardless of whether the field is empty or not. This may be
  1941. // used to include empty fields in Patch requests.
  1942. ForceSendFields []string `json:"-"`
  1943. // NullFields is a list of field names (e.g. "FhirStores") to include in
  1944. // API requests with the JSON null value. By default, fields with empty
  1945. // values are omitted from API requests. However, any field with an
  1946. // empty value appearing in NullFields will be sent to the server as
  1947. // null. It is an error if a field in this list has a non-empty value.
  1948. // This may be used to include null fields in Patch requests.
  1949. NullFields []string `json:"-"`
  1950. }
  1951. func (s *ListFhirStoresResponse) MarshalJSON() ([]byte, error) {
  1952. type NoMethod ListFhirStoresResponse
  1953. raw := NoMethod(*s)
  1954. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1955. }
  1956. // ListHl7V2StoresResponse: Lists the HL7v2 stores in the given dataset.
  1957. type ListHl7V2StoresResponse struct {
  1958. // Hl7V2Stores: The returned HL7v2 stores. Won't be more HL7v2 stores
  1959. // than the value of
  1960. // page_size in the request.
  1961. Hl7V2Stores []*Hl7V2Store `json:"hl7V2Stores,omitempty"`
  1962. // NextPageToken: Token to retrieve the next page of results or empty if
  1963. // there are no more
  1964. // results in the list.
  1965. NextPageToken string `json:"nextPageToken,omitempty"`
  1966. // ServerResponse contains the HTTP response code and headers from the
  1967. // server.
  1968. googleapi.ServerResponse `json:"-"`
  1969. // ForceSendFields is a list of field names (e.g. "Hl7V2Stores") to
  1970. // unconditionally include in API requests. By default, fields with
  1971. // empty values are omitted from API requests. However, any non-pointer,
  1972. // non-interface field appearing in ForceSendFields will be sent to the
  1973. // server regardless of whether the field is empty or not. This may be
  1974. // used to include empty fields in Patch requests.
  1975. ForceSendFields []string `json:"-"`
  1976. // NullFields is a list of field names (e.g. "Hl7V2Stores") to include
  1977. // in API requests with the JSON null value. By default, fields with
  1978. // empty values are omitted from API requests. However, any field with
  1979. // an empty value appearing in NullFields will be sent to the server as
  1980. // null. It is an error if a field in this list has a non-empty value.
  1981. // This may be used to include null fields in Patch requests.
  1982. NullFields []string `json:"-"`
  1983. }
  1984. func (s *ListHl7V2StoresResponse) MarshalJSON() ([]byte, error) {
  1985. type NoMethod ListHl7V2StoresResponse
  1986. raw := NoMethod(*s)
  1987. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1988. }
  1989. // ListLocationsResponse: The response message for
  1990. // Locations.ListLocations.
  1991. type ListLocationsResponse struct {
  1992. // Locations: A list of locations that matches the specified filter in
  1993. // the request.
  1994. Locations []*Location `json:"locations,omitempty"`
  1995. // NextPageToken: The standard List next-page token.
  1996. NextPageToken string `json:"nextPageToken,omitempty"`
  1997. // ServerResponse contains the HTTP response code and headers from the
  1998. // server.
  1999. googleapi.ServerResponse `json:"-"`
  2000. // ForceSendFields is a list of field names (e.g. "Locations") to
  2001. // unconditionally include in API requests. By default, fields with
  2002. // empty values are omitted from API requests. However, any non-pointer,
  2003. // non-interface field appearing in ForceSendFields will be sent to the
  2004. // server regardless of whether the field is empty or not. This may be
  2005. // used to include empty fields in Patch requests.
  2006. ForceSendFields []string `json:"-"`
  2007. // NullFields is a list of field names (e.g. "Locations") to include in
  2008. // API requests with the JSON null value. By default, fields with empty
  2009. // values are omitted from API requests. However, any field with an
  2010. // empty value appearing in NullFields will be sent to the server as
  2011. // null. It is an error if a field in this list has a non-empty value.
  2012. // This may be used to include null fields in Patch requests.
  2013. NullFields []string `json:"-"`
  2014. }
  2015. func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
  2016. type NoMethod ListLocationsResponse
  2017. raw := NoMethod(*s)
  2018. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2019. }
  2020. // ListMessagesResponse: Lists the messages in the specified HL7v2
  2021. // store.
  2022. type ListMessagesResponse struct {
  2023. // Messages: The returned message names. Won't be more values than the
  2024. // value of
  2025. // page_size in the request.
  2026. Messages []string `json:"messages,omitempty"`
  2027. // NextPageToken: Token to retrieve the next page of results or empty if
  2028. // there are no more
  2029. // results in the list.
  2030. NextPageToken string `json:"nextPageToken,omitempty"`
  2031. // ServerResponse contains the HTTP response code and headers from the
  2032. // server.
  2033. googleapi.ServerResponse `json:"-"`
  2034. // ForceSendFields is a list of field names (e.g. "Messages") to
  2035. // unconditionally include in API requests. By default, fields with
  2036. // empty values are omitted from API requests. However, any non-pointer,
  2037. // non-interface field appearing in ForceSendFields will be sent to the
  2038. // server regardless of whether the field is empty or not. This may be
  2039. // used to include empty fields in Patch requests.
  2040. ForceSendFields []string `json:"-"`
  2041. // NullFields is a list of field names (e.g. "Messages") to include in
  2042. // API requests with the JSON null value. By default, fields with empty
  2043. // values are omitted from API requests. However, any field with an
  2044. // empty value appearing in NullFields will be sent to the server as
  2045. // null. It is an error if a field in this list has a non-empty value.
  2046. // This may be used to include null fields in Patch requests.
  2047. NullFields []string `json:"-"`
  2048. }
  2049. func (s *ListMessagesResponse) MarshalJSON() ([]byte, error) {
  2050. type NoMethod ListMessagesResponse
  2051. raw := NoMethod(*s)
  2052. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2053. }
  2054. // ListOperationsResponse: The response message for
  2055. // Operations.ListOperations.
  2056. type ListOperationsResponse struct {
  2057. // NextPageToken: The standard List next-page token.
  2058. NextPageToken string `json:"nextPageToken,omitempty"`
  2059. // Operations: A list of operations that matches the specified filter in
  2060. // the request.
  2061. Operations []*Operation `json:"operations,omitempty"`
  2062. // ServerResponse contains the HTTP response code and headers from the
  2063. // server.
  2064. googleapi.ServerResponse `json:"-"`
  2065. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2066. // unconditionally include in API requests. By default, fields with
  2067. // empty values are omitted from API requests. However, any non-pointer,
  2068. // non-interface field appearing in ForceSendFields will be sent to the
  2069. // server regardless of whether the field is empty or not. This may be
  2070. // used to include empty fields in Patch requests.
  2071. ForceSendFields []string `json:"-"`
  2072. // NullFields is a list of field names (e.g. "NextPageToken") to include
  2073. // in API requests with the JSON null value. By default, fields with
  2074. // empty values are omitted from API requests. However, any field with
  2075. // an empty value appearing in NullFields will be sent to the server as
  2076. // null. It is an error if a field in this list has a non-empty value.
  2077. // This may be used to include null fields in Patch requests.
  2078. NullFields []string `json:"-"`
  2079. }
  2080. func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  2081. type NoMethod ListOperationsResponse
  2082. raw := NoMethod(*s)
  2083. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2084. }
  2085. // Location: A resource that represents Google Cloud Platform location.
  2086. type Location struct {
  2087. // DisplayName: The friendly name for this location, typically a nearby
  2088. // city name.
  2089. // For example, "Tokyo".
  2090. DisplayName string `json:"displayName,omitempty"`
  2091. // Labels: Cross-service attributes for the location. For example
  2092. //
  2093. // {"cloud.googleapis.com/region": "us-east1"}
  2094. Labels map[string]string `json:"labels,omitempty"`
  2095. // LocationId: The canonical id for this location. For example:
  2096. // "us-east1".
  2097. LocationId string `json:"locationId,omitempty"`
  2098. // Metadata: Service-specific metadata. For example the available
  2099. // capacity at the given
  2100. // location.
  2101. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  2102. // Name: Resource name for the location, which may vary between
  2103. // implementations.
  2104. // For example: "projects/example-project/locations/us-east1"
  2105. Name string `json:"name,omitempty"`
  2106. // ServerResponse contains the HTTP response code and headers from the
  2107. // server.
  2108. googleapi.ServerResponse `json:"-"`
  2109. // ForceSendFields is a list of field names (e.g. "DisplayName") to
  2110. // unconditionally include in API requests. By default, fields with
  2111. // empty values are omitted from API requests. However, any non-pointer,
  2112. // non-interface field appearing in ForceSendFields will be sent to the
  2113. // server regardless of whether the field is empty or not. This may be
  2114. // used to include empty fields in Patch requests.
  2115. ForceSendFields []string `json:"-"`
  2116. // NullFields is a list of field names (e.g. "DisplayName") to include
  2117. // in API requests with the JSON null value. By default, fields with
  2118. // empty values are omitted from API requests. However, any field with
  2119. // an empty value appearing in NullFields will be sent to the server as
  2120. // null. It is an error if a field in this list has a non-empty value.
  2121. // This may be used to include null fields in Patch requests.
  2122. NullFields []string `json:"-"`
  2123. }
  2124. func (s *Location) MarshalJSON() ([]byte, error) {
  2125. type NoMethod Location
  2126. raw := NoMethod(*s)
  2127. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2128. }
  2129. // Message: A complete HL7v2 message.
  2130. // See http://www.hl7.org/implement/standards/index.cfm?ref=common for
  2131. // details
  2132. // on the standard.
  2133. type Message struct {
  2134. // CreateTime: The datetime when the message was created. Set by the
  2135. // server.
  2136. CreateTime string `json:"createTime,omitempty"`
  2137. // Data: Raw message bytes.
  2138. Data string `json:"data,omitempty"`
  2139. // Labels: User-supplied key-value pairs used to organize HL7v2
  2140. // stores.
  2141. //
  2142. // Label keys must be between 1 and 63 characters long, have a UTF-8
  2143. // encoding
  2144. // of maximum 128 bytes, and must conform to the
  2145. // following PCRE regular expression:
  2146. // \p{Ll}\p{Lo}{0,62}
  2147. //
  2148. // Label values are optional, must be between 1 and 63 characters long,
  2149. // have
  2150. // a UTF-8 encoding of maximum 128 bytes, and must conform to
  2151. // the
  2152. // following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
  2153. //
  2154. // No more than 64 labels can be associated with a given store.
  2155. Labels map[string]string `json:"labels,omitempty"`
  2156. // MessageType: The message type and trigger event for this message.
  2157. // MSH-9.
  2158. MessageType string `json:"messageType,omitempty"`
  2159. // Name: Resource name of the Message, of the
  2160. // form
  2161. // `projects/{project_id}/datasets/{dataset_id}/hl7V2Stores/{hl7_v2_
  2162. // store_id}/messages/{message_id}`.
  2163. // Assigned by the server.
  2164. Name string `json:"name,omitempty"`
  2165. // ParsedData: The parsed version of the raw message data.
  2166. ParsedData *ParsedData `json:"parsedData,omitempty"`
  2167. // PatientIds: All patient IDs listed in the PID-2, PID-3, and PID-4
  2168. // segments of this
  2169. // message.
  2170. PatientIds []*PatientId `json:"patientIds,omitempty"`
  2171. // SendFacility: The hospital that this message came from. MSH-4.
  2172. SendFacility string `json:"sendFacility,omitempty"`
  2173. // SendTime: The datetime the sending application sent this message.
  2174. // MSH-7.
  2175. SendTime string `json:"sendTime,omitempty"`
  2176. // ServerResponse contains the HTTP response code and headers from the
  2177. // server.
  2178. googleapi.ServerResponse `json:"-"`
  2179. // ForceSendFields is a list of field names (e.g. "CreateTime") to
  2180. // unconditionally include in API requests. By default, fields with
  2181. // empty values are omitted from API requests. However, any non-pointer,
  2182. // non-interface field appearing in ForceSendFields will be sent to the
  2183. // server regardless of whether the field is empty or not. This may be
  2184. // used to include empty fields in Patch requests.
  2185. ForceSendFields []string `json:"-"`
  2186. // NullFields is a list of field names (e.g. "CreateTime") to include in
  2187. // API requests with the JSON null value. By default, fields with empty
  2188. // values are omitted from API requests. However, any field with an
  2189. // empty value appearing in NullFields will be sent to the server as
  2190. // null. It is an error if a field in this list has a non-empty value.
  2191. // This may be used to include null fields in Patch requests.
  2192. NullFields []string `json:"-"`
  2193. }
  2194. func (s *Message) MarshalJSON() ([]byte, error) {
  2195. type NoMethod Message
  2196. raw := NoMethod(*s)
  2197. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2198. }
  2199. // NotificationConfig: Specifies where notifications should be sent upon
  2200. // changes to a data store.
  2201. type NotificationConfig struct {
  2202. // PubsubTopic: The [Cloud
  2203. // Pub/Sub](https://cloud.google.com/pubsub/docs/) topic
  2204. // that
  2205. // notifications of changes are published on. Supplied by the
  2206. // client.
  2207. // PubsubMessage.Data will contain the resource
  2208. // name.
  2209. // PubsubMessage.MessageId is the ID of this message. It is guaranteed
  2210. // to be
  2211. // unique within the topic.
  2212. // PubsubMessage.PublishTime is the time at which the message was
  2213. // published.
  2214. // Notifications are only sent if the topic is
  2215. // non-empty.
  2216. // [Topic
  2217. // names](https://cloud.google.com/pubsub/docs/overview#names) must be
  2218. // scoped
  2219. // to a project. cloud-healthcare@system.gserviceaccount.com must
  2220. // have
  2221. // publisher permissions on the given Cloud Pub/Sub topic. Not having
  2222. // adequate
  2223. // permissions will cause the calls that send notifications to fail.
  2224. PubsubTopic string `json:"pubsubTopic,omitempty"`
  2225. // ForceSendFields is a list of field names (e.g. "PubsubTopic") to
  2226. // unconditionally include in API requests. By default, fields with
  2227. // empty values are omitted from API requests. However, any non-pointer,
  2228. // non-interface field appearing in ForceSendFields will be sent to the
  2229. // server regardless of whether the field is empty or not. This may be
  2230. // used to include empty fields in Patch requests.
  2231. ForceSendFields []string `json:"-"`
  2232. // NullFields is a list of field names (e.g. "PubsubTopic") to include
  2233. // in API requests with the JSON null value. By default, fields with
  2234. // empty values are omitted from API requests. However, any field with
  2235. // an empty value appearing in NullFields will be sent to the server as
  2236. // null. It is an error if a field in this list has a non-empty value.
  2237. // This may be used to include null fields in Patch requests.
  2238. NullFields []string `json:"-"`
  2239. }
  2240. func (s *NotificationConfig) MarshalJSON() ([]byte, error) {
  2241. type NoMethod NotificationConfig
  2242. raw := NoMethod(*s)
  2243. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2244. }
  2245. // Operation: This resource represents a long-running operation that is
  2246. // the result of a
  2247. // network API call.
  2248. type Operation struct {
  2249. // Done: If the value is `false`, it means the operation is still in
  2250. // progress.
  2251. // If `true`, the operation is completed, and either `error` or
  2252. // `response` is
  2253. // available.
  2254. Done bool `json:"done,omitempty"`
  2255. // Error: The error result of the operation in case of failure or
  2256. // cancellation.
  2257. Error *Status `json:"error,omitempty"`
  2258. // Metadata: Service-specific metadata associated with the operation.
  2259. // It typically
  2260. // contains progress information and common metadata such as create
  2261. // time.
  2262. // Some services might not provide such metadata. Any method that
  2263. // returns a
  2264. // long-running operation should document the metadata type, if any.
  2265. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  2266. // Name: The server-assigned name, which is only unique within the same
  2267. // service that
  2268. // originally returns it. If you use the default HTTP mapping,
  2269. // the
  2270. // `name` should have the format of `operations/some/unique/name`.
  2271. Name string `json:"name,omitempty"`
  2272. // Response: The normal response of the operation in case of success.
  2273. // If the original
  2274. // method returns no data on success, such as `Delete`, the response
  2275. // is
  2276. // `google.protobuf.Empty`. If the original method is
  2277. // standard
  2278. // `Get`/`Create`/`Update`, the response should be the resource. For
  2279. // other
  2280. // methods, the response should have the type `XxxResponse`, where
  2281. // `Xxx`
  2282. // is the original method name. For example, if the original method
  2283. // name
  2284. // is `TakeSnapshot()`, the inferred response type
  2285. // is
  2286. // `TakeSnapshotResponse`.
  2287. Response googleapi.RawMessage `json:"response,omitempty"`
  2288. // ServerResponse contains the HTTP response code and headers from the
  2289. // server.
  2290. googleapi.ServerResponse `json:"-"`
  2291. // ForceSendFields is a list of field names (e.g. "Done") to
  2292. // unconditionally include in API requests. By default, fields with
  2293. // empty values are omitted from API requests. However, any non-pointer,
  2294. // non-interface field appearing in ForceSendFields will be sent to the
  2295. // server regardless of whether the field is empty or not. This may be
  2296. // used to include empty fields in Patch requests.
  2297. ForceSendFields []string `json:"-"`
  2298. // NullFields is a list of field names (e.g. "Done") to include in API
  2299. // requests with the JSON null value. By default, fields with empty
  2300. // values are omitted from API requests. However, any field with an
  2301. // empty value appearing in NullFields will be sent to the server as
  2302. // null. It is an error if a field in this list has a non-empty value.
  2303. // This may be used to include null fields in Patch requests.
  2304. NullFields []string `json:"-"`
  2305. }
  2306. func (s *Operation) MarshalJSON() ([]byte, error) {
  2307. type NoMethod Operation
  2308. raw := NoMethod(*s)
  2309. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2310. }
  2311. // OperationMetadata: OperationMetadata provides information about the
  2312. // operation execution.
  2313. // Returned in the long-running operation's metadata field.
  2314. type OperationMetadata struct {
  2315. // ApiMethodName: The name of the API method that initiated the
  2316. // operation.
  2317. ApiMethodName string `json:"apiMethodName,omitempty"`
  2318. Counter *ProgressCounter `json:"counter,omitempty"`
  2319. // CreateTime: The time at which the operation was created by the API.
  2320. CreateTime string `json:"createTime,omitempty"`
  2321. // EndTime: The time at which execution was completed.
  2322. EndTime string `json:"endTime,omitempty"`
  2323. // ForceSendFields is a list of field names (e.g. "ApiMethodName") to
  2324. // unconditionally include in API requests. By default, fields with
  2325. // empty values are omitted from API requests. However, any non-pointer,
  2326. // non-interface field appearing in ForceSendFields will be sent to the
  2327. // server regardless of whether the field is empty or not. This may be
  2328. // used to include empty fields in Patch requests.
  2329. ForceSendFields []string `json:"-"`
  2330. // NullFields is a list of field names (e.g. "ApiMethodName") to include
  2331. // in API requests with the JSON null value. By default, fields with
  2332. // empty values are omitted from API requests. However, any field with
  2333. // an empty value appearing in NullFields will be sent to the server as
  2334. // null. It is an error if a field in this list has a non-empty value.
  2335. // This may be used to include null fields in Patch requests.
  2336. NullFields []string `json:"-"`
  2337. }
  2338. func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  2339. type NoMethod OperationMetadata
  2340. raw := NoMethod(*s)
  2341. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2342. }
  2343. // OutputConfig: Specifies the location(s) to which data should be
  2344. // exported.
  2345. type OutputConfig struct {
  2346. // BigQueryDestination: BigQueryDestination requires two IAM roles:
  2347. // `roles/bigquery.dataEditor`
  2348. // and `roles/bigquery.jobUser`.
  2349. BigQueryDestination *BigQueryDestination `json:"bigQueryDestination,omitempty"`
  2350. // GcsDestination: GcsDestination requires `roles/storage.objectAdmin`
  2351. // Cloud IAM role.
  2352. // Note that writing a file to the same destination multiple times
  2353. // will
  2354. // result in the previous version of the file being overwritten.
  2355. GcsDestination *GcsDestination `json:"gcsDestination,omitempty"`
  2356. // ForceSendFields is a list of field names (e.g. "BigQueryDestination")
  2357. // to unconditionally include in API requests. By default, fields with
  2358. // empty values are omitted from API requests. However, any non-pointer,
  2359. // non-interface field appearing in ForceSendFields will be sent to the
  2360. // server regardless of whether the field is empty or not. This may be
  2361. // used to include empty fields in Patch requests.
  2362. ForceSendFields []string `json:"-"`
  2363. // NullFields is a list of field names (e.g. "BigQueryDestination") to
  2364. // include in API requests with the JSON null value. By default, fields
  2365. // with empty values are omitted from API requests. However, any field
  2366. // with an empty value appearing in NullFields will be sent to the
  2367. // server as null. It is an error if a field in this list has a
  2368. // non-empty value. This may be used to include null fields in Patch
  2369. // requests.
  2370. NullFields []string `json:"-"`
  2371. }
  2372. func (s *OutputConfig) MarshalJSON() ([]byte, error) {
  2373. type NoMethod OutputConfig
  2374. raw := NoMethod(*s)
  2375. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2376. }
  2377. // ParsedData: The content of a HL7v2 message in a structured format.
  2378. type ParsedData struct {
  2379. Segments []*Segment `json:"segments,omitempty"`
  2380. // ForceSendFields is a list of field names (e.g. "Segments") to
  2381. // unconditionally include in API requests. By default, fields with
  2382. // empty values are omitted from API requests. However, any non-pointer,
  2383. // non-interface field appearing in ForceSendFields will be sent to the
  2384. // server regardless of whether the field is empty or not. This may be
  2385. // used to include empty fields in Patch requests.
  2386. ForceSendFields []string `json:"-"`
  2387. // NullFields is a list of field names (e.g. "Segments") to include in
  2388. // API requests with the JSON null value. By default, fields with empty
  2389. // values are omitted from API requests. However, any field with an
  2390. // empty value appearing in NullFields will be sent to the server as
  2391. // null. It is an error if a field in this list has a non-empty value.
  2392. // This may be used to include null fields in Patch requests.
  2393. NullFields []string `json:"-"`
  2394. }
  2395. func (s *ParsedData) MarshalJSON() ([]byte, error) {
  2396. type NoMethod ParsedData
  2397. raw := NoMethod(*s)
  2398. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2399. }
  2400. // ParserConfig: The configuration for the parser. It determines how the
  2401. // server parses the
  2402. // messages.
  2403. type ParserConfig struct {
  2404. // AllowNullHeader: Determines whether messages with no header are
  2405. // allowed.
  2406. AllowNullHeader bool `json:"allowNullHeader,omitempty"`
  2407. // SegmentTerminator: Byte(s) to be used as the segment terminator. If
  2408. // this is unset, '\r' will
  2409. // be used as segment terminator.
  2410. SegmentTerminator string `json:"segmentTerminator,omitempty"`
  2411. // ForceSendFields is a list of field names (e.g. "AllowNullHeader") to
  2412. // unconditionally include in API requests. By default, fields with
  2413. // empty values are omitted from API requests. However, any non-pointer,
  2414. // non-interface field appearing in ForceSendFields will be sent to the
  2415. // server regardless of whether the field is empty or not. This may be
  2416. // used to include empty fields in Patch requests.
  2417. ForceSendFields []string `json:"-"`
  2418. // NullFields is a list of field names (e.g. "AllowNullHeader") to
  2419. // include in API requests with the JSON null value. By default, fields
  2420. // with empty values are omitted from API requests. However, any field
  2421. // with an empty value appearing in NullFields will be sent to the
  2422. // server as null. It is an error if a field in this list has a
  2423. // non-empty value. This may be used to include null fields in Patch
  2424. // requests.
  2425. NullFields []string `json:"-"`
  2426. }
  2427. func (s *ParserConfig) MarshalJSON() ([]byte, error) {
  2428. type NoMethod ParserConfig
  2429. raw := NoMethod(*s)
  2430. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2431. }
  2432. // PatientId: A patient identifier and associated type.
  2433. type PatientId struct {
  2434. // Type: ID type, e.g. MRN or NHS.
  2435. Type string `json:"type,omitempty"`
  2436. // Value: The patient's unique identifier.
  2437. Value string `json:"value,omitempty"`
  2438. // ForceSendFields is a list of field names (e.g. "Type") to
  2439. // unconditionally include in API requests. By default, fields with
  2440. // empty values are omitted from API requests. However, any non-pointer,
  2441. // non-interface field appearing in ForceSendFields will be sent to the
  2442. // server regardless of whether the field is empty or not. This may be
  2443. // used to include empty fields in Patch requests.
  2444. ForceSendFields []string `json:"-"`
  2445. // NullFields is a list of field names (e.g. "Type") to include in API
  2446. // requests with the JSON null value. By default, fields with empty
  2447. // values are omitted from API requests. However, any field with an
  2448. // empty value appearing in NullFields will be sent to the server as
  2449. // null. It is an error if a field in this list has a non-empty value.
  2450. // This may be used to include null fields in Patch requests.
  2451. NullFields []string `json:"-"`
  2452. }
  2453. func (s *PatientId) MarshalJSON() ([]byte, error) {
  2454. type NoMethod PatientId
  2455. raw := NoMethod(*s)
  2456. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2457. }
  2458. // Policy: Defines an Identity and Access Management (IAM) policy. It is
  2459. // used to
  2460. // specify access control policies for Cloud Platform resources.
  2461. //
  2462. //
  2463. // A `Policy` consists of a list of `bindings`. A `binding` binds a list
  2464. // of
  2465. // `members` to a `role`, where the members can be user accounts, Google
  2466. // groups,
  2467. // Google domains, and service accounts. A `role` is a named list of
  2468. // permissions
  2469. // defined by IAM.
  2470. //
  2471. // **JSON Example**
  2472. //
  2473. // {
  2474. // "bindings": [
  2475. // {
  2476. // "role": "roles/owner",
  2477. // "members": [
  2478. // "user:mike@example.com",
  2479. // "group:admins@example.com",
  2480. // "domain:google.com",
  2481. //
  2482. // "serviceAccount:my-other-app@appspot.gserviceaccount.com"
  2483. // ]
  2484. // },
  2485. // {
  2486. // "role": "roles/viewer",
  2487. // "members": ["user:sean@example.com"]
  2488. // }
  2489. // ]
  2490. // }
  2491. //
  2492. // **YAML Example**
  2493. //
  2494. // bindings:
  2495. // - members:
  2496. // - user:mike@example.com
  2497. // - group:admins@example.com
  2498. // - domain:google.com
  2499. // - serviceAccount:my-other-app@appspot.gserviceaccount.com
  2500. // role: roles/owner
  2501. // - members:
  2502. // - user:sean@example.com
  2503. // role: roles/viewer
  2504. //
  2505. //
  2506. // For a description of IAM and its features, see the
  2507. // [IAM developer's guide](https://cloud.google.com/iam/docs).
  2508. type Policy struct {
  2509. // AuditConfigs: Specifies cloud audit logging configuration for this
  2510. // policy.
  2511. AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
  2512. // Bindings: Associates a list of `members` to a `role`.
  2513. // `bindings` with no members will result in an error.
  2514. Bindings []*Binding `json:"bindings,omitempty"`
  2515. // Etag: `etag` is used for optimistic concurrency control as a way to
  2516. // help
  2517. // prevent simultaneous updates of a policy from overwriting each
  2518. // other.
  2519. // It is strongly suggested that systems make use of the `etag` in
  2520. // the
  2521. // read-modify-write cycle to perform policy updates in order to avoid
  2522. // race
  2523. // conditions: An `etag` is returned in the response to `getIamPolicy`,
  2524. // and
  2525. // systems are expected to put that etag in the request to
  2526. // `setIamPolicy` to
  2527. // ensure that their change will be applied to the same version of the
  2528. // policy.
  2529. //
  2530. // If no `etag` is provided in the call to `setIamPolicy`, then the
  2531. // existing
  2532. // policy is overwritten blindly.
  2533. Etag string `json:"etag,omitempty"`
  2534. // Version: Deprecated.
  2535. Version int64 `json:"version,omitempty"`
  2536. // ServerResponse contains the HTTP response code and headers from the
  2537. // server.
  2538. googleapi.ServerResponse `json:"-"`
  2539. // ForceSendFields is a list of field names (e.g. "AuditConfigs") to
  2540. // unconditionally include in API requests. By default, fields with
  2541. // empty values are omitted from API requests. However, any non-pointer,
  2542. // non-interface field appearing in ForceSendFields will be sent to the
  2543. // server regardless of whether the field is empty or not. This may be
  2544. // used to include empty fields in Patch requests.
  2545. ForceSendFields []string `json:"-"`
  2546. // NullFields is a list of field names (e.g. "AuditConfigs") to include
  2547. // in API requests with the JSON null value. By default, fields with
  2548. // empty values are omitted from API requests. However, any field with
  2549. // an empty value appearing in NullFields will be sent to the server as
  2550. // null. It is an error if a field in this list has a non-empty value.
  2551. // This may be used to include null fields in Patch requests.
  2552. NullFields []string `json:"-"`
  2553. }
  2554. func (s *Policy) MarshalJSON() ([]byte, error) {
  2555. type NoMethod Policy
  2556. raw := NoMethod(*s)
  2557. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2558. }
  2559. // ProgressCounter: ProgressCounter provides counters to describe an
  2560. // operation's progress.
  2561. type ProgressCounter struct {
  2562. // Failure: The number of units that failed in the operation.
  2563. Failure int64 `json:"failure,omitempty,string"`
  2564. // Pending: The number of units that are pending in the operation.
  2565. Pending int64 `json:"pending,omitempty,string"`
  2566. // Success: The number of units that succeeded in the operation.
  2567. Success int64 `json:"success,omitempty,string"`
  2568. // ForceSendFields is a list of field names (e.g. "Failure") to
  2569. // unconditionally include in API requests. By default, fields with
  2570. // empty values are omitted from API requests. However, any non-pointer,
  2571. // non-interface field appearing in ForceSendFields will be sent to the
  2572. // server regardless of whether the field is empty or not. This may be
  2573. // used to include empty fields in Patch requests.
  2574. ForceSendFields []string `json:"-"`
  2575. // NullFields is a list of field names (e.g. "Failure") to include in
  2576. // API requests with the JSON null value. By default, fields with empty
  2577. // values are omitted from API requests. However, any field with an
  2578. // empty value appearing in NullFields will be sent to the server as
  2579. // null. It is an error if a field in this list has a non-empty value.
  2580. // This may be used to include null fields in Patch requests.
  2581. NullFields []string `json:"-"`
  2582. }
  2583. func (s *ProgressCounter) MarshalJSON() ([]byte, error) {
  2584. type NoMethod ProgressCounter
  2585. raw := NoMethod(*s)
  2586. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2587. }
  2588. // ResourceAnnotation: Resource level annotation.
  2589. type ResourceAnnotation struct {
  2590. Label string `json:"label,omitempty"`
  2591. // ForceSendFields is a list of field names (e.g. "Label") to
  2592. // unconditionally include in API requests. By default, fields with
  2593. // empty values are omitted from API requests. However, any non-pointer,
  2594. // non-interface field appearing in ForceSendFields will be sent to the
  2595. // server regardless of whether the field is empty or not. This may be
  2596. // used to include empty fields in Patch requests.
  2597. ForceSendFields []string `json:"-"`
  2598. // NullFields is a list of field names (e.g. "Label") to include in API
  2599. // requests with the JSON null value. By default, fields with empty
  2600. // values are omitted from API requests. However, any field with an
  2601. // empty value appearing in NullFields will be sent to the server as
  2602. // null. It is an error if a field in this list has a non-empty value.
  2603. // This may be used to include null fields in Patch requests.
  2604. NullFields []string `json:"-"`
  2605. }
  2606. func (s *ResourceAnnotation) MarshalJSON() ([]byte, error) {
  2607. type NoMethod ResourceAnnotation
  2608. raw := NoMethod(*s)
  2609. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2610. }
  2611. // SchemaConfig: Configuration for the FHIR BigQuery schema. Determines
  2612. // how the server
  2613. // generates the schema.
  2614. type SchemaConfig struct {
  2615. // RecursiveStructureDepth: The depth for all recursive structures in
  2616. // the output analytics
  2617. // schema. For example, concept in the CodeSystem resource is a
  2618. // recursive
  2619. // structure; when the depth is 2, the CodeSystem table will have a
  2620. // column
  2621. // called `concept.concept` but not `concept.concept.concept`. If
  2622. // not
  2623. // specified or set to 0, the server will use the default value 2.
  2624. RecursiveStructureDepth int64 `json:"recursiveStructureDepth,omitempty,string"`
  2625. // SchemaType: Specifies the output schema type. If unspecified, the
  2626. // default is
  2627. // `LOSSLESS`.
  2628. //
  2629. // Possible values:
  2630. // "SCHEMA_TYPE_UNSPECIFIED" - No schema type specified. Same as
  2631. // `LOSSLESS`.
  2632. // "LOSSLESS" - Schema generated from original FHIR data.
  2633. // "ANALYTICS" - Analytics schema defined by the FHIR community.
  2634. // See https://github.com/FHIR/sql-on-fhir.
  2635. SchemaType string `json:"schemaType,omitempty"`
  2636. // ForceSendFields is a list of field names (e.g.
  2637. // "RecursiveStructureDepth") to unconditionally include in API
  2638. // requests. By default, fields with empty values are omitted from API
  2639. // requests. However, any non-pointer, non-interface field appearing in
  2640. // ForceSendFields will be sent to the server regardless of whether the
  2641. // field is empty or not. This may be used to include empty fields in
  2642. // Patch requests.
  2643. ForceSendFields []string `json:"-"`
  2644. // NullFields is a list of field names (e.g. "RecursiveStructureDepth")
  2645. // to include in API requests with the JSON null value. By default,
  2646. // fields with empty values are omitted from API requests. However, any
  2647. // field with an empty value appearing in NullFields will be sent to the
  2648. // server as null. It is an error if a field in this list has a
  2649. // non-empty value. This may be used to include null fields in Patch
  2650. // requests.
  2651. NullFields []string `json:"-"`
  2652. }
  2653. func (s *SchemaConfig) MarshalJSON() ([]byte, error) {
  2654. type NoMethod SchemaConfig
  2655. raw := NoMethod(*s)
  2656. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2657. }
  2658. // SearchResourcesRequest: Request to search the resources in the
  2659. // specified FHIR store.
  2660. type SearchResourcesRequest struct {
  2661. // ResourceType: The type of the resource to search.
  2662. ResourceType string `json:"resourceType,omitempty"`
  2663. // ForceSendFields is a list of field names (e.g. "ResourceType") to
  2664. // unconditionally include in API requests. By default, fields with
  2665. // empty values are omitted from API requests. However, any non-pointer,
  2666. // non-interface field appearing in ForceSendFields will be sent to the
  2667. // server regardless of whether the field is empty or not. This may be
  2668. // used to include empty fields in Patch requests.
  2669. ForceSendFields []string `json:"-"`
  2670. // NullFields is a list of field names (e.g. "ResourceType") to include
  2671. // in API requests with the JSON null value. By default, fields with
  2672. // empty values are omitted from API requests. However, any field with
  2673. // an empty value appearing in NullFields will be sent to the server as
  2674. // null. It is an error if a field in this list has a non-empty value.
  2675. // This may be used to include null fields in Patch requests.
  2676. NullFields []string `json:"-"`
  2677. }
  2678. func (s *SearchResourcesRequest) MarshalJSON() ([]byte, error) {
  2679. type NoMethod SearchResourcesRequest
  2680. raw := NoMethod(*s)
  2681. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2682. }
  2683. // Segment: A segment in a structured format.
  2684. type Segment struct {
  2685. // Fields: A mapping from the positional location to the value.
  2686. // The key string uses indexes separated by dots to identify
  2687. // Fields,
  2688. // components and sub-components. To be consistent with how the
  2689. // standard
  2690. // refers to different parts of message, we use zero-based indexes for
  2691. // fields
  2692. // and one-based indexes for components and sub-components. A bracket
  2693. // notation
  2694. // is also used to identify different instances of a repeated
  2695. // field.
  2696. // Zero-based indexes are used to refer to each instance.
  2697. // Regex for key: (\d+)(\[\d+\])?(.\d+)?(.\d+)?
  2698. //
  2699. // Examples of (key, value) pairs:
  2700. //
  2701. // (0.1, "foo") denotes First component of Field 0 has the value
  2702. // "foo".
  2703. //
  2704. // (1.1.2, "bar") denotes Second sub-component of the first component
  2705. // of
  2706. // Field 1 has the value "bar".
  2707. //
  2708. // (1[0].1, "baz") denotes First component of the
  2709. // first Instance of Field 1, which is repeated, has the value "baz".
  2710. Fields map[string]string `json:"fields,omitempty"`
  2711. // SegmentId: A string that indicates the type of segment, e.g., EVN,
  2712. // PID.
  2713. SegmentId string `json:"segmentId,omitempty"`
  2714. // SetId: Set ID for segments that can be in a set. This can be empty if
  2715. // it is
  2716. // missing or it is not applicable.
  2717. SetId string `json:"setId,omitempty"`
  2718. // ForceSendFields is a list of field names (e.g. "Fields") to
  2719. // unconditionally include in API requests. By default, fields with
  2720. // empty values are omitted from API requests. However, any non-pointer,
  2721. // non-interface field appearing in ForceSendFields will be sent to the
  2722. // server regardless of whether the field is empty or not. This may be
  2723. // used to include empty fields in Patch requests.
  2724. ForceSendFields []string `json:"-"`
  2725. // NullFields is a list of field names (e.g. "Fields") to include in API
  2726. // requests with the JSON null value. By default, fields with empty
  2727. // values are omitted from API requests. However, any field with an
  2728. // empty value appearing in NullFields will be sent to the server as
  2729. // null. It is an error if a field in this list has a non-empty value.
  2730. // This may be used to include null fields in Patch requests.
  2731. NullFields []string `json:"-"`
  2732. }
  2733. func (s *Segment) MarshalJSON() ([]byte, error) {
  2734. type NoMethod Segment
  2735. raw := NoMethod(*s)
  2736. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2737. }
  2738. // SensitiveTextAnnotation: A TextAnnotation specifies a text range that
  2739. // includes sensitive information.
  2740. type SensitiveTextAnnotation struct {
  2741. // Details: Maps from a resource slice (e.g. FHIR resource field path)
  2742. // to a set of
  2743. // sensitive text findings. For example,
  2744. // Appointment.Narrative text1 --> {findings_1, findings_2, findings_3}
  2745. Details map[string]Detail `json:"details,omitempty"`
  2746. // ForceSendFields is a list of field names (e.g. "Details") to
  2747. // unconditionally include in API requests. By default, fields with
  2748. // empty values are omitted from API requests. However, any non-pointer,
  2749. // non-interface field appearing in ForceSendFields will be sent to the
  2750. // server regardless of whether the field is empty or not. This may be
  2751. // used to include empty fields in Patch requests.
  2752. ForceSendFields []string `json:"-"`
  2753. // NullFields is a list of field names (e.g. "Details") to include in
  2754. // API requests with the JSON null value. By default, fields with empty
  2755. // values are omitted from API requests. However, any field with an
  2756. // empty value appearing in NullFields will be sent to the server as
  2757. // null. It is an error if a field in this list has a non-empty value.
  2758. // This may be used to include null fields in Patch requests.
  2759. NullFields []string `json:"-"`
  2760. }
  2761. func (s *SensitiveTextAnnotation) MarshalJSON() ([]byte, error) {
  2762. type NoMethod SensitiveTextAnnotation
  2763. raw := NoMethod(*s)
  2764. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2765. }
  2766. // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
  2767. type SetIamPolicyRequest struct {
  2768. // Policy: REQUIRED: The complete policy to be applied to the
  2769. // `resource`. The size of
  2770. // the policy is limited to a few 10s of KB. An empty policy is a
  2771. // valid policy but certain Cloud Platform services (such as
  2772. // Projects)
  2773. // might reject them.
  2774. Policy *Policy `json:"policy,omitempty"`
  2775. // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the
  2776. // policy to modify. Only
  2777. // the fields in the mask will be modified. If no mask is provided,
  2778. // the
  2779. // following default mask is used:
  2780. // paths: "bindings, etag"
  2781. // This field is only used by Cloud IAM.
  2782. UpdateMask string `json:"updateMask,omitempty"`
  2783. // ForceSendFields is a list of field names (e.g. "Policy") to
  2784. // unconditionally include in API requests. By default, fields with
  2785. // empty values are omitted from API requests. However, any non-pointer,
  2786. // non-interface field appearing in ForceSendFields will be sent to the
  2787. // server regardless of whether the field is empty or not. This may be
  2788. // used to include empty fields in Patch requests.
  2789. ForceSendFields []string `json:"-"`
  2790. // NullFields is a list of field names (e.g. "Policy") to include in API
  2791. // requests with the JSON null value. By default, fields with empty
  2792. // values are omitted from API requests. However, any field with an
  2793. // empty value appearing in NullFields will be sent to the server as
  2794. // null. It is an error if a field in this list has a non-empty value.
  2795. // This may be used to include null fields in Patch requests.
  2796. NullFields []string `json:"-"`
  2797. }
  2798. func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  2799. type NoMethod SetIamPolicyRequest
  2800. raw := NoMethod(*s)
  2801. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2802. }
  2803. // Status: The `Status` type defines a logical error model that is
  2804. // suitable for
  2805. // different programming environments, including REST APIs and RPC APIs.
  2806. // It is
  2807. // used by [gRPC](https://github.com/grpc). The error model is designed
  2808. // to be:
  2809. //
  2810. // - Simple to use and understand for most users
  2811. // - Flexible enough to meet unexpected needs
  2812. //
  2813. // # Overview
  2814. //
  2815. // The `Status` message contains three pieces of data: error code,
  2816. // error
  2817. // message, and error details. The error code should be an enum value
  2818. // of
  2819. // google.rpc.Code, but it may accept additional error codes if needed.
  2820. // The
  2821. // error message should be a developer-facing English message that
  2822. // helps
  2823. // developers *understand* and *resolve* the error. If a localized
  2824. // user-facing
  2825. // error message is needed, put the localized message in the error
  2826. // details or
  2827. // localize it in the client. The optional error details may contain
  2828. // arbitrary
  2829. // information about the error. There is a predefined set of error
  2830. // detail types
  2831. // in the package `google.rpc` that can be used for common error
  2832. // conditions.
  2833. //
  2834. // # Language mapping
  2835. //
  2836. // The `Status` message is the logical representation of the error
  2837. // model, but it
  2838. // is not necessarily the actual wire format. When the `Status` message
  2839. // is
  2840. // exposed in different client libraries and different wire protocols,
  2841. // it can be
  2842. // mapped differently. For example, it will likely be mapped to some
  2843. // exceptions
  2844. // in Java, but more likely mapped to some error codes in C.
  2845. //
  2846. // # Other uses
  2847. //
  2848. // The error model and the `Status` message can be used in a variety
  2849. // of
  2850. // environments, either with or without APIs, to provide a
  2851. // consistent developer experience across different
  2852. // environments.
  2853. //
  2854. // Example uses of this error model include:
  2855. //
  2856. // - Partial errors. If a service needs to return partial errors to the
  2857. // client,
  2858. // it may embed the `Status` in the normal response to indicate the
  2859. // partial
  2860. // errors.
  2861. //
  2862. // - Workflow errors. A typical workflow has multiple steps. Each step
  2863. // may
  2864. // have a `Status` message for error reporting.
  2865. //
  2866. // - Batch operations. If a client uses batch request and batch
  2867. // response, the
  2868. // `Status` message should be used directly inside batch response,
  2869. // one for
  2870. // each error sub-response.
  2871. //
  2872. // - Asynchronous operations. If an API call embeds asynchronous
  2873. // operation
  2874. // results in its response, the status of those operations should
  2875. // be
  2876. // represented directly using the `Status` message.
  2877. //
  2878. // - Logging. If some API errors are stored in logs, the message
  2879. // `Status` could
  2880. // be used directly after any stripping needed for security/privacy
  2881. // reasons.
  2882. type Status struct {
  2883. // Code: The status code, which should be an enum value of
  2884. // google.rpc.Code.
  2885. Code int64 `json:"code,omitempty"`
  2886. // Details: A list of messages that carry the error details. There is a
  2887. // common set of
  2888. // message types for APIs to use.
  2889. Details []googleapi.RawMessage `json:"details,omitempty"`
  2890. // Message: A developer-facing error message, which should be in
  2891. // English. Any
  2892. // user-facing error message should be localized and sent in
  2893. // the
  2894. // google.rpc.Status.details field, or localized by the client.
  2895. Message string `json:"message,omitempty"`
  2896. // ForceSendFields is a list of field names (e.g. "Code") to
  2897. // unconditionally include in API requests. By default, fields with
  2898. // empty values are omitted from API requests. However, any non-pointer,
  2899. // non-interface field appearing in ForceSendFields will be sent to the
  2900. // server regardless of whether the field is empty or not. This may be
  2901. // used to include empty fields in Patch requests.
  2902. ForceSendFields []string `json:"-"`
  2903. // NullFields is a list of field names (e.g. "Code") to include in API
  2904. // requests with the JSON null value. By default, fields with empty
  2905. // values are omitted from API requests. However, any field with an
  2906. // empty value appearing in NullFields will be sent to the server as
  2907. // null. It is an error if a field in this list has a non-empty value.
  2908. // This may be used to include null fields in Patch requests.
  2909. NullFields []string `json:"-"`
  2910. }
  2911. func (s *Status) MarshalJSON() ([]byte, error) {
  2912. type NoMethod Status
  2913. raw := NoMethod(*s)
  2914. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2915. }
  2916. // TestIamPermissionsRequest: Request message for `TestIamPermissions`
  2917. // method.
  2918. type TestIamPermissionsRequest struct {
  2919. // Permissions: The set of permissions to check for the `resource`.
  2920. // Permissions with
  2921. // wildcards (such as '*' or 'storage.*') are not allowed. For
  2922. // more
  2923. // information see
  2924. // [IAM
  2925. // Overview](https://cloud.google.com/iam/docs/overview#permissions).
  2926. Permissions []string `json:"permissions,omitempty"`
  2927. // ForceSendFields is a list of field names (e.g. "Permissions") to
  2928. // unconditionally include in API requests. By default, fields with
  2929. // empty values are omitted from API requests. However, any non-pointer,
  2930. // non-interface field appearing in ForceSendFields will be sent to the
  2931. // server regardless of whether the field is empty or not. This may be
  2932. // used to include empty fields in Patch requests.
  2933. ForceSendFields []string `json:"-"`
  2934. // NullFields is a list of field names (e.g. "Permissions") to include
  2935. // in API requests with the JSON null value. By default, fields with
  2936. // empty values are omitted from API requests. However, any field with
  2937. // an empty value appearing in NullFields will be sent to the server as
  2938. // null. It is an error if a field in this list has a non-empty value.
  2939. // This may be used to include null fields in Patch requests.
  2940. NullFields []string `json:"-"`
  2941. }
  2942. func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  2943. type NoMethod TestIamPermissionsRequest
  2944. raw := NoMethod(*s)
  2945. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2946. }
  2947. // TestIamPermissionsResponse: Response message for `TestIamPermissions`
  2948. // method.
  2949. type TestIamPermissionsResponse struct {
  2950. // Permissions: A subset of `TestPermissionsRequest.permissions` that
  2951. // the caller is
  2952. // allowed.
  2953. Permissions []string `json:"permissions,omitempty"`
  2954. // ServerResponse contains the HTTP response code and headers from the
  2955. // server.
  2956. googleapi.ServerResponse `json:"-"`
  2957. // ForceSendFields is a list of field names (e.g. "Permissions") to
  2958. // unconditionally include in API requests. By default, fields with
  2959. // empty values are omitted from API requests. However, any non-pointer,
  2960. // non-interface field appearing in ForceSendFields will be sent to the
  2961. // server regardless of whether the field is empty or not. This may be
  2962. // used to include empty fields in Patch requests.
  2963. ForceSendFields []string `json:"-"`
  2964. // NullFields is a list of field names (e.g. "Permissions") to include
  2965. // in API requests with the JSON null value. By default, fields with
  2966. // empty values are omitted from API requests. However, any field with
  2967. // an empty value appearing in NullFields will be sent to the server as
  2968. // null. It is an error if a field in this list has a non-empty value.
  2969. // This may be used to include null fields in Patch requests.
  2970. NullFields []string `json:"-"`
  2971. }
  2972. func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  2973. type NoMethod TestIamPermissionsResponse
  2974. raw := NoMethod(*s)
  2975. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2976. }
  2977. // Vertex: A 2D coordinate in an image. The origin is the top-left.
  2978. type Vertex struct {
  2979. // X: X coordinate.
  2980. X float64 `json:"x,omitempty"`
  2981. // Y: Y coordinate.
  2982. Y float64 `json:"y,omitempty"`
  2983. // ForceSendFields is a list of field names (e.g. "X") to
  2984. // unconditionally include in API requests. By default, fields with
  2985. // empty values are omitted from API requests. However, any non-pointer,
  2986. // non-interface field appearing in ForceSendFields will be sent to the
  2987. // server regardless of whether the field is empty or not. This may be
  2988. // used to include empty fields in Patch requests.
  2989. ForceSendFields []string `json:"-"`
  2990. // NullFields is a list of field names (e.g. "X") to include in API
  2991. // requests with the JSON null value. By default, fields with empty
  2992. // values are omitted from API requests. However, any field with an
  2993. // empty value appearing in NullFields will be sent to the server as
  2994. // null. It is an error if a field in this list has a non-empty value.
  2995. // This may be used to include null fields in Patch requests.
  2996. NullFields []string `json:"-"`
  2997. }
  2998. func (s *Vertex) MarshalJSON() ([]byte, error) {
  2999. type NoMethod Vertex
  3000. raw := NoMethod(*s)
  3001. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3002. }
  3003. func (s *Vertex) UnmarshalJSON(data []byte) error {
  3004. type NoMethod Vertex
  3005. var s1 struct {
  3006. X gensupport.JSONFloat64 `json:"x"`
  3007. Y gensupport.JSONFloat64 `json:"y"`
  3008. *NoMethod
  3009. }
  3010. s1.NoMethod = (*NoMethod)(s)
  3011. if err := json.Unmarshal(data, &s1); err != nil {
  3012. return err
  3013. }
  3014. s.X = float64(s1.X)
  3015. s.Y = float64(s1.Y)
  3016. return nil
  3017. }
  3018. // method id "healthcare.projects.locations.get":
  3019. type ProjectsLocationsGetCall struct {
  3020. s *Service
  3021. name string
  3022. urlParams_ gensupport.URLParams
  3023. ifNoneMatch_ string
  3024. ctx_ context.Context
  3025. header_ http.Header
  3026. }
  3027. // Get: Gets information about a location.
  3028. func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  3029. c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3030. c.name = name
  3031. return c
  3032. }
  3033. // Fields allows partial responses to be retrieved. See
  3034. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3035. // for more information.
  3036. func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  3037. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3038. return c
  3039. }
  3040. // IfNoneMatch sets the optional parameter which makes the operation
  3041. // fail if the object's ETag matches the given value. This is useful for
  3042. // getting updates only after the object has changed since the last
  3043. // request. Use googleapi.IsNotModified to check whether the response
  3044. // error from Do is the result of In-None-Match.
  3045. func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  3046. c.ifNoneMatch_ = entityTag
  3047. return c
  3048. }
  3049. // Context sets the context to be used in this call's Do method. Any
  3050. // pending HTTP request will be aborted if the provided context is
  3051. // canceled.
  3052. func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  3053. c.ctx_ = ctx
  3054. return c
  3055. }
  3056. // Header returns an http.Header that can be modified by the caller to
  3057. // add HTTP headers to the request.
  3058. func (c *ProjectsLocationsGetCall) Header() http.Header {
  3059. if c.header_ == nil {
  3060. c.header_ = make(http.Header)
  3061. }
  3062. return c.header_
  3063. }
  3064. func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  3065. reqHeaders := make(http.Header)
  3066. for k, v := range c.header_ {
  3067. reqHeaders[k] = v
  3068. }
  3069. reqHeaders.Set("User-Agent", c.s.userAgent())
  3070. if c.ifNoneMatch_ != "" {
  3071. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3072. }
  3073. var body io.Reader = nil
  3074. c.urlParams_.Set("alt", alt)
  3075. c.urlParams_.Set("prettyPrint", "false")
  3076. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  3077. urls += "?" + c.urlParams_.Encode()
  3078. req, err := http.NewRequest("GET", urls, body)
  3079. if err != nil {
  3080. return nil, err
  3081. }
  3082. req.Header = reqHeaders
  3083. googleapi.Expand(req.URL, map[string]string{
  3084. "name": c.name,
  3085. })
  3086. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3087. }
  3088. // Do executes the "healthcare.projects.locations.get" call.
  3089. // Exactly one of *Location or error will be non-nil. Any non-2xx status
  3090. // code is an error. Response headers are in either
  3091. // *Location.ServerResponse.Header or (if a response was returned at
  3092. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3093. // to check whether the returned error was because
  3094. // http.StatusNotModified was returned.
  3095. func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  3096. gensupport.SetOptions(c.urlParams_, opts...)
  3097. res, err := c.doRequest("json")
  3098. if res != nil && res.StatusCode == http.StatusNotModified {
  3099. if res.Body != nil {
  3100. res.Body.Close()
  3101. }
  3102. return nil, &googleapi.Error{
  3103. Code: res.StatusCode,
  3104. Header: res.Header,
  3105. }
  3106. }
  3107. if err != nil {
  3108. return nil, err
  3109. }
  3110. defer googleapi.CloseBody(res)
  3111. if err := googleapi.CheckResponse(res); err != nil {
  3112. return nil, err
  3113. }
  3114. ret := &Location{
  3115. ServerResponse: googleapi.ServerResponse{
  3116. Header: res.Header,
  3117. HTTPStatusCode: res.StatusCode,
  3118. },
  3119. }
  3120. target := &ret
  3121. if err := gensupport.DecodeResponse(target, res); err != nil {
  3122. return nil, err
  3123. }
  3124. return ret, nil
  3125. // {
  3126. // "description": "Gets information about a location.",
  3127. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}",
  3128. // "httpMethod": "GET",
  3129. // "id": "healthcare.projects.locations.get",
  3130. // "parameterOrder": [
  3131. // "name"
  3132. // ],
  3133. // "parameters": {
  3134. // "name": {
  3135. // "description": "Resource name for the location.",
  3136. // "location": "path",
  3137. // "pattern": "^projects/[^/]+/locations/[^/]+$",
  3138. // "required": true,
  3139. // "type": "string"
  3140. // }
  3141. // },
  3142. // "path": "v1alpha/{+name}",
  3143. // "response": {
  3144. // "$ref": "Location"
  3145. // },
  3146. // "scopes": [
  3147. // "https://www.googleapis.com/auth/cloud-platform"
  3148. // ]
  3149. // }
  3150. }
  3151. // method id "healthcare.projects.locations.list":
  3152. type ProjectsLocationsListCall struct {
  3153. s *Service
  3154. name string
  3155. urlParams_ gensupport.URLParams
  3156. ifNoneMatch_ string
  3157. ctx_ context.Context
  3158. header_ http.Header
  3159. }
  3160. // List: Lists information about the supported locations for this
  3161. // service.
  3162. func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  3163. c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3164. c.name = name
  3165. return c
  3166. }
  3167. // Filter sets the optional parameter "filter": The standard list
  3168. // filter.
  3169. func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  3170. c.urlParams_.Set("filter", filter)
  3171. return c
  3172. }
  3173. // PageSize sets the optional parameter "pageSize": The standard list
  3174. // page size.
  3175. func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  3176. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3177. return c
  3178. }
  3179. // PageToken sets the optional parameter "pageToken": The standard list
  3180. // page token.
  3181. func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  3182. c.urlParams_.Set("pageToken", pageToken)
  3183. return c
  3184. }
  3185. // Fields allows partial responses to be retrieved. See
  3186. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3187. // for more information.
  3188. func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  3189. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3190. return c
  3191. }
  3192. // IfNoneMatch sets the optional parameter which makes the operation
  3193. // fail if the object's ETag matches the given value. This is useful for
  3194. // getting updates only after the object has changed since the last
  3195. // request. Use googleapi.IsNotModified to check whether the response
  3196. // error from Do is the result of In-None-Match.
  3197. func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  3198. c.ifNoneMatch_ = entityTag
  3199. return c
  3200. }
  3201. // Context sets the context to be used in this call's Do method. Any
  3202. // pending HTTP request will be aborted if the provided context is
  3203. // canceled.
  3204. func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  3205. c.ctx_ = ctx
  3206. return c
  3207. }
  3208. // Header returns an http.Header that can be modified by the caller to
  3209. // add HTTP headers to the request.
  3210. func (c *ProjectsLocationsListCall) Header() http.Header {
  3211. if c.header_ == nil {
  3212. c.header_ = make(http.Header)
  3213. }
  3214. return c.header_
  3215. }
  3216. func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  3217. reqHeaders := make(http.Header)
  3218. for k, v := range c.header_ {
  3219. reqHeaders[k] = v
  3220. }
  3221. reqHeaders.Set("User-Agent", c.s.userAgent())
  3222. if c.ifNoneMatch_ != "" {
  3223. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3224. }
  3225. var body io.Reader = nil
  3226. c.urlParams_.Set("alt", alt)
  3227. c.urlParams_.Set("prettyPrint", "false")
  3228. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/locations")
  3229. urls += "?" + c.urlParams_.Encode()
  3230. req, err := http.NewRequest("GET", urls, body)
  3231. if err != nil {
  3232. return nil, err
  3233. }
  3234. req.Header = reqHeaders
  3235. googleapi.Expand(req.URL, map[string]string{
  3236. "name": c.name,
  3237. })
  3238. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3239. }
  3240. // Do executes the "healthcare.projects.locations.list" call.
  3241. // Exactly one of *ListLocationsResponse or error will be non-nil. Any
  3242. // non-2xx status code is an error. Response headers are in either
  3243. // *ListLocationsResponse.ServerResponse.Header or (if a response was
  3244. // returned at all) in error.(*googleapi.Error).Header. Use
  3245. // googleapi.IsNotModified to check whether the returned error was
  3246. // because http.StatusNotModified was returned.
  3247. func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  3248. gensupport.SetOptions(c.urlParams_, opts...)
  3249. res, err := c.doRequest("json")
  3250. if res != nil && res.StatusCode == http.StatusNotModified {
  3251. if res.Body != nil {
  3252. res.Body.Close()
  3253. }
  3254. return nil, &googleapi.Error{
  3255. Code: res.StatusCode,
  3256. Header: res.Header,
  3257. }
  3258. }
  3259. if err != nil {
  3260. return nil, err
  3261. }
  3262. defer googleapi.CloseBody(res)
  3263. if err := googleapi.CheckResponse(res); err != nil {
  3264. return nil, err
  3265. }
  3266. ret := &ListLocationsResponse{
  3267. ServerResponse: googleapi.ServerResponse{
  3268. Header: res.Header,
  3269. HTTPStatusCode: res.StatusCode,
  3270. },
  3271. }
  3272. target := &ret
  3273. if err := gensupport.DecodeResponse(target, res); err != nil {
  3274. return nil, err
  3275. }
  3276. return ret, nil
  3277. // {
  3278. // "description": "Lists information about the supported locations for this service.",
  3279. // "flatPath": "v1alpha/projects/{projectsId}/locations",
  3280. // "httpMethod": "GET",
  3281. // "id": "healthcare.projects.locations.list",
  3282. // "parameterOrder": [
  3283. // "name"
  3284. // ],
  3285. // "parameters": {
  3286. // "filter": {
  3287. // "description": "The standard list filter.",
  3288. // "location": "query",
  3289. // "type": "string"
  3290. // },
  3291. // "name": {
  3292. // "description": "The resource that owns the locations collection, if applicable.",
  3293. // "location": "path",
  3294. // "pattern": "^projects/[^/]+$",
  3295. // "required": true,
  3296. // "type": "string"
  3297. // },
  3298. // "pageSize": {
  3299. // "description": "The standard list page size.",
  3300. // "format": "int32",
  3301. // "location": "query",
  3302. // "type": "integer"
  3303. // },
  3304. // "pageToken": {
  3305. // "description": "The standard list page token.",
  3306. // "location": "query",
  3307. // "type": "string"
  3308. // }
  3309. // },
  3310. // "path": "v1alpha/{+name}/locations",
  3311. // "response": {
  3312. // "$ref": "ListLocationsResponse"
  3313. // },
  3314. // "scopes": [
  3315. // "https://www.googleapis.com/auth/cloud-platform"
  3316. // ]
  3317. // }
  3318. }
  3319. // Pages invokes f for each page of results.
  3320. // A non-nil error returned from f will halt the iteration.
  3321. // The provided context supersedes any context provided to the Context method.
  3322. func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  3323. c.ctx_ = ctx
  3324. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  3325. for {
  3326. x, err := c.Do()
  3327. if err != nil {
  3328. return err
  3329. }
  3330. if err := f(x); err != nil {
  3331. return err
  3332. }
  3333. if x.NextPageToken == "" {
  3334. return nil
  3335. }
  3336. c.PageToken(x.NextPageToken)
  3337. }
  3338. }
  3339. // method id "healthcare.projects.locations.datasets.create":
  3340. type ProjectsLocationsDatasetsCreateCall struct {
  3341. s *Service
  3342. parent string
  3343. dataset *Dataset
  3344. urlParams_ gensupport.URLParams
  3345. ctx_ context.Context
  3346. header_ http.Header
  3347. }
  3348. // Create: Creates a new health dataset.
  3349. func (r *ProjectsLocationsDatasetsService) Create(parent string, dataset *Dataset) *ProjectsLocationsDatasetsCreateCall {
  3350. c := &ProjectsLocationsDatasetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3351. c.parent = parent
  3352. c.dataset = dataset
  3353. return c
  3354. }
  3355. // DatasetId sets the optional parameter "datasetId": The ID of the
  3356. // dataset that is being created.
  3357. // The string must match the following regex:
  3358. // `[\p{L}\p{N}_\-\.]{1,256}`.
  3359. func (c *ProjectsLocationsDatasetsCreateCall) DatasetId(datasetId string) *ProjectsLocationsDatasetsCreateCall {
  3360. c.urlParams_.Set("datasetId", datasetId)
  3361. return c
  3362. }
  3363. // Fields allows partial responses to be retrieved. See
  3364. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3365. // for more information.
  3366. func (c *ProjectsLocationsDatasetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsCreateCall {
  3367. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3368. return c
  3369. }
  3370. // Context sets the context to be used in this call's Do method. Any
  3371. // pending HTTP request will be aborted if the provided context is
  3372. // canceled.
  3373. func (c *ProjectsLocationsDatasetsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsCreateCall {
  3374. c.ctx_ = ctx
  3375. return c
  3376. }
  3377. // Header returns an http.Header that can be modified by the caller to
  3378. // add HTTP headers to the request.
  3379. func (c *ProjectsLocationsDatasetsCreateCall) Header() http.Header {
  3380. if c.header_ == nil {
  3381. c.header_ = make(http.Header)
  3382. }
  3383. return c.header_
  3384. }
  3385. func (c *ProjectsLocationsDatasetsCreateCall) doRequest(alt string) (*http.Response, error) {
  3386. reqHeaders := make(http.Header)
  3387. for k, v := range c.header_ {
  3388. reqHeaders[k] = v
  3389. }
  3390. reqHeaders.Set("User-Agent", c.s.userAgent())
  3391. var body io.Reader = nil
  3392. body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataset)
  3393. if err != nil {
  3394. return nil, err
  3395. }
  3396. reqHeaders.Set("Content-Type", "application/json")
  3397. c.urlParams_.Set("alt", alt)
  3398. c.urlParams_.Set("prettyPrint", "false")
  3399. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/datasets")
  3400. urls += "?" + c.urlParams_.Encode()
  3401. req, err := http.NewRequest("POST", urls, body)
  3402. if err != nil {
  3403. return nil, err
  3404. }
  3405. req.Header = reqHeaders
  3406. googleapi.Expand(req.URL, map[string]string{
  3407. "parent": c.parent,
  3408. })
  3409. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3410. }
  3411. // Do executes the "healthcare.projects.locations.datasets.create" call.
  3412. // Exactly one of *Dataset or error will be non-nil. Any non-2xx status
  3413. // code is an error. Response headers are in either
  3414. // *Dataset.ServerResponse.Header or (if a response was returned at all)
  3415. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3416. // check whether the returned error was because http.StatusNotModified
  3417. // was returned.
  3418. func (c *ProjectsLocationsDatasetsCreateCall) Do(opts ...googleapi.CallOption) (*Dataset, error) {
  3419. gensupport.SetOptions(c.urlParams_, opts...)
  3420. res, err := c.doRequest("json")
  3421. if res != nil && res.StatusCode == http.StatusNotModified {
  3422. if res.Body != nil {
  3423. res.Body.Close()
  3424. }
  3425. return nil, &googleapi.Error{
  3426. Code: res.StatusCode,
  3427. Header: res.Header,
  3428. }
  3429. }
  3430. if err != nil {
  3431. return nil, err
  3432. }
  3433. defer googleapi.CloseBody(res)
  3434. if err := googleapi.CheckResponse(res); err != nil {
  3435. return nil, err
  3436. }
  3437. ret := &Dataset{
  3438. ServerResponse: googleapi.ServerResponse{
  3439. Header: res.Header,
  3440. HTTPStatusCode: res.StatusCode,
  3441. },
  3442. }
  3443. target := &ret
  3444. if err := gensupport.DecodeResponse(target, res); err != nil {
  3445. return nil, err
  3446. }
  3447. return ret, nil
  3448. // {
  3449. // "description": "Creates a new health dataset.",
  3450. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets",
  3451. // "httpMethod": "POST",
  3452. // "id": "healthcare.projects.locations.datasets.create",
  3453. // "parameterOrder": [
  3454. // "parent"
  3455. // ],
  3456. // "parameters": {
  3457. // "datasetId": {
  3458. // "description": "The ID of the dataset that is being created.\nThe string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.",
  3459. // "location": "query",
  3460. // "type": "string"
  3461. // },
  3462. // "parent": {
  3463. // "description": "The name of the project in which the dataset should be created (e.g.,\n`projects/{project_id}/locations/{location_id}`).",
  3464. // "location": "path",
  3465. // "pattern": "^projects/[^/]+/locations/[^/]+$",
  3466. // "required": true,
  3467. // "type": "string"
  3468. // }
  3469. // },
  3470. // "path": "v1alpha/{+parent}/datasets",
  3471. // "request": {
  3472. // "$ref": "Dataset"
  3473. // },
  3474. // "response": {
  3475. // "$ref": "Dataset"
  3476. // },
  3477. // "scopes": [
  3478. // "https://www.googleapis.com/auth/cloud-platform"
  3479. // ]
  3480. // }
  3481. }
  3482. // method id "healthcare.projects.locations.datasets.deidentify":
  3483. type ProjectsLocationsDatasetsDeidentifyCall struct {
  3484. s *Service
  3485. sourceDataset string
  3486. deidentifydatasetrequest *DeidentifyDatasetRequest
  3487. urlParams_ gensupport.URLParams
  3488. ctx_ context.Context
  3489. header_ http.Header
  3490. }
  3491. // Deidentify: Creates a new dataset containing de-identified data from
  3492. // the source
  3493. // dataset. The metadata field type
  3494. // is OperationMetadata.
  3495. // If the request is successful, the
  3496. // response field type is
  3497. // DeidentifySummary.
  3498. // If errors occur,
  3499. // details field type is
  3500. // DeidentifyErrorDetails.
  3501. func (r *ProjectsLocationsDatasetsService) Deidentify(sourceDataset string, deidentifydatasetrequest *DeidentifyDatasetRequest) *ProjectsLocationsDatasetsDeidentifyCall {
  3502. c := &ProjectsLocationsDatasetsDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3503. c.sourceDataset = sourceDataset
  3504. c.deidentifydatasetrequest = deidentifydatasetrequest
  3505. return c
  3506. }
  3507. // Fields allows partial responses to be retrieved. See
  3508. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3509. // for more information.
  3510. func (c *ProjectsLocationsDatasetsDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDeidentifyCall {
  3511. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3512. return c
  3513. }
  3514. // Context sets the context to be used in this call's Do method. Any
  3515. // pending HTTP request will be aborted if the provided context is
  3516. // canceled.
  3517. func (c *ProjectsLocationsDatasetsDeidentifyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDeidentifyCall {
  3518. c.ctx_ = ctx
  3519. return c
  3520. }
  3521. // Header returns an http.Header that can be modified by the caller to
  3522. // add HTTP headers to the request.
  3523. func (c *ProjectsLocationsDatasetsDeidentifyCall) Header() http.Header {
  3524. if c.header_ == nil {
  3525. c.header_ = make(http.Header)
  3526. }
  3527. return c.header_
  3528. }
  3529. func (c *ProjectsLocationsDatasetsDeidentifyCall) doRequest(alt string) (*http.Response, error) {
  3530. reqHeaders := make(http.Header)
  3531. for k, v := range c.header_ {
  3532. reqHeaders[k] = v
  3533. }
  3534. reqHeaders.Set("User-Agent", c.s.userAgent())
  3535. var body io.Reader = nil
  3536. body, err := googleapi.WithoutDataWrapper.JSONReader(c.deidentifydatasetrequest)
  3537. if err != nil {
  3538. return nil, err
  3539. }
  3540. reqHeaders.Set("Content-Type", "application/json")
  3541. c.urlParams_.Set("alt", alt)
  3542. c.urlParams_.Set("prettyPrint", "false")
  3543. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+sourceDataset}:deidentify")
  3544. urls += "?" + c.urlParams_.Encode()
  3545. req, err := http.NewRequest("POST", urls, body)
  3546. if err != nil {
  3547. return nil, err
  3548. }
  3549. req.Header = reqHeaders
  3550. googleapi.Expand(req.URL, map[string]string{
  3551. "sourceDataset": c.sourceDataset,
  3552. })
  3553. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3554. }
  3555. // Do executes the "healthcare.projects.locations.datasets.deidentify" call.
  3556. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3557. // status code is an error. Response headers are in either
  3558. // *Operation.ServerResponse.Header or (if a response was returned at
  3559. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3560. // to check whether the returned error was because
  3561. // http.StatusNotModified was returned.
  3562. func (c *ProjectsLocationsDatasetsDeidentifyCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3563. gensupport.SetOptions(c.urlParams_, opts...)
  3564. res, err := c.doRequest("json")
  3565. if res != nil && res.StatusCode == http.StatusNotModified {
  3566. if res.Body != nil {
  3567. res.Body.Close()
  3568. }
  3569. return nil, &googleapi.Error{
  3570. Code: res.StatusCode,
  3571. Header: res.Header,
  3572. }
  3573. }
  3574. if err != nil {
  3575. return nil, err
  3576. }
  3577. defer googleapi.CloseBody(res)
  3578. if err := googleapi.CheckResponse(res); err != nil {
  3579. return nil, err
  3580. }
  3581. ret := &Operation{
  3582. ServerResponse: googleapi.ServerResponse{
  3583. Header: res.Header,
  3584. HTTPStatusCode: res.StatusCode,
  3585. },
  3586. }
  3587. target := &ret
  3588. if err := gensupport.DecodeResponse(target, res); err != nil {
  3589. return nil, err
  3590. }
  3591. return ret, nil
  3592. // {
  3593. // "description": "Creates a new dataset containing de-identified data from the source\ndataset. The metadata field type\nis OperationMetadata.\nIf the request is successful, the\nresponse field type is\nDeidentifySummary.\nIf errors occur,\ndetails field type is\nDeidentifyErrorDetails.",
  3594. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}:deidentify",
  3595. // "httpMethod": "POST",
  3596. // "id": "healthcare.projects.locations.datasets.deidentify",
  3597. // "parameterOrder": [
  3598. // "sourceDataset"
  3599. // ],
  3600. // "parameters": {
  3601. // "sourceDataset": {
  3602. // "description": "Source dataset resource name. (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`).",
  3603. // "location": "path",
  3604. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  3605. // "required": true,
  3606. // "type": "string"
  3607. // }
  3608. // },
  3609. // "path": "v1alpha/{+sourceDataset}:deidentify",
  3610. // "request": {
  3611. // "$ref": "DeidentifyDatasetRequest"
  3612. // },
  3613. // "response": {
  3614. // "$ref": "Operation"
  3615. // },
  3616. // "scopes": [
  3617. // "https://www.googleapis.com/auth/cloud-platform"
  3618. // ]
  3619. // }
  3620. }
  3621. // method id "healthcare.projects.locations.datasets.delete":
  3622. type ProjectsLocationsDatasetsDeleteCall struct {
  3623. s *Service
  3624. name string
  3625. urlParams_ gensupport.URLParams
  3626. ctx_ context.Context
  3627. header_ http.Header
  3628. }
  3629. // Delete: Deletes the specified health dataset and all data contained
  3630. // in the dataset.
  3631. // Deleting a dataset does not affect the sources from which the dataset
  3632. // was
  3633. // imported (if any).
  3634. func (r *ProjectsLocationsDatasetsService) Delete(name string) *ProjectsLocationsDatasetsDeleteCall {
  3635. c := &ProjectsLocationsDatasetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3636. c.name = name
  3637. return c
  3638. }
  3639. // Fields allows partial responses to be retrieved. See
  3640. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3641. // for more information.
  3642. func (c *ProjectsLocationsDatasetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDeleteCall {
  3643. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3644. return c
  3645. }
  3646. // Context sets the context to be used in this call's Do method. Any
  3647. // pending HTTP request will be aborted if the provided context is
  3648. // canceled.
  3649. func (c *ProjectsLocationsDatasetsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDeleteCall {
  3650. c.ctx_ = ctx
  3651. return c
  3652. }
  3653. // Header returns an http.Header that can be modified by the caller to
  3654. // add HTTP headers to the request.
  3655. func (c *ProjectsLocationsDatasetsDeleteCall) Header() http.Header {
  3656. if c.header_ == nil {
  3657. c.header_ = make(http.Header)
  3658. }
  3659. return c.header_
  3660. }
  3661. func (c *ProjectsLocationsDatasetsDeleteCall) doRequest(alt string) (*http.Response, error) {
  3662. reqHeaders := make(http.Header)
  3663. for k, v := range c.header_ {
  3664. reqHeaders[k] = v
  3665. }
  3666. reqHeaders.Set("User-Agent", c.s.userAgent())
  3667. var body io.Reader = nil
  3668. c.urlParams_.Set("alt", alt)
  3669. c.urlParams_.Set("prettyPrint", "false")
  3670. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  3671. urls += "?" + c.urlParams_.Encode()
  3672. req, err := http.NewRequest("DELETE", urls, body)
  3673. if err != nil {
  3674. return nil, err
  3675. }
  3676. req.Header = reqHeaders
  3677. googleapi.Expand(req.URL, map[string]string{
  3678. "name": c.name,
  3679. })
  3680. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3681. }
  3682. // Do executes the "healthcare.projects.locations.datasets.delete" call.
  3683. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  3684. // code is an error. Response headers are in either
  3685. // *Empty.ServerResponse.Header or (if a response was returned at all)
  3686. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3687. // check whether the returned error was because http.StatusNotModified
  3688. // was returned.
  3689. func (c *ProjectsLocationsDatasetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  3690. gensupport.SetOptions(c.urlParams_, opts...)
  3691. res, err := c.doRequest("json")
  3692. if res != nil && res.StatusCode == http.StatusNotModified {
  3693. if res.Body != nil {
  3694. res.Body.Close()
  3695. }
  3696. return nil, &googleapi.Error{
  3697. Code: res.StatusCode,
  3698. Header: res.Header,
  3699. }
  3700. }
  3701. if err != nil {
  3702. return nil, err
  3703. }
  3704. defer googleapi.CloseBody(res)
  3705. if err := googleapi.CheckResponse(res); err != nil {
  3706. return nil, err
  3707. }
  3708. ret := &Empty{
  3709. ServerResponse: googleapi.ServerResponse{
  3710. Header: res.Header,
  3711. HTTPStatusCode: res.StatusCode,
  3712. },
  3713. }
  3714. target := &ret
  3715. if err := gensupport.DecodeResponse(target, res); err != nil {
  3716. return nil, err
  3717. }
  3718. return ret, nil
  3719. // {
  3720. // "description": "Deletes the specified health dataset and all data contained in the dataset.\nDeleting a dataset does not affect the sources from which the dataset was\nimported (if any).",
  3721. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}",
  3722. // "httpMethod": "DELETE",
  3723. // "id": "healthcare.projects.locations.datasets.delete",
  3724. // "parameterOrder": [
  3725. // "name"
  3726. // ],
  3727. // "parameters": {
  3728. // "name": {
  3729. // "description": "The name of the dataset to delete (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`).",
  3730. // "location": "path",
  3731. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  3732. // "required": true,
  3733. // "type": "string"
  3734. // }
  3735. // },
  3736. // "path": "v1alpha/{+name}",
  3737. // "response": {
  3738. // "$ref": "Empty"
  3739. // },
  3740. // "scopes": [
  3741. // "https://www.googleapis.com/auth/cloud-platform"
  3742. // ]
  3743. // }
  3744. }
  3745. // method id "healthcare.projects.locations.datasets.get":
  3746. type ProjectsLocationsDatasetsGetCall struct {
  3747. s *Service
  3748. name string
  3749. urlParams_ gensupport.URLParams
  3750. ifNoneMatch_ string
  3751. ctx_ context.Context
  3752. header_ http.Header
  3753. }
  3754. // Get: Gets any metadata associated with a dataset.
  3755. func (r *ProjectsLocationsDatasetsService) Get(name string) *ProjectsLocationsDatasetsGetCall {
  3756. c := &ProjectsLocationsDatasetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3757. c.name = name
  3758. return c
  3759. }
  3760. // Fields allows partial responses to be retrieved. See
  3761. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3762. // for more information.
  3763. func (c *ProjectsLocationsDatasetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsGetCall {
  3764. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3765. return c
  3766. }
  3767. // IfNoneMatch sets the optional parameter which makes the operation
  3768. // fail if the object's ETag matches the given value. This is useful for
  3769. // getting updates only after the object has changed since the last
  3770. // request. Use googleapi.IsNotModified to check whether the response
  3771. // error from Do is the result of In-None-Match.
  3772. func (c *ProjectsLocationsDatasetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsGetCall {
  3773. c.ifNoneMatch_ = entityTag
  3774. return c
  3775. }
  3776. // Context sets the context to be used in this call's Do method. Any
  3777. // pending HTTP request will be aborted if the provided context is
  3778. // canceled.
  3779. func (c *ProjectsLocationsDatasetsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsGetCall {
  3780. c.ctx_ = ctx
  3781. return c
  3782. }
  3783. // Header returns an http.Header that can be modified by the caller to
  3784. // add HTTP headers to the request.
  3785. func (c *ProjectsLocationsDatasetsGetCall) Header() http.Header {
  3786. if c.header_ == nil {
  3787. c.header_ = make(http.Header)
  3788. }
  3789. return c.header_
  3790. }
  3791. func (c *ProjectsLocationsDatasetsGetCall) doRequest(alt string) (*http.Response, error) {
  3792. reqHeaders := make(http.Header)
  3793. for k, v := range c.header_ {
  3794. reqHeaders[k] = v
  3795. }
  3796. reqHeaders.Set("User-Agent", c.s.userAgent())
  3797. if c.ifNoneMatch_ != "" {
  3798. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3799. }
  3800. var body io.Reader = nil
  3801. c.urlParams_.Set("alt", alt)
  3802. c.urlParams_.Set("prettyPrint", "false")
  3803. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  3804. urls += "?" + c.urlParams_.Encode()
  3805. req, err := http.NewRequest("GET", urls, body)
  3806. if err != nil {
  3807. return nil, err
  3808. }
  3809. req.Header = reqHeaders
  3810. googleapi.Expand(req.URL, map[string]string{
  3811. "name": c.name,
  3812. })
  3813. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3814. }
  3815. // Do executes the "healthcare.projects.locations.datasets.get" call.
  3816. // Exactly one of *Dataset or error will be non-nil. Any non-2xx status
  3817. // code is an error. Response headers are in either
  3818. // *Dataset.ServerResponse.Header or (if a response was returned at all)
  3819. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3820. // check whether the returned error was because http.StatusNotModified
  3821. // was returned.
  3822. func (c *ProjectsLocationsDatasetsGetCall) Do(opts ...googleapi.CallOption) (*Dataset, error) {
  3823. gensupport.SetOptions(c.urlParams_, opts...)
  3824. res, err := c.doRequest("json")
  3825. if res != nil && res.StatusCode == http.StatusNotModified {
  3826. if res.Body != nil {
  3827. res.Body.Close()
  3828. }
  3829. return nil, &googleapi.Error{
  3830. Code: res.StatusCode,
  3831. Header: res.Header,
  3832. }
  3833. }
  3834. if err != nil {
  3835. return nil, err
  3836. }
  3837. defer googleapi.CloseBody(res)
  3838. if err := googleapi.CheckResponse(res); err != nil {
  3839. return nil, err
  3840. }
  3841. ret := &Dataset{
  3842. ServerResponse: googleapi.ServerResponse{
  3843. Header: res.Header,
  3844. HTTPStatusCode: res.StatusCode,
  3845. },
  3846. }
  3847. target := &ret
  3848. if err := gensupport.DecodeResponse(target, res); err != nil {
  3849. return nil, err
  3850. }
  3851. return ret, nil
  3852. // {
  3853. // "description": "Gets any metadata associated with a dataset.",
  3854. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}",
  3855. // "httpMethod": "GET",
  3856. // "id": "healthcare.projects.locations.datasets.get",
  3857. // "parameterOrder": [
  3858. // "name"
  3859. // ],
  3860. // "parameters": {
  3861. // "name": {
  3862. // "description": "The name of the dataset to read (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`).",
  3863. // "location": "path",
  3864. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  3865. // "required": true,
  3866. // "type": "string"
  3867. // }
  3868. // },
  3869. // "path": "v1alpha/{+name}",
  3870. // "response": {
  3871. // "$ref": "Dataset"
  3872. // },
  3873. // "scopes": [
  3874. // "https://www.googleapis.com/auth/cloud-platform"
  3875. // ]
  3876. // }
  3877. }
  3878. // method id "healthcare.projects.locations.datasets.getIamPolicy":
  3879. type ProjectsLocationsDatasetsGetIamPolicyCall struct {
  3880. s *Service
  3881. resource string
  3882. urlParams_ gensupport.URLParams
  3883. ifNoneMatch_ string
  3884. ctx_ context.Context
  3885. header_ http.Header
  3886. }
  3887. // GetIamPolicy: Gets the access control policy for a resource.
  3888. // Returns an empty policy if the resource exists and does not have a
  3889. // policy
  3890. // set.
  3891. func (r *ProjectsLocationsDatasetsService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsGetIamPolicyCall {
  3892. c := &ProjectsLocationsDatasetsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3893. c.resource = resource
  3894. return c
  3895. }
  3896. // Fields allows partial responses to be retrieved. See
  3897. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3898. // for more information.
  3899. func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsGetIamPolicyCall {
  3900. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3901. return c
  3902. }
  3903. // IfNoneMatch sets the optional parameter which makes the operation
  3904. // fail if the object's ETag matches the given value. This is useful for
  3905. // getting updates only after the object has changed since the last
  3906. // request. Use googleapi.IsNotModified to check whether the response
  3907. // error from Do is the result of In-None-Match.
  3908. func (c *ProjectsLocationsDatasetsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsGetIamPolicyCall {
  3909. c.ifNoneMatch_ = entityTag
  3910. return c
  3911. }
  3912. // Context sets the context to be used in this call's Do method. Any
  3913. // pending HTTP request will be aborted if the provided context is
  3914. // canceled.
  3915. func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsGetIamPolicyCall {
  3916. c.ctx_ = ctx
  3917. return c
  3918. }
  3919. // Header returns an http.Header that can be modified by the caller to
  3920. // add HTTP headers to the request.
  3921. func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Header() http.Header {
  3922. if c.header_ == nil {
  3923. c.header_ = make(http.Header)
  3924. }
  3925. return c.header_
  3926. }
  3927. func (c *ProjectsLocationsDatasetsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  3928. reqHeaders := make(http.Header)
  3929. for k, v := range c.header_ {
  3930. reqHeaders[k] = v
  3931. }
  3932. reqHeaders.Set("User-Agent", c.s.userAgent())
  3933. if c.ifNoneMatch_ != "" {
  3934. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3935. }
  3936. var body io.Reader = nil
  3937. c.urlParams_.Set("alt", alt)
  3938. c.urlParams_.Set("prettyPrint", "false")
  3939. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy")
  3940. urls += "?" + c.urlParams_.Encode()
  3941. req, err := http.NewRequest("GET", urls, body)
  3942. if err != nil {
  3943. return nil, err
  3944. }
  3945. req.Header = reqHeaders
  3946. googleapi.Expand(req.URL, map[string]string{
  3947. "resource": c.resource,
  3948. })
  3949. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3950. }
  3951. // Do executes the "healthcare.projects.locations.datasets.getIamPolicy" call.
  3952. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  3953. // code is an error. Response headers are in either
  3954. // *Policy.ServerResponse.Header or (if a response was returned at all)
  3955. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3956. // check whether the returned error was because http.StatusNotModified
  3957. // was returned.
  3958. func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  3959. gensupport.SetOptions(c.urlParams_, opts...)
  3960. res, err := c.doRequest("json")
  3961. if res != nil && res.StatusCode == http.StatusNotModified {
  3962. if res.Body != nil {
  3963. res.Body.Close()
  3964. }
  3965. return nil, &googleapi.Error{
  3966. Code: res.StatusCode,
  3967. Header: res.Header,
  3968. }
  3969. }
  3970. if err != nil {
  3971. return nil, err
  3972. }
  3973. defer googleapi.CloseBody(res)
  3974. if err := googleapi.CheckResponse(res); err != nil {
  3975. return nil, err
  3976. }
  3977. ret := &Policy{
  3978. ServerResponse: googleapi.ServerResponse{
  3979. Header: res.Header,
  3980. HTTPStatusCode: res.StatusCode,
  3981. },
  3982. }
  3983. target := &ret
  3984. if err := gensupport.DecodeResponse(target, res); err != nil {
  3985. return nil, err
  3986. }
  3987. return ret, nil
  3988. // {
  3989. // "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.",
  3990. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}:getIamPolicy",
  3991. // "httpMethod": "GET",
  3992. // "id": "healthcare.projects.locations.datasets.getIamPolicy",
  3993. // "parameterOrder": [
  3994. // "resource"
  3995. // ],
  3996. // "parameters": {
  3997. // "resource": {
  3998. // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
  3999. // "location": "path",
  4000. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  4001. // "required": true,
  4002. // "type": "string"
  4003. // }
  4004. // },
  4005. // "path": "v1alpha/{+resource}:getIamPolicy",
  4006. // "response": {
  4007. // "$ref": "Policy"
  4008. // },
  4009. // "scopes": [
  4010. // "https://www.googleapis.com/auth/cloud-platform"
  4011. // ]
  4012. // }
  4013. }
  4014. // method id "healthcare.projects.locations.datasets.list":
  4015. type ProjectsLocationsDatasetsListCall struct {
  4016. s *Service
  4017. parent string
  4018. urlParams_ gensupport.URLParams
  4019. ifNoneMatch_ string
  4020. ctx_ context.Context
  4021. header_ http.Header
  4022. }
  4023. // List: Lists the health datasets in the current project.
  4024. func (r *ProjectsLocationsDatasetsService) List(parent string) *ProjectsLocationsDatasetsListCall {
  4025. c := &ProjectsLocationsDatasetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4026. c.parent = parent
  4027. return c
  4028. }
  4029. // PageSize sets the optional parameter "pageSize": The maximum number
  4030. // of items to return. Capped to 100 if not specified.
  4031. // May not be larger than 1000.
  4032. func (c *ProjectsLocationsDatasetsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsListCall {
  4033. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4034. return c
  4035. }
  4036. // PageToken sets the optional parameter "pageToken": The
  4037. // next_page_token value returned from a previous List request, if any.
  4038. func (c *ProjectsLocationsDatasetsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsListCall {
  4039. c.urlParams_.Set("pageToken", pageToken)
  4040. return c
  4041. }
  4042. // Fields allows partial responses to be retrieved. See
  4043. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4044. // for more information.
  4045. func (c *ProjectsLocationsDatasetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsListCall {
  4046. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4047. return c
  4048. }
  4049. // IfNoneMatch sets the optional parameter which makes the operation
  4050. // fail if the object's ETag matches the given value. This is useful for
  4051. // getting updates only after the object has changed since the last
  4052. // request. Use googleapi.IsNotModified to check whether the response
  4053. // error from Do is the result of In-None-Match.
  4054. func (c *ProjectsLocationsDatasetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsListCall {
  4055. c.ifNoneMatch_ = entityTag
  4056. return c
  4057. }
  4058. // Context sets the context to be used in this call's Do method. Any
  4059. // pending HTTP request will be aborted if the provided context is
  4060. // canceled.
  4061. func (c *ProjectsLocationsDatasetsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsListCall {
  4062. c.ctx_ = ctx
  4063. return c
  4064. }
  4065. // Header returns an http.Header that can be modified by the caller to
  4066. // add HTTP headers to the request.
  4067. func (c *ProjectsLocationsDatasetsListCall) Header() http.Header {
  4068. if c.header_ == nil {
  4069. c.header_ = make(http.Header)
  4070. }
  4071. return c.header_
  4072. }
  4073. func (c *ProjectsLocationsDatasetsListCall) doRequest(alt string) (*http.Response, error) {
  4074. reqHeaders := make(http.Header)
  4075. for k, v := range c.header_ {
  4076. reqHeaders[k] = v
  4077. }
  4078. reqHeaders.Set("User-Agent", c.s.userAgent())
  4079. if c.ifNoneMatch_ != "" {
  4080. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4081. }
  4082. var body io.Reader = nil
  4083. c.urlParams_.Set("alt", alt)
  4084. c.urlParams_.Set("prettyPrint", "false")
  4085. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/datasets")
  4086. urls += "?" + c.urlParams_.Encode()
  4087. req, err := http.NewRequest("GET", urls, body)
  4088. if err != nil {
  4089. return nil, err
  4090. }
  4091. req.Header = reqHeaders
  4092. googleapi.Expand(req.URL, map[string]string{
  4093. "parent": c.parent,
  4094. })
  4095. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4096. }
  4097. // Do executes the "healthcare.projects.locations.datasets.list" call.
  4098. // Exactly one of *ListDatasetsResponse or error will be non-nil. Any
  4099. // non-2xx status code is an error. Response headers are in either
  4100. // *ListDatasetsResponse.ServerResponse.Header or (if a response was
  4101. // returned at all) in error.(*googleapi.Error).Header. Use
  4102. // googleapi.IsNotModified to check whether the returned error was
  4103. // because http.StatusNotModified was returned.
  4104. func (c *ProjectsLocationsDatasetsListCall) Do(opts ...googleapi.CallOption) (*ListDatasetsResponse, error) {
  4105. gensupport.SetOptions(c.urlParams_, opts...)
  4106. res, err := c.doRequest("json")
  4107. if res != nil && res.StatusCode == http.StatusNotModified {
  4108. if res.Body != nil {
  4109. res.Body.Close()
  4110. }
  4111. return nil, &googleapi.Error{
  4112. Code: res.StatusCode,
  4113. Header: res.Header,
  4114. }
  4115. }
  4116. if err != nil {
  4117. return nil, err
  4118. }
  4119. defer googleapi.CloseBody(res)
  4120. if err := googleapi.CheckResponse(res); err != nil {
  4121. return nil, err
  4122. }
  4123. ret := &ListDatasetsResponse{
  4124. ServerResponse: googleapi.ServerResponse{
  4125. Header: res.Header,
  4126. HTTPStatusCode: res.StatusCode,
  4127. },
  4128. }
  4129. target := &ret
  4130. if err := gensupport.DecodeResponse(target, res); err != nil {
  4131. return nil, err
  4132. }
  4133. return ret, nil
  4134. // {
  4135. // "description": "Lists the health datasets in the current project.",
  4136. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets",
  4137. // "httpMethod": "GET",
  4138. // "id": "healthcare.projects.locations.datasets.list",
  4139. // "parameterOrder": [
  4140. // "parent"
  4141. // ],
  4142. // "parameters": {
  4143. // "pageSize": {
  4144. // "description": "The maximum number of items to return. Capped to 100 if not specified.\nMay not be larger than 1000.",
  4145. // "format": "int32",
  4146. // "location": "query",
  4147. // "type": "integer"
  4148. // },
  4149. // "pageToken": {
  4150. // "description": "The next_page_token value returned from a previous List request, if any.",
  4151. // "location": "query",
  4152. // "type": "string"
  4153. // },
  4154. // "parent": {
  4155. // "description": "The name of the project whose datasets should be listed (e.g.,\n`projects/{project_id}/locations/{location_id}`).",
  4156. // "location": "path",
  4157. // "pattern": "^projects/[^/]+/locations/[^/]+$",
  4158. // "required": true,
  4159. // "type": "string"
  4160. // }
  4161. // },
  4162. // "path": "v1alpha/{+parent}/datasets",
  4163. // "response": {
  4164. // "$ref": "ListDatasetsResponse"
  4165. // },
  4166. // "scopes": [
  4167. // "https://www.googleapis.com/auth/cloud-platform"
  4168. // ]
  4169. // }
  4170. }
  4171. // Pages invokes f for each page of results.
  4172. // A non-nil error returned from f will halt the iteration.
  4173. // The provided context supersedes any context provided to the Context method.
  4174. func (c *ProjectsLocationsDatasetsListCall) Pages(ctx context.Context, f func(*ListDatasetsResponse) error) error {
  4175. c.ctx_ = ctx
  4176. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4177. for {
  4178. x, err := c.Do()
  4179. if err != nil {
  4180. return err
  4181. }
  4182. if err := f(x); err != nil {
  4183. return err
  4184. }
  4185. if x.NextPageToken == "" {
  4186. return nil
  4187. }
  4188. c.PageToken(x.NextPageToken)
  4189. }
  4190. }
  4191. // method id "healthcare.projects.locations.datasets.patch":
  4192. type ProjectsLocationsDatasetsPatchCall struct {
  4193. s *Service
  4194. name string
  4195. dataset *Dataset
  4196. urlParams_ gensupport.URLParams
  4197. ctx_ context.Context
  4198. header_ http.Header
  4199. }
  4200. // Patch: Updates dataset metadata.
  4201. func (r *ProjectsLocationsDatasetsService) Patch(name string, dataset *Dataset) *ProjectsLocationsDatasetsPatchCall {
  4202. c := &ProjectsLocationsDatasetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4203. c.name = name
  4204. c.dataset = dataset
  4205. return c
  4206. }
  4207. // UpdateMask sets the optional parameter "updateMask": The update mask
  4208. // applies to the resource. For the `FieldMask`
  4209. // definition,
  4210. // see
  4211. // https://developers.google.com/protocol-buffers/docs/re
  4212. // ference/google.protobuf#fieldmask
  4213. func (c *ProjectsLocationsDatasetsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsPatchCall {
  4214. c.urlParams_.Set("updateMask", updateMask)
  4215. return c
  4216. }
  4217. // Fields allows partial responses to be retrieved. See
  4218. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4219. // for more information.
  4220. func (c *ProjectsLocationsDatasetsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsPatchCall {
  4221. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4222. return c
  4223. }
  4224. // Context sets the context to be used in this call's Do method. Any
  4225. // pending HTTP request will be aborted if the provided context is
  4226. // canceled.
  4227. func (c *ProjectsLocationsDatasetsPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsPatchCall {
  4228. c.ctx_ = ctx
  4229. return c
  4230. }
  4231. // Header returns an http.Header that can be modified by the caller to
  4232. // add HTTP headers to the request.
  4233. func (c *ProjectsLocationsDatasetsPatchCall) Header() http.Header {
  4234. if c.header_ == nil {
  4235. c.header_ = make(http.Header)
  4236. }
  4237. return c.header_
  4238. }
  4239. func (c *ProjectsLocationsDatasetsPatchCall) doRequest(alt string) (*http.Response, error) {
  4240. reqHeaders := make(http.Header)
  4241. for k, v := range c.header_ {
  4242. reqHeaders[k] = v
  4243. }
  4244. reqHeaders.Set("User-Agent", c.s.userAgent())
  4245. var body io.Reader = nil
  4246. body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataset)
  4247. if err != nil {
  4248. return nil, err
  4249. }
  4250. reqHeaders.Set("Content-Type", "application/json")
  4251. c.urlParams_.Set("alt", alt)
  4252. c.urlParams_.Set("prettyPrint", "false")
  4253. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  4254. urls += "?" + c.urlParams_.Encode()
  4255. req, err := http.NewRequest("PATCH", urls, body)
  4256. if err != nil {
  4257. return nil, err
  4258. }
  4259. req.Header = reqHeaders
  4260. googleapi.Expand(req.URL, map[string]string{
  4261. "name": c.name,
  4262. })
  4263. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4264. }
  4265. // Do executes the "healthcare.projects.locations.datasets.patch" call.
  4266. // Exactly one of *Dataset or error will be non-nil. Any non-2xx status
  4267. // code is an error. Response headers are in either
  4268. // *Dataset.ServerResponse.Header or (if a response was returned at all)
  4269. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4270. // check whether the returned error was because http.StatusNotModified
  4271. // was returned.
  4272. func (c *ProjectsLocationsDatasetsPatchCall) Do(opts ...googleapi.CallOption) (*Dataset, error) {
  4273. gensupport.SetOptions(c.urlParams_, opts...)
  4274. res, err := c.doRequest("json")
  4275. if res != nil && res.StatusCode == http.StatusNotModified {
  4276. if res.Body != nil {
  4277. res.Body.Close()
  4278. }
  4279. return nil, &googleapi.Error{
  4280. Code: res.StatusCode,
  4281. Header: res.Header,
  4282. }
  4283. }
  4284. if err != nil {
  4285. return nil, err
  4286. }
  4287. defer googleapi.CloseBody(res)
  4288. if err := googleapi.CheckResponse(res); err != nil {
  4289. return nil, err
  4290. }
  4291. ret := &Dataset{
  4292. ServerResponse: googleapi.ServerResponse{
  4293. Header: res.Header,
  4294. HTTPStatusCode: res.StatusCode,
  4295. },
  4296. }
  4297. target := &ret
  4298. if err := gensupport.DecodeResponse(target, res); err != nil {
  4299. return nil, err
  4300. }
  4301. return ret, nil
  4302. // {
  4303. // "description": "Updates dataset metadata.",
  4304. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}",
  4305. // "httpMethod": "PATCH",
  4306. // "id": "healthcare.projects.locations.datasets.patch",
  4307. // "parameterOrder": [
  4308. // "name"
  4309. // ],
  4310. // "parameters": {
  4311. // "name": {
  4312. // "description": "Output only. Resource name of the dataset, of the form\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.",
  4313. // "location": "path",
  4314. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  4315. // "required": true,
  4316. // "type": "string"
  4317. // },
  4318. // "updateMask": {
  4319. // "description": "The update mask applies to the resource. For the `FieldMask` definition,\nsee\nhttps://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask",
  4320. // "format": "google-fieldmask",
  4321. // "location": "query",
  4322. // "type": "string"
  4323. // }
  4324. // },
  4325. // "path": "v1alpha/{+name}",
  4326. // "request": {
  4327. // "$ref": "Dataset"
  4328. // },
  4329. // "response": {
  4330. // "$ref": "Dataset"
  4331. // },
  4332. // "scopes": [
  4333. // "https://www.googleapis.com/auth/cloud-platform"
  4334. // ]
  4335. // }
  4336. }
  4337. // method id "healthcare.projects.locations.datasets.setIamPolicy":
  4338. type ProjectsLocationsDatasetsSetIamPolicyCall struct {
  4339. s *Service
  4340. resource string
  4341. setiampolicyrequest *SetIamPolicyRequest
  4342. urlParams_ gensupport.URLParams
  4343. ctx_ context.Context
  4344. header_ http.Header
  4345. }
  4346. // SetIamPolicy: Sets the access control policy on the specified
  4347. // resource. Replaces any
  4348. // existing policy.
  4349. func (r *ProjectsLocationsDatasetsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsSetIamPolicyCall {
  4350. c := &ProjectsLocationsDatasetsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4351. c.resource = resource
  4352. c.setiampolicyrequest = setiampolicyrequest
  4353. return c
  4354. }
  4355. // Fields allows partial responses to be retrieved. See
  4356. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4357. // for more information.
  4358. func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSetIamPolicyCall {
  4359. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4360. return c
  4361. }
  4362. // Context sets the context to be used in this call's Do method. Any
  4363. // pending HTTP request will be aborted if the provided context is
  4364. // canceled.
  4365. func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSetIamPolicyCall {
  4366. c.ctx_ = ctx
  4367. return c
  4368. }
  4369. // Header returns an http.Header that can be modified by the caller to
  4370. // add HTTP headers to the request.
  4371. func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Header() http.Header {
  4372. if c.header_ == nil {
  4373. c.header_ = make(http.Header)
  4374. }
  4375. return c.header_
  4376. }
  4377. func (c *ProjectsLocationsDatasetsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4378. reqHeaders := make(http.Header)
  4379. for k, v := range c.header_ {
  4380. reqHeaders[k] = v
  4381. }
  4382. reqHeaders.Set("User-Agent", c.s.userAgent())
  4383. var body io.Reader = nil
  4384. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  4385. if err != nil {
  4386. return nil, err
  4387. }
  4388. reqHeaders.Set("Content-Type", "application/json")
  4389. c.urlParams_.Set("alt", alt)
  4390. c.urlParams_.Set("prettyPrint", "false")
  4391. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy")
  4392. urls += "?" + c.urlParams_.Encode()
  4393. req, err := http.NewRequest("POST", urls, body)
  4394. if err != nil {
  4395. return nil, err
  4396. }
  4397. req.Header = reqHeaders
  4398. googleapi.Expand(req.URL, map[string]string{
  4399. "resource": c.resource,
  4400. })
  4401. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4402. }
  4403. // Do executes the "healthcare.projects.locations.datasets.setIamPolicy" call.
  4404. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  4405. // code is an error. Response headers are in either
  4406. // *Policy.ServerResponse.Header or (if a response was returned at all)
  4407. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4408. // check whether the returned error was because http.StatusNotModified
  4409. // was returned.
  4410. func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4411. gensupport.SetOptions(c.urlParams_, opts...)
  4412. res, err := c.doRequest("json")
  4413. if res != nil && res.StatusCode == http.StatusNotModified {
  4414. if res.Body != nil {
  4415. res.Body.Close()
  4416. }
  4417. return nil, &googleapi.Error{
  4418. Code: res.StatusCode,
  4419. Header: res.Header,
  4420. }
  4421. }
  4422. if err != nil {
  4423. return nil, err
  4424. }
  4425. defer googleapi.CloseBody(res)
  4426. if err := googleapi.CheckResponse(res); err != nil {
  4427. return nil, err
  4428. }
  4429. ret := &Policy{
  4430. ServerResponse: googleapi.ServerResponse{
  4431. Header: res.Header,
  4432. HTTPStatusCode: res.StatusCode,
  4433. },
  4434. }
  4435. target := &ret
  4436. if err := gensupport.DecodeResponse(target, res); err != nil {
  4437. return nil, err
  4438. }
  4439. return ret, nil
  4440. // {
  4441. // "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.",
  4442. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}:setIamPolicy",
  4443. // "httpMethod": "POST",
  4444. // "id": "healthcare.projects.locations.datasets.setIamPolicy",
  4445. // "parameterOrder": [
  4446. // "resource"
  4447. // ],
  4448. // "parameters": {
  4449. // "resource": {
  4450. // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
  4451. // "location": "path",
  4452. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  4453. // "required": true,
  4454. // "type": "string"
  4455. // }
  4456. // },
  4457. // "path": "v1alpha/{+resource}:setIamPolicy",
  4458. // "request": {
  4459. // "$ref": "SetIamPolicyRequest"
  4460. // },
  4461. // "response": {
  4462. // "$ref": "Policy"
  4463. // },
  4464. // "scopes": [
  4465. // "https://www.googleapis.com/auth/cloud-platform"
  4466. // ]
  4467. // }
  4468. }
  4469. // method id "healthcare.projects.locations.datasets.testIamPermissions":
  4470. type ProjectsLocationsDatasetsTestIamPermissionsCall struct {
  4471. s *Service
  4472. resource string
  4473. testiampermissionsrequest *TestIamPermissionsRequest
  4474. urlParams_ gensupport.URLParams
  4475. ctx_ context.Context
  4476. header_ http.Header
  4477. }
  4478. // TestIamPermissions: Returns permissions that a caller has on the
  4479. // specified resource.
  4480. // If the resource does not exist, this will return an empty set
  4481. // of
  4482. // permissions, not a NOT_FOUND error.
  4483. //
  4484. // Note: This operation is designed to be used for building
  4485. // permission-aware
  4486. // UIs and command-line tools, not for authorization checking. This
  4487. // operation
  4488. // may "fail open" without warning.
  4489. func (r *ProjectsLocationsDatasetsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsTestIamPermissionsCall {
  4490. c := &ProjectsLocationsDatasetsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4491. c.resource = resource
  4492. c.testiampermissionsrequest = testiampermissionsrequest
  4493. return c
  4494. }
  4495. // Fields allows partial responses to be retrieved. See
  4496. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4497. // for more information.
  4498. func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsTestIamPermissionsCall {
  4499. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4500. return c
  4501. }
  4502. // Context sets the context to be used in this call's Do method. Any
  4503. // pending HTTP request will be aborted if the provided context is
  4504. // canceled.
  4505. func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsTestIamPermissionsCall {
  4506. c.ctx_ = ctx
  4507. return c
  4508. }
  4509. // Header returns an http.Header that can be modified by the caller to
  4510. // add HTTP headers to the request.
  4511. func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Header() http.Header {
  4512. if c.header_ == nil {
  4513. c.header_ = make(http.Header)
  4514. }
  4515. return c.header_
  4516. }
  4517. func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  4518. reqHeaders := make(http.Header)
  4519. for k, v := range c.header_ {
  4520. reqHeaders[k] = v
  4521. }
  4522. reqHeaders.Set("User-Agent", c.s.userAgent())
  4523. var body io.Reader = nil
  4524. body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  4525. if err != nil {
  4526. return nil, err
  4527. }
  4528. reqHeaders.Set("Content-Type", "application/json")
  4529. c.urlParams_.Set("alt", alt)
  4530. c.urlParams_.Set("prettyPrint", "false")
  4531. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions")
  4532. urls += "?" + c.urlParams_.Encode()
  4533. req, err := http.NewRequest("POST", urls, body)
  4534. if err != nil {
  4535. return nil, err
  4536. }
  4537. req.Header = reqHeaders
  4538. googleapi.Expand(req.URL, map[string]string{
  4539. "resource": c.resource,
  4540. })
  4541. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4542. }
  4543. // Do executes the "healthcare.projects.locations.datasets.testIamPermissions" call.
  4544. // Exactly one of *TestIamPermissionsResponse or error will be non-nil.
  4545. // Any non-2xx status code is an error. Response headers are in either
  4546. // *TestIamPermissionsResponse.ServerResponse.Header or (if a response
  4547. // was returned at all) in error.(*googleapi.Error).Header. Use
  4548. // googleapi.IsNotModified to check whether the returned error was
  4549. // because http.StatusNotModified was returned.
  4550. func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  4551. gensupport.SetOptions(c.urlParams_, opts...)
  4552. res, err := c.doRequest("json")
  4553. if res != nil && res.StatusCode == http.StatusNotModified {
  4554. if res.Body != nil {
  4555. res.Body.Close()
  4556. }
  4557. return nil, &googleapi.Error{
  4558. Code: res.StatusCode,
  4559. Header: res.Header,
  4560. }
  4561. }
  4562. if err != nil {
  4563. return nil, err
  4564. }
  4565. defer googleapi.CloseBody(res)
  4566. if err := googleapi.CheckResponse(res); err != nil {
  4567. return nil, err
  4568. }
  4569. ret := &TestIamPermissionsResponse{
  4570. ServerResponse: googleapi.ServerResponse{
  4571. Header: res.Header,
  4572. HTTPStatusCode: res.StatusCode,
  4573. },
  4574. }
  4575. target := &ret
  4576. if err := gensupport.DecodeResponse(target, res); err != nil {
  4577. return nil, err
  4578. }
  4579. return ret, nil
  4580. // {
  4581. // "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.",
  4582. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}:testIamPermissions",
  4583. // "httpMethod": "POST",
  4584. // "id": "healthcare.projects.locations.datasets.testIamPermissions",
  4585. // "parameterOrder": [
  4586. // "resource"
  4587. // ],
  4588. // "parameters": {
  4589. // "resource": {
  4590. // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
  4591. // "location": "path",
  4592. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  4593. // "required": true,
  4594. // "type": "string"
  4595. // }
  4596. // },
  4597. // "path": "v1alpha/{+resource}:testIamPermissions",
  4598. // "request": {
  4599. // "$ref": "TestIamPermissionsRequest"
  4600. // },
  4601. // "response": {
  4602. // "$ref": "TestIamPermissionsResponse"
  4603. // },
  4604. // "scopes": [
  4605. // "https://www.googleapis.com/auth/cloud-platform"
  4606. // ]
  4607. // }
  4608. }
  4609. // method id "healthcare.projects.locations.datasets.annotationStores.create":
  4610. type ProjectsLocationsDatasetsAnnotationStoresCreateCall struct {
  4611. s *Service
  4612. parent string
  4613. annotationstore *AnnotationStore
  4614. urlParams_ gensupport.URLParams
  4615. ctx_ context.Context
  4616. header_ http.Header
  4617. }
  4618. // Create: Creates a new Annotation store within the parent dataset.
  4619. func (r *ProjectsLocationsDatasetsAnnotationStoresService) Create(parent string, annotationstore *AnnotationStore) *ProjectsLocationsDatasetsAnnotationStoresCreateCall {
  4620. c := &ProjectsLocationsDatasetsAnnotationStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4621. c.parent = parent
  4622. c.annotationstore = annotationstore
  4623. return c
  4624. }
  4625. // AnnotationStoreId sets the optional parameter "annotationStoreId":
  4626. // The ID of the Annotation store that is being created.
  4627. // The string must match the following regex:
  4628. // `[\p{L}\p{N}_\-\.]{1,256}`.
  4629. func (c *ProjectsLocationsDatasetsAnnotationStoresCreateCall) AnnotationStoreId(annotationStoreId string) *ProjectsLocationsDatasetsAnnotationStoresCreateCall {
  4630. c.urlParams_.Set("annotationStoreId", annotationStoreId)
  4631. return c
  4632. }
  4633. // Fields allows partial responses to be retrieved. See
  4634. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4635. // for more information.
  4636. func (c *ProjectsLocationsDatasetsAnnotationStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresCreateCall {
  4637. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4638. return c
  4639. }
  4640. // Context sets the context to be used in this call's Do method. Any
  4641. // pending HTTP request will be aborted if the provided context is
  4642. // canceled.
  4643. func (c *ProjectsLocationsDatasetsAnnotationStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresCreateCall {
  4644. c.ctx_ = ctx
  4645. return c
  4646. }
  4647. // Header returns an http.Header that can be modified by the caller to
  4648. // add HTTP headers to the request.
  4649. func (c *ProjectsLocationsDatasetsAnnotationStoresCreateCall) Header() http.Header {
  4650. if c.header_ == nil {
  4651. c.header_ = make(http.Header)
  4652. }
  4653. return c.header_
  4654. }
  4655. func (c *ProjectsLocationsDatasetsAnnotationStoresCreateCall) doRequest(alt string) (*http.Response, error) {
  4656. reqHeaders := make(http.Header)
  4657. for k, v := range c.header_ {
  4658. reqHeaders[k] = v
  4659. }
  4660. reqHeaders.Set("User-Agent", c.s.userAgent())
  4661. var body io.Reader = nil
  4662. body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotationstore)
  4663. if err != nil {
  4664. return nil, err
  4665. }
  4666. reqHeaders.Set("Content-Type", "application/json")
  4667. c.urlParams_.Set("alt", alt)
  4668. c.urlParams_.Set("prettyPrint", "false")
  4669. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/annotationStores")
  4670. urls += "?" + c.urlParams_.Encode()
  4671. req, err := http.NewRequest("POST", urls, body)
  4672. if err != nil {
  4673. return nil, err
  4674. }
  4675. req.Header = reqHeaders
  4676. googleapi.Expand(req.URL, map[string]string{
  4677. "parent": c.parent,
  4678. })
  4679. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4680. }
  4681. // Do executes the "healthcare.projects.locations.datasets.annotationStores.create" call.
  4682. // Exactly one of *AnnotationStore or error will be non-nil. Any non-2xx
  4683. // status code is an error. Response headers are in either
  4684. // *AnnotationStore.ServerResponse.Header or (if a response was returned
  4685. // at all) in error.(*googleapi.Error).Header. Use
  4686. // googleapi.IsNotModified to check whether the returned error was
  4687. // because http.StatusNotModified was returned.
  4688. func (c *ProjectsLocationsDatasetsAnnotationStoresCreateCall) Do(opts ...googleapi.CallOption) (*AnnotationStore, error) {
  4689. gensupport.SetOptions(c.urlParams_, opts...)
  4690. res, err := c.doRequest("json")
  4691. if res != nil && res.StatusCode == http.StatusNotModified {
  4692. if res.Body != nil {
  4693. res.Body.Close()
  4694. }
  4695. return nil, &googleapi.Error{
  4696. Code: res.StatusCode,
  4697. Header: res.Header,
  4698. }
  4699. }
  4700. if err != nil {
  4701. return nil, err
  4702. }
  4703. defer googleapi.CloseBody(res)
  4704. if err := googleapi.CheckResponse(res); err != nil {
  4705. return nil, err
  4706. }
  4707. ret := &AnnotationStore{
  4708. ServerResponse: googleapi.ServerResponse{
  4709. Header: res.Header,
  4710. HTTPStatusCode: res.StatusCode,
  4711. },
  4712. }
  4713. target := &ret
  4714. if err := gensupport.DecodeResponse(target, res); err != nil {
  4715. return nil, err
  4716. }
  4717. return ret, nil
  4718. // {
  4719. // "description": "Creates a new Annotation store within the parent dataset.",
  4720. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores",
  4721. // "httpMethod": "POST",
  4722. // "id": "healthcare.projects.locations.datasets.annotationStores.create",
  4723. // "parameterOrder": [
  4724. // "parent"
  4725. // ],
  4726. // "parameters": {
  4727. // "annotationStoreId": {
  4728. // "description": "The ID of the Annotation store that is being created.\nThe string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.",
  4729. // "location": "query",
  4730. // "type": "string"
  4731. // },
  4732. // "parent": {
  4733. // "description": "The name of the dataset this Annotation store belongs to.",
  4734. // "location": "path",
  4735. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  4736. // "required": true,
  4737. // "type": "string"
  4738. // }
  4739. // },
  4740. // "path": "v1alpha/{+parent}/annotationStores",
  4741. // "request": {
  4742. // "$ref": "AnnotationStore"
  4743. // },
  4744. // "response": {
  4745. // "$ref": "AnnotationStore"
  4746. // },
  4747. // "scopes": [
  4748. // "https://www.googleapis.com/auth/cloud-platform"
  4749. // ]
  4750. // }
  4751. }
  4752. // method id "healthcare.projects.locations.datasets.annotationStores.delete":
  4753. type ProjectsLocationsDatasetsAnnotationStoresDeleteCall struct {
  4754. s *Service
  4755. name string
  4756. urlParams_ gensupport.URLParams
  4757. ctx_ context.Context
  4758. header_ http.Header
  4759. }
  4760. // Delete: Deletes the specified Annotation store and removes all
  4761. // annotations that are
  4762. // contained within it.
  4763. func (r *ProjectsLocationsDatasetsAnnotationStoresService) Delete(name string) *ProjectsLocationsDatasetsAnnotationStoresDeleteCall {
  4764. c := &ProjectsLocationsDatasetsAnnotationStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4765. c.name = name
  4766. return c
  4767. }
  4768. // Fields allows partial responses to be retrieved. See
  4769. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4770. // for more information.
  4771. func (c *ProjectsLocationsDatasetsAnnotationStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresDeleteCall {
  4772. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4773. return c
  4774. }
  4775. // Context sets the context to be used in this call's Do method. Any
  4776. // pending HTTP request will be aborted if the provided context is
  4777. // canceled.
  4778. func (c *ProjectsLocationsDatasetsAnnotationStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresDeleteCall {
  4779. c.ctx_ = ctx
  4780. return c
  4781. }
  4782. // Header returns an http.Header that can be modified by the caller to
  4783. // add HTTP headers to the request.
  4784. func (c *ProjectsLocationsDatasetsAnnotationStoresDeleteCall) Header() http.Header {
  4785. if c.header_ == nil {
  4786. c.header_ = make(http.Header)
  4787. }
  4788. return c.header_
  4789. }
  4790. func (c *ProjectsLocationsDatasetsAnnotationStoresDeleteCall) doRequest(alt string) (*http.Response, error) {
  4791. reqHeaders := make(http.Header)
  4792. for k, v := range c.header_ {
  4793. reqHeaders[k] = v
  4794. }
  4795. reqHeaders.Set("User-Agent", c.s.userAgent())
  4796. var body io.Reader = nil
  4797. c.urlParams_.Set("alt", alt)
  4798. c.urlParams_.Set("prettyPrint", "false")
  4799. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  4800. urls += "?" + c.urlParams_.Encode()
  4801. req, err := http.NewRequest("DELETE", urls, body)
  4802. if err != nil {
  4803. return nil, err
  4804. }
  4805. req.Header = reqHeaders
  4806. googleapi.Expand(req.URL, map[string]string{
  4807. "name": c.name,
  4808. })
  4809. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4810. }
  4811. // Do executes the "healthcare.projects.locations.datasets.annotationStores.delete" call.
  4812. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  4813. // code is an error. Response headers are in either
  4814. // *Empty.ServerResponse.Header or (if a response was returned at all)
  4815. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4816. // check whether the returned error was because http.StatusNotModified
  4817. // was returned.
  4818. func (c *ProjectsLocationsDatasetsAnnotationStoresDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  4819. gensupport.SetOptions(c.urlParams_, opts...)
  4820. res, err := c.doRequest("json")
  4821. if res != nil && res.StatusCode == http.StatusNotModified {
  4822. if res.Body != nil {
  4823. res.Body.Close()
  4824. }
  4825. return nil, &googleapi.Error{
  4826. Code: res.StatusCode,
  4827. Header: res.Header,
  4828. }
  4829. }
  4830. if err != nil {
  4831. return nil, err
  4832. }
  4833. defer googleapi.CloseBody(res)
  4834. if err := googleapi.CheckResponse(res); err != nil {
  4835. return nil, err
  4836. }
  4837. ret := &Empty{
  4838. ServerResponse: googleapi.ServerResponse{
  4839. Header: res.Header,
  4840. HTTPStatusCode: res.StatusCode,
  4841. },
  4842. }
  4843. target := &ret
  4844. if err := gensupport.DecodeResponse(target, res); err != nil {
  4845. return nil, err
  4846. }
  4847. return ret, nil
  4848. // {
  4849. // "description": "Deletes the specified Annotation store and removes all annotations that are\ncontained within it.",
  4850. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}",
  4851. // "httpMethod": "DELETE",
  4852. // "id": "healthcare.projects.locations.datasets.annotationStores.delete",
  4853. // "parameterOrder": [
  4854. // "name"
  4855. // ],
  4856. // "parameters": {
  4857. // "name": {
  4858. // "description": "The resource name of the Annotation store to delete.",
  4859. // "location": "path",
  4860. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$",
  4861. // "required": true,
  4862. // "type": "string"
  4863. // }
  4864. // },
  4865. // "path": "v1alpha/{+name}",
  4866. // "response": {
  4867. // "$ref": "Empty"
  4868. // },
  4869. // "scopes": [
  4870. // "https://www.googleapis.com/auth/cloud-platform"
  4871. // ]
  4872. // }
  4873. }
  4874. // method id "healthcare.projects.locations.datasets.annotationStores.get":
  4875. type ProjectsLocationsDatasetsAnnotationStoresGetCall struct {
  4876. s *Service
  4877. name string
  4878. urlParams_ gensupport.URLParams
  4879. ifNoneMatch_ string
  4880. ctx_ context.Context
  4881. header_ http.Header
  4882. }
  4883. // Get: Gets the specified Annotation store or returns NOT_FOUND if it
  4884. // does not
  4885. // exist.
  4886. func (r *ProjectsLocationsDatasetsAnnotationStoresService) Get(name string) *ProjectsLocationsDatasetsAnnotationStoresGetCall {
  4887. c := &ProjectsLocationsDatasetsAnnotationStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4888. c.name = name
  4889. return c
  4890. }
  4891. // Fields allows partial responses to be retrieved. See
  4892. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4893. // for more information.
  4894. func (c *ProjectsLocationsDatasetsAnnotationStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresGetCall {
  4895. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4896. return c
  4897. }
  4898. // IfNoneMatch sets the optional parameter which makes the operation
  4899. // fail if the object's ETag matches the given value. This is useful for
  4900. // getting updates only after the object has changed since the last
  4901. // request. Use googleapi.IsNotModified to check whether the response
  4902. // error from Do is the result of In-None-Match.
  4903. func (c *ProjectsLocationsDatasetsAnnotationStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsAnnotationStoresGetCall {
  4904. c.ifNoneMatch_ = entityTag
  4905. return c
  4906. }
  4907. // Context sets the context to be used in this call's Do method. Any
  4908. // pending HTTP request will be aborted if the provided context is
  4909. // canceled.
  4910. func (c *ProjectsLocationsDatasetsAnnotationStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresGetCall {
  4911. c.ctx_ = ctx
  4912. return c
  4913. }
  4914. // Header returns an http.Header that can be modified by the caller to
  4915. // add HTTP headers to the request.
  4916. func (c *ProjectsLocationsDatasetsAnnotationStoresGetCall) Header() http.Header {
  4917. if c.header_ == nil {
  4918. c.header_ = make(http.Header)
  4919. }
  4920. return c.header_
  4921. }
  4922. func (c *ProjectsLocationsDatasetsAnnotationStoresGetCall) doRequest(alt string) (*http.Response, error) {
  4923. reqHeaders := make(http.Header)
  4924. for k, v := range c.header_ {
  4925. reqHeaders[k] = v
  4926. }
  4927. reqHeaders.Set("User-Agent", c.s.userAgent())
  4928. if c.ifNoneMatch_ != "" {
  4929. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4930. }
  4931. var body io.Reader = nil
  4932. c.urlParams_.Set("alt", alt)
  4933. c.urlParams_.Set("prettyPrint", "false")
  4934. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  4935. urls += "?" + c.urlParams_.Encode()
  4936. req, err := http.NewRequest("GET", urls, body)
  4937. if err != nil {
  4938. return nil, err
  4939. }
  4940. req.Header = reqHeaders
  4941. googleapi.Expand(req.URL, map[string]string{
  4942. "name": c.name,
  4943. })
  4944. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4945. }
  4946. // Do executes the "healthcare.projects.locations.datasets.annotationStores.get" call.
  4947. // Exactly one of *AnnotationStore or error will be non-nil. Any non-2xx
  4948. // status code is an error. Response headers are in either
  4949. // *AnnotationStore.ServerResponse.Header or (if a response was returned
  4950. // at all) in error.(*googleapi.Error).Header. Use
  4951. // googleapi.IsNotModified to check whether the returned error was
  4952. // because http.StatusNotModified was returned.
  4953. func (c *ProjectsLocationsDatasetsAnnotationStoresGetCall) Do(opts ...googleapi.CallOption) (*AnnotationStore, error) {
  4954. gensupport.SetOptions(c.urlParams_, opts...)
  4955. res, err := c.doRequest("json")
  4956. if res != nil && res.StatusCode == http.StatusNotModified {
  4957. if res.Body != nil {
  4958. res.Body.Close()
  4959. }
  4960. return nil, &googleapi.Error{
  4961. Code: res.StatusCode,
  4962. Header: res.Header,
  4963. }
  4964. }
  4965. if err != nil {
  4966. return nil, err
  4967. }
  4968. defer googleapi.CloseBody(res)
  4969. if err := googleapi.CheckResponse(res); err != nil {
  4970. return nil, err
  4971. }
  4972. ret := &AnnotationStore{
  4973. ServerResponse: googleapi.ServerResponse{
  4974. Header: res.Header,
  4975. HTTPStatusCode: res.StatusCode,
  4976. },
  4977. }
  4978. target := &ret
  4979. if err := gensupport.DecodeResponse(target, res); err != nil {
  4980. return nil, err
  4981. }
  4982. return ret, nil
  4983. // {
  4984. // "description": "Gets the specified Annotation store or returns NOT_FOUND if it does not\nexist.",
  4985. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}",
  4986. // "httpMethod": "GET",
  4987. // "id": "healthcare.projects.locations.datasets.annotationStores.get",
  4988. // "parameterOrder": [
  4989. // "name"
  4990. // ],
  4991. // "parameters": {
  4992. // "name": {
  4993. // "description": "The resource name of the Annotation store to get.",
  4994. // "location": "path",
  4995. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$",
  4996. // "required": true,
  4997. // "type": "string"
  4998. // }
  4999. // },
  5000. // "path": "v1alpha/{+name}",
  5001. // "response": {
  5002. // "$ref": "AnnotationStore"
  5003. // },
  5004. // "scopes": [
  5005. // "https://www.googleapis.com/auth/cloud-platform"
  5006. // ]
  5007. // }
  5008. }
  5009. // method id "healthcare.projects.locations.datasets.annotationStores.getIamPolicy":
  5010. type ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall struct {
  5011. s *Service
  5012. resource string
  5013. getiampolicyrequest *GetIamPolicyRequest
  5014. urlParams_ gensupport.URLParams
  5015. ctx_ context.Context
  5016. header_ http.Header
  5017. }
  5018. // GetIamPolicy: Gets the access control policy for a resource. Returns
  5019. // NOT_FOUND error if
  5020. // the resource does not exist. Returns an empty policy if the resource
  5021. // exists
  5022. // but does not have a policy set.
  5023. //
  5024. // Authorization requires the Google IAM
  5025. // permission
  5026. // `healthcare.AnnotationStores.getIamPolicy` on the specified resource
  5027. func (r *ProjectsLocationsDatasetsAnnotationStoresService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall {
  5028. c := &ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5029. c.resource = resource
  5030. c.getiampolicyrequest = getiampolicyrequest
  5031. return c
  5032. }
  5033. // Fields allows partial responses to be retrieved. See
  5034. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5035. // for more information.
  5036. func (c *ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall {
  5037. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5038. return c
  5039. }
  5040. // Context sets the context to be used in this call's Do method. Any
  5041. // pending HTTP request will be aborted if the provided context is
  5042. // canceled.
  5043. func (c *ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall {
  5044. c.ctx_ = ctx
  5045. return c
  5046. }
  5047. // Header returns an http.Header that can be modified by the caller to
  5048. // add HTTP headers to the request.
  5049. func (c *ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall) Header() http.Header {
  5050. if c.header_ == nil {
  5051. c.header_ = make(http.Header)
  5052. }
  5053. return c.header_
  5054. }
  5055. func (c *ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  5056. reqHeaders := make(http.Header)
  5057. for k, v := range c.header_ {
  5058. reqHeaders[k] = v
  5059. }
  5060. reqHeaders.Set("User-Agent", c.s.userAgent())
  5061. var body io.Reader = nil
  5062. body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
  5063. if err != nil {
  5064. return nil, err
  5065. }
  5066. reqHeaders.Set("Content-Type", "application/json")
  5067. c.urlParams_.Set("alt", alt)
  5068. c.urlParams_.Set("prettyPrint", "false")
  5069. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy")
  5070. urls += "?" + c.urlParams_.Encode()
  5071. req, err := http.NewRequest("POST", urls, body)
  5072. if err != nil {
  5073. return nil, err
  5074. }
  5075. req.Header = reqHeaders
  5076. googleapi.Expand(req.URL, map[string]string{
  5077. "resource": c.resource,
  5078. })
  5079. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5080. }
  5081. // Do executes the "healthcare.projects.locations.datasets.annotationStores.getIamPolicy" call.
  5082. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  5083. // code is an error. Response headers are in either
  5084. // *Policy.ServerResponse.Header or (if a response was returned at all)
  5085. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5086. // check whether the returned error was because http.StatusNotModified
  5087. // was returned.
  5088. func (c *ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  5089. gensupport.SetOptions(c.urlParams_, opts...)
  5090. res, err := c.doRequest("json")
  5091. if res != nil && res.StatusCode == http.StatusNotModified {
  5092. if res.Body != nil {
  5093. res.Body.Close()
  5094. }
  5095. return nil, &googleapi.Error{
  5096. Code: res.StatusCode,
  5097. Header: res.Header,
  5098. }
  5099. }
  5100. if err != nil {
  5101. return nil, err
  5102. }
  5103. defer googleapi.CloseBody(res)
  5104. if err := googleapi.CheckResponse(res); err != nil {
  5105. return nil, err
  5106. }
  5107. ret := &Policy{
  5108. ServerResponse: googleapi.ServerResponse{
  5109. Header: res.Header,
  5110. HTTPStatusCode: res.StatusCode,
  5111. },
  5112. }
  5113. target := &ret
  5114. if err := gensupport.DecodeResponse(target, res); err != nil {
  5115. return nil, err
  5116. }
  5117. return ret, nil
  5118. // {
  5119. // "description": "Gets the access control policy for a resource. Returns NOT_FOUND error if\nthe resource does not exist. Returns an empty policy if the resource exists\nbut does not have a policy set.\n\nAuthorization requires the Google IAM permission\n`healthcare.AnnotationStores.getIamPolicy` on the specified resource",
  5120. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}:getIamPolicy",
  5121. // "httpMethod": "POST",
  5122. // "id": "healthcare.projects.locations.datasets.annotationStores.getIamPolicy",
  5123. // "parameterOrder": [
  5124. // "resource"
  5125. // ],
  5126. // "parameters": {
  5127. // "resource": {
  5128. // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
  5129. // "location": "path",
  5130. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$",
  5131. // "required": true,
  5132. // "type": "string"
  5133. // }
  5134. // },
  5135. // "path": "v1alpha/{+resource}:getIamPolicy",
  5136. // "request": {
  5137. // "$ref": "GetIamPolicyRequest"
  5138. // },
  5139. // "response": {
  5140. // "$ref": "Policy"
  5141. // },
  5142. // "scopes": [
  5143. // "https://www.googleapis.com/auth/cloud-platform"
  5144. // ]
  5145. // }
  5146. }
  5147. // method id "healthcare.projects.locations.datasets.annotationStores.list":
  5148. type ProjectsLocationsDatasetsAnnotationStoresListCall struct {
  5149. s *Service
  5150. parent string
  5151. urlParams_ gensupport.URLParams
  5152. ifNoneMatch_ string
  5153. ctx_ context.Context
  5154. header_ http.Header
  5155. }
  5156. // List: Lists the Annotation stores in the given dataset for a source
  5157. // store.
  5158. func (r *ProjectsLocationsDatasetsAnnotationStoresService) List(parent string) *ProjectsLocationsDatasetsAnnotationStoresListCall {
  5159. c := &ProjectsLocationsDatasetsAnnotationStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5160. c.parent = parent
  5161. return c
  5162. }
  5163. // Filter sets the optional parameter "filter": Restricts stores
  5164. // returned to those matching a filter.
  5165. // Syntax:
  5166. // https://cloud.google.com/appengine/docs/standard/python/search
  5167. // /query_strings
  5168. // Only filtering on labels is supported, for example
  5169. // `labels.key=value`.
  5170. func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) Filter(filter string) *ProjectsLocationsDatasetsAnnotationStoresListCall {
  5171. c.urlParams_.Set("filter", filter)
  5172. return c
  5173. }
  5174. // PageSize sets the optional parameter "pageSize": Limit on the number
  5175. // of Annotation stores to return in a single response.
  5176. // If zero the default page size of 100 is used.
  5177. func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsAnnotationStoresListCall {
  5178. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5179. return c
  5180. }
  5181. // PageToken sets the optional parameter "pageToken": The
  5182. // next_page_token value returned from the previous List request, if
  5183. // any.
  5184. func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsAnnotationStoresListCall {
  5185. c.urlParams_.Set("pageToken", pageToken)
  5186. return c
  5187. }
  5188. // Fields allows partial responses to be retrieved. See
  5189. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5190. // for more information.
  5191. func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresListCall {
  5192. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5193. return c
  5194. }
  5195. // IfNoneMatch sets the optional parameter which makes the operation
  5196. // fail if the object's ETag matches the given value. This is useful for
  5197. // getting updates only after the object has changed since the last
  5198. // request. Use googleapi.IsNotModified to check whether the response
  5199. // error from Do is the result of In-None-Match.
  5200. func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsAnnotationStoresListCall {
  5201. c.ifNoneMatch_ = entityTag
  5202. return c
  5203. }
  5204. // Context sets the context to be used in this call's Do method. Any
  5205. // pending HTTP request will be aborted if the provided context is
  5206. // canceled.
  5207. func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresListCall {
  5208. c.ctx_ = ctx
  5209. return c
  5210. }
  5211. // Header returns an http.Header that can be modified by the caller to
  5212. // add HTTP headers to the request.
  5213. func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) Header() http.Header {
  5214. if c.header_ == nil {
  5215. c.header_ = make(http.Header)
  5216. }
  5217. return c.header_
  5218. }
  5219. func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) doRequest(alt string) (*http.Response, error) {
  5220. reqHeaders := make(http.Header)
  5221. for k, v := range c.header_ {
  5222. reqHeaders[k] = v
  5223. }
  5224. reqHeaders.Set("User-Agent", c.s.userAgent())
  5225. if c.ifNoneMatch_ != "" {
  5226. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5227. }
  5228. var body io.Reader = nil
  5229. c.urlParams_.Set("alt", alt)
  5230. c.urlParams_.Set("prettyPrint", "false")
  5231. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/annotationStores")
  5232. urls += "?" + c.urlParams_.Encode()
  5233. req, err := http.NewRequest("GET", urls, body)
  5234. if err != nil {
  5235. return nil, err
  5236. }
  5237. req.Header = reqHeaders
  5238. googleapi.Expand(req.URL, map[string]string{
  5239. "parent": c.parent,
  5240. })
  5241. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5242. }
  5243. // Do executes the "healthcare.projects.locations.datasets.annotationStores.list" call.
  5244. // Exactly one of *ListAnnotationStoresResponse or error will be
  5245. // non-nil. Any non-2xx status code is an error. Response headers are in
  5246. // either *ListAnnotationStoresResponse.ServerResponse.Header or (if a
  5247. // response was returned at all) in error.(*googleapi.Error).Header. Use
  5248. // googleapi.IsNotModified to check whether the returned error was
  5249. // because http.StatusNotModified was returned.
  5250. func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) Do(opts ...googleapi.CallOption) (*ListAnnotationStoresResponse, error) {
  5251. gensupport.SetOptions(c.urlParams_, opts...)
  5252. res, err := c.doRequest("json")
  5253. if res != nil && res.StatusCode == http.StatusNotModified {
  5254. if res.Body != nil {
  5255. res.Body.Close()
  5256. }
  5257. return nil, &googleapi.Error{
  5258. Code: res.StatusCode,
  5259. Header: res.Header,
  5260. }
  5261. }
  5262. if err != nil {
  5263. return nil, err
  5264. }
  5265. defer googleapi.CloseBody(res)
  5266. if err := googleapi.CheckResponse(res); err != nil {
  5267. return nil, err
  5268. }
  5269. ret := &ListAnnotationStoresResponse{
  5270. ServerResponse: googleapi.ServerResponse{
  5271. Header: res.Header,
  5272. HTTPStatusCode: res.StatusCode,
  5273. },
  5274. }
  5275. target := &ret
  5276. if err := gensupport.DecodeResponse(target, res); err != nil {
  5277. return nil, err
  5278. }
  5279. return ret, nil
  5280. // {
  5281. // "description": "Lists the Annotation stores in the given dataset for a source store.",
  5282. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores",
  5283. // "httpMethod": "GET",
  5284. // "id": "healthcare.projects.locations.datasets.annotationStores.list",
  5285. // "parameterOrder": [
  5286. // "parent"
  5287. // ],
  5288. // "parameters": {
  5289. // "filter": {
  5290. // "description": "Restricts stores returned to those matching a filter. Syntax:\nhttps://cloud.google.com/appengine/docs/standard/python/search/query_strings\nOnly filtering on labels is supported, for example `labels.key=value`.",
  5291. // "location": "query",
  5292. // "type": "string"
  5293. // },
  5294. // "pageSize": {
  5295. // "description": "Limit on the number of Annotation stores to return in a single response.\nIf zero the default page size of 100 is used.",
  5296. // "format": "int32",
  5297. // "location": "query",
  5298. // "type": "integer"
  5299. // },
  5300. // "pageToken": {
  5301. // "description": "The next_page_token value returned from the previous List request, if any.",
  5302. // "location": "query",
  5303. // "type": "string"
  5304. // },
  5305. // "parent": {
  5306. // "description": "Name of the dataset.",
  5307. // "location": "path",
  5308. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  5309. // "required": true,
  5310. // "type": "string"
  5311. // }
  5312. // },
  5313. // "path": "v1alpha/{+parent}/annotationStores",
  5314. // "response": {
  5315. // "$ref": "ListAnnotationStoresResponse"
  5316. // },
  5317. // "scopes": [
  5318. // "https://www.googleapis.com/auth/cloud-platform"
  5319. // ]
  5320. // }
  5321. }
  5322. // Pages invokes f for each page of results.
  5323. // A non-nil error returned from f will halt the iteration.
  5324. // The provided context supersedes any context provided to the Context method.
  5325. func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) Pages(ctx context.Context, f func(*ListAnnotationStoresResponse) error) error {
  5326. c.ctx_ = ctx
  5327. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5328. for {
  5329. x, err := c.Do()
  5330. if err != nil {
  5331. return err
  5332. }
  5333. if err := f(x); err != nil {
  5334. return err
  5335. }
  5336. if x.NextPageToken == "" {
  5337. return nil
  5338. }
  5339. c.PageToken(x.NextPageToken)
  5340. }
  5341. }
  5342. // method id "healthcare.projects.locations.datasets.annotationStores.patch":
  5343. type ProjectsLocationsDatasetsAnnotationStoresPatchCall struct {
  5344. s *Service
  5345. name string
  5346. annotationstore *AnnotationStore
  5347. urlParams_ gensupport.URLParams
  5348. ctx_ context.Context
  5349. header_ http.Header
  5350. }
  5351. // Patch: Updates the specified Annotation store.
  5352. func (r *ProjectsLocationsDatasetsAnnotationStoresService) Patch(name string, annotationstore *AnnotationStore) *ProjectsLocationsDatasetsAnnotationStoresPatchCall {
  5353. c := &ProjectsLocationsDatasetsAnnotationStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5354. c.name = name
  5355. c.annotationstore = annotationstore
  5356. return c
  5357. }
  5358. // UpdateMask sets the optional parameter "updateMask": The update mask
  5359. // applies to the resource. For the `FieldMask`
  5360. // definition,
  5361. // see
  5362. // https://developers.google.com/protocol-buffers/docs/re
  5363. // ference/google.protobuf#fieldmask
  5364. func (c *ProjectsLocationsDatasetsAnnotationStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsAnnotationStoresPatchCall {
  5365. c.urlParams_.Set("updateMask", updateMask)
  5366. return c
  5367. }
  5368. // Fields allows partial responses to be retrieved. See
  5369. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5370. // for more information.
  5371. func (c *ProjectsLocationsDatasetsAnnotationStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresPatchCall {
  5372. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5373. return c
  5374. }
  5375. // Context sets the context to be used in this call's Do method. Any
  5376. // pending HTTP request will be aborted if the provided context is
  5377. // canceled.
  5378. func (c *ProjectsLocationsDatasetsAnnotationStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresPatchCall {
  5379. c.ctx_ = ctx
  5380. return c
  5381. }
  5382. // Header returns an http.Header that can be modified by the caller to
  5383. // add HTTP headers to the request.
  5384. func (c *ProjectsLocationsDatasetsAnnotationStoresPatchCall) Header() http.Header {
  5385. if c.header_ == nil {
  5386. c.header_ = make(http.Header)
  5387. }
  5388. return c.header_
  5389. }
  5390. func (c *ProjectsLocationsDatasetsAnnotationStoresPatchCall) doRequest(alt string) (*http.Response, error) {
  5391. reqHeaders := make(http.Header)
  5392. for k, v := range c.header_ {
  5393. reqHeaders[k] = v
  5394. }
  5395. reqHeaders.Set("User-Agent", c.s.userAgent())
  5396. var body io.Reader = nil
  5397. body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotationstore)
  5398. if err != nil {
  5399. return nil, err
  5400. }
  5401. reqHeaders.Set("Content-Type", "application/json")
  5402. c.urlParams_.Set("alt", alt)
  5403. c.urlParams_.Set("prettyPrint", "false")
  5404. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  5405. urls += "?" + c.urlParams_.Encode()
  5406. req, err := http.NewRequest("PATCH", urls, body)
  5407. if err != nil {
  5408. return nil, err
  5409. }
  5410. req.Header = reqHeaders
  5411. googleapi.Expand(req.URL, map[string]string{
  5412. "name": c.name,
  5413. })
  5414. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5415. }
  5416. // Do executes the "healthcare.projects.locations.datasets.annotationStores.patch" call.
  5417. // Exactly one of *AnnotationStore or error will be non-nil. Any non-2xx
  5418. // status code is an error. Response headers are in either
  5419. // *AnnotationStore.ServerResponse.Header or (if a response was returned
  5420. // at all) in error.(*googleapi.Error).Header. Use
  5421. // googleapi.IsNotModified to check whether the returned error was
  5422. // because http.StatusNotModified was returned.
  5423. func (c *ProjectsLocationsDatasetsAnnotationStoresPatchCall) Do(opts ...googleapi.CallOption) (*AnnotationStore, error) {
  5424. gensupport.SetOptions(c.urlParams_, opts...)
  5425. res, err := c.doRequest("json")
  5426. if res != nil && res.StatusCode == http.StatusNotModified {
  5427. if res.Body != nil {
  5428. res.Body.Close()
  5429. }
  5430. return nil, &googleapi.Error{
  5431. Code: res.StatusCode,
  5432. Header: res.Header,
  5433. }
  5434. }
  5435. if err != nil {
  5436. return nil, err
  5437. }
  5438. defer googleapi.CloseBody(res)
  5439. if err := googleapi.CheckResponse(res); err != nil {
  5440. return nil, err
  5441. }
  5442. ret := &AnnotationStore{
  5443. ServerResponse: googleapi.ServerResponse{
  5444. Header: res.Header,
  5445. HTTPStatusCode: res.StatusCode,
  5446. },
  5447. }
  5448. target := &ret
  5449. if err := gensupport.DecodeResponse(target, res); err != nil {
  5450. return nil, err
  5451. }
  5452. return ret, nil
  5453. // {
  5454. // "description": "Updates the specified Annotation store.",
  5455. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}",
  5456. // "httpMethod": "PATCH",
  5457. // "id": "healthcare.projects.locations.datasets.annotationStores.patch",
  5458. // "parameterOrder": [
  5459. // "name"
  5460. // ],
  5461. // "parameters": {
  5462. // "name": {
  5463. // "description": "Output only. Resource name of the Annotation store, of the form\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}`.",
  5464. // "location": "path",
  5465. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$",
  5466. // "required": true,
  5467. // "type": "string"
  5468. // },
  5469. // "updateMask": {
  5470. // "description": "The update mask applies to the resource. For the `FieldMask` definition,\nsee\nhttps://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask",
  5471. // "format": "google-fieldmask",
  5472. // "location": "query",
  5473. // "type": "string"
  5474. // }
  5475. // },
  5476. // "path": "v1alpha/{+name}",
  5477. // "request": {
  5478. // "$ref": "AnnotationStore"
  5479. // },
  5480. // "response": {
  5481. // "$ref": "AnnotationStore"
  5482. // },
  5483. // "scopes": [
  5484. // "https://www.googleapis.com/auth/cloud-platform"
  5485. // ]
  5486. // }
  5487. }
  5488. // method id "healthcare.projects.locations.datasets.annotationStores.setIamPolicy":
  5489. type ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall struct {
  5490. s *Service
  5491. resource string
  5492. setiampolicyrequest *SetIamPolicyRequest
  5493. urlParams_ gensupport.URLParams
  5494. ctx_ context.Context
  5495. header_ http.Header
  5496. }
  5497. // SetIamPolicy: POLICIES
  5498. // Sets the access control policy for a resource. Replaces any
  5499. // existing
  5500. // policy.
  5501. //
  5502. // Authorization requires the Google IAM
  5503. // permission
  5504. // 'healthcare.annotationStores.setIamPolicy' on the specified resource
  5505. func (r *ProjectsLocationsDatasetsAnnotationStoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall {
  5506. c := &ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5507. c.resource = resource
  5508. c.setiampolicyrequest = setiampolicyrequest
  5509. return c
  5510. }
  5511. // Fields allows partial responses to be retrieved. See
  5512. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5513. // for more information.
  5514. func (c *ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall {
  5515. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5516. return c
  5517. }
  5518. // Context sets the context to be used in this call's Do method. Any
  5519. // pending HTTP request will be aborted if the provided context is
  5520. // canceled.
  5521. func (c *ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall {
  5522. c.ctx_ = ctx
  5523. return c
  5524. }
  5525. // Header returns an http.Header that can be modified by the caller to
  5526. // add HTTP headers to the request.
  5527. func (c *ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall) Header() http.Header {
  5528. if c.header_ == nil {
  5529. c.header_ = make(http.Header)
  5530. }
  5531. return c.header_
  5532. }
  5533. func (c *ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  5534. reqHeaders := make(http.Header)
  5535. for k, v := range c.header_ {
  5536. reqHeaders[k] = v
  5537. }
  5538. reqHeaders.Set("User-Agent", c.s.userAgent())
  5539. var body io.Reader = nil
  5540. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  5541. if err != nil {
  5542. return nil, err
  5543. }
  5544. reqHeaders.Set("Content-Type", "application/json")
  5545. c.urlParams_.Set("alt", alt)
  5546. c.urlParams_.Set("prettyPrint", "false")
  5547. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy")
  5548. urls += "?" + c.urlParams_.Encode()
  5549. req, err := http.NewRequest("POST", urls, body)
  5550. if err != nil {
  5551. return nil, err
  5552. }
  5553. req.Header = reqHeaders
  5554. googleapi.Expand(req.URL, map[string]string{
  5555. "resource": c.resource,
  5556. })
  5557. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5558. }
  5559. // Do executes the "healthcare.projects.locations.datasets.annotationStores.setIamPolicy" call.
  5560. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  5561. // code is an error. Response headers are in either
  5562. // *Policy.ServerResponse.Header or (if a response was returned at all)
  5563. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5564. // check whether the returned error was because http.StatusNotModified
  5565. // was returned.
  5566. func (c *ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  5567. gensupport.SetOptions(c.urlParams_, opts...)
  5568. res, err := c.doRequest("json")
  5569. if res != nil && res.StatusCode == http.StatusNotModified {
  5570. if res.Body != nil {
  5571. res.Body.Close()
  5572. }
  5573. return nil, &googleapi.Error{
  5574. Code: res.StatusCode,
  5575. Header: res.Header,
  5576. }
  5577. }
  5578. if err != nil {
  5579. return nil, err
  5580. }
  5581. defer googleapi.CloseBody(res)
  5582. if err := googleapi.CheckResponse(res); err != nil {
  5583. return nil, err
  5584. }
  5585. ret := &Policy{
  5586. ServerResponse: googleapi.ServerResponse{
  5587. Header: res.Header,
  5588. HTTPStatusCode: res.StatusCode,
  5589. },
  5590. }
  5591. target := &ret
  5592. if err := gensupport.DecodeResponse(target, res); err != nil {
  5593. return nil, err
  5594. }
  5595. return ret, nil
  5596. // {
  5597. // "description": "POLICIES\nSets the access control policy for a resource. Replaces any existing\npolicy.\n\nAuthorization requires the Google IAM permission\n'healthcare.annotationStores.setIamPolicy' on the specified resource",
  5598. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}:setIamPolicy",
  5599. // "httpMethod": "POST",
  5600. // "id": "healthcare.projects.locations.datasets.annotationStores.setIamPolicy",
  5601. // "parameterOrder": [
  5602. // "resource"
  5603. // ],
  5604. // "parameters": {
  5605. // "resource": {
  5606. // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
  5607. // "location": "path",
  5608. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$",
  5609. // "required": true,
  5610. // "type": "string"
  5611. // }
  5612. // },
  5613. // "path": "v1alpha/{+resource}:setIamPolicy",
  5614. // "request": {
  5615. // "$ref": "SetIamPolicyRequest"
  5616. // },
  5617. // "response": {
  5618. // "$ref": "Policy"
  5619. // },
  5620. // "scopes": [
  5621. // "https://www.googleapis.com/auth/cloud-platform"
  5622. // ]
  5623. // }
  5624. }
  5625. // method id "healthcare.projects.locations.datasets.annotationStores.testIamPermissions":
  5626. type ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall struct {
  5627. s *Service
  5628. resource string
  5629. testiampermissionsrequest *TestIamPermissionsRequest
  5630. urlParams_ gensupport.URLParams
  5631. ctx_ context.Context
  5632. header_ http.Header
  5633. }
  5634. // TestIamPermissions: Returns permissions that a caller has on the
  5635. // specified resource.
  5636. // If the resource does not exist, this will return an empty set
  5637. // of
  5638. // permissions, not a NOT_FOUND error.
  5639. //
  5640. // There is no permission required to make this API call.
  5641. func (r *ProjectsLocationsDatasetsAnnotationStoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall {
  5642. c := &ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5643. c.resource = resource
  5644. c.testiampermissionsrequest = testiampermissionsrequest
  5645. return c
  5646. }
  5647. // Fields allows partial responses to be retrieved. See
  5648. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5649. // for more information.
  5650. func (c *ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall {
  5651. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5652. return c
  5653. }
  5654. // Context sets the context to be used in this call's Do method. Any
  5655. // pending HTTP request will be aborted if the provided context is
  5656. // canceled.
  5657. func (c *ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall {
  5658. c.ctx_ = ctx
  5659. return c
  5660. }
  5661. // Header returns an http.Header that can be modified by the caller to
  5662. // add HTTP headers to the request.
  5663. func (c *ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall) Header() http.Header {
  5664. if c.header_ == nil {
  5665. c.header_ = make(http.Header)
  5666. }
  5667. return c.header_
  5668. }
  5669. func (c *ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  5670. reqHeaders := make(http.Header)
  5671. for k, v := range c.header_ {
  5672. reqHeaders[k] = v
  5673. }
  5674. reqHeaders.Set("User-Agent", c.s.userAgent())
  5675. var body io.Reader = nil
  5676. body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  5677. if err != nil {
  5678. return nil, err
  5679. }
  5680. reqHeaders.Set("Content-Type", "application/json")
  5681. c.urlParams_.Set("alt", alt)
  5682. c.urlParams_.Set("prettyPrint", "false")
  5683. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions")
  5684. urls += "?" + c.urlParams_.Encode()
  5685. req, err := http.NewRequest("POST", urls, body)
  5686. if err != nil {
  5687. return nil, err
  5688. }
  5689. req.Header = reqHeaders
  5690. googleapi.Expand(req.URL, map[string]string{
  5691. "resource": c.resource,
  5692. })
  5693. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5694. }
  5695. // Do executes the "healthcare.projects.locations.datasets.annotationStores.testIamPermissions" call.
  5696. // Exactly one of *TestIamPermissionsResponse or error will be non-nil.
  5697. // Any non-2xx status code is an error. Response headers are in either
  5698. // *TestIamPermissionsResponse.ServerResponse.Header or (if a response
  5699. // was returned at all) in error.(*googleapi.Error).Header. Use
  5700. // googleapi.IsNotModified to check whether the returned error was
  5701. // because http.StatusNotModified was returned.
  5702. func (c *ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  5703. gensupport.SetOptions(c.urlParams_, opts...)
  5704. res, err := c.doRequest("json")
  5705. if res != nil && res.StatusCode == http.StatusNotModified {
  5706. if res.Body != nil {
  5707. res.Body.Close()
  5708. }
  5709. return nil, &googleapi.Error{
  5710. Code: res.StatusCode,
  5711. Header: res.Header,
  5712. }
  5713. }
  5714. if err != nil {
  5715. return nil, err
  5716. }
  5717. defer googleapi.CloseBody(res)
  5718. if err := googleapi.CheckResponse(res); err != nil {
  5719. return nil, err
  5720. }
  5721. ret := &TestIamPermissionsResponse{
  5722. ServerResponse: googleapi.ServerResponse{
  5723. Header: res.Header,
  5724. HTTPStatusCode: res.StatusCode,
  5725. },
  5726. }
  5727. target := &ret
  5728. if err := gensupport.DecodeResponse(target, res); err != nil {
  5729. return nil, err
  5730. }
  5731. return ret, nil
  5732. // {
  5733. // "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\nThere is no permission required to make this API call.",
  5734. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}:testIamPermissions",
  5735. // "httpMethod": "POST",
  5736. // "id": "healthcare.projects.locations.datasets.annotationStores.testIamPermissions",
  5737. // "parameterOrder": [
  5738. // "resource"
  5739. // ],
  5740. // "parameters": {
  5741. // "resource": {
  5742. // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
  5743. // "location": "path",
  5744. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$",
  5745. // "required": true,
  5746. // "type": "string"
  5747. // }
  5748. // },
  5749. // "path": "v1alpha/{+resource}:testIamPermissions",
  5750. // "request": {
  5751. // "$ref": "TestIamPermissionsRequest"
  5752. // },
  5753. // "response": {
  5754. // "$ref": "TestIamPermissionsResponse"
  5755. // },
  5756. // "scopes": [
  5757. // "https://www.googleapis.com/auth/cloud-platform"
  5758. // ]
  5759. // }
  5760. }
  5761. // method id "healthcare.projects.locations.datasets.annotationStores.annotations.create":
  5762. type ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall struct {
  5763. s *Service
  5764. parent string
  5765. annotation *Annotation
  5766. urlParams_ gensupport.URLParams
  5767. ctx_ context.Context
  5768. header_ http.Header
  5769. }
  5770. // Create: Creates a new Annotation
  5771. // record. It is valid to create Annotation objects for the same source
  5772. // more
  5773. // than once since a unique ID is assigned to each record by this
  5774. // service.
  5775. func (r *ProjectsLocationsDatasetsAnnotationStoresAnnotationsService) Create(parent string, annotation *Annotation) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall {
  5776. c := &ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5777. c.parent = parent
  5778. c.annotation = annotation
  5779. return c
  5780. }
  5781. // Fields allows partial responses to be retrieved. See
  5782. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5783. // for more information.
  5784. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall {
  5785. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5786. return c
  5787. }
  5788. // Context sets the context to be used in this call's Do method. Any
  5789. // pending HTTP request will be aborted if the provided context is
  5790. // canceled.
  5791. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall {
  5792. c.ctx_ = ctx
  5793. return c
  5794. }
  5795. // Header returns an http.Header that can be modified by the caller to
  5796. // add HTTP headers to the request.
  5797. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall) Header() http.Header {
  5798. if c.header_ == nil {
  5799. c.header_ = make(http.Header)
  5800. }
  5801. return c.header_
  5802. }
  5803. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall) doRequest(alt string) (*http.Response, error) {
  5804. reqHeaders := make(http.Header)
  5805. for k, v := range c.header_ {
  5806. reqHeaders[k] = v
  5807. }
  5808. reqHeaders.Set("User-Agent", c.s.userAgent())
  5809. var body io.Reader = nil
  5810. body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotation)
  5811. if err != nil {
  5812. return nil, err
  5813. }
  5814. reqHeaders.Set("Content-Type", "application/json")
  5815. c.urlParams_.Set("alt", alt)
  5816. c.urlParams_.Set("prettyPrint", "false")
  5817. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/annotations")
  5818. urls += "?" + c.urlParams_.Encode()
  5819. req, err := http.NewRequest("POST", urls, body)
  5820. if err != nil {
  5821. return nil, err
  5822. }
  5823. req.Header = reqHeaders
  5824. googleapi.Expand(req.URL, map[string]string{
  5825. "parent": c.parent,
  5826. })
  5827. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5828. }
  5829. // Do executes the "healthcare.projects.locations.datasets.annotationStores.annotations.create" call.
  5830. // Exactly one of *Annotation or error will be non-nil. Any non-2xx
  5831. // status code is an error. Response headers are in either
  5832. // *Annotation.ServerResponse.Header or (if a response was returned at
  5833. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5834. // to check whether the returned error was because
  5835. // http.StatusNotModified was returned.
  5836. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall) Do(opts ...googleapi.CallOption) (*Annotation, error) {
  5837. gensupport.SetOptions(c.urlParams_, opts...)
  5838. res, err := c.doRequest("json")
  5839. if res != nil && res.StatusCode == http.StatusNotModified {
  5840. if res.Body != nil {
  5841. res.Body.Close()
  5842. }
  5843. return nil, &googleapi.Error{
  5844. Code: res.StatusCode,
  5845. Header: res.Header,
  5846. }
  5847. }
  5848. if err != nil {
  5849. return nil, err
  5850. }
  5851. defer googleapi.CloseBody(res)
  5852. if err := googleapi.CheckResponse(res); err != nil {
  5853. return nil, err
  5854. }
  5855. ret := &Annotation{
  5856. ServerResponse: googleapi.ServerResponse{
  5857. Header: res.Header,
  5858. HTTPStatusCode: res.StatusCode,
  5859. },
  5860. }
  5861. target := &ret
  5862. if err := gensupport.DecodeResponse(target, res); err != nil {
  5863. return nil, err
  5864. }
  5865. return ret, nil
  5866. // {
  5867. // "description": "Creates a new Annotation\nrecord. It is valid to create Annotation objects for the same source more\nthan once since a unique ID is assigned to each record by this service.",
  5868. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}/annotations",
  5869. // "httpMethod": "POST",
  5870. // "id": "healthcare.projects.locations.datasets.annotationStores.annotations.create",
  5871. // "parameterOrder": [
  5872. // "parent"
  5873. // ],
  5874. // "parameters": {
  5875. // "parent": {
  5876. // "description": "The name of the Annotation store this annotation belongs to. For example,\n`projects/my-project/locations/us-central1/datasets/mydataset/annotationStores/myannotationstore`.",
  5877. // "location": "path",
  5878. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$",
  5879. // "required": true,
  5880. // "type": "string"
  5881. // }
  5882. // },
  5883. // "path": "v1alpha/{+parent}/annotations",
  5884. // "request": {
  5885. // "$ref": "Annotation"
  5886. // },
  5887. // "response": {
  5888. // "$ref": "Annotation"
  5889. // },
  5890. // "scopes": [
  5891. // "https://www.googleapis.com/auth/cloud-platform"
  5892. // ]
  5893. // }
  5894. }
  5895. // method id "healthcare.projects.locations.datasets.annotationStores.annotations.delete":
  5896. type ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall struct {
  5897. s *Service
  5898. name string
  5899. urlParams_ gensupport.URLParams
  5900. ctx_ context.Context
  5901. header_ http.Header
  5902. }
  5903. // Delete: Deletes an Annotation or
  5904. // returns NOT_FOUND if it does not exist.
  5905. func (r *ProjectsLocationsDatasetsAnnotationStoresAnnotationsService) Delete(name string) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall {
  5906. c := &ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5907. c.name = name
  5908. return c
  5909. }
  5910. // Fields allows partial responses to be retrieved. See
  5911. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5912. // for more information.
  5913. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall {
  5914. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5915. return c
  5916. }
  5917. // Context sets the context to be used in this call's Do method. Any
  5918. // pending HTTP request will be aborted if the provided context is
  5919. // canceled.
  5920. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall {
  5921. c.ctx_ = ctx
  5922. return c
  5923. }
  5924. // Header returns an http.Header that can be modified by the caller to
  5925. // add HTTP headers to the request.
  5926. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall) Header() http.Header {
  5927. if c.header_ == nil {
  5928. c.header_ = make(http.Header)
  5929. }
  5930. return c.header_
  5931. }
  5932. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  5933. reqHeaders := make(http.Header)
  5934. for k, v := range c.header_ {
  5935. reqHeaders[k] = v
  5936. }
  5937. reqHeaders.Set("User-Agent", c.s.userAgent())
  5938. var body io.Reader = nil
  5939. c.urlParams_.Set("alt", alt)
  5940. c.urlParams_.Set("prettyPrint", "false")
  5941. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  5942. urls += "?" + c.urlParams_.Encode()
  5943. req, err := http.NewRequest("DELETE", urls, body)
  5944. if err != nil {
  5945. return nil, err
  5946. }
  5947. req.Header = reqHeaders
  5948. googleapi.Expand(req.URL, map[string]string{
  5949. "name": c.name,
  5950. })
  5951. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5952. }
  5953. // Do executes the "healthcare.projects.locations.datasets.annotationStores.annotations.delete" call.
  5954. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  5955. // code is an error. Response headers are in either
  5956. // *Empty.ServerResponse.Header or (if a response was returned at all)
  5957. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5958. // check whether the returned error was because http.StatusNotModified
  5959. // was returned.
  5960. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5961. gensupport.SetOptions(c.urlParams_, opts...)
  5962. res, err := c.doRequest("json")
  5963. if res != nil && res.StatusCode == http.StatusNotModified {
  5964. if res.Body != nil {
  5965. res.Body.Close()
  5966. }
  5967. return nil, &googleapi.Error{
  5968. Code: res.StatusCode,
  5969. Header: res.Header,
  5970. }
  5971. }
  5972. if err != nil {
  5973. return nil, err
  5974. }
  5975. defer googleapi.CloseBody(res)
  5976. if err := googleapi.CheckResponse(res); err != nil {
  5977. return nil, err
  5978. }
  5979. ret := &Empty{
  5980. ServerResponse: googleapi.ServerResponse{
  5981. Header: res.Header,
  5982. HTTPStatusCode: res.StatusCode,
  5983. },
  5984. }
  5985. target := &ret
  5986. if err := gensupport.DecodeResponse(target, res); err != nil {
  5987. return nil, err
  5988. }
  5989. return ret, nil
  5990. // {
  5991. // "description": "Deletes an Annotation or\nreturns NOT_FOUND if it does not exist.",
  5992. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}/annotations/{annotationsId}",
  5993. // "httpMethod": "DELETE",
  5994. // "id": "healthcare.projects.locations.datasets.annotationStores.annotations.delete",
  5995. // "parameterOrder": [
  5996. // "name"
  5997. // ],
  5998. // "parameters": {
  5999. // "name": {
  6000. // "description": "The resource name of the Annotation to delete.",
  6001. // "location": "path",
  6002. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+/annotations/[^/]+$",
  6003. // "required": true,
  6004. // "type": "string"
  6005. // }
  6006. // },
  6007. // "path": "v1alpha/{+name}",
  6008. // "response": {
  6009. // "$ref": "Empty"
  6010. // },
  6011. // "scopes": [
  6012. // "https://www.googleapis.com/auth/cloud-platform"
  6013. // ]
  6014. // }
  6015. }
  6016. // method id "healthcare.projects.locations.datasets.annotationStores.annotations.get":
  6017. type ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall struct {
  6018. s *Service
  6019. name string
  6020. urlParams_ gensupport.URLParams
  6021. ifNoneMatch_ string
  6022. ctx_ context.Context
  6023. header_ http.Header
  6024. }
  6025. // Get: Gets an Annotation.
  6026. func (r *ProjectsLocationsDatasetsAnnotationStoresAnnotationsService) Get(name string) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall {
  6027. c := &ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6028. c.name = name
  6029. return c
  6030. }
  6031. // Fields allows partial responses to be retrieved. See
  6032. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6033. // for more information.
  6034. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall {
  6035. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6036. return c
  6037. }
  6038. // IfNoneMatch sets the optional parameter which makes the operation
  6039. // fail if the object's ETag matches the given value. This is useful for
  6040. // getting updates only after the object has changed since the last
  6041. // request. Use googleapi.IsNotModified to check whether the response
  6042. // error from Do is the result of In-None-Match.
  6043. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall {
  6044. c.ifNoneMatch_ = entityTag
  6045. return c
  6046. }
  6047. // Context sets the context to be used in this call's Do method. Any
  6048. // pending HTTP request will be aborted if the provided context is
  6049. // canceled.
  6050. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall {
  6051. c.ctx_ = ctx
  6052. return c
  6053. }
  6054. // Header returns an http.Header that can be modified by the caller to
  6055. // add HTTP headers to the request.
  6056. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall) Header() http.Header {
  6057. if c.header_ == nil {
  6058. c.header_ = make(http.Header)
  6059. }
  6060. return c.header_
  6061. }
  6062. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall) doRequest(alt string) (*http.Response, error) {
  6063. reqHeaders := make(http.Header)
  6064. for k, v := range c.header_ {
  6065. reqHeaders[k] = v
  6066. }
  6067. reqHeaders.Set("User-Agent", c.s.userAgent())
  6068. if c.ifNoneMatch_ != "" {
  6069. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6070. }
  6071. var body io.Reader = nil
  6072. c.urlParams_.Set("alt", alt)
  6073. c.urlParams_.Set("prettyPrint", "false")
  6074. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  6075. urls += "?" + c.urlParams_.Encode()
  6076. req, err := http.NewRequest("GET", urls, body)
  6077. if err != nil {
  6078. return nil, err
  6079. }
  6080. req.Header = reqHeaders
  6081. googleapi.Expand(req.URL, map[string]string{
  6082. "name": c.name,
  6083. })
  6084. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6085. }
  6086. // Do executes the "healthcare.projects.locations.datasets.annotationStores.annotations.get" call.
  6087. // Exactly one of *Annotation or error will be non-nil. Any non-2xx
  6088. // status code is an error. Response headers are in either
  6089. // *Annotation.ServerResponse.Header or (if a response was returned at
  6090. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6091. // to check whether the returned error was because
  6092. // http.StatusNotModified was returned.
  6093. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall) Do(opts ...googleapi.CallOption) (*Annotation, error) {
  6094. gensupport.SetOptions(c.urlParams_, opts...)
  6095. res, err := c.doRequest("json")
  6096. if res != nil && res.StatusCode == http.StatusNotModified {
  6097. if res.Body != nil {
  6098. res.Body.Close()
  6099. }
  6100. return nil, &googleapi.Error{
  6101. Code: res.StatusCode,
  6102. Header: res.Header,
  6103. }
  6104. }
  6105. if err != nil {
  6106. return nil, err
  6107. }
  6108. defer googleapi.CloseBody(res)
  6109. if err := googleapi.CheckResponse(res); err != nil {
  6110. return nil, err
  6111. }
  6112. ret := &Annotation{
  6113. ServerResponse: googleapi.ServerResponse{
  6114. Header: res.Header,
  6115. HTTPStatusCode: res.StatusCode,
  6116. },
  6117. }
  6118. target := &ret
  6119. if err := gensupport.DecodeResponse(target, res); err != nil {
  6120. return nil, err
  6121. }
  6122. return ret, nil
  6123. // {
  6124. // "description": "Gets an Annotation.",
  6125. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}/annotations/{annotationsId}",
  6126. // "httpMethod": "GET",
  6127. // "id": "healthcare.projects.locations.datasets.annotationStores.annotations.get",
  6128. // "parameterOrder": [
  6129. // "name"
  6130. // ],
  6131. // "parameters": {
  6132. // "name": {
  6133. // "description": "The resource name of the Annotation to retrieve.",
  6134. // "location": "path",
  6135. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+/annotations/[^/]+$",
  6136. // "required": true,
  6137. // "type": "string"
  6138. // }
  6139. // },
  6140. // "path": "v1alpha/{+name}",
  6141. // "response": {
  6142. // "$ref": "Annotation"
  6143. // },
  6144. // "scopes": [
  6145. // "https://www.googleapis.com/auth/cloud-platform"
  6146. // ]
  6147. // }
  6148. }
  6149. // method id "healthcare.projects.locations.datasets.annotationStores.annotations.list":
  6150. type ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall struct {
  6151. s *Service
  6152. parent string
  6153. urlParams_ gensupport.URLParams
  6154. ifNoneMatch_ string
  6155. ctx_ context.Context
  6156. header_ http.Header
  6157. }
  6158. // List: Lists the Annotations in the
  6159. // given Annotation store
  6160. // for a source resource.
  6161. func (r *ProjectsLocationsDatasetsAnnotationStoresAnnotationsService) List(parent string) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall {
  6162. c := &ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6163. c.parent = parent
  6164. return c
  6165. }
  6166. // Filter sets the optional parameter "filter": Restricts Annotations
  6167. // returned to those matching a filter.
  6168. // Syntax:
  6169. // https://cloud.google.com/appengine/docs/standard/python/search
  6170. // /query_strings
  6171. // Fields/functions available for filtering are:
  6172. // - source_version
  6173. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) Filter(filter string) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall {
  6174. c.urlParams_.Set("filter", filter)
  6175. return c
  6176. }
  6177. // PageSize sets the optional parameter "pageSize": Limit on the number
  6178. // of Annotations to return in a single response.
  6179. // If zero the default page size of 100 is used.
  6180. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall {
  6181. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6182. return c
  6183. }
  6184. // PageToken sets the optional parameter "pageToken": The
  6185. // next_page_token value returned from the previous List request, if
  6186. // any.
  6187. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall {
  6188. c.urlParams_.Set("pageToken", pageToken)
  6189. return c
  6190. }
  6191. // Fields allows partial responses to be retrieved. See
  6192. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6193. // for more information.
  6194. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall {
  6195. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6196. return c
  6197. }
  6198. // IfNoneMatch sets the optional parameter which makes the operation
  6199. // fail if the object's ETag matches the given value. This is useful for
  6200. // getting updates only after the object has changed since the last
  6201. // request. Use googleapi.IsNotModified to check whether the response
  6202. // error from Do is the result of In-None-Match.
  6203. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall {
  6204. c.ifNoneMatch_ = entityTag
  6205. return c
  6206. }
  6207. // Context sets the context to be used in this call's Do method. Any
  6208. // pending HTTP request will be aborted if the provided context is
  6209. // canceled.
  6210. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall {
  6211. c.ctx_ = ctx
  6212. return c
  6213. }
  6214. // Header returns an http.Header that can be modified by the caller to
  6215. // add HTTP headers to the request.
  6216. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) Header() http.Header {
  6217. if c.header_ == nil {
  6218. c.header_ = make(http.Header)
  6219. }
  6220. return c.header_
  6221. }
  6222. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) doRequest(alt string) (*http.Response, error) {
  6223. reqHeaders := make(http.Header)
  6224. for k, v := range c.header_ {
  6225. reqHeaders[k] = v
  6226. }
  6227. reqHeaders.Set("User-Agent", c.s.userAgent())
  6228. if c.ifNoneMatch_ != "" {
  6229. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6230. }
  6231. var body io.Reader = nil
  6232. c.urlParams_.Set("alt", alt)
  6233. c.urlParams_.Set("prettyPrint", "false")
  6234. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/annotations")
  6235. urls += "?" + c.urlParams_.Encode()
  6236. req, err := http.NewRequest("GET", urls, body)
  6237. if err != nil {
  6238. return nil, err
  6239. }
  6240. req.Header = reqHeaders
  6241. googleapi.Expand(req.URL, map[string]string{
  6242. "parent": c.parent,
  6243. })
  6244. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6245. }
  6246. // Do executes the "healthcare.projects.locations.datasets.annotationStores.annotations.list" call.
  6247. // Exactly one of *ListAnnotationsResponse or error will be non-nil. Any
  6248. // non-2xx status code is an error. Response headers are in either
  6249. // *ListAnnotationsResponse.ServerResponse.Header or (if a response was
  6250. // returned at all) in error.(*googleapi.Error).Header. Use
  6251. // googleapi.IsNotModified to check whether the returned error was
  6252. // because http.StatusNotModified was returned.
  6253. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) Do(opts ...googleapi.CallOption) (*ListAnnotationsResponse, error) {
  6254. gensupport.SetOptions(c.urlParams_, opts...)
  6255. res, err := c.doRequest("json")
  6256. if res != nil && res.StatusCode == http.StatusNotModified {
  6257. if res.Body != nil {
  6258. res.Body.Close()
  6259. }
  6260. return nil, &googleapi.Error{
  6261. Code: res.StatusCode,
  6262. Header: res.Header,
  6263. }
  6264. }
  6265. if err != nil {
  6266. return nil, err
  6267. }
  6268. defer googleapi.CloseBody(res)
  6269. if err := googleapi.CheckResponse(res); err != nil {
  6270. return nil, err
  6271. }
  6272. ret := &ListAnnotationsResponse{
  6273. ServerResponse: googleapi.ServerResponse{
  6274. Header: res.Header,
  6275. HTTPStatusCode: res.StatusCode,
  6276. },
  6277. }
  6278. target := &ret
  6279. if err := gensupport.DecodeResponse(target, res); err != nil {
  6280. return nil, err
  6281. }
  6282. return ret, nil
  6283. // {
  6284. // "description": "Lists the Annotations in the\ngiven Annotation store\nfor a source resource.",
  6285. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}/annotations",
  6286. // "httpMethod": "GET",
  6287. // "id": "healthcare.projects.locations.datasets.annotationStores.annotations.list",
  6288. // "parameterOrder": [
  6289. // "parent"
  6290. // ],
  6291. // "parameters": {
  6292. // "filter": {
  6293. // "description": "Restricts Annotations returned to those matching a filter. Syntax:\nhttps://cloud.google.com/appengine/docs/standard/python/search/query_strings\nFields/functions available for filtering are:\n- source_version",
  6294. // "location": "query",
  6295. // "type": "string"
  6296. // },
  6297. // "pageSize": {
  6298. // "description": "Limit on the number of Annotations to return in a single response.\nIf zero the default page size of 100 is used.",
  6299. // "format": "int32",
  6300. // "location": "query",
  6301. // "type": "integer"
  6302. // },
  6303. // "pageToken": {
  6304. // "description": "The next_page_token value returned from the previous List request, if any.",
  6305. // "location": "query",
  6306. // "type": "string"
  6307. // },
  6308. // "parent": {
  6309. // "description": "Name of the Annotation store to retrieve Annotations from.",
  6310. // "location": "path",
  6311. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$",
  6312. // "required": true,
  6313. // "type": "string"
  6314. // }
  6315. // },
  6316. // "path": "v1alpha/{+parent}/annotations",
  6317. // "response": {
  6318. // "$ref": "ListAnnotationsResponse"
  6319. // },
  6320. // "scopes": [
  6321. // "https://www.googleapis.com/auth/cloud-platform"
  6322. // ]
  6323. // }
  6324. }
  6325. // Pages invokes f for each page of results.
  6326. // A non-nil error returned from f will halt the iteration.
  6327. // The provided context supersedes any context provided to the Context method.
  6328. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) Pages(ctx context.Context, f func(*ListAnnotationsResponse) error) error {
  6329. c.ctx_ = ctx
  6330. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6331. for {
  6332. x, err := c.Do()
  6333. if err != nil {
  6334. return err
  6335. }
  6336. if err := f(x); err != nil {
  6337. return err
  6338. }
  6339. if x.NextPageToken == "" {
  6340. return nil
  6341. }
  6342. c.PageToken(x.NextPageToken)
  6343. }
  6344. }
  6345. // method id "healthcare.projects.locations.datasets.annotationStores.annotations.patch":
  6346. type ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall struct {
  6347. s *Service
  6348. name string
  6349. annotation *Annotation
  6350. urlParams_ gensupport.URLParams
  6351. ctx_ context.Context
  6352. header_ http.Header
  6353. }
  6354. // Patch: Updates the Annotation.
  6355. func (r *ProjectsLocationsDatasetsAnnotationStoresAnnotationsService) Patch(name string, annotation *Annotation) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall {
  6356. c := &ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6357. c.name = name
  6358. c.annotation = annotation
  6359. return c
  6360. }
  6361. // UpdateMask sets the optional parameter "updateMask": The update mask
  6362. // applies to the resource. For the `FieldMask`
  6363. // definition,
  6364. // see
  6365. // https://developers.google.com/protocol-buffers/docs/re
  6366. // ference/google.protobuf#fieldmask
  6367. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall {
  6368. c.urlParams_.Set("updateMask", updateMask)
  6369. return c
  6370. }
  6371. // Fields allows partial responses to be retrieved. See
  6372. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6373. // for more information.
  6374. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall {
  6375. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6376. return c
  6377. }
  6378. // Context sets the context to be used in this call's Do method. Any
  6379. // pending HTTP request will be aborted if the provided context is
  6380. // canceled.
  6381. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall {
  6382. c.ctx_ = ctx
  6383. return c
  6384. }
  6385. // Header returns an http.Header that can be modified by the caller to
  6386. // add HTTP headers to the request.
  6387. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall) Header() http.Header {
  6388. if c.header_ == nil {
  6389. c.header_ = make(http.Header)
  6390. }
  6391. return c.header_
  6392. }
  6393. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall) doRequest(alt string) (*http.Response, error) {
  6394. reqHeaders := make(http.Header)
  6395. for k, v := range c.header_ {
  6396. reqHeaders[k] = v
  6397. }
  6398. reqHeaders.Set("User-Agent", c.s.userAgent())
  6399. var body io.Reader = nil
  6400. body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotation)
  6401. if err != nil {
  6402. return nil, err
  6403. }
  6404. reqHeaders.Set("Content-Type", "application/json")
  6405. c.urlParams_.Set("alt", alt)
  6406. c.urlParams_.Set("prettyPrint", "false")
  6407. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  6408. urls += "?" + c.urlParams_.Encode()
  6409. req, err := http.NewRequest("PATCH", urls, body)
  6410. if err != nil {
  6411. return nil, err
  6412. }
  6413. req.Header = reqHeaders
  6414. googleapi.Expand(req.URL, map[string]string{
  6415. "name": c.name,
  6416. })
  6417. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6418. }
  6419. // Do executes the "healthcare.projects.locations.datasets.annotationStores.annotations.patch" call.
  6420. // Exactly one of *Annotation or error will be non-nil. Any non-2xx
  6421. // status code is an error. Response headers are in either
  6422. // *Annotation.ServerResponse.Header or (if a response was returned at
  6423. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6424. // to check whether the returned error was because
  6425. // http.StatusNotModified was returned.
  6426. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall) Do(opts ...googleapi.CallOption) (*Annotation, error) {
  6427. gensupport.SetOptions(c.urlParams_, opts...)
  6428. res, err := c.doRequest("json")
  6429. if res != nil && res.StatusCode == http.StatusNotModified {
  6430. if res.Body != nil {
  6431. res.Body.Close()
  6432. }
  6433. return nil, &googleapi.Error{
  6434. Code: res.StatusCode,
  6435. Header: res.Header,
  6436. }
  6437. }
  6438. if err != nil {
  6439. return nil, err
  6440. }
  6441. defer googleapi.CloseBody(res)
  6442. if err := googleapi.CheckResponse(res); err != nil {
  6443. return nil, err
  6444. }
  6445. ret := &Annotation{
  6446. ServerResponse: googleapi.ServerResponse{
  6447. Header: res.Header,
  6448. HTTPStatusCode: res.StatusCode,
  6449. },
  6450. }
  6451. target := &ret
  6452. if err := gensupport.DecodeResponse(target, res); err != nil {
  6453. return nil, err
  6454. }
  6455. return ret, nil
  6456. // {
  6457. // "description": "Updates the Annotation.",
  6458. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}/annotations/{annotationsId}",
  6459. // "httpMethod": "PATCH",
  6460. // "id": "healthcare.projects.locations.datasets.annotationStores.annotations.patch",
  6461. // "parameterOrder": [
  6462. // "name"
  6463. // ],
  6464. // "parameters": {
  6465. // "name": {
  6466. // "description": "Output only. Resource name of the Annotation, of the form\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}/annotations/{annotation_id}`.",
  6467. // "location": "path",
  6468. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+/annotations/[^/]+$",
  6469. // "required": true,
  6470. // "type": "string"
  6471. // },
  6472. // "updateMask": {
  6473. // "description": "The update mask applies to the resource. For the `FieldMask` definition,\nsee\nhttps://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask",
  6474. // "format": "google-fieldmask",
  6475. // "location": "query",
  6476. // "type": "string"
  6477. // }
  6478. // },
  6479. // "path": "v1alpha/{+name}",
  6480. // "request": {
  6481. // "$ref": "Annotation"
  6482. // },
  6483. // "response": {
  6484. // "$ref": "Annotation"
  6485. // },
  6486. // "scopes": [
  6487. // "https://www.googleapis.com/auth/cloud-platform"
  6488. // ]
  6489. // }
  6490. }
  6491. // method id "healthcare.projects.locations.datasets.dicomStores.create":
  6492. type ProjectsLocationsDatasetsDicomStoresCreateCall struct {
  6493. s *Service
  6494. parent string
  6495. dicomstore *DicomStore
  6496. urlParams_ gensupport.URLParams
  6497. ctx_ context.Context
  6498. header_ http.Header
  6499. }
  6500. // Create: Creates a new DICOM store within the parent dataset.
  6501. func (r *ProjectsLocationsDatasetsDicomStoresService) Create(parent string, dicomstore *DicomStore) *ProjectsLocationsDatasetsDicomStoresCreateCall {
  6502. c := &ProjectsLocationsDatasetsDicomStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6503. c.parent = parent
  6504. c.dicomstore = dicomstore
  6505. return c
  6506. }
  6507. // DicomStoreId sets the optional parameter "dicomStoreId": The ID of
  6508. // the DICOM store that is being created.
  6509. // The string must match the following regex:
  6510. // `[\p{L}\p{N}_\-\.]{1,256}`.
  6511. func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) DicomStoreId(dicomStoreId string) *ProjectsLocationsDatasetsDicomStoresCreateCall {
  6512. c.urlParams_.Set("dicomStoreId", dicomStoreId)
  6513. return c
  6514. }
  6515. // Fields allows partial responses to be retrieved. See
  6516. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6517. // for more information.
  6518. func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresCreateCall {
  6519. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6520. return c
  6521. }
  6522. // Context sets the context to be used in this call's Do method. Any
  6523. // pending HTTP request will be aborted if the provided context is
  6524. // canceled.
  6525. func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresCreateCall {
  6526. c.ctx_ = ctx
  6527. return c
  6528. }
  6529. // Header returns an http.Header that can be modified by the caller to
  6530. // add HTTP headers to the request.
  6531. func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) Header() http.Header {
  6532. if c.header_ == nil {
  6533. c.header_ = make(http.Header)
  6534. }
  6535. return c.header_
  6536. }
  6537. func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) doRequest(alt string) (*http.Response, error) {
  6538. reqHeaders := make(http.Header)
  6539. for k, v := range c.header_ {
  6540. reqHeaders[k] = v
  6541. }
  6542. reqHeaders.Set("User-Agent", c.s.userAgent())
  6543. var body io.Reader = nil
  6544. body, err := googleapi.WithoutDataWrapper.JSONReader(c.dicomstore)
  6545. if err != nil {
  6546. return nil, err
  6547. }
  6548. reqHeaders.Set("Content-Type", "application/json")
  6549. c.urlParams_.Set("alt", alt)
  6550. c.urlParams_.Set("prettyPrint", "false")
  6551. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dicomStores")
  6552. urls += "?" + c.urlParams_.Encode()
  6553. req, err := http.NewRequest("POST", urls, body)
  6554. if err != nil {
  6555. return nil, err
  6556. }
  6557. req.Header = reqHeaders
  6558. googleapi.Expand(req.URL, map[string]string{
  6559. "parent": c.parent,
  6560. })
  6561. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6562. }
  6563. // Do executes the "healthcare.projects.locations.datasets.dicomStores.create" call.
  6564. // Exactly one of *DicomStore or error will be non-nil. Any non-2xx
  6565. // status code is an error. Response headers are in either
  6566. // *DicomStore.ServerResponse.Header or (if a response was returned at
  6567. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6568. // to check whether the returned error was because
  6569. // http.StatusNotModified was returned.
  6570. func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) Do(opts ...googleapi.CallOption) (*DicomStore, error) {
  6571. gensupport.SetOptions(c.urlParams_, opts...)
  6572. res, err := c.doRequest("json")
  6573. if res != nil && res.StatusCode == http.StatusNotModified {
  6574. if res.Body != nil {
  6575. res.Body.Close()
  6576. }
  6577. return nil, &googleapi.Error{
  6578. Code: res.StatusCode,
  6579. Header: res.Header,
  6580. }
  6581. }
  6582. if err != nil {
  6583. return nil, err
  6584. }
  6585. defer googleapi.CloseBody(res)
  6586. if err := googleapi.CheckResponse(res); err != nil {
  6587. return nil, err
  6588. }
  6589. ret := &DicomStore{
  6590. ServerResponse: googleapi.ServerResponse{
  6591. Header: res.Header,
  6592. HTTPStatusCode: res.StatusCode,
  6593. },
  6594. }
  6595. target := &ret
  6596. if err := gensupport.DecodeResponse(target, res); err != nil {
  6597. return nil, err
  6598. }
  6599. return ret, nil
  6600. // {
  6601. // "description": "Creates a new DICOM store within the parent dataset.",
  6602. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores",
  6603. // "httpMethod": "POST",
  6604. // "id": "healthcare.projects.locations.datasets.dicomStores.create",
  6605. // "parameterOrder": [
  6606. // "parent"
  6607. // ],
  6608. // "parameters": {
  6609. // "dicomStoreId": {
  6610. // "description": "The ID of the DICOM store that is being created.\nThe string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.",
  6611. // "location": "query",
  6612. // "type": "string"
  6613. // },
  6614. // "parent": {
  6615. // "description": "The name of the dataset this DICOM store belongs to.",
  6616. // "location": "path",
  6617. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  6618. // "required": true,
  6619. // "type": "string"
  6620. // }
  6621. // },
  6622. // "path": "v1alpha/{+parent}/dicomStores",
  6623. // "request": {
  6624. // "$ref": "DicomStore"
  6625. // },
  6626. // "response": {
  6627. // "$ref": "DicomStore"
  6628. // },
  6629. // "scopes": [
  6630. // "https://www.googleapis.com/auth/cloud-platform"
  6631. // ]
  6632. // }
  6633. }
  6634. // method id "healthcare.projects.locations.datasets.dicomStores.delete":
  6635. type ProjectsLocationsDatasetsDicomStoresDeleteCall struct {
  6636. s *Service
  6637. name string
  6638. urlParams_ gensupport.URLParams
  6639. ctx_ context.Context
  6640. header_ http.Header
  6641. }
  6642. // Delete: Deletes the specified DICOM store and removes all images that
  6643. // are contained
  6644. // within it.
  6645. func (r *ProjectsLocationsDatasetsDicomStoresService) Delete(name string) *ProjectsLocationsDatasetsDicomStoresDeleteCall {
  6646. c := &ProjectsLocationsDatasetsDicomStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6647. c.name = name
  6648. return c
  6649. }
  6650. // Fields allows partial responses to be retrieved. See
  6651. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6652. // for more information.
  6653. func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDeleteCall {
  6654. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6655. return c
  6656. }
  6657. // Context sets the context to be used in this call's Do method. Any
  6658. // pending HTTP request will be aborted if the provided context is
  6659. // canceled.
  6660. func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDeleteCall {
  6661. c.ctx_ = ctx
  6662. return c
  6663. }
  6664. // Header returns an http.Header that can be modified by the caller to
  6665. // add HTTP headers to the request.
  6666. func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) Header() http.Header {
  6667. if c.header_ == nil {
  6668. c.header_ = make(http.Header)
  6669. }
  6670. return c.header_
  6671. }
  6672. func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) doRequest(alt string) (*http.Response, error) {
  6673. reqHeaders := make(http.Header)
  6674. for k, v := range c.header_ {
  6675. reqHeaders[k] = v
  6676. }
  6677. reqHeaders.Set("User-Agent", c.s.userAgent())
  6678. var body io.Reader = nil
  6679. c.urlParams_.Set("alt", alt)
  6680. c.urlParams_.Set("prettyPrint", "false")
  6681. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  6682. urls += "?" + c.urlParams_.Encode()
  6683. req, err := http.NewRequest("DELETE", urls, body)
  6684. if err != nil {
  6685. return nil, err
  6686. }
  6687. req.Header = reqHeaders
  6688. googleapi.Expand(req.URL, map[string]string{
  6689. "name": c.name,
  6690. })
  6691. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6692. }
  6693. // Do executes the "healthcare.projects.locations.datasets.dicomStores.delete" call.
  6694. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  6695. // code is an error. Response headers are in either
  6696. // *Empty.ServerResponse.Header or (if a response was returned at all)
  6697. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6698. // check whether the returned error was because http.StatusNotModified
  6699. // was returned.
  6700. func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  6701. gensupport.SetOptions(c.urlParams_, opts...)
  6702. res, err := c.doRequest("json")
  6703. if res != nil && res.StatusCode == http.StatusNotModified {
  6704. if res.Body != nil {
  6705. res.Body.Close()
  6706. }
  6707. return nil, &googleapi.Error{
  6708. Code: res.StatusCode,
  6709. Header: res.Header,
  6710. }
  6711. }
  6712. if err != nil {
  6713. return nil, err
  6714. }
  6715. defer googleapi.CloseBody(res)
  6716. if err := googleapi.CheckResponse(res); err != nil {
  6717. return nil, err
  6718. }
  6719. ret := &Empty{
  6720. ServerResponse: googleapi.ServerResponse{
  6721. Header: res.Header,
  6722. HTTPStatusCode: res.StatusCode,
  6723. },
  6724. }
  6725. target := &ret
  6726. if err := gensupport.DecodeResponse(target, res); err != nil {
  6727. return nil, err
  6728. }
  6729. return ret, nil
  6730. // {
  6731. // "description": "Deletes the specified DICOM store and removes all images that are contained\nwithin it.",
  6732. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}",
  6733. // "httpMethod": "DELETE",
  6734. // "id": "healthcare.projects.locations.datasets.dicomStores.delete",
  6735. // "parameterOrder": [
  6736. // "name"
  6737. // ],
  6738. // "parameters": {
  6739. // "name": {
  6740. // "description": "The resource name of the DICOM store to delete.",
  6741. // "location": "path",
  6742. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  6743. // "required": true,
  6744. // "type": "string"
  6745. // }
  6746. // },
  6747. // "path": "v1alpha/{+name}",
  6748. // "response": {
  6749. // "$ref": "Empty"
  6750. // },
  6751. // "scopes": [
  6752. // "https://www.googleapis.com/auth/cloud-platform"
  6753. // ]
  6754. // }
  6755. }
  6756. // method id "healthcare.projects.locations.datasets.dicomStores.export":
  6757. type ProjectsLocationsDatasetsDicomStoresExportCall struct {
  6758. s *Service
  6759. name string
  6760. exportdicomdatarequest *ExportDicomDataRequest
  6761. urlParams_ gensupport.URLParams
  6762. ctx_ context.Context
  6763. header_ http.Header
  6764. }
  6765. // Export: Exports data to the specified destination by copying it from
  6766. // the DICOM
  6767. // store.
  6768. // The metadata field type is
  6769. // OperationMetadata.
  6770. func (r *ProjectsLocationsDatasetsDicomStoresService) Export(name string, exportdicomdatarequest *ExportDicomDataRequest) *ProjectsLocationsDatasetsDicomStoresExportCall {
  6771. c := &ProjectsLocationsDatasetsDicomStoresExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6772. c.name = name
  6773. c.exportdicomdatarequest = exportdicomdatarequest
  6774. return c
  6775. }
  6776. // Fields allows partial responses to be retrieved. See
  6777. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6778. // for more information.
  6779. func (c *ProjectsLocationsDatasetsDicomStoresExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresExportCall {
  6780. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6781. return c
  6782. }
  6783. // Context sets the context to be used in this call's Do method. Any
  6784. // pending HTTP request will be aborted if the provided context is
  6785. // canceled.
  6786. func (c *ProjectsLocationsDatasetsDicomStoresExportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresExportCall {
  6787. c.ctx_ = ctx
  6788. return c
  6789. }
  6790. // Header returns an http.Header that can be modified by the caller to
  6791. // add HTTP headers to the request.
  6792. func (c *ProjectsLocationsDatasetsDicomStoresExportCall) Header() http.Header {
  6793. if c.header_ == nil {
  6794. c.header_ = make(http.Header)
  6795. }
  6796. return c.header_
  6797. }
  6798. func (c *ProjectsLocationsDatasetsDicomStoresExportCall) doRequest(alt string) (*http.Response, error) {
  6799. reqHeaders := make(http.Header)
  6800. for k, v := range c.header_ {
  6801. reqHeaders[k] = v
  6802. }
  6803. reqHeaders.Set("User-Agent", c.s.userAgent())
  6804. var body io.Reader = nil
  6805. body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportdicomdatarequest)
  6806. if err != nil {
  6807. return nil, err
  6808. }
  6809. reqHeaders.Set("Content-Type", "application/json")
  6810. c.urlParams_.Set("alt", alt)
  6811. c.urlParams_.Set("prettyPrint", "false")
  6812. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:export")
  6813. urls += "?" + c.urlParams_.Encode()
  6814. req, err := http.NewRequest("POST", urls, body)
  6815. if err != nil {
  6816. return nil, err
  6817. }
  6818. req.Header = reqHeaders
  6819. googleapi.Expand(req.URL, map[string]string{
  6820. "name": c.name,
  6821. })
  6822. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6823. }
  6824. // Do executes the "healthcare.projects.locations.datasets.dicomStores.export" call.
  6825. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  6826. // status code is an error. Response headers are in either
  6827. // *Operation.ServerResponse.Header or (if a response was returned at
  6828. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6829. // to check whether the returned error was because
  6830. // http.StatusNotModified was returned.
  6831. func (c *ProjectsLocationsDatasetsDicomStoresExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6832. gensupport.SetOptions(c.urlParams_, opts...)
  6833. res, err := c.doRequest("json")
  6834. if res != nil && res.StatusCode == http.StatusNotModified {
  6835. if res.Body != nil {
  6836. res.Body.Close()
  6837. }
  6838. return nil, &googleapi.Error{
  6839. Code: res.StatusCode,
  6840. Header: res.Header,
  6841. }
  6842. }
  6843. if err != nil {
  6844. return nil, err
  6845. }
  6846. defer googleapi.CloseBody(res)
  6847. if err := googleapi.CheckResponse(res); err != nil {
  6848. return nil, err
  6849. }
  6850. ret := &Operation{
  6851. ServerResponse: googleapi.ServerResponse{
  6852. Header: res.Header,
  6853. HTTPStatusCode: res.StatusCode,
  6854. },
  6855. }
  6856. target := &ret
  6857. if err := gensupport.DecodeResponse(target, res); err != nil {
  6858. return nil, err
  6859. }
  6860. return ret, nil
  6861. // {
  6862. // "description": "Exports data to the specified destination by copying it from the DICOM\nstore.\nThe metadata field type is\nOperationMetadata.",
  6863. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}:export",
  6864. // "httpMethod": "POST",
  6865. // "id": "healthcare.projects.locations.datasets.dicomStores.export",
  6866. // "parameterOrder": [
  6867. // "name"
  6868. // ],
  6869. // "parameters": {
  6870. // "name": {
  6871. // "description": "The DICOM store resource name from which the data should be exported (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`).",
  6872. // "location": "path",
  6873. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  6874. // "required": true,
  6875. // "type": "string"
  6876. // }
  6877. // },
  6878. // "path": "v1alpha/{+name}:export",
  6879. // "request": {
  6880. // "$ref": "ExportDicomDataRequest"
  6881. // },
  6882. // "response": {
  6883. // "$ref": "Operation"
  6884. // },
  6885. // "scopes": [
  6886. // "https://www.googleapis.com/auth/cloud-platform"
  6887. // ]
  6888. // }
  6889. }
  6890. // method id "healthcare.projects.locations.datasets.dicomStores.get":
  6891. type ProjectsLocationsDatasetsDicomStoresGetCall struct {
  6892. s *Service
  6893. name string
  6894. urlParams_ gensupport.URLParams
  6895. ifNoneMatch_ string
  6896. ctx_ context.Context
  6897. header_ http.Header
  6898. }
  6899. // Get: Gets the specified DICOM store.
  6900. func (r *ProjectsLocationsDatasetsDicomStoresService) Get(name string) *ProjectsLocationsDatasetsDicomStoresGetCall {
  6901. c := &ProjectsLocationsDatasetsDicomStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6902. c.name = name
  6903. return c
  6904. }
  6905. // Fields allows partial responses to be retrieved. See
  6906. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6907. // for more information.
  6908. func (c *ProjectsLocationsDatasetsDicomStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresGetCall {
  6909. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6910. return c
  6911. }
  6912. // IfNoneMatch sets the optional parameter which makes the operation
  6913. // fail if the object's ETag matches the given value. This is useful for
  6914. // getting updates only after the object has changed since the last
  6915. // request. Use googleapi.IsNotModified to check whether the response
  6916. // error from Do is the result of In-None-Match.
  6917. func (c *ProjectsLocationsDatasetsDicomStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresGetCall {
  6918. c.ifNoneMatch_ = entityTag
  6919. return c
  6920. }
  6921. // Context sets the context to be used in this call's Do method. Any
  6922. // pending HTTP request will be aborted if the provided context is
  6923. // canceled.
  6924. func (c *ProjectsLocationsDatasetsDicomStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresGetCall {
  6925. c.ctx_ = ctx
  6926. return c
  6927. }
  6928. // Header returns an http.Header that can be modified by the caller to
  6929. // add HTTP headers to the request.
  6930. func (c *ProjectsLocationsDatasetsDicomStoresGetCall) Header() http.Header {
  6931. if c.header_ == nil {
  6932. c.header_ = make(http.Header)
  6933. }
  6934. return c.header_
  6935. }
  6936. func (c *ProjectsLocationsDatasetsDicomStoresGetCall) doRequest(alt string) (*http.Response, error) {
  6937. reqHeaders := make(http.Header)
  6938. for k, v := range c.header_ {
  6939. reqHeaders[k] = v
  6940. }
  6941. reqHeaders.Set("User-Agent", c.s.userAgent())
  6942. if c.ifNoneMatch_ != "" {
  6943. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6944. }
  6945. var body io.Reader = nil
  6946. c.urlParams_.Set("alt", alt)
  6947. c.urlParams_.Set("prettyPrint", "false")
  6948. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  6949. urls += "?" + c.urlParams_.Encode()
  6950. req, err := http.NewRequest("GET", urls, body)
  6951. if err != nil {
  6952. return nil, err
  6953. }
  6954. req.Header = reqHeaders
  6955. googleapi.Expand(req.URL, map[string]string{
  6956. "name": c.name,
  6957. })
  6958. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6959. }
  6960. // Do executes the "healthcare.projects.locations.datasets.dicomStores.get" call.
  6961. // Exactly one of *DicomStore or error will be non-nil. Any non-2xx
  6962. // status code is an error. Response headers are in either
  6963. // *DicomStore.ServerResponse.Header or (if a response was returned at
  6964. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6965. // to check whether the returned error was because
  6966. // http.StatusNotModified was returned.
  6967. func (c *ProjectsLocationsDatasetsDicomStoresGetCall) Do(opts ...googleapi.CallOption) (*DicomStore, error) {
  6968. gensupport.SetOptions(c.urlParams_, opts...)
  6969. res, err := c.doRequest("json")
  6970. if res != nil && res.StatusCode == http.StatusNotModified {
  6971. if res.Body != nil {
  6972. res.Body.Close()
  6973. }
  6974. return nil, &googleapi.Error{
  6975. Code: res.StatusCode,
  6976. Header: res.Header,
  6977. }
  6978. }
  6979. if err != nil {
  6980. return nil, err
  6981. }
  6982. defer googleapi.CloseBody(res)
  6983. if err := googleapi.CheckResponse(res); err != nil {
  6984. return nil, err
  6985. }
  6986. ret := &DicomStore{
  6987. ServerResponse: googleapi.ServerResponse{
  6988. Header: res.Header,
  6989. HTTPStatusCode: res.StatusCode,
  6990. },
  6991. }
  6992. target := &ret
  6993. if err := gensupport.DecodeResponse(target, res); err != nil {
  6994. return nil, err
  6995. }
  6996. return ret, nil
  6997. // {
  6998. // "description": "Gets the specified DICOM store.",
  6999. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}",
  7000. // "httpMethod": "GET",
  7001. // "id": "healthcare.projects.locations.datasets.dicomStores.get",
  7002. // "parameterOrder": [
  7003. // "name"
  7004. // ],
  7005. // "parameters": {
  7006. // "name": {
  7007. // "description": "The resource name of the DICOM store to get.",
  7008. // "location": "path",
  7009. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  7010. // "required": true,
  7011. // "type": "string"
  7012. // }
  7013. // },
  7014. // "path": "v1alpha/{+name}",
  7015. // "response": {
  7016. // "$ref": "DicomStore"
  7017. // },
  7018. // "scopes": [
  7019. // "https://www.googleapis.com/auth/cloud-platform"
  7020. // ]
  7021. // }
  7022. }
  7023. // method id "healthcare.projects.locations.datasets.dicomStores.getIamPolicy":
  7024. type ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall struct {
  7025. s *Service
  7026. resource string
  7027. urlParams_ gensupport.URLParams
  7028. ifNoneMatch_ string
  7029. ctx_ context.Context
  7030. header_ http.Header
  7031. }
  7032. // GetIamPolicy: Gets the access control policy for a resource.
  7033. // Returns an empty policy if the resource exists and does not have a
  7034. // policy
  7035. // set.
  7036. func (r *ProjectsLocationsDatasetsDicomStoresService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall {
  7037. c := &ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7038. c.resource = resource
  7039. return c
  7040. }
  7041. // Fields allows partial responses to be retrieved. See
  7042. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7043. // for more information.
  7044. func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall {
  7045. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7046. return c
  7047. }
  7048. // IfNoneMatch sets the optional parameter which makes the operation
  7049. // fail if the object's ETag matches the given value. This is useful for
  7050. // getting updates only after the object has changed since the last
  7051. // request. Use googleapi.IsNotModified to check whether the response
  7052. // error from Do is the result of In-None-Match.
  7053. func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall {
  7054. c.ifNoneMatch_ = entityTag
  7055. return c
  7056. }
  7057. // Context sets the context to be used in this call's Do method. Any
  7058. // pending HTTP request will be aborted if the provided context is
  7059. // canceled.
  7060. func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall {
  7061. c.ctx_ = ctx
  7062. return c
  7063. }
  7064. // Header returns an http.Header that can be modified by the caller to
  7065. // add HTTP headers to the request.
  7066. func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Header() http.Header {
  7067. if c.header_ == nil {
  7068. c.header_ = make(http.Header)
  7069. }
  7070. return c.header_
  7071. }
  7072. func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  7073. reqHeaders := make(http.Header)
  7074. for k, v := range c.header_ {
  7075. reqHeaders[k] = v
  7076. }
  7077. reqHeaders.Set("User-Agent", c.s.userAgent())
  7078. if c.ifNoneMatch_ != "" {
  7079. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7080. }
  7081. var body io.Reader = nil
  7082. c.urlParams_.Set("alt", alt)
  7083. c.urlParams_.Set("prettyPrint", "false")
  7084. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy")
  7085. urls += "?" + c.urlParams_.Encode()
  7086. req, err := http.NewRequest("GET", urls, body)
  7087. if err != nil {
  7088. return nil, err
  7089. }
  7090. req.Header = reqHeaders
  7091. googleapi.Expand(req.URL, map[string]string{
  7092. "resource": c.resource,
  7093. })
  7094. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7095. }
  7096. // Do executes the "healthcare.projects.locations.datasets.dicomStores.getIamPolicy" call.
  7097. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  7098. // code is an error. Response headers are in either
  7099. // *Policy.ServerResponse.Header or (if a response was returned at all)
  7100. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7101. // check whether the returned error was because http.StatusNotModified
  7102. // was returned.
  7103. func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  7104. gensupport.SetOptions(c.urlParams_, opts...)
  7105. res, err := c.doRequest("json")
  7106. if res != nil && res.StatusCode == http.StatusNotModified {
  7107. if res.Body != nil {
  7108. res.Body.Close()
  7109. }
  7110. return nil, &googleapi.Error{
  7111. Code: res.StatusCode,
  7112. Header: res.Header,
  7113. }
  7114. }
  7115. if err != nil {
  7116. return nil, err
  7117. }
  7118. defer googleapi.CloseBody(res)
  7119. if err := googleapi.CheckResponse(res); err != nil {
  7120. return nil, err
  7121. }
  7122. ret := &Policy{
  7123. ServerResponse: googleapi.ServerResponse{
  7124. Header: res.Header,
  7125. HTTPStatusCode: res.StatusCode,
  7126. },
  7127. }
  7128. target := &ret
  7129. if err := gensupport.DecodeResponse(target, res); err != nil {
  7130. return nil, err
  7131. }
  7132. return ret, nil
  7133. // {
  7134. // "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.",
  7135. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}:getIamPolicy",
  7136. // "httpMethod": "GET",
  7137. // "id": "healthcare.projects.locations.datasets.dicomStores.getIamPolicy",
  7138. // "parameterOrder": [
  7139. // "resource"
  7140. // ],
  7141. // "parameters": {
  7142. // "resource": {
  7143. // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
  7144. // "location": "path",
  7145. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  7146. // "required": true,
  7147. // "type": "string"
  7148. // }
  7149. // },
  7150. // "path": "v1alpha/{+resource}:getIamPolicy",
  7151. // "response": {
  7152. // "$ref": "Policy"
  7153. // },
  7154. // "scopes": [
  7155. // "https://www.googleapis.com/auth/cloud-platform"
  7156. // ]
  7157. // }
  7158. }
  7159. // method id "healthcare.projects.locations.datasets.dicomStores.import":
  7160. type ProjectsLocationsDatasetsDicomStoresImportCall struct {
  7161. s *Service
  7162. name string
  7163. importdicomdatarequest *ImportDicomDataRequest
  7164. urlParams_ gensupport.URLParams
  7165. ctx_ context.Context
  7166. header_ http.Header
  7167. }
  7168. // Import: Imports data into the DICOM store by copying it from the
  7169. // specified source.
  7170. // For errors, the Operation will be populated with error details (in
  7171. // the form
  7172. // of ImportDicomDataErrorDetails in error.details), which will
  7173. // hold
  7174. // finer-grained error information.
  7175. // The metadata field type is
  7176. // OperationMetadata.
  7177. func (r *ProjectsLocationsDatasetsDicomStoresService) Import(name string, importdicomdatarequest *ImportDicomDataRequest) *ProjectsLocationsDatasetsDicomStoresImportCall {
  7178. c := &ProjectsLocationsDatasetsDicomStoresImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7179. c.name = name
  7180. c.importdicomdatarequest = importdicomdatarequest
  7181. return c
  7182. }
  7183. // Fields allows partial responses to be retrieved. See
  7184. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7185. // for more information.
  7186. func (c *ProjectsLocationsDatasetsDicomStoresImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresImportCall {
  7187. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7188. return c
  7189. }
  7190. // Context sets the context to be used in this call's Do method. Any
  7191. // pending HTTP request will be aborted if the provided context is
  7192. // canceled.
  7193. func (c *ProjectsLocationsDatasetsDicomStoresImportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresImportCall {
  7194. c.ctx_ = ctx
  7195. return c
  7196. }
  7197. // Header returns an http.Header that can be modified by the caller to
  7198. // add HTTP headers to the request.
  7199. func (c *ProjectsLocationsDatasetsDicomStoresImportCall) Header() http.Header {
  7200. if c.header_ == nil {
  7201. c.header_ = make(http.Header)
  7202. }
  7203. return c.header_
  7204. }
  7205. func (c *ProjectsLocationsDatasetsDicomStoresImportCall) doRequest(alt string) (*http.Response, error) {
  7206. reqHeaders := make(http.Header)
  7207. for k, v := range c.header_ {
  7208. reqHeaders[k] = v
  7209. }
  7210. reqHeaders.Set("User-Agent", c.s.userAgent())
  7211. var body io.Reader = nil
  7212. body, err := googleapi.WithoutDataWrapper.JSONReader(c.importdicomdatarequest)
  7213. if err != nil {
  7214. return nil, err
  7215. }
  7216. reqHeaders.Set("Content-Type", "application/json")
  7217. c.urlParams_.Set("alt", alt)
  7218. c.urlParams_.Set("prettyPrint", "false")
  7219. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:import")
  7220. urls += "?" + c.urlParams_.Encode()
  7221. req, err := http.NewRequest("POST", urls, body)
  7222. if err != nil {
  7223. return nil, err
  7224. }
  7225. req.Header = reqHeaders
  7226. googleapi.Expand(req.URL, map[string]string{
  7227. "name": c.name,
  7228. })
  7229. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7230. }
  7231. // Do executes the "healthcare.projects.locations.datasets.dicomStores.import" call.
  7232. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7233. // status code is an error. Response headers are in either
  7234. // *Operation.ServerResponse.Header or (if a response was returned at
  7235. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7236. // to check whether the returned error was because
  7237. // http.StatusNotModified was returned.
  7238. func (c *ProjectsLocationsDatasetsDicomStoresImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7239. gensupport.SetOptions(c.urlParams_, opts...)
  7240. res, err := c.doRequest("json")
  7241. if res != nil && res.StatusCode == http.StatusNotModified {
  7242. if res.Body != nil {
  7243. res.Body.Close()
  7244. }
  7245. return nil, &googleapi.Error{
  7246. Code: res.StatusCode,
  7247. Header: res.Header,
  7248. }
  7249. }
  7250. if err != nil {
  7251. return nil, err
  7252. }
  7253. defer googleapi.CloseBody(res)
  7254. if err := googleapi.CheckResponse(res); err != nil {
  7255. return nil, err
  7256. }
  7257. ret := &Operation{
  7258. ServerResponse: googleapi.ServerResponse{
  7259. Header: res.Header,
  7260. HTTPStatusCode: res.StatusCode,
  7261. },
  7262. }
  7263. target := &ret
  7264. if err := gensupport.DecodeResponse(target, res); err != nil {
  7265. return nil, err
  7266. }
  7267. return ret, nil
  7268. // {
  7269. // "description": "Imports data into the DICOM store by copying it from the specified source.\nFor errors, the Operation will be populated with error details (in the form\nof ImportDicomDataErrorDetails in error.details), which will hold\nfiner-grained error information.\nThe metadata field type is\nOperationMetadata.",
  7270. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}:import",
  7271. // "httpMethod": "POST",
  7272. // "id": "healthcare.projects.locations.datasets.dicomStores.import",
  7273. // "parameterOrder": [
  7274. // "name"
  7275. // ],
  7276. // "parameters": {
  7277. // "name": {
  7278. // "description": "The name of the DICOM store resource into which the data is imported (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`).",
  7279. // "location": "path",
  7280. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  7281. // "required": true,
  7282. // "type": "string"
  7283. // }
  7284. // },
  7285. // "path": "v1alpha/{+name}:import",
  7286. // "request": {
  7287. // "$ref": "ImportDicomDataRequest"
  7288. // },
  7289. // "response": {
  7290. // "$ref": "Operation"
  7291. // },
  7292. // "scopes": [
  7293. // "https://www.googleapis.com/auth/cloud-platform"
  7294. // ]
  7295. // }
  7296. }
  7297. // method id "healthcare.projects.locations.datasets.dicomStores.list":
  7298. type ProjectsLocationsDatasetsDicomStoresListCall struct {
  7299. s *Service
  7300. parent string
  7301. urlParams_ gensupport.URLParams
  7302. ifNoneMatch_ string
  7303. ctx_ context.Context
  7304. header_ http.Header
  7305. }
  7306. // List: Lists the DICOM stores in the given dataset.
  7307. func (r *ProjectsLocationsDatasetsDicomStoresService) List(parent string) *ProjectsLocationsDatasetsDicomStoresListCall {
  7308. c := &ProjectsLocationsDatasetsDicomStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7309. c.parent = parent
  7310. return c
  7311. }
  7312. // PageSize sets the optional parameter "pageSize": Limit on the number
  7313. // of DICOM stores to return in a single response.
  7314. // If zero the default page size of 100 is used.
  7315. func (c *ProjectsLocationsDatasetsDicomStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsDicomStoresListCall {
  7316. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7317. return c
  7318. }
  7319. // PageToken sets the optional parameter "pageToken": The
  7320. // next_page_token value returned from the previous List request, if
  7321. // any.
  7322. func (c *ProjectsLocationsDatasetsDicomStoresListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsDicomStoresListCall {
  7323. c.urlParams_.Set("pageToken", pageToken)
  7324. return c
  7325. }
  7326. // Fields allows partial responses to be retrieved. See
  7327. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7328. // for more information.
  7329. func (c *ProjectsLocationsDatasetsDicomStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresListCall {
  7330. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7331. return c
  7332. }
  7333. // IfNoneMatch sets the optional parameter which makes the operation
  7334. // fail if the object's ETag matches the given value. This is useful for
  7335. // getting updates only after the object has changed since the last
  7336. // request. Use googleapi.IsNotModified to check whether the response
  7337. // error from Do is the result of In-None-Match.
  7338. func (c *ProjectsLocationsDatasetsDicomStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresListCall {
  7339. c.ifNoneMatch_ = entityTag
  7340. return c
  7341. }
  7342. // Context sets the context to be used in this call's Do method. Any
  7343. // pending HTTP request will be aborted if the provided context is
  7344. // canceled.
  7345. func (c *ProjectsLocationsDatasetsDicomStoresListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresListCall {
  7346. c.ctx_ = ctx
  7347. return c
  7348. }
  7349. // Header returns an http.Header that can be modified by the caller to
  7350. // add HTTP headers to the request.
  7351. func (c *ProjectsLocationsDatasetsDicomStoresListCall) Header() http.Header {
  7352. if c.header_ == nil {
  7353. c.header_ = make(http.Header)
  7354. }
  7355. return c.header_
  7356. }
  7357. func (c *ProjectsLocationsDatasetsDicomStoresListCall) doRequest(alt string) (*http.Response, error) {
  7358. reqHeaders := make(http.Header)
  7359. for k, v := range c.header_ {
  7360. reqHeaders[k] = v
  7361. }
  7362. reqHeaders.Set("User-Agent", c.s.userAgent())
  7363. if c.ifNoneMatch_ != "" {
  7364. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7365. }
  7366. var body io.Reader = nil
  7367. c.urlParams_.Set("alt", alt)
  7368. c.urlParams_.Set("prettyPrint", "false")
  7369. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dicomStores")
  7370. urls += "?" + c.urlParams_.Encode()
  7371. req, err := http.NewRequest("GET", urls, body)
  7372. if err != nil {
  7373. return nil, err
  7374. }
  7375. req.Header = reqHeaders
  7376. googleapi.Expand(req.URL, map[string]string{
  7377. "parent": c.parent,
  7378. })
  7379. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7380. }
  7381. // Do executes the "healthcare.projects.locations.datasets.dicomStores.list" call.
  7382. // Exactly one of *ListDicomStoresResponse or error will be non-nil. Any
  7383. // non-2xx status code is an error. Response headers are in either
  7384. // *ListDicomStoresResponse.ServerResponse.Header or (if a response was
  7385. // returned at all) in error.(*googleapi.Error).Header. Use
  7386. // googleapi.IsNotModified to check whether the returned error was
  7387. // because http.StatusNotModified was returned.
  7388. func (c *ProjectsLocationsDatasetsDicomStoresListCall) Do(opts ...googleapi.CallOption) (*ListDicomStoresResponse, error) {
  7389. gensupport.SetOptions(c.urlParams_, opts...)
  7390. res, err := c.doRequest("json")
  7391. if res != nil && res.StatusCode == http.StatusNotModified {
  7392. if res.Body != nil {
  7393. res.Body.Close()
  7394. }
  7395. return nil, &googleapi.Error{
  7396. Code: res.StatusCode,
  7397. Header: res.Header,
  7398. }
  7399. }
  7400. if err != nil {
  7401. return nil, err
  7402. }
  7403. defer googleapi.CloseBody(res)
  7404. if err := googleapi.CheckResponse(res); err != nil {
  7405. return nil, err
  7406. }
  7407. ret := &ListDicomStoresResponse{
  7408. ServerResponse: googleapi.ServerResponse{
  7409. Header: res.Header,
  7410. HTTPStatusCode: res.StatusCode,
  7411. },
  7412. }
  7413. target := &ret
  7414. if err := gensupport.DecodeResponse(target, res); err != nil {
  7415. return nil, err
  7416. }
  7417. return ret, nil
  7418. // {
  7419. // "description": "Lists the DICOM stores in the given dataset.",
  7420. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores",
  7421. // "httpMethod": "GET",
  7422. // "id": "healthcare.projects.locations.datasets.dicomStores.list",
  7423. // "parameterOrder": [
  7424. // "parent"
  7425. // ],
  7426. // "parameters": {
  7427. // "pageSize": {
  7428. // "description": "Limit on the number of DICOM stores to return in a single response.\nIf zero the default page size of 100 is used.",
  7429. // "format": "int32",
  7430. // "location": "query",
  7431. // "type": "integer"
  7432. // },
  7433. // "pageToken": {
  7434. // "description": "The next_page_token value returned from the previous List request, if any.",
  7435. // "location": "query",
  7436. // "type": "string"
  7437. // },
  7438. // "parent": {
  7439. // "description": "Name of the dataset.",
  7440. // "location": "path",
  7441. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  7442. // "required": true,
  7443. // "type": "string"
  7444. // }
  7445. // },
  7446. // "path": "v1alpha/{+parent}/dicomStores",
  7447. // "response": {
  7448. // "$ref": "ListDicomStoresResponse"
  7449. // },
  7450. // "scopes": [
  7451. // "https://www.googleapis.com/auth/cloud-platform"
  7452. // ]
  7453. // }
  7454. }
  7455. // Pages invokes f for each page of results.
  7456. // A non-nil error returned from f will halt the iteration.
  7457. // The provided context supersedes any context provided to the Context method.
  7458. func (c *ProjectsLocationsDatasetsDicomStoresListCall) Pages(ctx context.Context, f func(*ListDicomStoresResponse) error) error {
  7459. c.ctx_ = ctx
  7460. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  7461. for {
  7462. x, err := c.Do()
  7463. if err != nil {
  7464. return err
  7465. }
  7466. if err := f(x); err != nil {
  7467. return err
  7468. }
  7469. if x.NextPageToken == "" {
  7470. return nil
  7471. }
  7472. c.PageToken(x.NextPageToken)
  7473. }
  7474. }
  7475. // method id "healthcare.projects.locations.datasets.dicomStores.patch":
  7476. type ProjectsLocationsDatasetsDicomStoresPatchCall struct {
  7477. s *Service
  7478. name string
  7479. dicomstore *DicomStore
  7480. urlParams_ gensupport.URLParams
  7481. ctx_ context.Context
  7482. header_ http.Header
  7483. }
  7484. // Patch: Updates the specified DICOM store.
  7485. func (r *ProjectsLocationsDatasetsDicomStoresService) Patch(name string, dicomstore *DicomStore) *ProjectsLocationsDatasetsDicomStoresPatchCall {
  7486. c := &ProjectsLocationsDatasetsDicomStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7487. c.name = name
  7488. c.dicomstore = dicomstore
  7489. return c
  7490. }
  7491. // UpdateMask sets the optional parameter "updateMask": The update mask
  7492. // applies to the resource. For the `FieldMask`
  7493. // definition,
  7494. // see
  7495. // https://developers.google.com/protocol-buffers/docs/re
  7496. // ference/google.protobuf#fieldmask
  7497. func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsDicomStoresPatchCall {
  7498. c.urlParams_.Set("updateMask", updateMask)
  7499. return c
  7500. }
  7501. // Fields allows partial responses to be retrieved. See
  7502. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7503. // for more information.
  7504. func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresPatchCall {
  7505. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7506. return c
  7507. }
  7508. // Context sets the context to be used in this call's Do method. Any
  7509. // pending HTTP request will be aborted if the provided context is
  7510. // canceled.
  7511. func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresPatchCall {
  7512. c.ctx_ = ctx
  7513. return c
  7514. }
  7515. // Header returns an http.Header that can be modified by the caller to
  7516. // add HTTP headers to the request.
  7517. func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) Header() http.Header {
  7518. if c.header_ == nil {
  7519. c.header_ = make(http.Header)
  7520. }
  7521. return c.header_
  7522. }
  7523. func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) doRequest(alt string) (*http.Response, error) {
  7524. reqHeaders := make(http.Header)
  7525. for k, v := range c.header_ {
  7526. reqHeaders[k] = v
  7527. }
  7528. reqHeaders.Set("User-Agent", c.s.userAgent())
  7529. var body io.Reader = nil
  7530. body, err := googleapi.WithoutDataWrapper.JSONReader(c.dicomstore)
  7531. if err != nil {
  7532. return nil, err
  7533. }
  7534. reqHeaders.Set("Content-Type", "application/json")
  7535. c.urlParams_.Set("alt", alt)
  7536. c.urlParams_.Set("prettyPrint", "false")
  7537. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  7538. urls += "?" + c.urlParams_.Encode()
  7539. req, err := http.NewRequest("PATCH", urls, body)
  7540. if err != nil {
  7541. return nil, err
  7542. }
  7543. req.Header = reqHeaders
  7544. googleapi.Expand(req.URL, map[string]string{
  7545. "name": c.name,
  7546. })
  7547. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7548. }
  7549. // Do executes the "healthcare.projects.locations.datasets.dicomStores.patch" call.
  7550. // Exactly one of *DicomStore or error will be non-nil. Any non-2xx
  7551. // status code is an error. Response headers are in either
  7552. // *DicomStore.ServerResponse.Header or (if a response was returned at
  7553. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7554. // to check whether the returned error was because
  7555. // http.StatusNotModified was returned.
  7556. func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) Do(opts ...googleapi.CallOption) (*DicomStore, error) {
  7557. gensupport.SetOptions(c.urlParams_, opts...)
  7558. res, err := c.doRequest("json")
  7559. if res != nil && res.StatusCode == http.StatusNotModified {
  7560. if res.Body != nil {
  7561. res.Body.Close()
  7562. }
  7563. return nil, &googleapi.Error{
  7564. Code: res.StatusCode,
  7565. Header: res.Header,
  7566. }
  7567. }
  7568. if err != nil {
  7569. return nil, err
  7570. }
  7571. defer googleapi.CloseBody(res)
  7572. if err := googleapi.CheckResponse(res); err != nil {
  7573. return nil, err
  7574. }
  7575. ret := &DicomStore{
  7576. ServerResponse: googleapi.ServerResponse{
  7577. Header: res.Header,
  7578. HTTPStatusCode: res.StatusCode,
  7579. },
  7580. }
  7581. target := &ret
  7582. if err := gensupport.DecodeResponse(target, res); err != nil {
  7583. return nil, err
  7584. }
  7585. return ret, nil
  7586. // {
  7587. // "description": "Updates the specified DICOM store.",
  7588. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}",
  7589. // "httpMethod": "PATCH",
  7590. // "id": "healthcare.projects.locations.datasets.dicomStores.patch",
  7591. // "parameterOrder": [
  7592. // "name"
  7593. // ],
  7594. // "parameters": {
  7595. // "name": {
  7596. // "description": "Output only. Resource name of the DICOM store, of the form\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`.",
  7597. // "location": "path",
  7598. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  7599. // "required": true,
  7600. // "type": "string"
  7601. // },
  7602. // "updateMask": {
  7603. // "description": "The update mask applies to the resource. For the `FieldMask` definition,\nsee\nhttps://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask",
  7604. // "format": "google-fieldmask",
  7605. // "location": "query",
  7606. // "type": "string"
  7607. // }
  7608. // },
  7609. // "path": "v1alpha/{+name}",
  7610. // "request": {
  7611. // "$ref": "DicomStore"
  7612. // },
  7613. // "response": {
  7614. // "$ref": "DicomStore"
  7615. // },
  7616. // "scopes": [
  7617. // "https://www.googleapis.com/auth/cloud-platform"
  7618. // ]
  7619. // }
  7620. }
  7621. // method id "healthcare.projects.locations.datasets.dicomStores.setIamPolicy":
  7622. type ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall struct {
  7623. s *Service
  7624. resource string
  7625. setiampolicyrequest *SetIamPolicyRequest
  7626. urlParams_ gensupport.URLParams
  7627. ctx_ context.Context
  7628. header_ http.Header
  7629. }
  7630. // SetIamPolicy: Sets the access control policy on the specified
  7631. // resource. Replaces any
  7632. // existing policy.
  7633. func (r *ProjectsLocationsDatasetsDicomStoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall {
  7634. c := &ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7635. c.resource = resource
  7636. c.setiampolicyrequest = setiampolicyrequest
  7637. return c
  7638. }
  7639. // Fields allows partial responses to be retrieved. See
  7640. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7641. // for more information.
  7642. func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall {
  7643. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7644. return c
  7645. }
  7646. // Context sets the context to be used in this call's Do method. Any
  7647. // pending HTTP request will be aborted if the provided context is
  7648. // canceled.
  7649. func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall {
  7650. c.ctx_ = ctx
  7651. return c
  7652. }
  7653. // Header returns an http.Header that can be modified by the caller to
  7654. // add HTTP headers to the request.
  7655. func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Header() http.Header {
  7656. if c.header_ == nil {
  7657. c.header_ = make(http.Header)
  7658. }
  7659. return c.header_
  7660. }
  7661. func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  7662. reqHeaders := make(http.Header)
  7663. for k, v := range c.header_ {
  7664. reqHeaders[k] = v
  7665. }
  7666. reqHeaders.Set("User-Agent", c.s.userAgent())
  7667. var body io.Reader = nil
  7668. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  7669. if err != nil {
  7670. return nil, err
  7671. }
  7672. reqHeaders.Set("Content-Type", "application/json")
  7673. c.urlParams_.Set("alt", alt)
  7674. c.urlParams_.Set("prettyPrint", "false")
  7675. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy")
  7676. urls += "?" + c.urlParams_.Encode()
  7677. req, err := http.NewRequest("POST", urls, body)
  7678. if err != nil {
  7679. return nil, err
  7680. }
  7681. req.Header = reqHeaders
  7682. googleapi.Expand(req.URL, map[string]string{
  7683. "resource": c.resource,
  7684. })
  7685. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7686. }
  7687. // Do executes the "healthcare.projects.locations.datasets.dicomStores.setIamPolicy" call.
  7688. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  7689. // code is an error. Response headers are in either
  7690. // *Policy.ServerResponse.Header or (if a response was returned at all)
  7691. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7692. // check whether the returned error was because http.StatusNotModified
  7693. // was returned.
  7694. func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  7695. gensupport.SetOptions(c.urlParams_, opts...)
  7696. res, err := c.doRequest("json")
  7697. if res != nil && res.StatusCode == http.StatusNotModified {
  7698. if res.Body != nil {
  7699. res.Body.Close()
  7700. }
  7701. return nil, &googleapi.Error{
  7702. Code: res.StatusCode,
  7703. Header: res.Header,
  7704. }
  7705. }
  7706. if err != nil {
  7707. return nil, err
  7708. }
  7709. defer googleapi.CloseBody(res)
  7710. if err := googleapi.CheckResponse(res); err != nil {
  7711. return nil, err
  7712. }
  7713. ret := &Policy{
  7714. ServerResponse: googleapi.ServerResponse{
  7715. Header: res.Header,
  7716. HTTPStatusCode: res.StatusCode,
  7717. },
  7718. }
  7719. target := &ret
  7720. if err := gensupport.DecodeResponse(target, res); err != nil {
  7721. return nil, err
  7722. }
  7723. return ret, nil
  7724. // {
  7725. // "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.",
  7726. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}:setIamPolicy",
  7727. // "httpMethod": "POST",
  7728. // "id": "healthcare.projects.locations.datasets.dicomStores.setIamPolicy",
  7729. // "parameterOrder": [
  7730. // "resource"
  7731. // ],
  7732. // "parameters": {
  7733. // "resource": {
  7734. // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
  7735. // "location": "path",
  7736. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  7737. // "required": true,
  7738. // "type": "string"
  7739. // }
  7740. // },
  7741. // "path": "v1alpha/{+resource}:setIamPolicy",
  7742. // "request": {
  7743. // "$ref": "SetIamPolicyRequest"
  7744. // },
  7745. // "response": {
  7746. // "$ref": "Policy"
  7747. // },
  7748. // "scopes": [
  7749. // "https://www.googleapis.com/auth/cloud-platform"
  7750. // ]
  7751. // }
  7752. }
  7753. // method id "healthcare.projects.locations.datasets.dicomStores.testIamPermissions":
  7754. type ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall struct {
  7755. s *Service
  7756. resource string
  7757. testiampermissionsrequest *TestIamPermissionsRequest
  7758. urlParams_ gensupport.URLParams
  7759. ctx_ context.Context
  7760. header_ http.Header
  7761. }
  7762. // TestIamPermissions: Returns permissions that a caller has on the
  7763. // specified resource.
  7764. // If the resource does not exist, this will return an empty set
  7765. // of
  7766. // permissions, not a NOT_FOUND error.
  7767. //
  7768. // Note: This operation is designed to be used for building
  7769. // permission-aware
  7770. // UIs and command-line tools, not for authorization checking. This
  7771. // operation
  7772. // may "fail open" without warning.
  7773. func (r *ProjectsLocationsDatasetsDicomStoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall {
  7774. c := &ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7775. c.resource = resource
  7776. c.testiampermissionsrequest = testiampermissionsrequest
  7777. return c
  7778. }
  7779. // Fields allows partial responses to be retrieved. See
  7780. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7781. // for more information.
  7782. func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall {
  7783. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7784. return c
  7785. }
  7786. // Context sets the context to be used in this call's Do method. Any
  7787. // pending HTTP request will be aborted if the provided context is
  7788. // canceled.
  7789. func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall {
  7790. c.ctx_ = ctx
  7791. return c
  7792. }
  7793. // Header returns an http.Header that can be modified by the caller to
  7794. // add HTTP headers to the request.
  7795. func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Header() http.Header {
  7796. if c.header_ == nil {
  7797. c.header_ = make(http.Header)
  7798. }
  7799. return c.header_
  7800. }
  7801. func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  7802. reqHeaders := make(http.Header)
  7803. for k, v := range c.header_ {
  7804. reqHeaders[k] = v
  7805. }
  7806. reqHeaders.Set("User-Agent", c.s.userAgent())
  7807. var body io.Reader = nil
  7808. body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  7809. if err != nil {
  7810. return nil, err
  7811. }
  7812. reqHeaders.Set("Content-Type", "application/json")
  7813. c.urlParams_.Set("alt", alt)
  7814. c.urlParams_.Set("prettyPrint", "false")
  7815. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions")
  7816. urls += "?" + c.urlParams_.Encode()
  7817. req, err := http.NewRequest("POST", urls, body)
  7818. if err != nil {
  7819. return nil, err
  7820. }
  7821. req.Header = reqHeaders
  7822. googleapi.Expand(req.URL, map[string]string{
  7823. "resource": c.resource,
  7824. })
  7825. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7826. }
  7827. // Do executes the "healthcare.projects.locations.datasets.dicomStores.testIamPermissions" call.
  7828. // Exactly one of *TestIamPermissionsResponse or error will be non-nil.
  7829. // Any non-2xx status code is an error. Response headers are in either
  7830. // *TestIamPermissionsResponse.ServerResponse.Header or (if a response
  7831. // was returned at all) in error.(*googleapi.Error).Header. Use
  7832. // googleapi.IsNotModified to check whether the returned error was
  7833. // because http.StatusNotModified was returned.
  7834. func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  7835. gensupport.SetOptions(c.urlParams_, opts...)
  7836. res, err := c.doRequest("json")
  7837. if res != nil && res.StatusCode == http.StatusNotModified {
  7838. if res.Body != nil {
  7839. res.Body.Close()
  7840. }
  7841. return nil, &googleapi.Error{
  7842. Code: res.StatusCode,
  7843. Header: res.Header,
  7844. }
  7845. }
  7846. if err != nil {
  7847. return nil, err
  7848. }
  7849. defer googleapi.CloseBody(res)
  7850. if err := googleapi.CheckResponse(res); err != nil {
  7851. return nil, err
  7852. }
  7853. ret := &TestIamPermissionsResponse{
  7854. ServerResponse: googleapi.ServerResponse{
  7855. Header: res.Header,
  7856. HTTPStatusCode: res.StatusCode,
  7857. },
  7858. }
  7859. target := &ret
  7860. if err := gensupport.DecodeResponse(target, res); err != nil {
  7861. return nil, err
  7862. }
  7863. return ret, nil
  7864. // {
  7865. // "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.",
  7866. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}:testIamPermissions",
  7867. // "httpMethod": "POST",
  7868. // "id": "healthcare.projects.locations.datasets.dicomStores.testIamPermissions",
  7869. // "parameterOrder": [
  7870. // "resource"
  7871. // ],
  7872. // "parameters": {
  7873. // "resource": {
  7874. // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
  7875. // "location": "path",
  7876. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  7877. // "required": true,
  7878. // "type": "string"
  7879. // }
  7880. // },
  7881. // "path": "v1alpha/{+resource}:testIamPermissions",
  7882. // "request": {
  7883. // "$ref": "TestIamPermissionsRequest"
  7884. // },
  7885. // "response": {
  7886. // "$ref": "TestIamPermissionsResponse"
  7887. // },
  7888. // "scopes": [
  7889. // "https://www.googleapis.com/auth/cloud-platform"
  7890. // ]
  7891. // }
  7892. }
  7893. // method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.dicomWebDelete":
  7894. type ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebDeleteCall struct {
  7895. s *Service
  7896. parent string
  7897. dicomWebPath string
  7898. urlParams_ gensupport.URLParams
  7899. ctx_ context.Context
  7900. header_ http.Header
  7901. }
  7902. // DicomWebDelete: Handles DELETE requests equivalent to the GET
  7903. // requests specified in the
  7904. // WADO-RS standard. Since this implements an industry standard API,
  7905. // the
  7906. // dicom_web_path is interpreted directly by the serving binary. For
  7907. // example,
  7908. // if the request is
  7909. // for
  7910. // `/v1alpha/projects/{project_id}/locations/{location_id}/locations/
  7911. // {location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}/dicom
  7912. // Web/studies/1.2`,
  7913. // then `/studies/1.2` is passed to the serving binary as the
  7914. // dicom_web_path.
  7915. func (r *ProjectsLocationsDatasetsDicomStoresDicomWebService) DicomWebDelete(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebDeleteCall {
  7916. c := &ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7917. c.parent = parent
  7918. c.dicomWebPath = dicomWebPath
  7919. return c
  7920. }
  7921. // Fields allows partial responses to be retrieved. See
  7922. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7923. // for more information.
  7924. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebDeleteCall {
  7925. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7926. return c
  7927. }
  7928. // Context sets the context to be used in this call's Do method. Any
  7929. // pending HTTP request will be aborted if the provided context is
  7930. // canceled.
  7931. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebDeleteCall {
  7932. c.ctx_ = ctx
  7933. return c
  7934. }
  7935. // Header returns an http.Header that can be modified by the caller to
  7936. // add HTTP headers to the request.
  7937. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebDeleteCall) Header() http.Header {
  7938. if c.header_ == nil {
  7939. c.header_ = make(http.Header)
  7940. }
  7941. return c.header_
  7942. }
  7943. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebDeleteCall) doRequest(alt string) (*http.Response, error) {
  7944. reqHeaders := make(http.Header)
  7945. for k, v := range c.header_ {
  7946. reqHeaders[k] = v
  7947. }
  7948. reqHeaders.Set("User-Agent", c.s.userAgent())
  7949. var body io.Reader = nil
  7950. c.urlParams_.Set("alt", alt)
  7951. c.urlParams_.Set("prettyPrint", "false")
  7952. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dicomWeb/{+dicomWebPath}")
  7953. urls += "?" + c.urlParams_.Encode()
  7954. req, err := http.NewRequest("DELETE", urls, body)
  7955. if err != nil {
  7956. return nil, err
  7957. }
  7958. req.Header = reqHeaders
  7959. googleapi.Expand(req.URL, map[string]string{
  7960. "parent": c.parent,
  7961. "dicomWebPath": c.dicomWebPath,
  7962. })
  7963. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7964. }
  7965. // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.dicomWebDelete" call.
  7966. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  7967. // code is an error. Response headers are in either
  7968. // *Empty.ServerResponse.Header or (if a response was returned at all)
  7969. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7970. // check whether the returned error was because http.StatusNotModified
  7971. // was returned.
  7972. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  7973. gensupport.SetOptions(c.urlParams_, opts...)
  7974. res, err := c.doRequest("json")
  7975. if res != nil && res.StatusCode == http.StatusNotModified {
  7976. if res.Body != nil {
  7977. res.Body.Close()
  7978. }
  7979. return nil, &googleapi.Error{
  7980. Code: res.StatusCode,
  7981. Header: res.Header,
  7982. }
  7983. }
  7984. if err != nil {
  7985. return nil, err
  7986. }
  7987. defer googleapi.CloseBody(res)
  7988. if err := googleapi.CheckResponse(res); err != nil {
  7989. return nil, err
  7990. }
  7991. ret := &Empty{
  7992. ServerResponse: googleapi.ServerResponse{
  7993. Header: res.Header,
  7994. HTTPStatusCode: res.StatusCode,
  7995. },
  7996. }
  7997. target := &ret
  7998. if err := gensupport.DecodeResponse(target, res); err != nil {
  7999. return nil, err
  8000. }
  8001. return ret, nil
  8002. // {
  8003. // "description": "Handles DELETE requests equivalent to the GET requests specified in the\nWADO-RS standard. Since this implements an industry standard API, the\ndicom_web_path is interpreted directly by the serving binary. For example,\nif the request is for\n`/v1alpha/projects/{project_id}/locations/{location_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}/dicomWeb/studies/1.2`,\nthen `/studies/1.2` is passed to the serving binary as the dicom_web_path.",
  8004. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/{dicomWebId}",
  8005. // "httpMethod": "DELETE",
  8006. // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.dicomWebDelete",
  8007. // "parameterOrder": [
  8008. // "parent",
  8009. // "dicomWebPath"
  8010. // ],
  8011. // "parameters": {
  8012. // "dicomWebPath": {
  8013. // "description": "The path of the DICOMweb request, as specified in the WADO-RS standard.",
  8014. // "location": "path",
  8015. // "pattern": "^.+$",
  8016. // "required": true,
  8017. // "type": "string"
  8018. // },
  8019. // "parent": {
  8020. // "description": "The name of the DICOM store that is being accessed (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`).",
  8021. // "location": "path",
  8022. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  8023. // "required": true,
  8024. // "type": "string"
  8025. // }
  8026. // },
  8027. // "path": "v1alpha/{+parent}/dicomWeb/{+dicomWebPath}",
  8028. // "response": {
  8029. // "$ref": "Empty"
  8030. // },
  8031. // "scopes": [
  8032. // "https://www.googleapis.com/auth/cloud-platform"
  8033. // ]
  8034. // }
  8035. }
  8036. // method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.dicomWebGet":
  8037. type ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebGetCall struct {
  8038. s *Service
  8039. parent string
  8040. dicomWebPath string
  8041. urlParams_ gensupport.URLParams
  8042. ifNoneMatch_ string
  8043. ctx_ context.Context
  8044. header_ http.Header
  8045. }
  8046. // DicomWebGet: Handles the GET requests specified in the STOW-RS,
  8047. // WADO-RS, or QIDO-RS
  8048. // standard. Since this implements an industry standard API,
  8049. // the
  8050. // dicom_web_path is interpreted directly by the serving binary. For
  8051. // example,
  8052. // if the request is
  8053. // for
  8054. // `/v1alpha/projects/{project_id}/locations/{location_id}/datasets/{
  8055. // dataset_id}/dicomStores/{dicom_store_id}/dicomWeb/studies/{study_id}/s
  8056. // eries?PatientName={patient_name}`,
  8057. // then `studies/{study_id}/series` is passed to the serving binary as
  8058. // the
  8059. // dicom_web_path.
  8060. func (r *ProjectsLocationsDatasetsDicomStoresDicomWebService) DicomWebGet(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebGetCall {
  8061. c := &ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8062. c.parent = parent
  8063. c.dicomWebPath = dicomWebPath
  8064. return c
  8065. }
  8066. // Fields allows partial responses to be retrieved. See
  8067. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8068. // for more information.
  8069. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebGetCall {
  8070. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8071. return c
  8072. }
  8073. // IfNoneMatch sets the optional parameter which makes the operation
  8074. // fail if the object's ETag matches the given value. This is useful for
  8075. // getting updates only after the object has changed since the last
  8076. // request. Use googleapi.IsNotModified to check whether the response
  8077. // error from Do is the result of In-None-Match.
  8078. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebGetCall {
  8079. c.ifNoneMatch_ = entityTag
  8080. return c
  8081. }
  8082. // Context sets the context to be used in this call's Do method. Any
  8083. // pending HTTP request will be aborted if the provided context is
  8084. // canceled.
  8085. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebGetCall {
  8086. c.ctx_ = ctx
  8087. return c
  8088. }
  8089. // Header returns an http.Header that can be modified by the caller to
  8090. // add HTTP headers to the request.
  8091. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebGetCall) Header() http.Header {
  8092. if c.header_ == nil {
  8093. c.header_ = make(http.Header)
  8094. }
  8095. return c.header_
  8096. }
  8097. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebGetCall) doRequest(alt string) (*http.Response, error) {
  8098. reqHeaders := make(http.Header)
  8099. for k, v := range c.header_ {
  8100. reqHeaders[k] = v
  8101. }
  8102. reqHeaders.Set("User-Agent", c.s.userAgent())
  8103. if c.ifNoneMatch_ != "" {
  8104. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8105. }
  8106. var body io.Reader = nil
  8107. c.urlParams_.Set("alt", alt)
  8108. c.urlParams_.Set("prettyPrint", "false")
  8109. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dicomWeb/{+dicomWebPath}")
  8110. urls += "?" + c.urlParams_.Encode()
  8111. req, err := http.NewRequest("GET", urls, body)
  8112. if err != nil {
  8113. return nil, err
  8114. }
  8115. req.Header = reqHeaders
  8116. googleapi.Expand(req.URL, map[string]string{
  8117. "parent": c.parent,
  8118. "dicomWebPath": c.dicomWebPath,
  8119. })
  8120. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8121. }
  8122. // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.dicomWebGet" call.
  8123. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  8124. // code is an error. Response headers are in either
  8125. // *HttpBody.ServerResponse.Header or (if a response was returned at
  8126. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8127. // to check whether the returned error was because
  8128. // http.StatusNotModified was returned.
  8129. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebGetCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  8130. gensupport.SetOptions(c.urlParams_, opts...)
  8131. res, err := c.doRequest("json")
  8132. if res != nil && res.StatusCode == http.StatusNotModified {
  8133. if res.Body != nil {
  8134. res.Body.Close()
  8135. }
  8136. return nil, &googleapi.Error{
  8137. Code: res.StatusCode,
  8138. Header: res.Header,
  8139. }
  8140. }
  8141. if err != nil {
  8142. return nil, err
  8143. }
  8144. defer googleapi.CloseBody(res)
  8145. if err := googleapi.CheckResponse(res); err != nil {
  8146. return nil, err
  8147. }
  8148. ret := &HttpBody{
  8149. ServerResponse: googleapi.ServerResponse{
  8150. Header: res.Header,
  8151. HTTPStatusCode: res.StatusCode,
  8152. },
  8153. }
  8154. target := &ret
  8155. if err := gensupport.DecodeResponse(target, res); err != nil {
  8156. return nil, err
  8157. }
  8158. return ret, nil
  8159. // {
  8160. // "description": "Handles the GET requests specified in the STOW-RS, WADO-RS, or QIDO-RS\nstandard. Since this implements an industry standard API, the\ndicom_web_path is interpreted directly by the serving binary. For example,\nif the request is for\n`/v1alpha/projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}/dicomWeb/studies/{study_id}/series?PatientName={patient_name}`,\nthen `studies/{study_id}/series` is passed to the serving binary as the\ndicom_web_path.",
  8161. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/{dicomWebId}",
  8162. // "httpMethod": "GET",
  8163. // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.dicomWebGet",
  8164. // "parameterOrder": [
  8165. // "parent",
  8166. // "dicomWebPath"
  8167. // ],
  8168. // "parameters": {
  8169. // "dicomWebPath": {
  8170. // "description": "The path of the DICOMweb request, as specified in the STOW-RS, WADO-RS, or\nQIDO-RS standard (e.g., studies/{study_id}/series`).",
  8171. // "location": "path",
  8172. // "pattern": "^.+$",
  8173. // "required": true,
  8174. // "type": "string"
  8175. // },
  8176. // "parent": {
  8177. // "description": "The name of the DICOM store that is being accessed (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`).",
  8178. // "location": "path",
  8179. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  8180. // "required": true,
  8181. // "type": "string"
  8182. // }
  8183. // },
  8184. // "path": "v1alpha/{+parent}/dicomWeb/{+dicomWebPath}",
  8185. // "response": {
  8186. // "$ref": "HttpBody"
  8187. // },
  8188. // "scopes": [
  8189. // "https://www.googleapis.com/auth/cloud-platform"
  8190. // ]
  8191. // }
  8192. }
  8193. // method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.dicomWebPost":
  8194. type ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebPostCall struct {
  8195. s *Service
  8196. parent string
  8197. dicomWebPath string
  8198. httpbody *HttpBody
  8199. urlParams_ gensupport.URLParams
  8200. ctx_ context.Context
  8201. header_ http.Header
  8202. }
  8203. // DicomWebPost: Handles the POST requests specified in the STOW-RS,
  8204. // WADO-RS, or QIDO-RS
  8205. // standard. Since this implements an industry standard API,
  8206. // the
  8207. // dicom_web_path is interpreted directly by the serving binary. For
  8208. // example,
  8209. // if the request is
  8210. // for
  8211. // `/v1alpha/projects/{project_id}/locations/{location_id}/datasets/{
  8212. // dataset_id}/dicomStores/{dicom_store_id}/dicomWeb/studies/{study_id}`,
  8213. //
  8214. // then `/studies/{study_id}` is passed to the serving binary as
  8215. // the
  8216. // dicom_web_path.
  8217. func (r *ProjectsLocationsDatasetsDicomStoresDicomWebService) DicomWebPost(parent string, dicomWebPath string, httpbody *HttpBody) *ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebPostCall {
  8218. c := &ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebPostCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8219. c.parent = parent
  8220. c.dicomWebPath = dicomWebPath
  8221. c.httpbody = httpbody
  8222. return c
  8223. }
  8224. // Fields allows partial responses to be retrieved. See
  8225. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8226. // for more information.
  8227. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebPostCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebPostCall {
  8228. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8229. return c
  8230. }
  8231. // Context sets the context to be used in this call's Do method. Any
  8232. // pending HTTP request will be aborted if the provided context is
  8233. // canceled.
  8234. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebPostCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebPostCall {
  8235. c.ctx_ = ctx
  8236. return c
  8237. }
  8238. // Header returns an http.Header that can be modified by the caller to
  8239. // add HTTP headers to the request.
  8240. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebPostCall) Header() http.Header {
  8241. if c.header_ == nil {
  8242. c.header_ = make(http.Header)
  8243. }
  8244. return c.header_
  8245. }
  8246. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebPostCall) doRequest(alt string) (*http.Response, error) {
  8247. reqHeaders := make(http.Header)
  8248. for k, v := range c.header_ {
  8249. reqHeaders[k] = v
  8250. }
  8251. reqHeaders.Set("User-Agent", c.s.userAgent())
  8252. var body io.Reader = nil
  8253. body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpbody)
  8254. if err != nil {
  8255. return nil, err
  8256. }
  8257. reqHeaders.Set("Content-Type", "application/json")
  8258. c.urlParams_.Set("alt", alt)
  8259. c.urlParams_.Set("prettyPrint", "false")
  8260. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dicomWeb/{+dicomWebPath}")
  8261. urls += "?" + c.urlParams_.Encode()
  8262. req, err := http.NewRequest("POST", urls, body)
  8263. if err != nil {
  8264. return nil, err
  8265. }
  8266. req.Header = reqHeaders
  8267. googleapi.Expand(req.URL, map[string]string{
  8268. "parent": c.parent,
  8269. "dicomWebPath": c.dicomWebPath,
  8270. })
  8271. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8272. }
  8273. // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.dicomWebPost" call.
  8274. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  8275. // code is an error. Response headers are in either
  8276. // *HttpBody.ServerResponse.Header or (if a response was returned at
  8277. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8278. // to check whether the returned error was because
  8279. // http.StatusNotModified was returned.
  8280. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebDicomWebPostCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  8281. gensupport.SetOptions(c.urlParams_, opts...)
  8282. res, err := c.doRequest("json")
  8283. if res != nil && res.StatusCode == http.StatusNotModified {
  8284. if res.Body != nil {
  8285. res.Body.Close()
  8286. }
  8287. return nil, &googleapi.Error{
  8288. Code: res.StatusCode,
  8289. Header: res.Header,
  8290. }
  8291. }
  8292. if err != nil {
  8293. return nil, err
  8294. }
  8295. defer googleapi.CloseBody(res)
  8296. if err := googleapi.CheckResponse(res); err != nil {
  8297. return nil, err
  8298. }
  8299. ret := &HttpBody{
  8300. ServerResponse: googleapi.ServerResponse{
  8301. Header: res.Header,
  8302. HTTPStatusCode: res.StatusCode,
  8303. },
  8304. }
  8305. target := &ret
  8306. if err := gensupport.DecodeResponse(target, res); err != nil {
  8307. return nil, err
  8308. }
  8309. return ret, nil
  8310. // {
  8311. // "description": "Handles the POST requests specified in the STOW-RS, WADO-RS, or QIDO-RS\nstandard. Since this implements an industry standard API, the\ndicom_web_path is interpreted directly by the serving binary. For example,\nif the request is for\n`/v1alpha/projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}/dicomWeb/studies/{study_id}`,\nthen `/studies/{study_id}` is passed to the serving binary as the\ndicom_web_path.",
  8312. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/{dicomWebId}",
  8313. // "httpMethod": "POST",
  8314. // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.dicomWebPost",
  8315. // "parameterOrder": [
  8316. // "parent",
  8317. // "dicomWebPath"
  8318. // ],
  8319. // "parameters": {
  8320. // "dicomWebPath": {
  8321. // "description": "The path of the DICOMweb request, as specified in the STOW-RS, WADO-RS, or\nQIDO-RS standard (e.g., studies/{study_id}`).",
  8322. // "location": "path",
  8323. // "pattern": "^.+$",
  8324. // "required": true,
  8325. // "type": "string"
  8326. // },
  8327. // "parent": {
  8328. // "description": "The name of the DICOM store that is being accessed (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/dicomStores/{dicom_store_id}`).",
  8329. // "location": "path",
  8330. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  8331. // "required": true,
  8332. // "type": "string"
  8333. // }
  8334. // },
  8335. // "path": "v1alpha/{+parent}/dicomWeb/{+dicomWebPath}",
  8336. // "request": {
  8337. // "$ref": "HttpBody"
  8338. // },
  8339. // "response": {
  8340. // "$ref": "HttpBody"
  8341. // },
  8342. // "scopes": [
  8343. // "https://www.googleapis.com/auth/cloud-platform"
  8344. // ]
  8345. // }
  8346. }
  8347. // method id "healthcare.projects.locations.datasets.fhirStores.create":
  8348. type ProjectsLocationsDatasetsFhirStoresCreateCall struct {
  8349. s *Service
  8350. parent string
  8351. fhirstore *FhirStore
  8352. urlParams_ gensupport.URLParams
  8353. ctx_ context.Context
  8354. header_ http.Header
  8355. }
  8356. // Create: Creates a new FHIR store within the parent dataset.
  8357. func (r *ProjectsLocationsDatasetsFhirStoresService) Create(parent string, fhirstore *FhirStore) *ProjectsLocationsDatasetsFhirStoresCreateCall {
  8358. c := &ProjectsLocationsDatasetsFhirStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8359. c.parent = parent
  8360. c.fhirstore = fhirstore
  8361. return c
  8362. }
  8363. // FhirStoreId sets the optional parameter "fhirStoreId": The ID of the
  8364. // FHIR store that is being created.
  8365. // The string must match the following regex:
  8366. // `[\p{L}\p{N}_\-\.]{1,256}`.
  8367. func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) FhirStoreId(fhirStoreId string) *ProjectsLocationsDatasetsFhirStoresCreateCall {
  8368. c.urlParams_.Set("fhirStoreId", fhirStoreId)
  8369. return c
  8370. }
  8371. // Fields allows partial responses to be retrieved. See
  8372. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8373. // for more information.
  8374. func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresCreateCall {
  8375. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8376. return c
  8377. }
  8378. // Context sets the context to be used in this call's Do method. Any
  8379. // pending HTTP request will be aborted if the provided context is
  8380. // canceled.
  8381. func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresCreateCall {
  8382. c.ctx_ = ctx
  8383. return c
  8384. }
  8385. // Header returns an http.Header that can be modified by the caller to
  8386. // add HTTP headers to the request.
  8387. func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) Header() http.Header {
  8388. if c.header_ == nil {
  8389. c.header_ = make(http.Header)
  8390. }
  8391. return c.header_
  8392. }
  8393. func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) doRequest(alt string) (*http.Response, error) {
  8394. reqHeaders := make(http.Header)
  8395. for k, v := range c.header_ {
  8396. reqHeaders[k] = v
  8397. }
  8398. reqHeaders.Set("User-Agent", c.s.userAgent())
  8399. var body io.Reader = nil
  8400. body, err := googleapi.WithoutDataWrapper.JSONReader(c.fhirstore)
  8401. if err != nil {
  8402. return nil, err
  8403. }
  8404. reqHeaders.Set("Content-Type", "application/json")
  8405. c.urlParams_.Set("alt", alt)
  8406. c.urlParams_.Set("prettyPrint", "false")
  8407. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/fhirStores")
  8408. urls += "?" + c.urlParams_.Encode()
  8409. req, err := http.NewRequest("POST", urls, body)
  8410. if err != nil {
  8411. return nil, err
  8412. }
  8413. req.Header = reqHeaders
  8414. googleapi.Expand(req.URL, map[string]string{
  8415. "parent": c.parent,
  8416. })
  8417. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8418. }
  8419. // Do executes the "healthcare.projects.locations.datasets.fhirStores.create" call.
  8420. // Exactly one of *FhirStore or error will be non-nil. Any non-2xx
  8421. // status code is an error. Response headers are in either
  8422. // *FhirStore.ServerResponse.Header or (if a response was returned at
  8423. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8424. // to check whether the returned error was because
  8425. // http.StatusNotModified was returned.
  8426. func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) Do(opts ...googleapi.CallOption) (*FhirStore, error) {
  8427. gensupport.SetOptions(c.urlParams_, opts...)
  8428. res, err := c.doRequest("json")
  8429. if res != nil && res.StatusCode == http.StatusNotModified {
  8430. if res.Body != nil {
  8431. res.Body.Close()
  8432. }
  8433. return nil, &googleapi.Error{
  8434. Code: res.StatusCode,
  8435. Header: res.Header,
  8436. }
  8437. }
  8438. if err != nil {
  8439. return nil, err
  8440. }
  8441. defer googleapi.CloseBody(res)
  8442. if err := googleapi.CheckResponse(res); err != nil {
  8443. return nil, err
  8444. }
  8445. ret := &FhirStore{
  8446. ServerResponse: googleapi.ServerResponse{
  8447. Header: res.Header,
  8448. HTTPStatusCode: res.StatusCode,
  8449. },
  8450. }
  8451. target := &ret
  8452. if err := gensupport.DecodeResponse(target, res); err != nil {
  8453. return nil, err
  8454. }
  8455. return ret, nil
  8456. // {
  8457. // "description": "Creates a new FHIR store within the parent dataset.",
  8458. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores",
  8459. // "httpMethod": "POST",
  8460. // "id": "healthcare.projects.locations.datasets.fhirStores.create",
  8461. // "parameterOrder": [
  8462. // "parent"
  8463. // ],
  8464. // "parameters": {
  8465. // "fhirStoreId": {
  8466. // "description": "The ID of the FHIR store that is being created.\nThe string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.",
  8467. // "location": "query",
  8468. // "type": "string"
  8469. // },
  8470. // "parent": {
  8471. // "description": "The name of the dataset this FHIR store belongs to.",
  8472. // "location": "path",
  8473. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  8474. // "required": true,
  8475. // "type": "string"
  8476. // }
  8477. // },
  8478. // "path": "v1alpha/{+parent}/fhirStores",
  8479. // "request": {
  8480. // "$ref": "FhirStore"
  8481. // },
  8482. // "response": {
  8483. // "$ref": "FhirStore"
  8484. // },
  8485. // "scopes": [
  8486. // "https://www.googleapis.com/auth/cloud-platform"
  8487. // ]
  8488. // }
  8489. }
  8490. // method id "healthcare.projects.locations.datasets.fhirStores.delete":
  8491. type ProjectsLocationsDatasetsFhirStoresDeleteCall struct {
  8492. s *Service
  8493. name string
  8494. urlParams_ gensupport.URLParams
  8495. ctx_ context.Context
  8496. header_ http.Header
  8497. }
  8498. // Delete: Deletes the FHIR store and removes all resources that are
  8499. // contained within
  8500. // it.
  8501. func (r *ProjectsLocationsDatasetsFhirStoresService) Delete(name string) *ProjectsLocationsDatasetsFhirStoresDeleteCall {
  8502. c := &ProjectsLocationsDatasetsFhirStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8503. c.name = name
  8504. return c
  8505. }
  8506. // Fields allows partial responses to be retrieved. See
  8507. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8508. // for more information.
  8509. func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresDeleteCall {
  8510. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8511. return c
  8512. }
  8513. // Context sets the context to be used in this call's Do method. Any
  8514. // pending HTTP request will be aborted if the provided context is
  8515. // canceled.
  8516. func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresDeleteCall {
  8517. c.ctx_ = ctx
  8518. return c
  8519. }
  8520. // Header returns an http.Header that can be modified by the caller to
  8521. // add HTTP headers to the request.
  8522. func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) Header() http.Header {
  8523. if c.header_ == nil {
  8524. c.header_ = make(http.Header)
  8525. }
  8526. return c.header_
  8527. }
  8528. func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) doRequest(alt string) (*http.Response, error) {
  8529. reqHeaders := make(http.Header)
  8530. for k, v := range c.header_ {
  8531. reqHeaders[k] = v
  8532. }
  8533. reqHeaders.Set("User-Agent", c.s.userAgent())
  8534. var body io.Reader = nil
  8535. c.urlParams_.Set("alt", alt)
  8536. c.urlParams_.Set("prettyPrint", "false")
  8537. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  8538. urls += "?" + c.urlParams_.Encode()
  8539. req, err := http.NewRequest("DELETE", urls, body)
  8540. if err != nil {
  8541. return nil, err
  8542. }
  8543. req.Header = reqHeaders
  8544. googleapi.Expand(req.URL, map[string]string{
  8545. "name": c.name,
  8546. })
  8547. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8548. }
  8549. // Do executes the "healthcare.projects.locations.datasets.fhirStores.delete" call.
  8550. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  8551. // code is an error. Response headers are in either
  8552. // *Empty.ServerResponse.Header or (if a response was returned at all)
  8553. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8554. // check whether the returned error was because http.StatusNotModified
  8555. // was returned.
  8556. func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  8557. gensupport.SetOptions(c.urlParams_, opts...)
  8558. res, err := c.doRequest("json")
  8559. if res != nil && res.StatusCode == http.StatusNotModified {
  8560. if res.Body != nil {
  8561. res.Body.Close()
  8562. }
  8563. return nil, &googleapi.Error{
  8564. Code: res.StatusCode,
  8565. Header: res.Header,
  8566. }
  8567. }
  8568. if err != nil {
  8569. return nil, err
  8570. }
  8571. defer googleapi.CloseBody(res)
  8572. if err := googleapi.CheckResponse(res); err != nil {
  8573. return nil, err
  8574. }
  8575. ret := &Empty{
  8576. ServerResponse: googleapi.ServerResponse{
  8577. Header: res.Header,
  8578. HTTPStatusCode: res.StatusCode,
  8579. },
  8580. }
  8581. target := &ret
  8582. if err := gensupport.DecodeResponse(target, res); err != nil {
  8583. return nil, err
  8584. }
  8585. return ret, nil
  8586. // {
  8587. // "description": "Deletes the FHIR store and removes all resources that are contained within\nit.",
  8588. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}",
  8589. // "httpMethod": "DELETE",
  8590. // "id": "healthcare.projects.locations.datasets.fhirStores.delete",
  8591. // "parameterOrder": [
  8592. // "name"
  8593. // ],
  8594. // "parameters": {
  8595. // "name": {
  8596. // "description": "The resource name of the FHIR store to delete.",
  8597. // "location": "path",
  8598. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  8599. // "required": true,
  8600. // "type": "string"
  8601. // }
  8602. // },
  8603. // "path": "v1alpha/{+name}",
  8604. // "response": {
  8605. // "$ref": "Empty"
  8606. // },
  8607. // "scopes": [
  8608. // "https://www.googleapis.com/auth/cloud-platform"
  8609. // ]
  8610. // }
  8611. }
  8612. // method id "healthcare.projects.locations.datasets.fhirStores.executeBundle":
  8613. type ProjectsLocationsDatasetsFhirStoresExecuteBundleCall struct {
  8614. s *Service
  8615. parent string
  8616. httpbody *HttpBody
  8617. urlParams_ gensupport.URLParams
  8618. ctx_ context.Context
  8619. header_ http.Header
  8620. }
  8621. // ExecuteBundle: Executes all the requests in the given Bundle.
  8622. func (r *ProjectsLocationsDatasetsFhirStoresService) ExecuteBundle(parent string, httpbody *HttpBody) *ProjectsLocationsDatasetsFhirStoresExecuteBundleCall {
  8623. c := &ProjectsLocationsDatasetsFhirStoresExecuteBundleCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8624. c.parent = parent
  8625. c.httpbody = httpbody
  8626. return c
  8627. }
  8628. // Fields allows partial responses to be retrieved. See
  8629. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8630. // for more information.
  8631. func (c *ProjectsLocationsDatasetsFhirStoresExecuteBundleCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresExecuteBundleCall {
  8632. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8633. return c
  8634. }
  8635. // Context sets the context to be used in this call's Do method. Any
  8636. // pending HTTP request will be aborted if the provided context is
  8637. // canceled.
  8638. func (c *ProjectsLocationsDatasetsFhirStoresExecuteBundleCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresExecuteBundleCall {
  8639. c.ctx_ = ctx
  8640. return c
  8641. }
  8642. // Header returns an http.Header that can be modified by the caller to
  8643. // add HTTP headers to the request.
  8644. func (c *ProjectsLocationsDatasetsFhirStoresExecuteBundleCall) Header() http.Header {
  8645. if c.header_ == nil {
  8646. c.header_ = make(http.Header)
  8647. }
  8648. return c.header_
  8649. }
  8650. func (c *ProjectsLocationsDatasetsFhirStoresExecuteBundleCall) doRequest(alt string) (*http.Response, error) {
  8651. reqHeaders := make(http.Header)
  8652. for k, v := range c.header_ {
  8653. reqHeaders[k] = v
  8654. }
  8655. reqHeaders.Set("User-Agent", c.s.userAgent())
  8656. var body io.Reader = nil
  8657. body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpbody)
  8658. if err != nil {
  8659. return nil, err
  8660. }
  8661. reqHeaders.Set("Content-Type", "application/json")
  8662. c.urlParams_.Set("alt", alt)
  8663. c.urlParams_.Set("prettyPrint", "false")
  8664. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}")
  8665. urls += "?" + c.urlParams_.Encode()
  8666. req, err := http.NewRequest("POST", urls, body)
  8667. if err != nil {
  8668. return nil, err
  8669. }
  8670. req.Header = reqHeaders
  8671. googleapi.Expand(req.URL, map[string]string{
  8672. "parent": c.parent,
  8673. })
  8674. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8675. }
  8676. // Do executes the "healthcare.projects.locations.datasets.fhirStores.executeBundle" call.
  8677. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  8678. // code is an error. Response headers are in either
  8679. // *HttpBody.ServerResponse.Header or (if a response was returned at
  8680. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8681. // to check whether the returned error was because
  8682. // http.StatusNotModified was returned.
  8683. func (c *ProjectsLocationsDatasetsFhirStoresExecuteBundleCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  8684. gensupport.SetOptions(c.urlParams_, opts...)
  8685. res, err := c.doRequest("json")
  8686. if res != nil && res.StatusCode == http.StatusNotModified {
  8687. if res.Body != nil {
  8688. res.Body.Close()
  8689. }
  8690. return nil, &googleapi.Error{
  8691. Code: res.StatusCode,
  8692. Header: res.Header,
  8693. }
  8694. }
  8695. if err != nil {
  8696. return nil, err
  8697. }
  8698. defer googleapi.CloseBody(res)
  8699. if err := googleapi.CheckResponse(res); err != nil {
  8700. return nil, err
  8701. }
  8702. ret := &HttpBody{
  8703. ServerResponse: googleapi.ServerResponse{
  8704. Header: res.Header,
  8705. HTTPStatusCode: res.StatusCode,
  8706. },
  8707. }
  8708. target := &ret
  8709. if err := gensupport.DecodeResponse(target, res); err != nil {
  8710. return nil, err
  8711. }
  8712. return ret, nil
  8713. // {
  8714. // "description": "Executes all the requests in the given Bundle.",
  8715. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}",
  8716. // "httpMethod": "POST",
  8717. // "id": "healthcare.projects.locations.datasets.fhirStores.executeBundle",
  8718. // "parameterOrder": [
  8719. // "parent"
  8720. // ],
  8721. // "parameters": {
  8722. // "parent": {
  8723. // "description": "Name of the FHIR store in which this bundle will be executed.",
  8724. // "location": "path",
  8725. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  8726. // "required": true,
  8727. // "type": "string"
  8728. // }
  8729. // },
  8730. // "path": "v1alpha/{+parent}",
  8731. // "request": {
  8732. // "$ref": "HttpBody"
  8733. // },
  8734. // "response": {
  8735. // "$ref": "HttpBody"
  8736. // },
  8737. // "scopes": [
  8738. // "https://www.googleapis.com/auth/cloud-platform"
  8739. // ]
  8740. // }
  8741. }
  8742. // method id "healthcare.projects.locations.datasets.fhirStores.export":
  8743. type ProjectsLocationsDatasetsFhirStoresExportCall struct {
  8744. s *Service
  8745. name string
  8746. exportresourcesrequest *ExportResourcesRequest
  8747. urlParams_ gensupport.URLParams
  8748. ctx_ context.Context
  8749. header_ http.Header
  8750. }
  8751. // Export: Export resources from the FHIR store to the specified
  8752. // destination.
  8753. // Fatal errors will be populated in the
  8754. // error field.
  8755. // Otherwise a detailed response will be returned as of
  8756. // type
  8757. // ExportResourcesResponse contained in the
  8758. // response field when the operation
  8759. // finishes.
  8760. // The metadata field type is
  8761. // OperationMetadata.
  8762. func (r *ProjectsLocationsDatasetsFhirStoresService) Export(name string, exportresourcesrequest *ExportResourcesRequest) *ProjectsLocationsDatasetsFhirStoresExportCall {
  8763. c := &ProjectsLocationsDatasetsFhirStoresExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8764. c.name = name
  8765. c.exportresourcesrequest = exportresourcesrequest
  8766. return c
  8767. }
  8768. // Fields allows partial responses to be retrieved. See
  8769. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8770. // for more information.
  8771. func (c *ProjectsLocationsDatasetsFhirStoresExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresExportCall {
  8772. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8773. return c
  8774. }
  8775. // Context sets the context to be used in this call's Do method. Any
  8776. // pending HTTP request will be aborted if the provided context is
  8777. // canceled.
  8778. func (c *ProjectsLocationsDatasetsFhirStoresExportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresExportCall {
  8779. c.ctx_ = ctx
  8780. return c
  8781. }
  8782. // Header returns an http.Header that can be modified by the caller to
  8783. // add HTTP headers to the request.
  8784. func (c *ProjectsLocationsDatasetsFhirStoresExportCall) Header() http.Header {
  8785. if c.header_ == nil {
  8786. c.header_ = make(http.Header)
  8787. }
  8788. return c.header_
  8789. }
  8790. func (c *ProjectsLocationsDatasetsFhirStoresExportCall) doRequest(alt string) (*http.Response, error) {
  8791. reqHeaders := make(http.Header)
  8792. for k, v := range c.header_ {
  8793. reqHeaders[k] = v
  8794. }
  8795. reqHeaders.Set("User-Agent", c.s.userAgent())
  8796. var body io.Reader = nil
  8797. body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportresourcesrequest)
  8798. if err != nil {
  8799. return nil, err
  8800. }
  8801. reqHeaders.Set("Content-Type", "application/json")
  8802. c.urlParams_.Set("alt", alt)
  8803. c.urlParams_.Set("prettyPrint", "false")
  8804. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:export")
  8805. urls += "?" + c.urlParams_.Encode()
  8806. req, err := http.NewRequest("POST", urls, body)
  8807. if err != nil {
  8808. return nil, err
  8809. }
  8810. req.Header = reqHeaders
  8811. googleapi.Expand(req.URL, map[string]string{
  8812. "name": c.name,
  8813. })
  8814. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8815. }
  8816. // Do executes the "healthcare.projects.locations.datasets.fhirStores.export" call.
  8817. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  8818. // status code is an error. Response headers are in either
  8819. // *Operation.ServerResponse.Header or (if a response was returned at
  8820. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8821. // to check whether the returned error was because
  8822. // http.StatusNotModified was returned.
  8823. func (c *ProjectsLocationsDatasetsFhirStoresExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8824. gensupport.SetOptions(c.urlParams_, opts...)
  8825. res, err := c.doRequest("json")
  8826. if res != nil && res.StatusCode == http.StatusNotModified {
  8827. if res.Body != nil {
  8828. res.Body.Close()
  8829. }
  8830. return nil, &googleapi.Error{
  8831. Code: res.StatusCode,
  8832. Header: res.Header,
  8833. }
  8834. }
  8835. if err != nil {
  8836. return nil, err
  8837. }
  8838. defer googleapi.CloseBody(res)
  8839. if err := googleapi.CheckResponse(res); err != nil {
  8840. return nil, err
  8841. }
  8842. ret := &Operation{
  8843. ServerResponse: googleapi.ServerResponse{
  8844. Header: res.Header,
  8845. HTTPStatusCode: res.StatusCode,
  8846. },
  8847. }
  8848. target := &ret
  8849. if err := gensupport.DecodeResponse(target, res); err != nil {
  8850. return nil, err
  8851. }
  8852. return ret, nil
  8853. // {
  8854. // "description": "Export resources from the FHIR store to the specified destination.\nFatal errors will be populated in the\nerror field.\nOtherwise a detailed response will be returned as of type\nExportResourcesResponse contained in the\nresponse field when the operation\nfinishes.\nThe metadata field type is\nOperationMetadata.",
  8855. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:export",
  8856. // "httpMethod": "POST",
  8857. // "id": "healthcare.projects.locations.datasets.fhirStores.export",
  8858. // "parameterOrder": [
  8859. // "name"
  8860. // ],
  8861. // "parameters": {
  8862. // "name": {
  8863. // "description": "The FHIR store name to export from. The name should be in the format\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}`.",
  8864. // "location": "path",
  8865. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  8866. // "required": true,
  8867. // "type": "string"
  8868. // }
  8869. // },
  8870. // "path": "v1alpha/{+name}:export",
  8871. // "request": {
  8872. // "$ref": "ExportResourcesRequest"
  8873. // },
  8874. // "response": {
  8875. // "$ref": "Operation"
  8876. // },
  8877. // "scopes": [
  8878. // "https://www.googleapis.com/auth/cloud-platform"
  8879. // ]
  8880. // }
  8881. }
  8882. // method id "healthcare.projects.locations.datasets.fhirStores.get":
  8883. type ProjectsLocationsDatasetsFhirStoresGetCall struct {
  8884. s *Service
  8885. name string
  8886. urlParams_ gensupport.URLParams
  8887. ifNoneMatch_ string
  8888. ctx_ context.Context
  8889. header_ http.Header
  8890. }
  8891. // Get: Gets the specified FHIR store.
  8892. func (r *ProjectsLocationsDatasetsFhirStoresService) Get(name string) *ProjectsLocationsDatasetsFhirStoresGetCall {
  8893. c := &ProjectsLocationsDatasetsFhirStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8894. c.name = name
  8895. return c
  8896. }
  8897. // Fields allows partial responses to be retrieved. See
  8898. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8899. // for more information.
  8900. func (c *ProjectsLocationsDatasetsFhirStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresGetCall {
  8901. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8902. return c
  8903. }
  8904. // IfNoneMatch sets the optional parameter which makes the operation
  8905. // fail if the object's ETag matches the given value. This is useful for
  8906. // getting updates only after the object has changed since the last
  8907. // request. Use googleapi.IsNotModified to check whether the response
  8908. // error from Do is the result of In-None-Match.
  8909. func (c *ProjectsLocationsDatasetsFhirStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresGetCall {
  8910. c.ifNoneMatch_ = entityTag
  8911. return c
  8912. }
  8913. // Context sets the context to be used in this call's Do method. Any
  8914. // pending HTTP request will be aborted if the provided context is
  8915. // canceled.
  8916. func (c *ProjectsLocationsDatasetsFhirStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresGetCall {
  8917. c.ctx_ = ctx
  8918. return c
  8919. }
  8920. // Header returns an http.Header that can be modified by the caller to
  8921. // add HTTP headers to the request.
  8922. func (c *ProjectsLocationsDatasetsFhirStoresGetCall) Header() http.Header {
  8923. if c.header_ == nil {
  8924. c.header_ = make(http.Header)
  8925. }
  8926. return c.header_
  8927. }
  8928. func (c *ProjectsLocationsDatasetsFhirStoresGetCall) doRequest(alt string) (*http.Response, error) {
  8929. reqHeaders := make(http.Header)
  8930. for k, v := range c.header_ {
  8931. reqHeaders[k] = v
  8932. }
  8933. reqHeaders.Set("User-Agent", c.s.userAgent())
  8934. if c.ifNoneMatch_ != "" {
  8935. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8936. }
  8937. var body io.Reader = nil
  8938. c.urlParams_.Set("alt", alt)
  8939. c.urlParams_.Set("prettyPrint", "false")
  8940. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  8941. urls += "?" + c.urlParams_.Encode()
  8942. req, err := http.NewRequest("GET", urls, body)
  8943. if err != nil {
  8944. return nil, err
  8945. }
  8946. req.Header = reqHeaders
  8947. googleapi.Expand(req.URL, map[string]string{
  8948. "name": c.name,
  8949. })
  8950. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8951. }
  8952. // Do executes the "healthcare.projects.locations.datasets.fhirStores.get" call.
  8953. // Exactly one of *FhirStore or error will be non-nil. Any non-2xx
  8954. // status code is an error. Response headers are in either
  8955. // *FhirStore.ServerResponse.Header or (if a response was returned at
  8956. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8957. // to check whether the returned error was because
  8958. // http.StatusNotModified was returned.
  8959. func (c *ProjectsLocationsDatasetsFhirStoresGetCall) Do(opts ...googleapi.CallOption) (*FhirStore, error) {
  8960. gensupport.SetOptions(c.urlParams_, opts...)
  8961. res, err := c.doRequest("json")
  8962. if res != nil && res.StatusCode == http.StatusNotModified {
  8963. if res.Body != nil {
  8964. res.Body.Close()
  8965. }
  8966. return nil, &googleapi.Error{
  8967. Code: res.StatusCode,
  8968. Header: res.Header,
  8969. }
  8970. }
  8971. if err != nil {
  8972. return nil, err
  8973. }
  8974. defer googleapi.CloseBody(res)
  8975. if err := googleapi.CheckResponse(res); err != nil {
  8976. return nil, err
  8977. }
  8978. ret := &FhirStore{
  8979. ServerResponse: googleapi.ServerResponse{
  8980. Header: res.Header,
  8981. HTTPStatusCode: res.StatusCode,
  8982. },
  8983. }
  8984. target := &ret
  8985. if err := gensupport.DecodeResponse(target, res); err != nil {
  8986. return nil, err
  8987. }
  8988. return ret, nil
  8989. // {
  8990. // "description": "Gets the specified FHIR store.",
  8991. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}",
  8992. // "httpMethod": "GET",
  8993. // "id": "healthcare.projects.locations.datasets.fhirStores.get",
  8994. // "parameterOrder": [
  8995. // "name"
  8996. // ],
  8997. // "parameters": {
  8998. // "name": {
  8999. // "description": "The resource name of the FHIR store to get.",
  9000. // "location": "path",
  9001. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  9002. // "required": true,
  9003. // "type": "string"
  9004. // }
  9005. // },
  9006. // "path": "v1alpha/{+name}",
  9007. // "response": {
  9008. // "$ref": "FhirStore"
  9009. // },
  9010. // "scopes": [
  9011. // "https://www.googleapis.com/auth/cloud-platform"
  9012. // ]
  9013. // }
  9014. }
  9015. // method id "healthcare.projects.locations.datasets.fhirStores.getIamPolicy":
  9016. type ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall struct {
  9017. s *Service
  9018. resource string
  9019. getiampolicyrequest *GetIamPolicyRequest
  9020. urlParams_ gensupport.URLParams
  9021. ctx_ context.Context
  9022. header_ http.Header
  9023. }
  9024. // GetIamPolicy: Gets the access control policy for a FHIR store or
  9025. // security label within a
  9026. // FHIR store. Returns NOT_FOUND error if the resource does not exist.
  9027. // Returns
  9028. // an empty policy if the resource exists but does not have a policy
  9029. // set.
  9030. //
  9031. // Authorization requires the Google IAM
  9032. // permission
  9033. // 'healthcare.fhirStores.getIamPolicy' for a FHIR store
  9034. // or
  9035. // 'healthcare.securityLabels.getIamPolicy' for a security label
  9036. func (r *ProjectsLocationsDatasetsFhirStoresService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall {
  9037. c := &ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9038. c.resource = resource
  9039. c.getiampolicyrequest = getiampolicyrequest
  9040. return c
  9041. }
  9042. // Fields allows partial responses to be retrieved. See
  9043. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9044. // for more information.
  9045. func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall {
  9046. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9047. return c
  9048. }
  9049. // Context sets the context to be used in this call's Do method. Any
  9050. // pending HTTP request will be aborted if the provided context is
  9051. // canceled.
  9052. func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall {
  9053. c.ctx_ = ctx
  9054. return c
  9055. }
  9056. // Header returns an http.Header that can be modified by the caller to
  9057. // add HTTP headers to the request.
  9058. func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) Header() http.Header {
  9059. if c.header_ == nil {
  9060. c.header_ = make(http.Header)
  9061. }
  9062. return c.header_
  9063. }
  9064. func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  9065. reqHeaders := make(http.Header)
  9066. for k, v := range c.header_ {
  9067. reqHeaders[k] = v
  9068. }
  9069. reqHeaders.Set("User-Agent", c.s.userAgent())
  9070. var body io.Reader = nil
  9071. body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
  9072. if err != nil {
  9073. return nil, err
  9074. }
  9075. reqHeaders.Set("Content-Type", "application/json")
  9076. c.urlParams_.Set("alt", alt)
  9077. c.urlParams_.Set("prettyPrint", "false")
  9078. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy")
  9079. urls += "?" + c.urlParams_.Encode()
  9080. req, err := http.NewRequest("POST", urls, body)
  9081. if err != nil {
  9082. return nil, err
  9083. }
  9084. req.Header = reqHeaders
  9085. googleapi.Expand(req.URL, map[string]string{
  9086. "resource": c.resource,
  9087. })
  9088. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9089. }
  9090. // Do executes the "healthcare.projects.locations.datasets.fhirStores.getIamPolicy" call.
  9091. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  9092. // code is an error. Response headers are in either
  9093. // *Policy.ServerResponse.Header or (if a response was returned at all)
  9094. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9095. // check whether the returned error was because http.StatusNotModified
  9096. // was returned.
  9097. func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  9098. gensupport.SetOptions(c.urlParams_, opts...)
  9099. res, err := c.doRequest("json")
  9100. if res != nil && res.StatusCode == http.StatusNotModified {
  9101. if res.Body != nil {
  9102. res.Body.Close()
  9103. }
  9104. return nil, &googleapi.Error{
  9105. Code: res.StatusCode,
  9106. Header: res.Header,
  9107. }
  9108. }
  9109. if err != nil {
  9110. return nil, err
  9111. }
  9112. defer googleapi.CloseBody(res)
  9113. if err := googleapi.CheckResponse(res); err != nil {
  9114. return nil, err
  9115. }
  9116. ret := &Policy{
  9117. ServerResponse: googleapi.ServerResponse{
  9118. Header: res.Header,
  9119. HTTPStatusCode: res.StatusCode,
  9120. },
  9121. }
  9122. target := &ret
  9123. if err := gensupport.DecodeResponse(target, res); err != nil {
  9124. return nil, err
  9125. }
  9126. return ret, nil
  9127. // {
  9128. // "description": "Gets the access control policy for a FHIR store or security label within a\nFHIR store. Returns NOT_FOUND error if the resource does not exist. Returns\nan empty policy if the resource exists but does not have a policy set.\n\nAuthorization requires the Google IAM permission\n'healthcare.fhirStores.getIamPolicy' for a FHIR store or\n'healthcare.securityLabels.getIamPolicy' for a security label",
  9129. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:getIamPolicy",
  9130. // "httpMethod": "POST",
  9131. // "id": "healthcare.projects.locations.datasets.fhirStores.getIamPolicy",
  9132. // "parameterOrder": [
  9133. // "resource"
  9134. // ],
  9135. // "parameters": {
  9136. // "resource": {
  9137. // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
  9138. // "location": "path",
  9139. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  9140. // "required": true,
  9141. // "type": "string"
  9142. // }
  9143. // },
  9144. // "path": "v1alpha/{+resource}:getIamPolicy",
  9145. // "request": {
  9146. // "$ref": "GetIamPolicyRequest"
  9147. // },
  9148. // "response": {
  9149. // "$ref": "Policy"
  9150. // },
  9151. // "scopes": [
  9152. // "https://www.googleapis.com/auth/cloud-platform"
  9153. // ]
  9154. // }
  9155. }
  9156. // method id "healthcare.projects.locations.datasets.fhirStores.getMetadata":
  9157. type ProjectsLocationsDatasetsFhirStoresGetMetadataCall struct {
  9158. s *Service
  9159. name string
  9160. urlParams_ gensupport.URLParams
  9161. ifNoneMatch_ string
  9162. ctx_ context.Context
  9163. header_ http.Header
  9164. }
  9165. // GetMetadata: Gets the capabilities statement for the store.
  9166. //
  9167. func (r *ProjectsLocationsDatasetsFhirStoresService) GetMetadata(name string) *ProjectsLocationsDatasetsFhirStoresGetMetadataCall {
  9168. c := &ProjectsLocationsDatasetsFhirStoresGetMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9169. c.name = name
  9170. return c
  9171. }
  9172. // Fields allows partial responses to be retrieved. See
  9173. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9174. // for more information.
  9175. func (c *ProjectsLocationsDatasetsFhirStoresGetMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresGetMetadataCall {
  9176. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9177. return c
  9178. }
  9179. // IfNoneMatch sets the optional parameter which makes the operation
  9180. // fail if the object's ETag matches the given value. This is useful for
  9181. // getting updates only after the object has changed since the last
  9182. // request. Use googleapi.IsNotModified to check whether the response
  9183. // error from Do is the result of In-None-Match.
  9184. func (c *ProjectsLocationsDatasetsFhirStoresGetMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresGetMetadataCall {
  9185. c.ifNoneMatch_ = entityTag
  9186. return c
  9187. }
  9188. // Context sets the context to be used in this call's Do method. Any
  9189. // pending HTTP request will be aborted if the provided context is
  9190. // canceled.
  9191. func (c *ProjectsLocationsDatasetsFhirStoresGetMetadataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresGetMetadataCall {
  9192. c.ctx_ = ctx
  9193. return c
  9194. }
  9195. // Header returns an http.Header that can be modified by the caller to
  9196. // add HTTP headers to the request.
  9197. func (c *ProjectsLocationsDatasetsFhirStoresGetMetadataCall) Header() http.Header {
  9198. if c.header_ == nil {
  9199. c.header_ = make(http.Header)
  9200. }
  9201. return c.header_
  9202. }
  9203. func (c *ProjectsLocationsDatasetsFhirStoresGetMetadataCall) doRequest(alt string) (*http.Response, error) {
  9204. reqHeaders := make(http.Header)
  9205. for k, v := range c.header_ {
  9206. reqHeaders[k] = v
  9207. }
  9208. reqHeaders.Set("User-Agent", c.s.userAgent())
  9209. if c.ifNoneMatch_ != "" {
  9210. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9211. }
  9212. var body io.Reader = nil
  9213. c.urlParams_.Set("alt", alt)
  9214. c.urlParams_.Set("prettyPrint", "false")
  9215. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/metadata")
  9216. urls += "?" + c.urlParams_.Encode()
  9217. req, err := http.NewRequest("GET", urls, body)
  9218. if err != nil {
  9219. return nil, err
  9220. }
  9221. req.Header = reqHeaders
  9222. googleapi.Expand(req.URL, map[string]string{
  9223. "name": c.name,
  9224. })
  9225. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9226. }
  9227. // Do executes the "healthcare.projects.locations.datasets.fhirStores.getMetadata" call.
  9228. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  9229. // code is an error. Response headers are in either
  9230. // *HttpBody.ServerResponse.Header or (if a response was returned at
  9231. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  9232. // to check whether the returned error was because
  9233. // http.StatusNotModified was returned.
  9234. func (c *ProjectsLocationsDatasetsFhirStoresGetMetadataCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  9235. gensupport.SetOptions(c.urlParams_, opts...)
  9236. res, err := c.doRequest("json")
  9237. if res != nil && res.StatusCode == http.StatusNotModified {
  9238. if res.Body != nil {
  9239. res.Body.Close()
  9240. }
  9241. return nil, &googleapi.Error{
  9242. Code: res.StatusCode,
  9243. Header: res.Header,
  9244. }
  9245. }
  9246. if err != nil {
  9247. return nil, err
  9248. }
  9249. defer googleapi.CloseBody(res)
  9250. if err := googleapi.CheckResponse(res); err != nil {
  9251. return nil, err
  9252. }
  9253. ret := &HttpBody{
  9254. ServerResponse: googleapi.ServerResponse{
  9255. Header: res.Header,
  9256. HTTPStatusCode: res.StatusCode,
  9257. },
  9258. }
  9259. target := &ret
  9260. if err := gensupport.DecodeResponse(target, res); err != nil {
  9261. return nil, err
  9262. }
  9263. return ret, nil
  9264. // {
  9265. // "description": "Gets the capabilities statement for the store.\n",
  9266. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/metadata",
  9267. // "httpMethod": "GET",
  9268. // "id": "healthcare.projects.locations.datasets.fhirStores.getMetadata",
  9269. // "parameterOrder": [
  9270. // "name"
  9271. // ],
  9272. // "parameters": {
  9273. // "name": {
  9274. // "description": "Name of the FHIR store to retrieve the capabilities for.",
  9275. // "location": "path",
  9276. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  9277. // "required": true,
  9278. // "type": "string"
  9279. // }
  9280. // },
  9281. // "path": "v1alpha/{+name}/metadata",
  9282. // "response": {
  9283. // "$ref": "HttpBody"
  9284. // },
  9285. // "scopes": [
  9286. // "https://www.googleapis.com/auth/cloud-platform"
  9287. // ]
  9288. // }
  9289. }
  9290. // method id "healthcare.projects.locations.datasets.fhirStores.import":
  9291. type ProjectsLocationsDatasetsFhirStoresImportCall struct {
  9292. s *Service
  9293. name string
  9294. importresourcesrequest *ImportResourcesRequest
  9295. urlParams_ gensupport.URLParams
  9296. ctx_ context.Context
  9297. header_ http.Header
  9298. }
  9299. // Import: Import resources to the FHIR store by loading data from the
  9300. // specified
  9301. // sources.
  9302. // Fatal errors will be populated in the
  9303. // error field.
  9304. // Otherwise a detailed response will be returned as of
  9305. // type
  9306. // ImportResourcesResponse contained in the
  9307. // response field when the operation
  9308. // finishes.
  9309. // The metadata field type is
  9310. // OperationMetadata.
  9311. func (r *ProjectsLocationsDatasetsFhirStoresService) Import(name string, importresourcesrequest *ImportResourcesRequest) *ProjectsLocationsDatasetsFhirStoresImportCall {
  9312. c := &ProjectsLocationsDatasetsFhirStoresImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9313. c.name = name
  9314. c.importresourcesrequest = importresourcesrequest
  9315. return c
  9316. }
  9317. // Fields allows partial responses to be retrieved. See
  9318. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9319. // for more information.
  9320. func (c *ProjectsLocationsDatasetsFhirStoresImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresImportCall {
  9321. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9322. return c
  9323. }
  9324. // Context sets the context to be used in this call's Do method. Any
  9325. // pending HTTP request will be aborted if the provided context is
  9326. // canceled.
  9327. func (c *ProjectsLocationsDatasetsFhirStoresImportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresImportCall {
  9328. c.ctx_ = ctx
  9329. return c
  9330. }
  9331. // Header returns an http.Header that can be modified by the caller to
  9332. // add HTTP headers to the request.
  9333. func (c *ProjectsLocationsDatasetsFhirStoresImportCall) Header() http.Header {
  9334. if c.header_ == nil {
  9335. c.header_ = make(http.Header)
  9336. }
  9337. return c.header_
  9338. }
  9339. func (c *ProjectsLocationsDatasetsFhirStoresImportCall) doRequest(alt string) (*http.Response, error) {
  9340. reqHeaders := make(http.Header)
  9341. for k, v := range c.header_ {
  9342. reqHeaders[k] = v
  9343. }
  9344. reqHeaders.Set("User-Agent", c.s.userAgent())
  9345. var body io.Reader = nil
  9346. body, err := googleapi.WithoutDataWrapper.JSONReader(c.importresourcesrequest)
  9347. if err != nil {
  9348. return nil, err
  9349. }
  9350. reqHeaders.Set("Content-Type", "application/json")
  9351. c.urlParams_.Set("alt", alt)
  9352. c.urlParams_.Set("prettyPrint", "false")
  9353. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:import")
  9354. urls += "?" + c.urlParams_.Encode()
  9355. req, err := http.NewRequest("POST", urls, body)
  9356. if err != nil {
  9357. return nil, err
  9358. }
  9359. req.Header = reqHeaders
  9360. googleapi.Expand(req.URL, map[string]string{
  9361. "name": c.name,
  9362. })
  9363. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9364. }
  9365. // Do executes the "healthcare.projects.locations.datasets.fhirStores.import" call.
  9366. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  9367. // status code is an error. Response headers are in either
  9368. // *Operation.ServerResponse.Header or (if a response was returned at
  9369. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  9370. // to check whether the returned error was because
  9371. // http.StatusNotModified was returned.
  9372. func (c *ProjectsLocationsDatasetsFhirStoresImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  9373. gensupport.SetOptions(c.urlParams_, opts...)
  9374. res, err := c.doRequest("json")
  9375. if res != nil && res.StatusCode == http.StatusNotModified {
  9376. if res.Body != nil {
  9377. res.Body.Close()
  9378. }
  9379. return nil, &googleapi.Error{
  9380. Code: res.StatusCode,
  9381. Header: res.Header,
  9382. }
  9383. }
  9384. if err != nil {
  9385. return nil, err
  9386. }
  9387. defer googleapi.CloseBody(res)
  9388. if err := googleapi.CheckResponse(res); err != nil {
  9389. return nil, err
  9390. }
  9391. ret := &Operation{
  9392. ServerResponse: googleapi.ServerResponse{
  9393. Header: res.Header,
  9394. HTTPStatusCode: res.StatusCode,
  9395. },
  9396. }
  9397. target := &ret
  9398. if err := gensupport.DecodeResponse(target, res); err != nil {
  9399. return nil, err
  9400. }
  9401. return ret, nil
  9402. // {
  9403. // "description": "Import resources to the FHIR store by loading data from the specified\nsources.\nFatal errors will be populated in the\nerror field.\nOtherwise a detailed response will be returned as of type\nImportResourcesResponse contained in the\nresponse field when the operation\nfinishes.\nThe metadata field type is\nOperationMetadata.",
  9404. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:import",
  9405. // "httpMethod": "POST",
  9406. // "id": "healthcare.projects.locations.datasets.fhirStores.import",
  9407. // "parameterOrder": [
  9408. // "name"
  9409. // ],
  9410. // "parameters": {
  9411. // "name": {
  9412. // "description": "The FHIR store name to import FHIR resources to. The name should be in the\nformat\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}`.",
  9413. // "location": "path",
  9414. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  9415. // "required": true,
  9416. // "type": "string"
  9417. // }
  9418. // },
  9419. // "path": "v1alpha/{+name}:import",
  9420. // "request": {
  9421. // "$ref": "ImportResourcesRequest"
  9422. // },
  9423. // "response": {
  9424. // "$ref": "Operation"
  9425. // },
  9426. // "scopes": [
  9427. // "https://www.googleapis.com/auth/cloud-platform"
  9428. // ]
  9429. // }
  9430. }
  9431. // method id "healthcare.projects.locations.datasets.fhirStores.list":
  9432. type ProjectsLocationsDatasetsFhirStoresListCall struct {
  9433. s *Service
  9434. parent string
  9435. urlParams_ gensupport.URLParams
  9436. ifNoneMatch_ string
  9437. ctx_ context.Context
  9438. header_ http.Header
  9439. }
  9440. // List: Lists the FHIR stores in the given dataset.
  9441. func (r *ProjectsLocationsDatasetsFhirStoresService) List(parent string) *ProjectsLocationsDatasetsFhirStoresListCall {
  9442. c := &ProjectsLocationsDatasetsFhirStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9443. c.parent = parent
  9444. return c
  9445. }
  9446. // PageSize sets the optional parameter "pageSize": Limit on the number
  9447. // of FHIR stores to return in a single response. If zero
  9448. // the default page size of 100 is used.
  9449. func (c *ProjectsLocationsDatasetsFhirStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsFhirStoresListCall {
  9450. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  9451. return c
  9452. }
  9453. // PageToken sets the optional parameter "pageToken": The
  9454. // next_page_token value returned from the previous List request, if
  9455. // any.
  9456. func (c *ProjectsLocationsDatasetsFhirStoresListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsFhirStoresListCall {
  9457. c.urlParams_.Set("pageToken", pageToken)
  9458. return c
  9459. }
  9460. // Fields allows partial responses to be retrieved. See
  9461. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9462. // for more information.
  9463. func (c *ProjectsLocationsDatasetsFhirStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresListCall {
  9464. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9465. return c
  9466. }
  9467. // IfNoneMatch sets the optional parameter which makes the operation
  9468. // fail if the object's ETag matches the given value. This is useful for
  9469. // getting updates only after the object has changed since the last
  9470. // request. Use googleapi.IsNotModified to check whether the response
  9471. // error from Do is the result of In-None-Match.
  9472. func (c *ProjectsLocationsDatasetsFhirStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresListCall {
  9473. c.ifNoneMatch_ = entityTag
  9474. return c
  9475. }
  9476. // Context sets the context to be used in this call's Do method. Any
  9477. // pending HTTP request will be aborted if the provided context is
  9478. // canceled.
  9479. func (c *ProjectsLocationsDatasetsFhirStoresListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresListCall {
  9480. c.ctx_ = ctx
  9481. return c
  9482. }
  9483. // Header returns an http.Header that can be modified by the caller to
  9484. // add HTTP headers to the request.
  9485. func (c *ProjectsLocationsDatasetsFhirStoresListCall) Header() http.Header {
  9486. if c.header_ == nil {
  9487. c.header_ = make(http.Header)
  9488. }
  9489. return c.header_
  9490. }
  9491. func (c *ProjectsLocationsDatasetsFhirStoresListCall) doRequest(alt string) (*http.Response, error) {
  9492. reqHeaders := make(http.Header)
  9493. for k, v := range c.header_ {
  9494. reqHeaders[k] = v
  9495. }
  9496. reqHeaders.Set("User-Agent", c.s.userAgent())
  9497. if c.ifNoneMatch_ != "" {
  9498. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9499. }
  9500. var body io.Reader = nil
  9501. c.urlParams_.Set("alt", alt)
  9502. c.urlParams_.Set("prettyPrint", "false")
  9503. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/fhirStores")
  9504. urls += "?" + c.urlParams_.Encode()
  9505. req, err := http.NewRequest("GET", urls, body)
  9506. if err != nil {
  9507. return nil, err
  9508. }
  9509. req.Header = reqHeaders
  9510. googleapi.Expand(req.URL, map[string]string{
  9511. "parent": c.parent,
  9512. })
  9513. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9514. }
  9515. // Do executes the "healthcare.projects.locations.datasets.fhirStores.list" call.
  9516. // Exactly one of *ListFhirStoresResponse or error will be non-nil. Any
  9517. // non-2xx status code is an error. Response headers are in either
  9518. // *ListFhirStoresResponse.ServerResponse.Header or (if a response was
  9519. // returned at all) in error.(*googleapi.Error).Header. Use
  9520. // googleapi.IsNotModified to check whether the returned error was
  9521. // because http.StatusNotModified was returned.
  9522. func (c *ProjectsLocationsDatasetsFhirStoresListCall) Do(opts ...googleapi.CallOption) (*ListFhirStoresResponse, error) {
  9523. gensupport.SetOptions(c.urlParams_, opts...)
  9524. res, err := c.doRequest("json")
  9525. if res != nil && res.StatusCode == http.StatusNotModified {
  9526. if res.Body != nil {
  9527. res.Body.Close()
  9528. }
  9529. return nil, &googleapi.Error{
  9530. Code: res.StatusCode,
  9531. Header: res.Header,
  9532. }
  9533. }
  9534. if err != nil {
  9535. return nil, err
  9536. }
  9537. defer googleapi.CloseBody(res)
  9538. if err := googleapi.CheckResponse(res); err != nil {
  9539. return nil, err
  9540. }
  9541. ret := &ListFhirStoresResponse{
  9542. ServerResponse: googleapi.ServerResponse{
  9543. Header: res.Header,
  9544. HTTPStatusCode: res.StatusCode,
  9545. },
  9546. }
  9547. target := &ret
  9548. if err := gensupport.DecodeResponse(target, res); err != nil {
  9549. return nil, err
  9550. }
  9551. return ret, nil
  9552. // {
  9553. // "description": "Lists the FHIR stores in the given dataset.",
  9554. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores",
  9555. // "httpMethod": "GET",
  9556. // "id": "healthcare.projects.locations.datasets.fhirStores.list",
  9557. // "parameterOrder": [
  9558. // "parent"
  9559. // ],
  9560. // "parameters": {
  9561. // "pageSize": {
  9562. // "description": "Limit on the number of FHIR stores to return in a single response. If zero\nthe default page size of 100 is used.",
  9563. // "format": "int32",
  9564. // "location": "query",
  9565. // "type": "integer"
  9566. // },
  9567. // "pageToken": {
  9568. // "description": "The next_page_token value returned from the previous List request, if any.",
  9569. // "location": "query",
  9570. // "type": "string"
  9571. // },
  9572. // "parent": {
  9573. // "description": "Name of the dataset.",
  9574. // "location": "path",
  9575. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  9576. // "required": true,
  9577. // "type": "string"
  9578. // }
  9579. // },
  9580. // "path": "v1alpha/{+parent}/fhirStores",
  9581. // "response": {
  9582. // "$ref": "ListFhirStoresResponse"
  9583. // },
  9584. // "scopes": [
  9585. // "https://www.googleapis.com/auth/cloud-platform"
  9586. // ]
  9587. // }
  9588. }
  9589. // Pages invokes f for each page of results.
  9590. // A non-nil error returned from f will halt the iteration.
  9591. // The provided context supersedes any context provided to the Context method.
  9592. func (c *ProjectsLocationsDatasetsFhirStoresListCall) Pages(ctx context.Context, f func(*ListFhirStoresResponse) error) error {
  9593. c.ctx_ = ctx
  9594. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  9595. for {
  9596. x, err := c.Do()
  9597. if err != nil {
  9598. return err
  9599. }
  9600. if err := f(x); err != nil {
  9601. return err
  9602. }
  9603. if x.NextPageToken == "" {
  9604. return nil
  9605. }
  9606. c.PageToken(x.NextPageToken)
  9607. }
  9608. }
  9609. // method id "healthcare.projects.locations.datasets.fhirStores.patch":
  9610. type ProjectsLocationsDatasetsFhirStoresPatchCall struct {
  9611. s *Service
  9612. name string
  9613. fhirstore *FhirStore
  9614. urlParams_ gensupport.URLParams
  9615. ctx_ context.Context
  9616. header_ http.Header
  9617. }
  9618. // Patch: Updates the FHIR store.
  9619. func (r *ProjectsLocationsDatasetsFhirStoresService) Patch(name string, fhirstore *FhirStore) *ProjectsLocationsDatasetsFhirStoresPatchCall {
  9620. c := &ProjectsLocationsDatasetsFhirStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9621. c.name = name
  9622. c.fhirstore = fhirstore
  9623. return c
  9624. }
  9625. // UpdateMask sets the optional parameter "updateMask": The update mask
  9626. // applies to the resource. For the `FieldMask`
  9627. // definition,
  9628. // see
  9629. // https://developers.google.com/protocol-buffers/docs/re
  9630. // ference/google.protobuf#fieldmask
  9631. func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsFhirStoresPatchCall {
  9632. c.urlParams_.Set("updateMask", updateMask)
  9633. return c
  9634. }
  9635. // Fields allows partial responses to be retrieved. See
  9636. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9637. // for more information.
  9638. func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresPatchCall {
  9639. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9640. return c
  9641. }
  9642. // Context sets the context to be used in this call's Do method. Any
  9643. // pending HTTP request will be aborted if the provided context is
  9644. // canceled.
  9645. func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresPatchCall {
  9646. c.ctx_ = ctx
  9647. return c
  9648. }
  9649. // Header returns an http.Header that can be modified by the caller to
  9650. // add HTTP headers to the request.
  9651. func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) Header() http.Header {
  9652. if c.header_ == nil {
  9653. c.header_ = make(http.Header)
  9654. }
  9655. return c.header_
  9656. }
  9657. func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) doRequest(alt string) (*http.Response, error) {
  9658. reqHeaders := make(http.Header)
  9659. for k, v := range c.header_ {
  9660. reqHeaders[k] = v
  9661. }
  9662. reqHeaders.Set("User-Agent", c.s.userAgent())
  9663. var body io.Reader = nil
  9664. body, err := googleapi.WithoutDataWrapper.JSONReader(c.fhirstore)
  9665. if err != nil {
  9666. return nil, err
  9667. }
  9668. reqHeaders.Set("Content-Type", "application/json")
  9669. c.urlParams_.Set("alt", alt)
  9670. c.urlParams_.Set("prettyPrint", "false")
  9671. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  9672. urls += "?" + c.urlParams_.Encode()
  9673. req, err := http.NewRequest("PATCH", urls, body)
  9674. if err != nil {
  9675. return nil, err
  9676. }
  9677. req.Header = reqHeaders
  9678. googleapi.Expand(req.URL, map[string]string{
  9679. "name": c.name,
  9680. })
  9681. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9682. }
  9683. // Do executes the "healthcare.projects.locations.datasets.fhirStores.patch" call.
  9684. // Exactly one of *FhirStore or error will be non-nil. Any non-2xx
  9685. // status code is an error. Response headers are in either
  9686. // *FhirStore.ServerResponse.Header or (if a response was returned at
  9687. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  9688. // to check whether the returned error was because
  9689. // http.StatusNotModified was returned.
  9690. func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) Do(opts ...googleapi.CallOption) (*FhirStore, error) {
  9691. gensupport.SetOptions(c.urlParams_, opts...)
  9692. res, err := c.doRequest("json")
  9693. if res != nil && res.StatusCode == http.StatusNotModified {
  9694. if res.Body != nil {
  9695. res.Body.Close()
  9696. }
  9697. return nil, &googleapi.Error{
  9698. Code: res.StatusCode,
  9699. Header: res.Header,
  9700. }
  9701. }
  9702. if err != nil {
  9703. return nil, err
  9704. }
  9705. defer googleapi.CloseBody(res)
  9706. if err := googleapi.CheckResponse(res); err != nil {
  9707. return nil, err
  9708. }
  9709. ret := &FhirStore{
  9710. ServerResponse: googleapi.ServerResponse{
  9711. Header: res.Header,
  9712. HTTPStatusCode: res.StatusCode,
  9713. },
  9714. }
  9715. target := &ret
  9716. if err := gensupport.DecodeResponse(target, res); err != nil {
  9717. return nil, err
  9718. }
  9719. return ret, nil
  9720. // {
  9721. // "description": "Updates the FHIR store.",
  9722. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}",
  9723. // "httpMethod": "PATCH",
  9724. // "id": "healthcare.projects.locations.datasets.fhirStores.patch",
  9725. // "parameterOrder": [
  9726. // "name"
  9727. // ],
  9728. // "parameters": {
  9729. // "name": {
  9730. // "description": "Output only. Resource name of the FHIR store, of the form\n`projects/{project_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}`.",
  9731. // "location": "path",
  9732. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  9733. // "required": true,
  9734. // "type": "string"
  9735. // },
  9736. // "updateMask": {
  9737. // "description": "The update mask applies to the resource. For the `FieldMask` definition,\nsee\nhttps://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask",
  9738. // "format": "google-fieldmask",
  9739. // "location": "query",
  9740. // "type": "string"
  9741. // }
  9742. // },
  9743. // "path": "v1alpha/{+name}",
  9744. // "request": {
  9745. // "$ref": "FhirStore"
  9746. // },
  9747. // "response": {
  9748. // "$ref": "FhirStore"
  9749. // },
  9750. // "scopes": [
  9751. // "https://www.googleapis.com/auth/cloud-platform"
  9752. // ]
  9753. // }
  9754. }
  9755. // method id "healthcare.projects.locations.datasets.fhirStores.setIamPolicy":
  9756. type ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall struct {
  9757. s *Service
  9758. resource string
  9759. setiampolicyrequest *SetIamPolicyRequest
  9760. urlParams_ gensupport.URLParams
  9761. ctx_ context.Context
  9762. header_ http.Header
  9763. }
  9764. // SetIamPolicy: Sets the access control policy for a FHIR store or
  9765. // security label within a
  9766. // FHIR store. Replaces any existing policy.
  9767. //
  9768. // Authorization requires the Google IAM
  9769. // permission
  9770. // 'healthcare.fhirStores.setIamPolicy' for a FHIR store
  9771. // or
  9772. // 'healthcare.securityLabels.setIamPolicy' for a security label
  9773. func (r *ProjectsLocationsDatasetsFhirStoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall {
  9774. c := &ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9775. c.resource = resource
  9776. c.setiampolicyrequest = setiampolicyrequest
  9777. return c
  9778. }
  9779. // Fields allows partial responses to be retrieved. See
  9780. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9781. // for more information.
  9782. func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall {
  9783. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9784. return c
  9785. }
  9786. // Context sets the context to be used in this call's Do method. Any
  9787. // pending HTTP request will be aborted if the provided context is
  9788. // canceled.
  9789. func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall {
  9790. c.ctx_ = ctx
  9791. return c
  9792. }
  9793. // Header returns an http.Header that can be modified by the caller to
  9794. // add HTTP headers to the request.
  9795. func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) Header() http.Header {
  9796. if c.header_ == nil {
  9797. c.header_ = make(http.Header)
  9798. }
  9799. return c.header_
  9800. }
  9801. func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  9802. reqHeaders := make(http.Header)
  9803. for k, v := range c.header_ {
  9804. reqHeaders[k] = v
  9805. }
  9806. reqHeaders.Set("User-Agent", c.s.userAgent())
  9807. var body io.Reader = nil
  9808. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  9809. if err != nil {
  9810. return nil, err
  9811. }
  9812. reqHeaders.Set("Content-Type", "application/json")
  9813. c.urlParams_.Set("alt", alt)
  9814. c.urlParams_.Set("prettyPrint", "false")
  9815. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy")
  9816. urls += "?" + c.urlParams_.Encode()
  9817. req, err := http.NewRequest("POST", urls, body)
  9818. if err != nil {
  9819. return nil, err
  9820. }
  9821. req.Header = reqHeaders
  9822. googleapi.Expand(req.URL, map[string]string{
  9823. "resource": c.resource,
  9824. })
  9825. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9826. }
  9827. // Do executes the "healthcare.projects.locations.datasets.fhirStores.setIamPolicy" call.
  9828. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  9829. // code is an error. Response headers are in either
  9830. // *Policy.ServerResponse.Header or (if a response was returned at all)
  9831. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9832. // check whether the returned error was because http.StatusNotModified
  9833. // was returned.
  9834. func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  9835. gensupport.SetOptions(c.urlParams_, opts...)
  9836. res, err := c.doRequest("json")
  9837. if res != nil && res.StatusCode == http.StatusNotModified {
  9838. if res.Body != nil {
  9839. res.Body.Close()
  9840. }
  9841. return nil, &googleapi.Error{
  9842. Code: res.StatusCode,
  9843. Header: res.Header,
  9844. }
  9845. }
  9846. if err != nil {
  9847. return nil, err
  9848. }
  9849. defer googleapi.CloseBody(res)
  9850. if err := googleapi.CheckResponse(res); err != nil {
  9851. return nil, err
  9852. }
  9853. ret := &Policy{
  9854. ServerResponse: googleapi.ServerResponse{
  9855. Header: res.Header,
  9856. HTTPStatusCode: res.StatusCode,
  9857. },
  9858. }
  9859. target := &ret
  9860. if err := gensupport.DecodeResponse(target, res); err != nil {
  9861. return nil, err
  9862. }
  9863. return ret, nil
  9864. // {
  9865. // "description": "Sets the access control policy for a FHIR store or security label within a\nFHIR store. Replaces any existing policy.\n\nAuthorization requires the Google IAM permission\n'healthcare.fhirStores.setIamPolicy' for a FHIR store or\n'healthcare.securityLabels.setIamPolicy' for a security label",
  9866. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:setIamPolicy",
  9867. // "httpMethod": "POST",
  9868. // "id": "healthcare.projects.locations.datasets.fhirStores.setIamPolicy",
  9869. // "parameterOrder": [
  9870. // "resource"
  9871. // ],
  9872. // "parameters": {
  9873. // "resource": {
  9874. // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
  9875. // "location": "path",
  9876. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  9877. // "required": true,
  9878. // "type": "string"
  9879. // }
  9880. // },
  9881. // "path": "v1alpha/{+resource}:setIamPolicy",
  9882. // "request": {
  9883. // "$ref": "SetIamPolicyRequest"
  9884. // },
  9885. // "response": {
  9886. // "$ref": "Policy"
  9887. // },
  9888. // "scopes": [
  9889. // "https://www.googleapis.com/auth/cloud-platform"
  9890. // ]
  9891. // }
  9892. }
  9893. // method id "healthcare.projects.locations.datasets.fhirStores.testIamPermissions":
  9894. type ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall struct {
  9895. s *Service
  9896. resource string
  9897. testiampermissionsrequest *TestIamPermissionsRequest
  9898. urlParams_ gensupport.URLParams
  9899. ctx_ context.Context
  9900. header_ http.Header
  9901. }
  9902. // TestIamPermissions: Returns permissions that a caller has on the
  9903. // specified resource. If the
  9904. // resource does not exist, this will return an empty set of
  9905. // permissions, not
  9906. // a NOT_FOUND error.
  9907. //
  9908. // There is no permission required to make this API call.
  9909. func (r *ProjectsLocationsDatasetsFhirStoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall {
  9910. c := &ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9911. c.resource = resource
  9912. c.testiampermissionsrequest = testiampermissionsrequest
  9913. return c
  9914. }
  9915. // Fields allows partial responses to be retrieved. See
  9916. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9917. // for more information.
  9918. func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall {
  9919. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9920. return c
  9921. }
  9922. // Context sets the context to be used in this call's Do method. Any
  9923. // pending HTTP request will be aborted if the provided context is
  9924. // canceled.
  9925. func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall {
  9926. c.ctx_ = ctx
  9927. return c
  9928. }
  9929. // Header returns an http.Header that can be modified by the caller to
  9930. // add HTTP headers to the request.
  9931. func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) Header() http.Header {
  9932. if c.header_ == nil {
  9933. c.header_ = make(http.Header)
  9934. }
  9935. return c.header_
  9936. }
  9937. func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  9938. reqHeaders := make(http.Header)
  9939. for k, v := range c.header_ {
  9940. reqHeaders[k] = v
  9941. }
  9942. reqHeaders.Set("User-Agent", c.s.userAgent())
  9943. var body io.Reader = nil
  9944. body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  9945. if err != nil {
  9946. return nil, err
  9947. }
  9948. reqHeaders.Set("Content-Type", "application/json")
  9949. c.urlParams_.Set("alt", alt)
  9950. c.urlParams_.Set("prettyPrint", "false")
  9951. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions")
  9952. urls += "?" + c.urlParams_.Encode()
  9953. req, err := http.NewRequest("POST", urls, body)
  9954. if err != nil {
  9955. return nil, err
  9956. }
  9957. req.Header = reqHeaders
  9958. googleapi.Expand(req.URL, map[string]string{
  9959. "resource": c.resource,
  9960. })
  9961. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9962. }
  9963. // Do executes the "healthcare.projects.locations.datasets.fhirStores.testIamPermissions" call.
  9964. // Exactly one of *TestIamPermissionsResponse or error will be non-nil.
  9965. // Any non-2xx status code is an error. Response headers are in either
  9966. // *TestIamPermissionsResponse.ServerResponse.Header or (if a response
  9967. // was returned at all) in error.(*googleapi.Error).Header. Use
  9968. // googleapi.IsNotModified to check whether the returned error was
  9969. // because http.StatusNotModified was returned.
  9970. func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  9971. gensupport.SetOptions(c.urlParams_, opts...)
  9972. res, err := c.doRequest("json")
  9973. if res != nil && res.StatusCode == http.StatusNotModified {
  9974. if res.Body != nil {
  9975. res.Body.Close()
  9976. }
  9977. return nil, &googleapi.Error{
  9978. Code: res.StatusCode,
  9979. Header: res.Header,
  9980. }
  9981. }
  9982. if err != nil {
  9983. return nil, err
  9984. }
  9985. defer googleapi.CloseBody(res)
  9986. if err := googleapi.CheckResponse(res); err != nil {
  9987. return nil, err
  9988. }
  9989. ret := &TestIamPermissionsResponse{
  9990. ServerResponse: googleapi.ServerResponse{
  9991. Header: res.Header,
  9992. HTTPStatusCode: res.StatusCode,
  9993. },
  9994. }
  9995. target := &ret
  9996. if err := gensupport.DecodeResponse(target, res); err != nil {
  9997. return nil, err
  9998. }
  9999. return ret, nil
  10000. // {
  10001. // "description": "Returns permissions that a caller has on the specified resource. If the\nresource does not exist, this will return an empty set of permissions, not\na NOT_FOUND error.\n\nThere is no permission required to make this API call.",
  10002. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:testIamPermissions",
  10003. // "httpMethod": "POST",
  10004. // "id": "healthcare.projects.locations.datasets.fhirStores.testIamPermissions",
  10005. // "parameterOrder": [
  10006. // "resource"
  10007. // ],
  10008. // "parameters": {
  10009. // "resource": {
  10010. // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
  10011. // "location": "path",
  10012. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/.+$",
  10013. // "required": true,
  10014. // "type": "string"
  10015. // }
  10016. // },
  10017. // "path": "v1alpha/{+resource}:testIamPermissions",
  10018. // "request": {
  10019. // "$ref": "TestIamPermissionsRequest"
  10020. // },
  10021. // "response": {
  10022. // "$ref": "TestIamPermissionsResponse"
  10023. // },
  10024. // "scopes": [
  10025. // "https://www.googleapis.com/auth/cloud-platform"
  10026. // ]
  10027. // }
  10028. }
  10029. // method id "healthcare.projects.locations.datasets.fhirStores.resources._search":
  10030. type ProjectsLocationsDatasetsFhirStoresResourcesSearchCall struct {
  10031. s *Service
  10032. parent string
  10033. searchresourcesrequest *SearchResourcesRequest
  10034. urlParams_ gensupport.URLParams
  10035. ctx_ context.Context
  10036. header_ http.Header
  10037. }
  10038. // Search: Searches resources in the given FHIR store.
  10039. func (r *ProjectsLocationsDatasetsFhirStoresResourcesService) Search(parent string, searchresourcesrequest *SearchResourcesRequest) *ProjectsLocationsDatasetsFhirStoresResourcesSearchCall {
  10040. c := &ProjectsLocationsDatasetsFhirStoresResourcesSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10041. c.parent = parent
  10042. c.searchresourcesrequest = searchresourcesrequest
  10043. return c
  10044. }
  10045. // Fields allows partial responses to be retrieved. See
  10046. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10047. // for more information.
  10048. func (c *ProjectsLocationsDatasetsFhirStoresResourcesSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresResourcesSearchCall {
  10049. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10050. return c
  10051. }
  10052. // Context sets the context to be used in this call's Do method. Any
  10053. // pending HTTP request will be aborted if the provided context is
  10054. // canceled.
  10055. func (c *ProjectsLocationsDatasetsFhirStoresResourcesSearchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresResourcesSearchCall {
  10056. c.ctx_ = ctx
  10057. return c
  10058. }
  10059. // Header returns an http.Header that can be modified by the caller to
  10060. // add HTTP headers to the request.
  10061. func (c *ProjectsLocationsDatasetsFhirStoresResourcesSearchCall) Header() http.Header {
  10062. if c.header_ == nil {
  10063. c.header_ = make(http.Header)
  10064. }
  10065. return c.header_
  10066. }
  10067. func (c *ProjectsLocationsDatasetsFhirStoresResourcesSearchCall) doRequest(alt string) (*http.Response, error) {
  10068. reqHeaders := make(http.Header)
  10069. for k, v := range c.header_ {
  10070. reqHeaders[k] = v
  10071. }
  10072. reqHeaders.Set("User-Agent", c.s.userAgent())
  10073. var body io.Reader = nil
  10074. body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchresourcesrequest)
  10075. if err != nil {
  10076. return nil, err
  10077. }
  10078. reqHeaders.Set("Content-Type", "application/json")
  10079. c.urlParams_.Set("alt", alt)
  10080. c.urlParams_.Set("prettyPrint", "false")
  10081. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/resources/_search")
  10082. urls += "?" + c.urlParams_.Encode()
  10083. req, err := http.NewRequest("POST", urls, body)
  10084. if err != nil {
  10085. return nil, err
  10086. }
  10087. req.Header = reqHeaders
  10088. googleapi.Expand(req.URL, map[string]string{
  10089. "parent": c.parent,
  10090. })
  10091. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10092. }
  10093. // Do executes the "healthcare.projects.locations.datasets.fhirStores.resources._search" call.
  10094. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  10095. // code is an error. Response headers are in either
  10096. // *HttpBody.ServerResponse.Header or (if a response was returned at
  10097. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  10098. // to check whether the returned error was because
  10099. // http.StatusNotModified was returned.
  10100. func (c *ProjectsLocationsDatasetsFhirStoresResourcesSearchCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  10101. gensupport.SetOptions(c.urlParams_, opts...)
  10102. res, err := c.doRequest("json")
  10103. if res != nil && res.StatusCode == http.StatusNotModified {
  10104. if res.Body != nil {
  10105. res.Body.Close()
  10106. }
  10107. return nil, &googleapi.Error{
  10108. Code: res.StatusCode,
  10109. Header: res.Header,
  10110. }
  10111. }
  10112. if err != nil {
  10113. return nil, err
  10114. }
  10115. defer googleapi.CloseBody(res)
  10116. if err := googleapi.CheckResponse(res); err != nil {
  10117. return nil, err
  10118. }
  10119. ret := &HttpBody{
  10120. ServerResponse: googleapi.ServerResponse{
  10121. Header: res.Header,
  10122. HTTPStatusCode: res.StatusCode,
  10123. },
  10124. }
  10125. target := &ret
  10126. if err := gensupport.DecodeResponse(target, res); err != nil {
  10127. return nil, err
  10128. }
  10129. return ret, nil
  10130. // {
  10131. // "description": "Searches resources in the given FHIR store.",
  10132. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/resources/_search",
  10133. // "httpMethod": "POST",
  10134. // "id": "healthcare.projects.locations.datasets.fhirStores.resources._search",
  10135. // "parameterOrder": [
  10136. // "parent"
  10137. // ],
  10138. // "parameters": {
  10139. // "parent": {
  10140. // "description": "Name of the FHIR store to retrieve resources from.",
  10141. // "location": "path",
  10142. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  10143. // "required": true,
  10144. // "type": "string"
  10145. // }
  10146. // },
  10147. // "path": "v1alpha/{+parent}/resources/_search",
  10148. // "request": {
  10149. // "$ref": "SearchResourcesRequest"
  10150. // },
  10151. // "response": {
  10152. // "$ref": "HttpBody"
  10153. // },
  10154. // "scopes": [
  10155. // "https://www.googleapis.com/auth/cloud-platform"
  10156. // ]
  10157. // }
  10158. }
  10159. // method id "healthcare.projects.locations.datasets.fhirStores.resources.conditionalDeleteResource":
  10160. type ProjectsLocationsDatasetsFhirStoresResourcesConditionalDeleteResourceCall struct {
  10161. s *Service
  10162. parent string
  10163. type_ string
  10164. urlParams_ gensupport.URLParams
  10165. ctx_ context.Context
  10166. header_ http.Header
  10167. }
  10168. // ConditionalDeleteResource: Deletes FHIR resources matching a search
  10169. // query.
  10170. // Note: unless resource versioning is disabled by setting
  10171. // the
  10172. // disable_resource_versioning flag
  10173. // on the FHIR store, the deleted resources will be moved to a
  10174. // history
  10175. // repository that can still be retrieved through GetResourceVersion
  10176. // and
  10177. // related methods, unless they are removed by the
  10178. // DeleteResourceVersions
  10179. // method.
  10180. func (r *ProjectsLocationsDatasetsFhirStoresResourcesService) ConditionalDeleteResource(parent string, type_ string) *ProjectsLocationsDatasetsFhirStoresResourcesConditionalDeleteResourceCall {
  10181. c := &ProjectsLocationsDatasetsFhirStoresResourcesConditionalDeleteResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10182. c.parent = parent
  10183. c.type_ = type_
  10184. return c
  10185. }
  10186. // Fields allows partial responses to be retrieved. See
  10187. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10188. // for more information.
  10189. func (c *ProjectsLocationsDatasetsFhirStoresResourcesConditionalDeleteResourceCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresResourcesConditionalDeleteResourceCall {
  10190. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10191. return c
  10192. }
  10193. // Context sets the context to be used in this call's Do method. Any
  10194. // pending HTTP request will be aborted if the provided context is
  10195. // canceled.
  10196. func (c *ProjectsLocationsDatasetsFhirStoresResourcesConditionalDeleteResourceCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresResourcesConditionalDeleteResourceCall {
  10197. c.ctx_ = ctx
  10198. return c
  10199. }
  10200. // Header returns an http.Header that can be modified by the caller to
  10201. // add HTTP headers to the request.
  10202. func (c *ProjectsLocationsDatasetsFhirStoresResourcesConditionalDeleteResourceCall) Header() http.Header {
  10203. if c.header_ == nil {
  10204. c.header_ = make(http.Header)
  10205. }
  10206. return c.header_
  10207. }
  10208. func (c *ProjectsLocationsDatasetsFhirStoresResourcesConditionalDeleteResourceCall) doRequest(alt string) (*http.Response, error) {
  10209. reqHeaders := make(http.Header)
  10210. for k, v := range c.header_ {
  10211. reqHeaders[k] = v
  10212. }
  10213. reqHeaders.Set("User-Agent", c.s.userAgent())
  10214. var body io.Reader = nil
  10215. c.urlParams_.Set("alt", alt)
  10216. c.urlParams_.Set("prettyPrint", "false")
  10217. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/resources/{+type}")
  10218. urls += "?" + c.urlParams_.Encode()
  10219. req, err := http.NewRequest("DELETE", urls, body)
  10220. if err != nil {
  10221. return nil, err
  10222. }
  10223. req.Header = reqHeaders
  10224. googleapi.Expand(req.URL, map[string]string{
  10225. "parent": c.parent,
  10226. "type": c.type_,
  10227. })
  10228. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10229. }
  10230. // Do executes the "healthcare.projects.locations.datasets.fhirStores.resources.conditionalDeleteResource" call.
  10231. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  10232. // code is an error. Response headers are in either
  10233. // *Empty.ServerResponse.Header or (if a response was returned at all)
  10234. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  10235. // check whether the returned error was because http.StatusNotModified
  10236. // was returned.
  10237. func (c *ProjectsLocationsDatasetsFhirStoresResourcesConditionalDeleteResourceCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  10238. gensupport.SetOptions(c.urlParams_, opts...)
  10239. res, err := c.doRequest("json")
  10240. if res != nil && res.StatusCode == http.StatusNotModified {
  10241. if res.Body != nil {
  10242. res.Body.Close()
  10243. }
  10244. return nil, &googleapi.Error{
  10245. Code: res.StatusCode,
  10246. Header: res.Header,
  10247. }
  10248. }
  10249. if err != nil {
  10250. return nil, err
  10251. }
  10252. defer googleapi.CloseBody(res)
  10253. if err := googleapi.CheckResponse(res); err != nil {
  10254. return nil, err
  10255. }
  10256. ret := &Empty{
  10257. ServerResponse: googleapi.ServerResponse{
  10258. Header: res.Header,
  10259. HTTPStatusCode: res.StatusCode,
  10260. },
  10261. }
  10262. target := &ret
  10263. if err := gensupport.DecodeResponse(target, res); err != nil {
  10264. return nil, err
  10265. }
  10266. return ret, nil
  10267. // {
  10268. // "description": "Deletes FHIR resources matching a search query.\nNote: unless resource versioning is disabled by setting the\ndisable_resource_versioning flag\non the FHIR store, the deleted resources will be moved to a history\nrepository that can still be retrieved through GetResourceVersion and\nrelated methods, unless they are removed by the DeleteResourceVersions\nmethod.",
  10269. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/resources/{resourcesId}",
  10270. // "httpMethod": "DELETE",
  10271. // "id": "healthcare.projects.locations.datasets.fhirStores.resources.conditionalDeleteResource",
  10272. // "parameterOrder": [
  10273. // "parent",
  10274. // "type"
  10275. // ],
  10276. // "parameters": {
  10277. // "parent": {
  10278. // "description": "The name of the FHIR store this resource belongs to.",
  10279. // "location": "path",
  10280. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  10281. // "required": true,
  10282. // "type": "string"
  10283. // },
  10284. // "type": {
  10285. // "description": "The type of the resource to update.",
  10286. // "location": "path",
  10287. // "pattern": "^[^/]+$",
  10288. // "required": true,
  10289. // "type": "string"
  10290. // }
  10291. // },
  10292. // "path": "v1alpha/{+parent}/resources/{+type}",
  10293. // "response": {
  10294. // "$ref": "Empty"
  10295. // },
  10296. // "scopes": [
  10297. // "https://www.googleapis.com/auth/cloud-platform"
  10298. // ]
  10299. // }
  10300. }
  10301. // method id "healthcare.projects.locations.datasets.fhirStores.resources.conditionalPatchResource":
  10302. type ProjectsLocationsDatasetsFhirStoresResourcesConditionalPatchResourceCall struct {
  10303. s *Service
  10304. parent string
  10305. type_ string
  10306. httpbody *HttpBody
  10307. urlParams_ gensupport.URLParams
  10308. ctx_ context.Context
  10309. header_ http.Header
  10310. }
  10311. // ConditionalPatchResource: Updates parts of a resource if the resource
  10312. // exists based on the
  10313. // search criteria specified via query parameters.
  10314. func (r *ProjectsLocationsDatasetsFhirStoresResourcesService) ConditionalPatchResource(parent string, type_ string, httpbody *HttpBody) *ProjectsLocationsDatasetsFhirStoresResourcesConditionalPatchResourceCall {
  10315. c := &ProjectsLocationsDatasetsFhirStoresResourcesConditionalPatchResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10316. c.parent = parent
  10317. c.type_ = type_
  10318. c.httpbody = httpbody
  10319. return c
  10320. }
  10321. // Fields allows partial responses to be retrieved. See
  10322. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10323. // for more information.
  10324. func (c *ProjectsLocationsDatasetsFhirStoresResourcesConditionalPatchResourceCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresResourcesConditionalPatchResourceCall {
  10325. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10326. return c
  10327. }
  10328. // Context sets the context to be used in this call's Do method. Any
  10329. // pending HTTP request will be aborted if the provided context is
  10330. // canceled.
  10331. func (c *ProjectsLocationsDatasetsFhirStoresResourcesConditionalPatchResourceCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresResourcesConditionalPatchResourceCall {
  10332. c.ctx_ = ctx
  10333. return c
  10334. }
  10335. // Header returns an http.Header that can be modified by the caller to
  10336. // add HTTP headers to the request.
  10337. func (c *ProjectsLocationsDatasetsFhirStoresResourcesConditionalPatchResourceCall) Header() http.Header {
  10338. if c.header_ == nil {
  10339. c.header_ = make(http.Header)
  10340. }
  10341. return c.header_
  10342. }
  10343. func (c *ProjectsLocationsDatasetsFhirStoresResourcesConditionalPatchResourceCall) doRequest(alt string) (*http.Response, error) {
  10344. reqHeaders := make(http.Header)
  10345. for k, v := range c.header_ {
  10346. reqHeaders[k] = v
  10347. }
  10348. reqHeaders.Set("User-Agent", c.s.userAgent())
  10349. var body io.Reader = nil
  10350. body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpbody)
  10351. if err != nil {
  10352. return nil, err
  10353. }
  10354. reqHeaders.Set("Content-Type", "application/json")
  10355. c.urlParams_.Set("alt", alt)
  10356. c.urlParams_.Set("prettyPrint", "false")
  10357. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/resources/{+type}")
  10358. urls += "?" + c.urlParams_.Encode()
  10359. req, err := http.NewRequest("PATCH", urls, body)
  10360. if err != nil {
  10361. return nil, err
  10362. }
  10363. req.Header = reqHeaders
  10364. googleapi.Expand(req.URL, map[string]string{
  10365. "parent": c.parent,
  10366. "type": c.type_,
  10367. })
  10368. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10369. }
  10370. // Do executes the "healthcare.projects.locations.datasets.fhirStores.resources.conditionalPatchResource" call.
  10371. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  10372. // code is an error. Response headers are in either
  10373. // *HttpBody.ServerResponse.Header or (if a response was returned at
  10374. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  10375. // to check whether the returned error was because
  10376. // http.StatusNotModified was returned.
  10377. func (c *ProjectsLocationsDatasetsFhirStoresResourcesConditionalPatchResourceCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  10378. gensupport.SetOptions(c.urlParams_, opts...)
  10379. res, err := c.doRequest("json")
  10380. if res != nil && res.StatusCode == http.StatusNotModified {
  10381. if res.Body != nil {
  10382. res.Body.Close()
  10383. }
  10384. return nil, &googleapi.Error{
  10385. Code: res.StatusCode,
  10386. Header: res.Header,
  10387. }
  10388. }
  10389. if err != nil {
  10390. return nil, err
  10391. }
  10392. defer googleapi.CloseBody(res)
  10393. if err := googleapi.CheckResponse(res); err != nil {
  10394. return nil, err
  10395. }
  10396. ret := &HttpBody{
  10397. ServerResponse: googleapi.ServerResponse{
  10398. Header: res.Header,
  10399. HTTPStatusCode: res.StatusCode,
  10400. },
  10401. }
  10402. target := &ret
  10403. if err := gensupport.DecodeResponse(target, res); err != nil {
  10404. return nil, err
  10405. }
  10406. return ret, nil
  10407. // {
  10408. // "description": "Updates parts of a resource if the resource exists based on the\nsearch criteria specified via query parameters.",
  10409. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/resources/{resourcesId}",
  10410. // "httpMethod": "PATCH",
  10411. // "id": "healthcare.projects.locations.datasets.fhirStores.resources.conditionalPatchResource",
  10412. // "parameterOrder": [
  10413. // "parent",
  10414. // "type"
  10415. // ],
  10416. // "parameters": {
  10417. // "parent": {
  10418. // "description": "The name of the FHIR store this resource belongs to.",
  10419. // "location": "path",
  10420. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  10421. // "required": true,
  10422. // "type": "string"
  10423. // },
  10424. // "type": {
  10425. // "description": "The type of the resource to update.",
  10426. // "location": "path",
  10427. // "pattern": "^[^/]+$",
  10428. // "required": true,
  10429. // "type": "string"
  10430. // }
  10431. // },
  10432. // "path": "v1alpha/{+parent}/resources/{+type}",
  10433. // "request": {
  10434. // "$ref": "HttpBody"
  10435. // },
  10436. // "response": {
  10437. // "$ref": "HttpBody"
  10438. // },
  10439. // "scopes": [
  10440. // "https://www.googleapis.com/auth/cloud-platform"
  10441. // ]
  10442. // }
  10443. }
  10444. // method id "healthcare.projects.locations.datasets.fhirStores.resources.conditionalUpdateResource":
  10445. type ProjectsLocationsDatasetsFhirStoresResourcesConditionalUpdateResourceCall struct {
  10446. s *Service
  10447. parent string
  10448. type_ string
  10449. httpbody *HttpBody
  10450. urlParams_ gensupport.URLParams
  10451. ctx_ context.Context
  10452. header_ http.Header
  10453. }
  10454. // ConditionalUpdateResource: Updates the entire resource if the
  10455. // resource exists based on the
  10456. // search criteria specified via query parameters.
  10457. //
  10458. func (r *ProjectsLocationsDatasetsFhirStoresResourcesService) ConditionalUpdateResource(parent string, type_ string, httpbody *HttpBody) *ProjectsLocationsDatasetsFhirStoresResourcesConditionalUpdateResourceCall {
  10459. c := &ProjectsLocationsDatasetsFhirStoresResourcesConditionalUpdateResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10460. c.parent = parent
  10461. c.type_ = type_
  10462. c.httpbody = httpbody
  10463. return c
  10464. }
  10465. // Fields allows partial responses to be retrieved. See
  10466. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10467. // for more information.
  10468. func (c *ProjectsLocationsDatasetsFhirStoresResourcesConditionalUpdateResourceCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresResourcesConditionalUpdateResourceCall {
  10469. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10470. return c
  10471. }
  10472. // Context sets the context to be used in this call's Do method. Any
  10473. // pending HTTP request will be aborted if the provided context is
  10474. // canceled.
  10475. func (c *ProjectsLocationsDatasetsFhirStoresResourcesConditionalUpdateResourceCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresResourcesConditionalUpdateResourceCall {
  10476. c.ctx_ = ctx
  10477. return c
  10478. }
  10479. // Header returns an http.Header that can be modified by the caller to
  10480. // add HTTP headers to the request.
  10481. func (c *ProjectsLocationsDatasetsFhirStoresResourcesConditionalUpdateResourceCall) Header() http.Header {
  10482. if c.header_ == nil {
  10483. c.header_ = make(http.Header)
  10484. }
  10485. return c.header_
  10486. }
  10487. func (c *ProjectsLocationsDatasetsFhirStoresResourcesConditionalUpdateResourceCall) doRequest(alt string) (*http.Response, error) {
  10488. reqHeaders := make(http.Header)
  10489. for k, v := range c.header_ {
  10490. reqHeaders[k] = v
  10491. }
  10492. reqHeaders.Set("User-Agent", c.s.userAgent())
  10493. var body io.Reader = nil
  10494. body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpbody)
  10495. if err != nil {
  10496. return nil, err
  10497. }
  10498. reqHeaders.Set("Content-Type", "application/json")
  10499. c.urlParams_.Set("alt", alt)
  10500. c.urlParams_.Set("prettyPrint", "false")
  10501. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/resources/{+type}")
  10502. urls += "?" + c.urlParams_.Encode()
  10503. req, err := http.NewRequest("PUT", urls, body)
  10504. if err != nil {
  10505. return nil, err
  10506. }
  10507. req.Header = reqHeaders
  10508. googleapi.Expand(req.URL, map[string]string{
  10509. "parent": c.parent,
  10510. "type": c.type_,
  10511. })
  10512. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10513. }
  10514. // Do executes the "healthcare.projects.locations.datasets.fhirStores.resources.conditionalUpdateResource" call.
  10515. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  10516. // code is an error. Response headers are in either
  10517. // *HttpBody.ServerResponse.Header or (if a response was returned at
  10518. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  10519. // to check whether the returned error was because
  10520. // http.StatusNotModified was returned.
  10521. func (c *ProjectsLocationsDatasetsFhirStoresResourcesConditionalUpdateResourceCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  10522. gensupport.SetOptions(c.urlParams_, opts...)
  10523. res, err := c.doRequest("json")
  10524. if res != nil && res.StatusCode == http.StatusNotModified {
  10525. if res.Body != nil {
  10526. res.Body.Close()
  10527. }
  10528. return nil, &googleapi.Error{
  10529. Code: res.StatusCode,
  10530. Header: res.Header,
  10531. }
  10532. }
  10533. if err != nil {
  10534. return nil, err
  10535. }
  10536. defer googleapi.CloseBody(res)
  10537. if err := googleapi.CheckResponse(res); err != nil {
  10538. return nil, err
  10539. }
  10540. ret := &HttpBody{
  10541. ServerResponse: googleapi.ServerResponse{
  10542. Header: res.Header,
  10543. HTTPStatusCode: res.StatusCode,
  10544. },
  10545. }
  10546. target := &ret
  10547. if err := gensupport.DecodeResponse(target, res); err != nil {
  10548. return nil, err
  10549. }
  10550. return ret, nil
  10551. // {
  10552. // "description": "Updates the entire resource if the resource exists based on the\nsearch criteria specified via query parameters.\n",
  10553. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/resources/{resourcesId}",
  10554. // "httpMethod": "PUT",
  10555. // "id": "healthcare.projects.locations.datasets.fhirStores.resources.conditionalUpdateResource",
  10556. // "parameterOrder": [
  10557. // "parent",
  10558. // "type"
  10559. // ],
  10560. // "parameters": {
  10561. // "parent": {
  10562. // "description": "The name of the FHIR store this resource belongs to.",
  10563. // "location": "path",
  10564. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  10565. // "required": true,
  10566. // "type": "string"
  10567. // },
  10568. // "type": {
  10569. // "description": "The type of the resource to update.",
  10570. // "location": "path",
  10571. // "pattern": "^[^/]+$",
  10572. // "required": true,
  10573. // "type": "string"
  10574. // }
  10575. // },
  10576. // "path": "v1alpha/{+parent}/resources/{+type}",
  10577. // "request": {
  10578. // "$ref": "HttpBody"
  10579. // },
  10580. // "response": {
  10581. // "$ref": "HttpBody"
  10582. // },
  10583. // "scopes": [
  10584. // "https://www.googleapis.com/auth/cloud-platform"
  10585. // ]
  10586. // }
  10587. }
  10588. // method id "healthcare.projects.locations.datasets.fhirStores.resources.createResource":
  10589. type ProjectsLocationsDatasetsFhirStoresResourcesCreateResourceCall struct {
  10590. s *Service
  10591. parent string
  10592. type_ string
  10593. httpbody *HttpBody
  10594. urlParams_ gensupport.URLParams
  10595. ctx_ context.Context
  10596. header_ http.Header
  10597. }
  10598. // CreateResource: Creates a FHIR resource.
  10599. //
  10600. func (r *ProjectsLocationsDatasetsFhirStoresResourcesService) CreateResource(parent string, type_ string, httpbody *HttpBody) *ProjectsLocationsDatasetsFhirStoresResourcesCreateResourceCall {
  10601. c := &ProjectsLocationsDatasetsFhirStoresResourcesCreateResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10602. c.parent = parent
  10603. c.type_ = type_
  10604. c.httpbody = httpbody
  10605. return c
  10606. }
  10607. // Fields allows partial responses to be retrieved. See
  10608. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10609. // for more information.
  10610. func (c *ProjectsLocationsDatasetsFhirStoresResourcesCreateResourceCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresResourcesCreateResourceCall {
  10611. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10612. return c
  10613. }
  10614. // Context sets the context to be used in this call's Do method. Any
  10615. // pending HTTP request will be aborted if the provided context is
  10616. // canceled.
  10617. func (c *ProjectsLocationsDatasetsFhirStoresResourcesCreateResourceCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresResourcesCreateResourceCall {
  10618. c.ctx_ = ctx
  10619. return c
  10620. }
  10621. // Header returns an http.Header that can be modified by the caller to
  10622. // add HTTP headers to the request.
  10623. func (c *ProjectsLocationsDatasetsFhirStoresResourcesCreateResourceCall) Header() http.Header {
  10624. if c.header_ == nil {
  10625. c.header_ = make(http.Header)
  10626. }
  10627. return c.header_
  10628. }
  10629. func (c *ProjectsLocationsDatasetsFhirStoresResourcesCreateResourceCall) doRequest(alt string) (*http.Response, error) {
  10630. reqHeaders := make(http.Header)
  10631. for k, v := range c.header_ {
  10632. reqHeaders[k] = v
  10633. }
  10634. reqHeaders.Set("User-Agent", c.s.userAgent())
  10635. var body io.Reader = nil
  10636. body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpbody)
  10637. if err != nil {
  10638. return nil, err
  10639. }
  10640. reqHeaders.Set("Content-Type", "application/json")
  10641. c.urlParams_.Set("alt", alt)
  10642. c.urlParams_.Set("prettyPrint", "false")
  10643. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/resources/{+type}")
  10644. urls += "?" + c.urlParams_.Encode()
  10645. req, err := http.NewRequest("POST", urls, body)
  10646. if err != nil {
  10647. return nil, err
  10648. }
  10649. req.Header = reqHeaders
  10650. googleapi.Expand(req.URL, map[string]string{
  10651. "parent": c.parent,
  10652. "type": c.type_,
  10653. })
  10654. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10655. }
  10656. // Do executes the "healthcare.projects.locations.datasets.fhirStores.resources.createResource" call.
  10657. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  10658. // code is an error. Response headers are in either
  10659. // *HttpBody.ServerResponse.Header or (if a response was returned at
  10660. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  10661. // to check whether the returned error was because
  10662. // http.StatusNotModified was returned.
  10663. func (c *ProjectsLocationsDatasetsFhirStoresResourcesCreateResourceCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  10664. gensupport.SetOptions(c.urlParams_, opts...)
  10665. res, err := c.doRequest("json")
  10666. if res != nil && res.StatusCode == http.StatusNotModified {
  10667. if res.Body != nil {
  10668. res.Body.Close()
  10669. }
  10670. return nil, &googleapi.Error{
  10671. Code: res.StatusCode,
  10672. Header: res.Header,
  10673. }
  10674. }
  10675. if err != nil {
  10676. return nil, err
  10677. }
  10678. defer googleapi.CloseBody(res)
  10679. if err := googleapi.CheckResponse(res); err != nil {
  10680. return nil, err
  10681. }
  10682. ret := &HttpBody{
  10683. ServerResponse: googleapi.ServerResponse{
  10684. Header: res.Header,
  10685. HTTPStatusCode: res.StatusCode,
  10686. },
  10687. }
  10688. target := &ret
  10689. if err := gensupport.DecodeResponse(target, res); err != nil {
  10690. return nil, err
  10691. }
  10692. return ret, nil
  10693. // {
  10694. // "description": "Creates a FHIR resource.\n",
  10695. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/resources/{resourcesId}",
  10696. // "httpMethod": "POST",
  10697. // "id": "healthcare.projects.locations.datasets.fhirStores.resources.createResource",
  10698. // "parameterOrder": [
  10699. // "parent",
  10700. // "type"
  10701. // ],
  10702. // "parameters": {
  10703. // "parent": {
  10704. // "description": "The name of the FHIR store this resource belongs to.",
  10705. // "location": "path",
  10706. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  10707. // "required": true,
  10708. // "type": "string"
  10709. // },
  10710. // "type": {
  10711. // "description": "The type of the resource to create.",
  10712. // "location": "path",
  10713. // "pattern": "^[^/]+$",
  10714. // "required": true,
  10715. // "type": "string"
  10716. // }
  10717. // },
  10718. // "path": "v1alpha/{+parent}/resources/{+type}",
  10719. // "request": {
  10720. // "$ref": "HttpBody"
  10721. // },
  10722. // "response": {
  10723. // "$ref": "HttpBody"
  10724. // },
  10725. // "scopes": [
  10726. // "https://www.googleapis.com/auth/cloud-platform"
  10727. // ]
  10728. // }
  10729. }
  10730. // method id "healthcare.projects.locations.datasets.fhirStores.resources.delete":
  10731. type ProjectsLocationsDatasetsFhirStoresResourcesDeleteCall struct {
  10732. s *Service
  10733. name string
  10734. urlParams_ gensupport.URLParams
  10735. ctx_ context.Context
  10736. header_ http.Header
  10737. }
  10738. // Delete: Deletes a FHIR resource.
  10739. // Note: unless resource versioning is disabled by setting
  10740. // the
  10741. // disable_resource_versioning flag
  10742. // on the FHIR store, the deleted resources will be moved to a
  10743. // history
  10744. // repository that can still be retrieved through GetResourceVersion
  10745. // and
  10746. // related methods, unless they are removed by the
  10747. // DeleteResourceVersions
  10748. // method.
  10749. func (r *ProjectsLocationsDatasetsFhirStoresResourcesService) Delete(name string) *ProjectsLocationsDatasetsFhirStoresResourcesDeleteCall {
  10750. c := &ProjectsLocationsDatasetsFhirStoresResourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10751. c.name = name
  10752. return c
  10753. }
  10754. // Fields allows partial responses to be retrieved. See
  10755. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10756. // for more information.
  10757. func (c *ProjectsLocationsDatasetsFhirStoresResourcesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresResourcesDeleteCall {
  10758. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10759. return c
  10760. }
  10761. // Context sets the context to be used in this call's Do method. Any
  10762. // pending HTTP request will be aborted if the provided context is
  10763. // canceled.
  10764. func (c *ProjectsLocationsDatasetsFhirStoresResourcesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresResourcesDeleteCall {
  10765. c.ctx_ = ctx
  10766. return c
  10767. }
  10768. // Header returns an http.Header that can be modified by the caller to
  10769. // add HTTP headers to the request.
  10770. func (c *ProjectsLocationsDatasetsFhirStoresResourcesDeleteCall) Header() http.Header {
  10771. if c.header_ == nil {
  10772. c.header_ = make(http.Header)
  10773. }
  10774. return c.header_
  10775. }
  10776. func (c *ProjectsLocationsDatasetsFhirStoresResourcesDeleteCall) doRequest(alt string) (*http.Response, error) {
  10777. reqHeaders := make(http.Header)
  10778. for k, v := range c.header_ {
  10779. reqHeaders[k] = v
  10780. }
  10781. reqHeaders.Set("User-Agent", c.s.userAgent())
  10782. var body io.Reader = nil
  10783. c.urlParams_.Set("alt", alt)
  10784. c.urlParams_.Set("prettyPrint", "false")
  10785. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  10786. urls += "?" + c.urlParams_.Encode()
  10787. req, err := http.NewRequest("DELETE", urls, body)
  10788. if err != nil {
  10789. return nil, err
  10790. }
  10791. req.Header = reqHeaders
  10792. googleapi.Expand(req.URL, map[string]string{
  10793. "name": c.name,
  10794. })
  10795. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10796. }
  10797. // Do executes the "healthcare.projects.locations.datasets.fhirStores.resources.delete" call.
  10798. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  10799. // code is an error. Response headers are in either
  10800. // *HttpBody.ServerResponse.Header or (if a response was returned at
  10801. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  10802. // to check whether the returned error was because
  10803. // http.StatusNotModified was returned.
  10804. func (c *ProjectsLocationsDatasetsFhirStoresResourcesDeleteCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  10805. gensupport.SetOptions(c.urlParams_, opts...)
  10806. res, err := c.doRequest("json")
  10807. if res != nil && res.StatusCode == http.StatusNotModified {
  10808. if res.Body != nil {
  10809. res.Body.Close()
  10810. }
  10811. return nil, &googleapi.Error{
  10812. Code: res.StatusCode,
  10813. Header: res.Header,
  10814. }
  10815. }
  10816. if err != nil {
  10817. return nil, err
  10818. }
  10819. defer googleapi.CloseBody(res)
  10820. if err := googleapi.CheckResponse(res); err != nil {
  10821. return nil, err
  10822. }
  10823. ret := &HttpBody{
  10824. ServerResponse: googleapi.ServerResponse{
  10825. Header: res.Header,
  10826. HTTPStatusCode: res.StatusCode,
  10827. },
  10828. }
  10829. target := &ret
  10830. if err := gensupport.DecodeResponse(target, res); err != nil {
  10831. return nil, err
  10832. }
  10833. return ret, nil
  10834. // {
  10835. // "description": "Deletes a FHIR resource.\nNote: unless resource versioning is disabled by setting the\ndisable_resource_versioning flag\non the FHIR store, the deleted resources will be moved to a history\nrepository that can still be retrieved through GetResourceVersion and\nrelated methods, unless they are removed by the DeleteResourceVersions\nmethod.",
  10836. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/resources/{resourcesId}/{resourcesId1}",
  10837. // "httpMethod": "DELETE",
  10838. // "id": "healthcare.projects.locations.datasets.fhirStores.resources.delete",
  10839. // "parameterOrder": [
  10840. // "name"
  10841. // ],
  10842. // "parameters": {
  10843. // "name": {
  10844. // "description": "The name of the resource to delete.",
  10845. // "location": "path",
  10846. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/resources/[^/]+/[^/]+$",
  10847. // "required": true,
  10848. // "type": "string"
  10849. // }
  10850. // },
  10851. // "path": "v1alpha/{+name}",
  10852. // "response": {
  10853. // "$ref": "HttpBody"
  10854. // },
  10855. // "scopes": [
  10856. // "https://www.googleapis.com/auth/cloud-platform"
  10857. // ]
  10858. // }
  10859. }
  10860. // method id "healthcare.projects.locations.datasets.fhirStores.resources.delete$purge":
  10861. type ProjectsLocationsDatasetsFhirStoresResourcesDeletePurgeCall struct {
  10862. s *Service
  10863. name string
  10864. urlParams_ gensupport.URLParams
  10865. ctx_ context.Context
  10866. header_ http.Header
  10867. }
  10868. // DeletePurge: Deletes all the historical versions of a resource
  10869. // (excluding current
  10870. // version) from the FHIR store. To remove all versions of a resource,
  10871. // first
  10872. // delete the current version and call this API.
  10873. func (r *ProjectsLocationsDatasetsFhirStoresResourcesService) DeletePurge(name string) *ProjectsLocationsDatasetsFhirStoresResourcesDeletePurgeCall {
  10874. c := &ProjectsLocationsDatasetsFhirStoresResourcesDeletePurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10875. c.name = name
  10876. return c
  10877. }
  10878. // Fields allows partial responses to be retrieved. See
  10879. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10880. // for more information.
  10881. func (c *ProjectsLocationsDatasetsFhirStoresResourcesDeletePurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresResourcesDeletePurgeCall {
  10882. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10883. return c
  10884. }
  10885. // Context sets the context to be used in this call's Do method. Any
  10886. // pending HTTP request will be aborted if the provided context is
  10887. // canceled.
  10888. func (c *ProjectsLocationsDatasetsFhirStoresResourcesDeletePurgeCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresResourcesDeletePurgeCall {
  10889. c.ctx_ = ctx
  10890. return c
  10891. }
  10892. // Header returns an http.Header that can be modified by the caller to
  10893. // add HTTP headers to the request.
  10894. func (c *ProjectsLocationsDatasetsFhirStoresResourcesDeletePurgeCall) Header() http.Header {
  10895. if c.header_ == nil {
  10896. c.header_ = make(http.Header)
  10897. }
  10898. return c.header_
  10899. }
  10900. func (c *ProjectsLocationsDatasetsFhirStoresResourcesDeletePurgeCall) doRequest(alt string) (*http.Response, error) {
  10901. reqHeaders := make(http.Header)
  10902. for k, v := range c.header_ {
  10903. reqHeaders[k] = v
  10904. }
  10905. reqHeaders.Set("User-Agent", c.s.userAgent())
  10906. var body io.Reader = nil
  10907. c.urlParams_.Set("alt", alt)
  10908. c.urlParams_.Set("prettyPrint", "false")
  10909. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/$purge")
  10910. urls += "?" + c.urlParams_.Encode()
  10911. req, err := http.NewRequest("DELETE", urls, body)
  10912. if err != nil {
  10913. return nil, err
  10914. }
  10915. req.Header = reqHeaders
  10916. googleapi.Expand(req.URL, map[string]string{
  10917. "name": c.name,
  10918. })
  10919. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10920. }
  10921. // Do executes the "healthcare.projects.locations.datasets.fhirStores.resources.delete$purge" call.
  10922. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  10923. // code is an error. Response headers are in either
  10924. // *Empty.ServerResponse.Header or (if a response was returned at all)
  10925. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  10926. // check whether the returned error was because http.StatusNotModified
  10927. // was returned.
  10928. func (c *ProjectsLocationsDatasetsFhirStoresResourcesDeletePurgeCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  10929. gensupport.SetOptions(c.urlParams_, opts...)
  10930. res, err := c.doRequest("json")
  10931. if res != nil && res.StatusCode == http.StatusNotModified {
  10932. if res.Body != nil {
  10933. res.Body.Close()
  10934. }
  10935. return nil, &googleapi.Error{
  10936. Code: res.StatusCode,
  10937. Header: res.Header,
  10938. }
  10939. }
  10940. if err != nil {
  10941. return nil, err
  10942. }
  10943. defer googleapi.CloseBody(res)
  10944. if err := googleapi.CheckResponse(res); err != nil {
  10945. return nil, err
  10946. }
  10947. ret := &Empty{
  10948. ServerResponse: googleapi.ServerResponse{
  10949. Header: res.Header,
  10950. HTTPStatusCode: res.StatusCode,
  10951. },
  10952. }
  10953. target := &ret
  10954. if err := gensupport.DecodeResponse(target, res); err != nil {
  10955. return nil, err
  10956. }
  10957. return ret, nil
  10958. // {
  10959. // "description": "Deletes all the historical versions of a resource (excluding current\nversion) from the FHIR store. To remove all versions of a resource, first\ndelete the current version and call this API.",
  10960. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/resources/{resourcesId}/{resourcesId1}/$purge",
  10961. // "httpMethod": "DELETE",
  10962. // "id": "healthcare.projects.locations.datasets.fhirStores.resources.delete$purge",
  10963. // "parameterOrder": [
  10964. // "name"
  10965. // ],
  10966. // "parameters": {
  10967. // "name": {
  10968. // "description": "The name of the resource to purge.",
  10969. // "location": "path",
  10970. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/resources/[^/]+/[^/]+$",
  10971. // "required": true,
  10972. // "type": "string"
  10973. // }
  10974. // },
  10975. // "path": "v1alpha/{+name}/$purge",
  10976. // "response": {
  10977. // "$ref": "Empty"
  10978. // },
  10979. // "scopes": [
  10980. // "https://www.googleapis.com/auth/cloud-platform"
  10981. // ]
  10982. // }
  10983. }
  10984. // method id "healthcare.projects.locations.datasets.fhirStores.resources.get":
  10985. type ProjectsLocationsDatasetsFhirStoresResourcesGetCall struct {
  10986. s *Service
  10987. name string
  10988. urlParams_ gensupport.URLParams
  10989. ifNoneMatch_ string
  10990. ctx_ context.Context
  10991. header_ http.Header
  10992. }
  10993. // Get: Gets a FHIR resource.
  10994. //
  10995. func (r *ProjectsLocationsDatasetsFhirStoresResourcesService) Get(name string) *ProjectsLocationsDatasetsFhirStoresResourcesGetCall {
  10996. c := &ProjectsLocationsDatasetsFhirStoresResourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10997. c.name = name
  10998. return c
  10999. }
  11000. // Fields allows partial responses to be retrieved. See
  11001. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11002. // for more information.
  11003. func (c *ProjectsLocationsDatasetsFhirStoresResourcesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresResourcesGetCall {
  11004. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11005. return c
  11006. }
  11007. // IfNoneMatch sets the optional parameter which makes the operation
  11008. // fail if the object's ETag matches the given value. This is useful for
  11009. // getting updates only after the object has changed since the last
  11010. // request. Use googleapi.IsNotModified to check whether the response
  11011. // error from Do is the result of In-None-Match.
  11012. func (c *ProjectsLocationsDatasetsFhirStoresResourcesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresResourcesGetCall {
  11013. c.ifNoneMatch_ = entityTag
  11014. return c
  11015. }
  11016. // Context sets the context to be used in this call's Do method. Any
  11017. // pending HTTP request will be aborted if the provided context is
  11018. // canceled.
  11019. func (c *ProjectsLocationsDatasetsFhirStoresResourcesGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresResourcesGetCall {
  11020. c.ctx_ = ctx
  11021. return c
  11022. }
  11023. // Header returns an http.Header that can be modified by the caller to
  11024. // add HTTP headers to the request.
  11025. func (c *ProjectsLocationsDatasetsFhirStoresResourcesGetCall) Header() http.Header {
  11026. if c.header_ == nil {
  11027. c.header_ = make(http.Header)
  11028. }
  11029. return c.header_
  11030. }
  11031. func (c *ProjectsLocationsDatasetsFhirStoresResourcesGetCall) doRequest(alt string) (*http.Response, error) {
  11032. reqHeaders := make(http.Header)
  11033. for k, v := range c.header_ {
  11034. reqHeaders[k] = v
  11035. }
  11036. reqHeaders.Set("User-Agent", c.s.userAgent())
  11037. if c.ifNoneMatch_ != "" {
  11038. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  11039. }
  11040. var body io.Reader = nil
  11041. c.urlParams_.Set("alt", alt)
  11042. c.urlParams_.Set("prettyPrint", "false")
  11043. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  11044. urls += "?" + c.urlParams_.Encode()
  11045. req, err := http.NewRequest("GET", urls, body)
  11046. if err != nil {
  11047. return nil, err
  11048. }
  11049. req.Header = reqHeaders
  11050. googleapi.Expand(req.URL, map[string]string{
  11051. "name": c.name,
  11052. })
  11053. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11054. }
  11055. // Do executes the "healthcare.projects.locations.datasets.fhirStores.resources.get" call.
  11056. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  11057. // code is an error. Response headers are in either
  11058. // *HttpBody.ServerResponse.Header or (if a response was returned at
  11059. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  11060. // to check whether the returned error was because
  11061. // http.StatusNotModified was returned.
  11062. func (c *ProjectsLocationsDatasetsFhirStoresResourcesGetCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  11063. gensupport.SetOptions(c.urlParams_, opts...)
  11064. res, err := c.doRequest("json")
  11065. if res != nil && res.StatusCode == http.StatusNotModified {
  11066. if res.Body != nil {
  11067. res.Body.Close()
  11068. }
  11069. return nil, &googleapi.Error{
  11070. Code: res.StatusCode,
  11071. Header: res.Header,
  11072. }
  11073. }
  11074. if err != nil {
  11075. return nil, err
  11076. }
  11077. defer googleapi.CloseBody(res)
  11078. if err := googleapi.CheckResponse(res); err != nil {
  11079. return nil, err
  11080. }
  11081. ret := &HttpBody{
  11082. ServerResponse: googleapi.ServerResponse{
  11083. Header: res.Header,
  11084. HTTPStatusCode: res.StatusCode,
  11085. },
  11086. }
  11087. target := &ret
  11088. if err := gensupport.DecodeResponse(target, res); err != nil {
  11089. return nil, err
  11090. }
  11091. return ret, nil
  11092. // {
  11093. // "description": "Gets a FHIR resource.\n",
  11094. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/resources/{resourcesId}/{resourcesId1}",
  11095. // "httpMethod": "GET",
  11096. // "id": "healthcare.projects.locations.datasets.fhirStores.resources.get",
  11097. // "parameterOrder": [
  11098. // "name"
  11099. // ],
  11100. // "parameters": {
  11101. // "name": {
  11102. // "description": "The name of the resource to retrieve.",
  11103. // "location": "path",
  11104. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/resources/[^/]+/[^/]+$",
  11105. // "required": true,
  11106. // "type": "string"
  11107. // }
  11108. // },
  11109. // "path": "v1alpha/{+name}",
  11110. // "response": {
  11111. // "$ref": "HttpBody"
  11112. // },
  11113. // "scopes": [
  11114. // "https://www.googleapis.com/auth/cloud-platform"
  11115. // ]
  11116. // }
  11117. }
  11118. // method id "healthcare.projects.locations.datasets.fhirStores.resources.getMetadata":
  11119. type ProjectsLocationsDatasetsFhirStoresResourcesGetMetadataCall struct {
  11120. s *Service
  11121. name string
  11122. urlParams_ gensupport.URLParams
  11123. ifNoneMatch_ string
  11124. ctx_ context.Context
  11125. header_ http.Header
  11126. }
  11127. // GetMetadata: Gets the capabilities statement for the store.
  11128. //
  11129. func (r *ProjectsLocationsDatasetsFhirStoresResourcesService) GetMetadata(name string) *ProjectsLocationsDatasetsFhirStoresResourcesGetMetadataCall {
  11130. c := &ProjectsLocationsDatasetsFhirStoresResourcesGetMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11131. c.name = name
  11132. return c
  11133. }
  11134. // Fields allows partial responses to be retrieved. See
  11135. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11136. // for more information.
  11137. func (c *ProjectsLocationsDatasetsFhirStoresResourcesGetMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresResourcesGetMetadataCall {
  11138. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11139. return c
  11140. }
  11141. // IfNoneMatch sets the optional parameter which makes the operation
  11142. // fail if the object's ETag matches the given value. This is useful for
  11143. // getting updates only after the object has changed since the last
  11144. // request. Use googleapi.IsNotModified to check whether the response
  11145. // error from Do is the result of In-None-Match.
  11146. func (c *ProjectsLocationsDatasetsFhirStoresResourcesGetMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresResourcesGetMetadataCall {
  11147. c.ifNoneMatch_ = entityTag
  11148. return c
  11149. }
  11150. // Context sets the context to be used in this call's Do method. Any
  11151. // pending HTTP request will be aborted if the provided context is
  11152. // canceled.
  11153. func (c *ProjectsLocationsDatasetsFhirStoresResourcesGetMetadataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresResourcesGetMetadataCall {
  11154. c.ctx_ = ctx
  11155. return c
  11156. }
  11157. // Header returns an http.Header that can be modified by the caller to
  11158. // add HTTP headers to the request.
  11159. func (c *ProjectsLocationsDatasetsFhirStoresResourcesGetMetadataCall) Header() http.Header {
  11160. if c.header_ == nil {
  11161. c.header_ = make(http.Header)
  11162. }
  11163. return c.header_
  11164. }
  11165. func (c *ProjectsLocationsDatasetsFhirStoresResourcesGetMetadataCall) doRequest(alt string) (*http.Response, error) {
  11166. reqHeaders := make(http.Header)
  11167. for k, v := range c.header_ {
  11168. reqHeaders[k] = v
  11169. }
  11170. reqHeaders.Set("User-Agent", c.s.userAgent())
  11171. if c.ifNoneMatch_ != "" {
  11172. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  11173. }
  11174. var body io.Reader = nil
  11175. c.urlParams_.Set("alt", alt)
  11176. c.urlParams_.Set("prettyPrint", "false")
  11177. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/resources/metadata")
  11178. urls += "?" + c.urlParams_.Encode()
  11179. req, err := http.NewRequest("GET", urls, body)
  11180. if err != nil {
  11181. return nil, err
  11182. }
  11183. req.Header = reqHeaders
  11184. googleapi.Expand(req.URL, map[string]string{
  11185. "name": c.name,
  11186. })
  11187. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11188. }
  11189. // Do executes the "healthcare.projects.locations.datasets.fhirStores.resources.getMetadata" call.
  11190. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  11191. // code is an error. Response headers are in either
  11192. // *HttpBody.ServerResponse.Header or (if a response was returned at
  11193. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  11194. // to check whether the returned error was because
  11195. // http.StatusNotModified was returned.
  11196. func (c *ProjectsLocationsDatasetsFhirStoresResourcesGetMetadataCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  11197. gensupport.SetOptions(c.urlParams_, opts...)
  11198. res, err := c.doRequest("json")
  11199. if res != nil && res.StatusCode == http.StatusNotModified {
  11200. if res.Body != nil {
  11201. res.Body.Close()
  11202. }
  11203. return nil, &googleapi.Error{
  11204. Code: res.StatusCode,
  11205. Header: res.Header,
  11206. }
  11207. }
  11208. if err != nil {
  11209. return nil, err
  11210. }
  11211. defer googleapi.CloseBody(res)
  11212. if err := googleapi.CheckResponse(res); err != nil {
  11213. return nil, err
  11214. }
  11215. ret := &HttpBody{
  11216. ServerResponse: googleapi.ServerResponse{
  11217. Header: res.Header,
  11218. HTTPStatusCode: res.StatusCode,
  11219. },
  11220. }
  11221. target := &ret
  11222. if err := gensupport.DecodeResponse(target, res); err != nil {
  11223. return nil, err
  11224. }
  11225. return ret, nil
  11226. // {
  11227. // "description": "Gets the capabilities statement for the store.\n",
  11228. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/resources/metadata",
  11229. // "httpMethod": "GET",
  11230. // "id": "healthcare.projects.locations.datasets.fhirStores.resources.getMetadata",
  11231. // "parameterOrder": [
  11232. // "name"
  11233. // ],
  11234. // "parameters": {
  11235. // "name": {
  11236. // "description": "Name of the FHIR store to retrieve the capabilities for.",
  11237. // "location": "path",
  11238. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  11239. // "required": true,
  11240. // "type": "string"
  11241. // }
  11242. // },
  11243. // "path": "v1alpha/{+name}/resources/metadata",
  11244. // "response": {
  11245. // "$ref": "HttpBody"
  11246. // },
  11247. // "scopes": [
  11248. // "https://www.googleapis.com/auth/cloud-platform"
  11249. // ]
  11250. // }
  11251. }
  11252. // method id "healthcare.projects.locations.datasets.fhirStores.resources.patch":
  11253. type ProjectsLocationsDatasetsFhirStoresResourcesPatchCall struct {
  11254. s *Service
  11255. name string
  11256. httpbody *HttpBody
  11257. urlParams_ gensupport.URLParams
  11258. ctx_ context.Context
  11259. header_ http.Header
  11260. }
  11261. // Patch: Updates part of an existing resource.
  11262. //
  11263. func (r *ProjectsLocationsDatasetsFhirStoresResourcesService) Patch(name string, httpbody *HttpBody) *ProjectsLocationsDatasetsFhirStoresResourcesPatchCall {
  11264. c := &ProjectsLocationsDatasetsFhirStoresResourcesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11265. c.name = name
  11266. c.httpbody = httpbody
  11267. return c
  11268. }
  11269. // Fields allows partial responses to be retrieved. See
  11270. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11271. // for more information.
  11272. func (c *ProjectsLocationsDatasetsFhirStoresResourcesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresResourcesPatchCall {
  11273. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11274. return c
  11275. }
  11276. // Context sets the context to be used in this call's Do method. Any
  11277. // pending HTTP request will be aborted if the provided context is
  11278. // canceled.
  11279. func (c *ProjectsLocationsDatasetsFhirStoresResourcesPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresResourcesPatchCall {
  11280. c.ctx_ = ctx
  11281. return c
  11282. }
  11283. // Header returns an http.Header that can be modified by the caller to
  11284. // add HTTP headers to the request.
  11285. func (c *ProjectsLocationsDatasetsFhirStoresResourcesPatchCall) Header() http.Header {
  11286. if c.header_ == nil {
  11287. c.header_ = make(http.Header)
  11288. }
  11289. return c.header_
  11290. }
  11291. func (c *ProjectsLocationsDatasetsFhirStoresResourcesPatchCall) doRequest(alt string) (*http.Response, error) {
  11292. reqHeaders := make(http.Header)
  11293. for k, v := range c.header_ {
  11294. reqHeaders[k] = v
  11295. }
  11296. reqHeaders.Set("User-Agent", c.s.userAgent())
  11297. var body io.Reader = nil
  11298. body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpbody)
  11299. if err != nil {
  11300. return nil, err
  11301. }
  11302. reqHeaders.Set("Content-Type", "application/json")
  11303. c.urlParams_.Set("alt", alt)
  11304. c.urlParams_.Set("prettyPrint", "false")
  11305. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  11306. urls += "?" + c.urlParams_.Encode()
  11307. req, err := http.NewRequest("PATCH", urls, body)
  11308. if err != nil {
  11309. return nil, err
  11310. }
  11311. req.Header = reqHeaders
  11312. googleapi.Expand(req.URL, map[string]string{
  11313. "name": c.name,
  11314. })
  11315. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11316. }
  11317. // Do executes the "healthcare.projects.locations.datasets.fhirStores.resources.patch" call.
  11318. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  11319. // code is an error. Response headers are in either
  11320. // *HttpBody.ServerResponse.Header or (if a response was returned at
  11321. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  11322. // to check whether the returned error was because
  11323. // http.StatusNotModified was returned.
  11324. func (c *ProjectsLocationsDatasetsFhirStoresResourcesPatchCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  11325. gensupport.SetOptions(c.urlParams_, opts...)
  11326. res, err := c.doRequest("json")
  11327. if res != nil && res.StatusCode == http.StatusNotModified {
  11328. if res.Body != nil {
  11329. res.Body.Close()
  11330. }
  11331. return nil, &googleapi.Error{
  11332. Code: res.StatusCode,
  11333. Header: res.Header,
  11334. }
  11335. }
  11336. if err != nil {
  11337. return nil, err
  11338. }
  11339. defer googleapi.CloseBody(res)
  11340. if err := googleapi.CheckResponse(res); err != nil {
  11341. return nil, err
  11342. }
  11343. ret := &HttpBody{
  11344. ServerResponse: googleapi.ServerResponse{
  11345. Header: res.Header,
  11346. HTTPStatusCode: res.StatusCode,
  11347. },
  11348. }
  11349. target := &ret
  11350. if err := gensupport.DecodeResponse(target, res); err != nil {
  11351. return nil, err
  11352. }
  11353. return ret, nil
  11354. // {
  11355. // "description": "Updates part of an existing resource.\n",
  11356. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/resources/{resourcesId}/{resourcesId1}",
  11357. // "httpMethod": "PATCH",
  11358. // "id": "healthcare.projects.locations.datasets.fhirStores.resources.patch",
  11359. // "parameterOrder": [
  11360. // "name"
  11361. // ],
  11362. // "parameters": {
  11363. // "name": {
  11364. // "description": "The name of the resource to update.",
  11365. // "location": "path",
  11366. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/resources/[^/]+/[^/]+$",
  11367. // "required": true,
  11368. // "type": "string"
  11369. // }
  11370. // },
  11371. // "path": "v1alpha/{+name}",
  11372. // "request": {
  11373. // "$ref": "HttpBody"
  11374. // },
  11375. // "response": {
  11376. // "$ref": "HttpBody"
  11377. // },
  11378. // "scopes": [
  11379. // "https://www.googleapis.com/auth/cloud-platform"
  11380. // ]
  11381. // }
  11382. }
  11383. // method id "healthcare.projects.locations.datasets.fhirStores.resources.searchResources":
  11384. type ProjectsLocationsDatasetsFhirStoresResourcesSearchResourcesCall struct {
  11385. s *Service
  11386. parent string
  11387. resourceType string
  11388. urlParams_ gensupport.URLParams
  11389. ifNoneMatch_ string
  11390. ctx_ context.Context
  11391. header_ http.Header
  11392. }
  11393. // SearchResources: Searches resources in the given FHIR store.
  11394. func (r *ProjectsLocationsDatasetsFhirStoresResourcesService) SearchResources(parent string, resourceType string) *ProjectsLocationsDatasetsFhirStoresResourcesSearchResourcesCall {
  11395. c := &ProjectsLocationsDatasetsFhirStoresResourcesSearchResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11396. c.parent = parent
  11397. c.resourceType = resourceType
  11398. return c
  11399. }
  11400. // Fields allows partial responses to be retrieved. See
  11401. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11402. // for more information.
  11403. func (c *ProjectsLocationsDatasetsFhirStoresResourcesSearchResourcesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresResourcesSearchResourcesCall {
  11404. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11405. return c
  11406. }
  11407. // IfNoneMatch sets the optional parameter which makes the operation
  11408. // fail if the object's ETag matches the given value. This is useful for
  11409. // getting updates only after the object has changed since the last
  11410. // request. Use googleapi.IsNotModified to check whether the response
  11411. // error from Do is the result of In-None-Match.
  11412. func (c *ProjectsLocationsDatasetsFhirStoresResourcesSearchResourcesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresResourcesSearchResourcesCall {
  11413. c.ifNoneMatch_ = entityTag
  11414. return c
  11415. }
  11416. // Context sets the context to be used in this call's Do method. Any
  11417. // pending HTTP request will be aborted if the provided context is
  11418. // canceled.
  11419. func (c *ProjectsLocationsDatasetsFhirStoresResourcesSearchResourcesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresResourcesSearchResourcesCall {
  11420. c.ctx_ = ctx
  11421. return c
  11422. }
  11423. // Header returns an http.Header that can be modified by the caller to
  11424. // add HTTP headers to the request.
  11425. func (c *ProjectsLocationsDatasetsFhirStoresResourcesSearchResourcesCall) Header() http.Header {
  11426. if c.header_ == nil {
  11427. c.header_ = make(http.Header)
  11428. }
  11429. return c.header_
  11430. }
  11431. func (c *ProjectsLocationsDatasetsFhirStoresResourcesSearchResourcesCall) doRequest(alt string) (*http.Response, error) {
  11432. reqHeaders := make(http.Header)
  11433. for k, v := range c.header_ {
  11434. reqHeaders[k] = v
  11435. }
  11436. reqHeaders.Set("User-Agent", c.s.userAgent())
  11437. if c.ifNoneMatch_ != "" {
  11438. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  11439. }
  11440. var body io.Reader = nil
  11441. c.urlParams_.Set("alt", alt)
  11442. c.urlParams_.Set("prettyPrint", "false")
  11443. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/resources/{+resourceType}")
  11444. urls += "?" + c.urlParams_.Encode()
  11445. req, err := http.NewRequest("GET", urls, body)
  11446. if err != nil {
  11447. return nil, err
  11448. }
  11449. req.Header = reqHeaders
  11450. googleapi.Expand(req.URL, map[string]string{
  11451. "parent": c.parent,
  11452. "resourceType": c.resourceType,
  11453. })
  11454. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11455. }
  11456. // Do executes the "healthcare.projects.locations.datasets.fhirStores.resources.searchResources" call.
  11457. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  11458. // code is an error. Response headers are in either
  11459. // *HttpBody.ServerResponse.Header or (if a response was returned at
  11460. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  11461. // to check whether the returned error was because
  11462. // http.StatusNotModified was returned.
  11463. func (c *ProjectsLocationsDatasetsFhirStoresResourcesSearchResourcesCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  11464. gensupport.SetOptions(c.urlParams_, opts...)
  11465. res, err := c.doRequest("json")
  11466. if res != nil && res.StatusCode == http.StatusNotModified {
  11467. if res.Body != nil {
  11468. res.Body.Close()
  11469. }
  11470. return nil, &googleapi.Error{
  11471. Code: res.StatusCode,
  11472. Header: res.Header,
  11473. }
  11474. }
  11475. if err != nil {
  11476. return nil, err
  11477. }
  11478. defer googleapi.CloseBody(res)
  11479. if err := googleapi.CheckResponse(res); err != nil {
  11480. return nil, err
  11481. }
  11482. ret := &HttpBody{
  11483. ServerResponse: googleapi.ServerResponse{
  11484. Header: res.Header,
  11485. HTTPStatusCode: res.StatusCode,
  11486. },
  11487. }
  11488. target := &ret
  11489. if err := gensupport.DecodeResponse(target, res); err != nil {
  11490. return nil, err
  11491. }
  11492. return ret, nil
  11493. // {
  11494. // "description": "Searches resources in the given FHIR store.",
  11495. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/resources/{resourcesId}",
  11496. // "httpMethod": "GET",
  11497. // "id": "healthcare.projects.locations.datasets.fhirStores.resources.searchResources",
  11498. // "parameterOrder": [
  11499. // "parent",
  11500. // "resourceType"
  11501. // ],
  11502. // "parameters": {
  11503. // "parent": {
  11504. // "description": "Name of the FHIR store to retrieve resources from.",
  11505. // "location": "path",
  11506. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  11507. // "required": true,
  11508. // "type": "string"
  11509. // },
  11510. // "resourceType": {
  11511. // "description": "The type of the resource to search.",
  11512. // "location": "path",
  11513. // "pattern": "^.+$",
  11514. // "required": true,
  11515. // "type": "string"
  11516. // }
  11517. // },
  11518. // "path": "v1alpha/{+parent}/resources/{+resourceType}",
  11519. // "response": {
  11520. // "$ref": "HttpBody"
  11521. // },
  11522. // "scopes": [
  11523. // "https://www.googleapis.com/auth/cloud-platform"
  11524. // ]
  11525. // }
  11526. }
  11527. // method id "healthcare.projects.locations.datasets.fhirStores.resources.update":
  11528. type ProjectsLocationsDatasetsFhirStoresResourcesUpdateCall struct {
  11529. s *Service
  11530. name string
  11531. httpbody *HttpBody
  11532. urlParams_ gensupport.URLParams
  11533. ctx_ context.Context
  11534. header_ http.Header
  11535. }
  11536. // Update: Updates the entire resource or creates a new resource with a
  11537. // client
  11538. // specified ID if the resource does not exist and the FHIR store
  11539. // has
  11540. // enable_update_create set.
  11541. //
  11542. func (r *ProjectsLocationsDatasetsFhirStoresResourcesService) Update(name string, httpbody *HttpBody) *ProjectsLocationsDatasetsFhirStoresResourcesUpdateCall {
  11543. c := &ProjectsLocationsDatasetsFhirStoresResourcesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11544. c.name = name
  11545. c.httpbody = httpbody
  11546. return c
  11547. }
  11548. // Fields allows partial responses to be retrieved. See
  11549. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11550. // for more information.
  11551. func (c *ProjectsLocationsDatasetsFhirStoresResourcesUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresResourcesUpdateCall {
  11552. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11553. return c
  11554. }
  11555. // Context sets the context to be used in this call's Do method. Any
  11556. // pending HTTP request will be aborted if the provided context is
  11557. // canceled.
  11558. func (c *ProjectsLocationsDatasetsFhirStoresResourcesUpdateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresResourcesUpdateCall {
  11559. c.ctx_ = ctx
  11560. return c
  11561. }
  11562. // Header returns an http.Header that can be modified by the caller to
  11563. // add HTTP headers to the request.
  11564. func (c *ProjectsLocationsDatasetsFhirStoresResourcesUpdateCall) Header() http.Header {
  11565. if c.header_ == nil {
  11566. c.header_ = make(http.Header)
  11567. }
  11568. return c.header_
  11569. }
  11570. func (c *ProjectsLocationsDatasetsFhirStoresResourcesUpdateCall) doRequest(alt string) (*http.Response, error) {
  11571. reqHeaders := make(http.Header)
  11572. for k, v := range c.header_ {
  11573. reqHeaders[k] = v
  11574. }
  11575. reqHeaders.Set("User-Agent", c.s.userAgent())
  11576. var body io.Reader = nil
  11577. body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpbody)
  11578. if err != nil {
  11579. return nil, err
  11580. }
  11581. reqHeaders.Set("Content-Type", "application/json")
  11582. c.urlParams_.Set("alt", alt)
  11583. c.urlParams_.Set("prettyPrint", "false")
  11584. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  11585. urls += "?" + c.urlParams_.Encode()
  11586. req, err := http.NewRequest("PUT", urls, body)
  11587. if err != nil {
  11588. return nil, err
  11589. }
  11590. req.Header = reqHeaders
  11591. googleapi.Expand(req.URL, map[string]string{
  11592. "name": c.name,
  11593. })
  11594. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11595. }
  11596. // Do executes the "healthcare.projects.locations.datasets.fhirStores.resources.update" call.
  11597. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  11598. // code is an error. Response headers are in either
  11599. // *HttpBody.ServerResponse.Header or (if a response was returned at
  11600. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  11601. // to check whether the returned error was because
  11602. // http.StatusNotModified was returned.
  11603. func (c *ProjectsLocationsDatasetsFhirStoresResourcesUpdateCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  11604. gensupport.SetOptions(c.urlParams_, opts...)
  11605. res, err := c.doRequest("json")
  11606. if res != nil && res.StatusCode == http.StatusNotModified {
  11607. if res.Body != nil {
  11608. res.Body.Close()
  11609. }
  11610. return nil, &googleapi.Error{
  11611. Code: res.StatusCode,
  11612. Header: res.Header,
  11613. }
  11614. }
  11615. if err != nil {
  11616. return nil, err
  11617. }
  11618. defer googleapi.CloseBody(res)
  11619. if err := googleapi.CheckResponse(res); err != nil {
  11620. return nil, err
  11621. }
  11622. ret := &HttpBody{
  11623. ServerResponse: googleapi.ServerResponse{
  11624. Header: res.Header,
  11625. HTTPStatusCode: res.StatusCode,
  11626. },
  11627. }
  11628. target := &ret
  11629. if err := gensupport.DecodeResponse(target, res); err != nil {
  11630. return nil, err
  11631. }
  11632. return ret, nil
  11633. // {
  11634. // "description": "Updates the entire resource or creates a new resource with a client\nspecified ID if the resource does not exist and the FHIR store has\nenable_update_create set.\n",
  11635. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/resources/{resourcesId}/{resourcesId1}",
  11636. // "httpMethod": "PUT",
  11637. // "id": "healthcare.projects.locations.datasets.fhirStores.resources.update",
  11638. // "parameterOrder": [
  11639. // "name"
  11640. // ],
  11641. // "parameters": {
  11642. // "name": {
  11643. // "description": "The name of the resource to update.",
  11644. // "location": "path",
  11645. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/resources/[^/]+/[^/]+$",
  11646. // "required": true,
  11647. // "type": "string"
  11648. // }
  11649. // },
  11650. // "path": "v1alpha/{+name}",
  11651. // "request": {
  11652. // "$ref": "HttpBody"
  11653. // },
  11654. // "response": {
  11655. // "$ref": "HttpBody"
  11656. // },
  11657. // "scopes": [
  11658. // "https://www.googleapis.com/auth/cloud-platform"
  11659. // ]
  11660. // }
  11661. }
  11662. // method id "healthcare.projects.locations.datasets.fhirStores.resources.Patient.get$everything":
  11663. type ProjectsLocationsDatasetsFhirStoresResourcesPatientGetEverythingCall struct {
  11664. s *Service
  11665. name string
  11666. urlParams_ gensupport.URLParams
  11667. ifNoneMatch_ string
  11668. ctx_ context.Context
  11669. header_ http.Header
  11670. }
  11671. // GetEverything: Gets all the resources in the patient compartment.
  11672. //
  11673. func (r *ProjectsLocationsDatasetsFhirStoresResourcesPatientService) GetEverything(name string) *ProjectsLocationsDatasetsFhirStoresResourcesPatientGetEverythingCall {
  11674. c := &ProjectsLocationsDatasetsFhirStoresResourcesPatientGetEverythingCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11675. c.name = name
  11676. return c
  11677. }
  11678. // End sets the optional parameter "end": The response includes records
  11679. // prior to the end date. If no end date is
  11680. // provided, all records subsequent to the start date are in scope.
  11681. func (c *ProjectsLocationsDatasetsFhirStoresResourcesPatientGetEverythingCall) End(end string) *ProjectsLocationsDatasetsFhirStoresResourcesPatientGetEverythingCall {
  11682. c.urlParams_.Set("end", end)
  11683. return c
  11684. }
  11685. // Start sets the optional parameter "start": The response includes
  11686. // records subsequent to the start date. If no start
  11687. // date is provided, all records prior to the end date are in scope.
  11688. func (c *ProjectsLocationsDatasetsFhirStoresResourcesPatientGetEverythingCall) Start(start string) *ProjectsLocationsDatasetsFhirStoresResourcesPatientGetEverythingCall {
  11689. c.urlParams_.Set("start", start)
  11690. return c
  11691. }
  11692. // Fields allows partial responses to be retrieved. See
  11693. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11694. // for more information.
  11695. func (c *ProjectsLocationsDatasetsFhirStoresResourcesPatientGetEverythingCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresResourcesPatientGetEverythingCall {
  11696. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11697. return c
  11698. }
  11699. // IfNoneMatch sets the optional parameter which makes the operation
  11700. // fail if the object's ETag matches the given value. This is useful for
  11701. // getting updates only after the object has changed since the last
  11702. // request. Use googleapi.IsNotModified to check whether the response
  11703. // error from Do is the result of In-None-Match.
  11704. func (c *ProjectsLocationsDatasetsFhirStoresResourcesPatientGetEverythingCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresResourcesPatientGetEverythingCall {
  11705. c.ifNoneMatch_ = entityTag
  11706. return c
  11707. }
  11708. // Context sets the context to be used in this call's Do method. Any
  11709. // pending HTTP request will be aborted if the provided context is
  11710. // canceled.
  11711. func (c *ProjectsLocationsDatasetsFhirStoresResourcesPatientGetEverythingCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresResourcesPatientGetEverythingCall {
  11712. c.ctx_ = ctx
  11713. return c
  11714. }
  11715. // Header returns an http.Header that can be modified by the caller to
  11716. // add HTTP headers to the request.
  11717. func (c *ProjectsLocationsDatasetsFhirStoresResourcesPatientGetEverythingCall) Header() http.Header {
  11718. if c.header_ == nil {
  11719. c.header_ = make(http.Header)
  11720. }
  11721. return c.header_
  11722. }
  11723. func (c *ProjectsLocationsDatasetsFhirStoresResourcesPatientGetEverythingCall) doRequest(alt string) (*http.Response, error) {
  11724. reqHeaders := make(http.Header)
  11725. for k, v := range c.header_ {
  11726. reqHeaders[k] = v
  11727. }
  11728. reqHeaders.Set("User-Agent", c.s.userAgent())
  11729. if c.ifNoneMatch_ != "" {
  11730. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  11731. }
  11732. var body io.Reader = nil
  11733. c.urlParams_.Set("alt", alt)
  11734. c.urlParams_.Set("prettyPrint", "false")
  11735. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/$everything")
  11736. urls += "?" + c.urlParams_.Encode()
  11737. req, err := http.NewRequest("GET", urls, body)
  11738. if err != nil {
  11739. return nil, err
  11740. }
  11741. req.Header = reqHeaders
  11742. googleapi.Expand(req.URL, map[string]string{
  11743. "name": c.name,
  11744. })
  11745. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11746. }
  11747. // Do executes the "healthcare.projects.locations.datasets.fhirStores.resources.Patient.get$everything" call.
  11748. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  11749. // code is an error. Response headers are in either
  11750. // *HttpBody.ServerResponse.Header or (if a response was returned at
  11751. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  11752. // to check whether the returned error was because
  11753. // http.StatusNotModified was returned.
  11754. func (c *ProjectsLocationsDatasetsFhirStoresResourcesPatientGetEverythingCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  11755. gensupport.SetOptions(c.urlParams_, opts...)
  11756. res, err := c.doRequest("json")
  11757. if res != nil && res.StatusCode == http.StatusNotModified {
  11758. if res.Body != nil {
  11759. res.Body.Close()
  11760. }
  11761. return nil, &googleapi.Error{
  11762. Code: res.StatusCode,
  11763. Header: res.Header,
  11764. }
  11765. }
  11766. if err != nil {
  11767. return nil, err
  11768. }
  11769. defer googleapi.CloseBody(res)
  11770. if err := googleapi.CheckResponse(res); err != nil {
  11771. return nil, err
  11772. }
  11773. ret := &HttpBody{
  11774. ServerResponse: googleapi.ServerResponse{
  11775. Header: res.Header,
  11776. HTTPStatusCode: res.StatusCode,
  11777. },
  11778. }
  11779. target := &ret
  11780. if err := gensupport.DecodeResponse(target, res); err != nil {
  11781. return nil, err
  11782. }
  11783. return ret, nil
  11784. // {
  11785. // "description": "Gets all the resources in the patient compartment.\n",
  11786. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/resources/Patient/{PatientId}/$everything",
  11787. // "httpMethod": "GET",
  11788. // "id": "healthcare.projects.locations.datasets.fhirStores.resources.Patient.get$everything",
  11789. // "parameterOrder": [
  11790. // "name"
  11791. // ],
  11792. // "parameters": {
  11793. // "end": {
  11794. // "description": "The response includes records prior to the end date. If no end date is\nprovided, all records subsequent to the start date are in scope.",
  11795. // "location": "query",
  11796. // "type": "string"
  11797. // },
  11798. // "name": {
  11799. // "description": "Name of the patient for which the information is required.",
  11800. // "location": "path",
  11801. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/resources/Patient/[^/]+$",
  11802. // "required": true,
  11803. // "type": "string"
  11804. // },
  11805. // "start": {
  11806. // "description": "The response includes records subsequent to the start date. If no start\ndate is provided, all records prior to the end date are in scope.",
  11807. // "location": "query",
  11808. // "type": "string"
  11809. // }
  11810. // },
  11811. // "path": "v1alpha/{+name}/$everything",
  11812. // "response": {
  11813. // "$ref": "HttpBody"
  11814. // },
  11815. // "scopes": [
  11816. // "https://www.googleapis.com/auth/cloud-platform"
  11817. // ]
  11818. // }
  11819. }
  11820. // method id "healthcare.projects.locations.datasets.fhirStores.resources._history.get":
  11821. type ProjectsLocationsDatasetsFhirStoresResourcesHistoryGetCall struct {
  11822. s *Service
  11823. name string
  11824. urlParams_ gensupport.URLParams
  11825. ifNoneMatch_ string
  11826. ctx_ context.Context
  11827. header_ http.Header
  11828. }
  11829. // Get: Gets a version (current or historical) of FHIR resource by
  11830. // version id.
  11831. //
  11832. func (r *ProjectsLocationsDatasetsFhirStoresResourcesHistoryService) Get(name string) *ProjectsLocationsDatasetsFhirStoresResourcesHistoryGetCall {
  11833. c := &ProjectsLocationsDatasetsFhirStoresResourcesHistoryGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11834. c.name = name
  11835. return c
  11836. }
  11837. // Fields allows partial responses to be retrieved. See
  11838. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11839. // for more information.
  11840. func (c *ProjectsLocationsDatasetsFhirStoresResourcesHistoryGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresResourcesHistoryGetCall {
  11841. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11842. return c
  11843. }
  11844. // IfNoneMatch sets the optional parameter which makes the operation
  11845. // fail if the object's ETag matches the given value. This is useful for
  11846. // getting updates only after the object has changed since the last
  11847. // request. Use googleapi.IsNotModified to check whether the response
  11848. // error from Do is the result of In-None-Match.
  11849. func (c *ProjectsLocationsDatasetsFhirStoresResourcesHistoryGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresResourcesHistoryGetCall {
  11850. c.ifNoneMatch_ = entityTag
  11851. return c
  11852. }
  11853. // Context sets the context to be used in this call's Do method. Any
  11854. // pending HTTP request will be aborted if the provided context is
  11855. // canceled.
  11856. func (c *ProjectsLocationsDatasetsFhirStoresResourcesHistoryGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresResourcesHistoryGetCall {
  11857. c.ctx_ = ctx
  11858. return c
  11859. }
  11860. // Header returns an http.Header that can be modified by the caller to
  11861. // add HTTP headers to the request.
  11862. func (c *ProjectsLocationsDatasetsFhirStoresResourcesHistoryGetCall) Header() http.Header {
  11863. if c.header_ == nil {
  11864. c.header_ = make(http.Header)
  11865. }
  11866. return c.header_
  11867. }
  11868. func (c *ProjectsLocationsDatasetsFhirStoresResourcesHistoryGetCall) doRequest(alt string) (*http.Response, error) {
  11869. reqHeaders := make(http.Header)
  11870. for k, v := range c.header_ {
  11871. reqHeaders[k] = v
  11872. }
  11873. reqHeaders.Set("User-Agent", c.s.userAgent())
  11874. if c.ifNoneMatch_ != "" {
  11875. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  11876. }
  11877. var body io.Reader = nil
  11878. c.urlParams_.Set("alt", alt)
  11879. c.urlParams_.Set("prettyPrint", "false")
  11880. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  11881. urls += "?" + c.urlParams_.Encode()
  11882. req, err := http.NewRequest("GET", urls, body)
  11883. if err != nil {
  11884. return nil, err
  11885. }
  11886. req.Header = reqHeaders
  11887. googleapi.Expand(req.URL, map[string]string{
  11888. "name": c.name,
  11889. })
  11890. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11891. }
  11892. // Do executes the "healthcare.projects.locations.datasets.fhirStores.resources._history.get" call.
  11893. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  11894. // code is an error. Response headers are in either
  11895. // *HttpBody.ServerResponse.Header or (if a response was returned at
  11896. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  11897. // to check whether the returned error was because
  11898. // http.StatusNotModified was returned.
  11899. func (c *ProjectsLocationsDatasetsFhirStoresResourcesHistoryGetCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  11900. gensupport.SetOptions(c.urlParams_, opts...)
  11901. res, err := c.doRequest("json")
  11902. if res != nil && res.StatusCode == http.StatusNotModified {
  11903. if res.Body != nil {
  11904. res.Body.Close()
  11905. }
  11906. return nil, &googleapi.Error{
  11907. Code: res.StatusCode,
  11908. Header: res.Header,
  11909. }
  11910. }
  11911. if err != nil {
  11912. return nil, err
  11913. }
  11914. defer googleapi.CloseBody(res)
  11915. if err := googleapi.CheckResponse(res); err != nil {
  11916. return nil, err
  11917. }
  11918. ret := &HttpBody{
  11919. ServerResponse: googleapi.ServerResponse{
  11920. Header: res.Header,
  11921. HTTPStatusCode: res.StatusCode,
  11922. },
  11923. }
  11924. target := &ret
  11925. if err := gensupport.DecodeResponse(target, res); err != nil {
  11926. return nil, err
  11927. }
  11928. return ret, nil
  11929. // {
  11930. // "description": "Gets a version (current or historical) of FHIR resource by version id.\n",
  11931. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/resources/{resourcesId}/{resourcesId1}/_history/{_historyId}",
  11932. // "httpMethod": "GET",
  11933. // "id": "healthcare.projects.locations.datasets.fhirStores.resources._history.get",
  11934. // "parameterOrder": [
  11935. // "name"
  11936. // ],
  11937. // "parameters": {
  11938. // "name": {
  11939. // "description": "The name of the resource version to retrieve.",
  11940. // "location": "path",
  11941. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/resources/[^/]+/[^/]+/_history/[^/]+$",
  11942. // "required": true,
  11943. // "type": "string"
  11944. // }
  11945. // },
  11946. // "path": "v1alpha/{+name}",
  11947. // "response": {
  11948. // "$ref": "HttpBody"
  11949. // },
  11950. // "scopes": [
  11951. // "https://www.googleapis.com/auth/cloud-platform"
  11952. // ]
  11953. // }
  11954. }
  11955. // method id "healthcare.projects.locations.datasets.fhirStores.resources._history.list":
  11956. type ProjectsLocationsDatasetsFhirStoresResourcesHistoryListCall struct {
  11957. s *Service
  11958. name string
  11959. urlParams_ gensupport.URLParams
  11960. ifNoneMatch_ string
  11961. ctx_ context.Context
  11962. header_ http.Header
  11963. }
  11964. // List: Lists all the versions of a resource (including the current
  11965. // version and
  11966. // deleted versions) from the FHIR store.
  11967. //
  11968. func (r *ProjectsLocationsDatasetsFhirStoresResourcesHistoryService) List(name string) *ProjectsLocationsDatasetsFhirStoresResourcesHistoryListCall {
  11969. c := &ProjectsLocationsDatasetsFhirStoresResourcesHistoryListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11970. c.name = name
  11971. return c
  11972. }
  11973. // At sets the optional parameter "at": Only include resource versions
  11974. // that were current at some point during the
  11975. // time period specified in the date time value. The date parameter
  11976. // format is
  11977. // yyyy-mm-ddThh:mm:ss[Z|(+|-)hh:mm]
  11978. // Clients may specify any of the following:
  11979. // An entire year: `_at=2019`
  11980. // An entire month: `_at=2019-01`
  11981. // A specific day: `_at=2019-01-20`
  11982. // A specific second: `_at=2018-12-31T23:59:58Z`
  11983. func (c *ProjectsLocationsDatasetsFhirStoresResourcesHistoryListCall) At(at string) *ProjectsLocationsDatasetsFhirStoresResourcesHistoryListCall {
  11984. c.urlParams_.Set("at", at)
  11985. return c
  11986. }
  11987. // Count sets the optional parameter "count": The maximum number of
  11988. // search results on a page.
  11989. func (c *ProjectsLocationsDatasetsFhirStoresResourcesHistoryListCall) Count(count int64) *ProjectsLocationsDatasetsFhirStoresResourcesHistoryListCall {
  11990. c.urlParams_.Set("count", fmt.Sprint(count))
  11991. return c
  11992. }
  11993. // Page sets the optional parameter "page": Used to retrieve the first,
  11994. // previous, next, or last page of resource
  11995. // versions when using pagination. Value should be set to the value of
  11996. // the
  11997. // `link.url` field returned in the response to the previous request,
  11998. // where
  11999. // `link.relation` is "first", "previous", "next" or "last".
  12000. // Omit `page` if no previous request has been made.
  12001. func (c *ProjectsLocationsDatasetsFhirStoresResourcesHistoryListCall) Page(page string) *ProjectsLocationsDatasetsFhirStoresResourcesHistoryListCall {
  12002. c.urlParams_.Set("page", page)
  12003. return c
  12004. }
  12005. // Since sets the optional parameter "since": Only include resource
  12006. // versions that were created at or after the given
  12007. // instant in time. The instant in time uses the
  12008. // format
  12009. // YYYY-MM-DDThh:mm:ss.sss+zz:zz (for example
  12010. // 2015-02-07T13:28:17.239+02:00 or
  12011. // 2017-01-01T00:00:00Z). The time must be specified to the second
  12012. // and
  12013. // include a time zone.
  12014. func (c *ProjectsLocationsDatasetsFhirStoresResourcesHistoryListCall) Since(since string) *ProjectsLocationsDatasetsFhirStoresResourcesHistoryListCall {
  12015. c.urlParams_.Set("since", since)
  12016. return c
  12017. }
  12018. // Fields allows partial responses to be retrieved. See
  12019. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  12020. // for more information.
  12021. func (c *ProjectsLocationsDatasetsFhirStoresResourcesHistoryListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresResourcesHistoryListCall {
  12022. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  12023. return c
  12024. }
  12025. // IfNoneMatch sets the optional parameter which makes the operation
  12026. // fail if the object's ETag matches the given value. This is useful for
  12027. // getting updates only after the object has changed since the last
  12028. // request. Use googleapi.IsNotModified to check whether the response
  12029. // error from Do is the result of In-None-Match.
  12030. func (c *ProjectsLocationsDatasetsFhirStoresResourcesHistoryListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresResourcesHistoryListCall {
  12031. c.ifNoneMatch_ = entityTag
  12032. return c
  12033. }
  12034. // Context sets the context to be used in this call's Do method. Any
  12035. // pending HTTP request will be aborted if the provided context is
  12036. // canceled.
  12037. func (c *ProjectsLocationsDatasetsFhirStoresResourcesHistoryListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresResourcesHistoryListCall {
  12038. c.ctx_ = ctx
  12039. return c
  12040. }
  12041. // Header returns an http.Header that can be modified by the caller to
  12042. // add HTTP headers to the request.
  12043. func (c *ProjectsLocationsDatasetsFhirStoresResourcesHistoryListCall) Header() http.Header {
  12044. if c.header_ == nil {
  12045. c.header_ = make(http.Header)
  12046. }
  12047. return c.header_
  12048. }
  12049. func (c *ProjectsLocationsDatasetsFhirStoresResourcesHistoryListCall) doRequest(alt string) (*http.Response, error) {
  12050. reqHeaders := make(http.Header)
  12051. for k, v := range c.header_ {
  12052. reqHeaders[k] = v
  12053. }
  12054. reqHeaders.Set("User-Agent", c.s.userAgent())
  12055. if c.ifNoneMatch_ != "" {
  12056. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  12057. }
  12058. var body io.Reader = nil
  12059. c.urlParams_.Set("alt", alt)
  12060. c.urlParams_.Set("prettyPrint", "false")
  12061. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/_history")
  12062. urls += "?" + c.urlParams_.Encode()
  12063. req, err := http.NewRequest("GET", urls, body)
  12064. if err != nil {
  12065. return nil, err
  12066. }
  12067. req.Header = reqHeaders
  12068. googleapi.Expand(req.URL, map[string]string{
  12069. "name": c.name,
  12070. })
  12071. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  12072. }
  12073. // Do executes the "healthcare.projects.locations.datasets.fhirStores.resources._history.list" call.
  12074. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  12075. // code is an error. Response headers are in either
  12076. // *HttpBody.ServerResponse.Header or (if a response was returned at
  12077. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  12078. // to check whether the returned error was because
  12079. // http.StatusNotModified was returned.
  12080. func (c *ProjectsLocationsDatasetsFhirStoresResourcesHistoryListCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  12081. gensupport.SetOptions(c.urlParams_, opts...)
  12082. res, err := c.doRequest("json")
  12083. if res != nil && res.StatusCode == http.StatusNotModified {
  12084. if res.Body != nil {
  12085. res.Body.Close()
  12086. }
  12087. return nil, &googleapi.Error{
  12088. Code: res.StatusCode,
  12089. Header: res.Header,
  12090. }
  12091. }
  12092. if err != nil {
  12093. return nil, err
  12094. }
  12095. defer googleapi.CloseBody(res)
  12096. if err := googleapi.CheckResponse(res); err != nil {
  12097. return nil, err
  12098. }
  12099. ret := &HttpBody{
  12100. ServerResponse: googleapi.ServerResponse{
  12101. Header: res.Header,
  12102. HTTPStatusCode: res.StatusCode,
  12103. },
  12104. }
  12105. target := &ret
  12106. if err := gensupport.DecodeResponse(target, res); err != nil {
  12107. return nil, err
  12108. }
  12109. return ret, nil
  12110. // {
  12111. // "description": "Lists all the versions of a resource (including the current version and\ndeleted versions) from the FHIR store.\n",
  12112. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/resources/{resourcesId}/{resourcesId1}/_history",
  12113. // "httpMethod": "GET",
  12114. // "id": "healthcare.projects.locations.datasets.fhirStores.resources._history.list",
  12115. // "parameterOrder": [
  12116. // "name"
  12117. // ],
  12118. // "parameters": {
  12119. // "at": {
  12120. // "description": "Only include resource versions that were current at some point during the\ntime period specified in the date time value. The date parameter format is\nyyyy-mm-ddThh:mm:ss[Z|(+|-)hh:mm]\nClients may specify any of the following:\nAn entire year: `_at=2019`\nAn entire month: `_at=2019-01`\nA specific day: `_at=2019-01-20`\nA specific second: `_at=2018-12-31T23:59:58Z`",
  12121. // "location": "query",
  12122. // "type": "string"
  12123. // },
  12124. // "count": {
  12125. // "description": "The maximum number of search results on a page.",
  12126. // "format": "int32",
  12127. // "location": "query",
  12128. // "type": "integer"
  12129. // },
  12130. // "name": {
  12131. // "description": "The name of the resource to retrieve.",
  12132. // "location": "path",
  12133. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/resources/[^/]+/[^/]+$",
  12134. // "required": true,
  12135. // "type": "string"
  12136. // },
  12137. // "page": {
  12138. // "description": "Used to retrieve the first, previous, next, or last page of resource\nversions when using pagination. Value should be set to the value of the\n`link.url` field returned in the response to the previous request, where\n`link.relation` is \"first\", \"previous\", \"next\" or \"last\".\nOmit `page` if no previous request has been made.",
  12139. // "location": "query",
  12140. // "type": "string"
  12141. // },
  12142. // "since": {
  12143. // "description": "Only include resource versions that were created at or after the given\ninstant in time. The instant in time uses the format\nYYYY-MM-DDThh:mm:ss.sss+zz:zz (for example 2015-02-07T13:28:17.239+02:00 or\n2017-01-01T00:00:00Z). The time must be specified to the second and\ninclude a time zone.",
  12144. // "location": "query",
  12145. // "type": "string"
  12146. // }
  12147. // },
  12148. // "path": "v1alpha/{+name}/_history",
  12149. // "response": {
  12150. // "$ref": "HttpBody"
  12151. // },
  12152. // "scopes": [
  12153. // "https://www.googleapis.com/auth/cloud-platform"
  12154. // ]
  12155. // }
  12156. }
  12157. // method id "healthcare.projects.locations.datasets.fhirStores.securityLabels.getIamPolicy":
  12158. type ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall struct {
  12159. s *Service
  12160. resource string
  12161. getiampolicyrequest *GetIamPolicyRequest
  12162. urlParams_ gensupport.URLParams
  12163. ctx_ context.Context
  12164. header_ http.Header
  12165. }
  12166. // GetIamPolicy: Gets the access control policy for a FHIR store or
  12167. // security label within a
  12168. // FHIR store. Returns NOT_FOUND error if the resource does not exist.
  12169. // Returns
  12170. // an empty policy if the resource exists but does not have a policy
  12171. // set.
  12172. //
  12173. // Authorization requires the Google IAM
  12174. // permission
  12175. // 'healthcare.fhirStores.getIamPolicy' for a FHIR store
  12176. // or
  12177. // 'healthcare.securityLabels.getIamPolicy' for a security label
  12178. func (r *ProjectsLocationsDatasetsFhirStoresSecurityLabelsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall {
  12179. c := &ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  12180. c.resource = resource
  12181. c.getiampolicyrequest = getiampolicyrequest
  12182. return c
  12183. }
  12184. // Fields allows partial responses to be retrieved. See
  12185. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  12186. // for more information.
  12187. func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall {
  12188. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  12189. return c
  12190. }
  12191. // Context sets the context to be used in this call's Do method. Any
  12192. // pending HTTP request will be aborted if the provided context is
  12193. // canceled.
  12194. func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall {
  12195. c.ctx_ = ctx
  12196. return c
  12197. }
  12198. // Header returns an http.Header that can be modified by the caller to
  12199. // add HTTP headers to the request.
  12200. func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall) Header() http.Header {
  12201. if c.header_ == nil {
  12202. c.header_ = make(http.Header)
  12203. }
  12204. return c.header_
  12205. }
  12206. func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  12207. reqHeaders := make(http.Header)
  12208. for k, v := range c.header_ {
  12209. reqHeaders[k] = v
  12210. }
  12211. reqHeaders.Set("User-Agent", c.s.userAgent())
  12212. var body io.Reader = nil
  12213. body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
  12214. if err != nil {
  12215. return nil, err
  12216. }
  12217. reqHeaders.Set("Content-Type", "application/json")
  12218. c.urlParams_.Set("alt", alt)
  12219. c.urlParams_.Set("prettyPrint", "false")
  12220. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy")
  12221. urls += "?" + c.urlParams_.Encode()
  12222. req, err := http.NewRequest("POST", urls, body)
  12223. if err != nil {
  12224. return nil, err
  12225. }
  12226. req.Header = reqHeaders
  12227. googleapi.Expand(req.URL, map[string]string{
  12228. "resource": c.resource,
  12229. })
  12230. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  12231. }
  12232. // Do executes the "healthcare.projects.locations.datasets.fhirStores.securityLabels.getIamPolicy" call.
  12233. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  12234. // code is an error. Response headers are in either
  12235. // *Policy.ServerResponse.Header or (if a response was returned at all)
  12236. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  12237. // check whether the returned error was because http.StatusNotModified
  12238. // was returned.
  12239. func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  12240. gensupport.SetOptions(c.urlParams_, opts...)
  12241. res, err := c.doRequest("json")
  12242. if res != nil && res.StatusCode == http.StatusNotModified {
  12243. if res.Body != nil {
  12244. res.Body.Close()
  12245. }
  12246. return nil, &googleapi.Error{
  12247. Code: res.StatusCode,
  12248. Header: res.Header,
  12249. }
  12250. }
  12251. if err != nil {
  12252. return nil, err
  12253. }
  12254. defer googleapi.CloseBody(res)
  12255. if err := googleapi.CheckResponse(res); err != nil {
  12256. return nil, err
  12257. }
  12258. ret := &Policy{
  12259. ServerResponse: googleapi.ServerResponse{
  12260. Header: res.Header,
  12261. HTTPStatusCode: res.StatusCode,
  12262. },
  12263. }
  12264. target := &ret
  12265. if err := gensupport.DecodeResponse(target, res); err != nil {
  12266. return nil, err
  12267. }
  12268. return ret, nil
  12269. // {
  12270. // "description": "Gets the access control policy for a FHIR store or security label within a\nFHIR store. Returns NOT_FOUND error if the resource does not exist. Returns\nan empty policy if the resource exists but does not have a policy set.\n\nAuthorization requires the Google IAM permission\n'healthcare.fhirStores.getIamPolicy' for a FHIR store or\n'healthcare.securityLabels.getIamPolicy' for a security label",
  12271. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/securityLabels/{securityLabelsId}:getIamPolicy",
  12272. // "httpMethod": "POST",
  12273. // "id": "healthcare.projects.locations.datasets.fhirStores.securityLabels.getIamPolicy",
  12274. // "parameterOrder": [
  12275. // "resource"
  12276. // ],
  12277. // "parameters": {
  12278. // "resource": {
  12279. // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
  12280. // "location": "path",
  12281. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/securityLabels/[^/]+$",
  12282. // "required": true,
  12283. // "type": "string"
  12284. // }
  12285. // },
  12286. // "path": "v1alpha/{+resource}:getIamPolicy",
  12287. // "request": {
  12288. // "$ref": "GetIamPolicyRequest"
  12289. // },
  12290. // "response": {
  12291. // "$ref": "Policy"
  12292. // },
  12293. // "scopes": [
  12294. // "https://www.googleapis.com/auth/cloud-platform"
  12295. // ]
  12296. // }
  12297. }
  12298. // method id "healthcare.projects.locations.datasets.fhirStores.securityLabels.setIamPolicy":
  12299. type ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall struct {
  12300. s *Service
  12301. resource string
  12302. setiampolicyrequest *SetIamPolicyRequest
  12303. urlParams_ gensupport.URLParams
  12304. ctx_ context.Context
  12305. header_ http.Header
  12306. }
  12307. // SetIamPolicy: Sets the access control policy for a FHIR store or
  12308. // security label within a
  12309. // FHIR store. Replaces any existing policy.
  12310. //
  12311. // Authorization requires the Google IAM
  12312. // permission
  12313. // 'healthcare.fhirStores.setIamPolicy' for a FHIR store
  12314. // or
  12315. // 'healthcare.securityLabels.setIamPolicy' for a security label
  12316. func (r *ProjectsLocationsDatasetsFhirStoresSecurityLabelsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall {
  12317. c := &ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  12318. c.resource = resource
  12319. c.setiampolicyrequest = setiampolicyrequest
  12320. return c
  12321. }
  12322. // Fields allows partial responses to be retrieved. See
  12323. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  12324. // for more information.
  12325. func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall {
  12326. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  12327. return c
  12328. }
  12329. // Context sets the context to be used in this call's Do method. Any
  12330. // pending HTTP request will be aborted if the provided context is
  12331. // canceled.
  12332. func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall {
  12333. c.ctx_ = ctx
  12334. return c
  12335. }
  12336. // Header returns an http.Header that can be modified by the caller to
  12337. // add HTTP headers to the request.
  12338. func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall) Header() http.Header {
  12339. if c.header_ == nil {
  12340. c.header_ = make(http.Header)
  12341. }
  12342. return c.header_
  12343. }
  12344. func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  12345. reqHeaders := make(http.Header)
  12346. for k, v := range c.header_ {
  12347. reqHeaders[k] = v
  12348. }
  12349. reqHeaders.Set("User-Agent", c.s.userAgent())
  12350. var body io.Reader = nil
  12351. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  12352. if err != nil {
  12353. return nil, err
  12354. }
  12355. reqHeaders.Set("Content-Type", "application/json")
  12356. c.urlParams_.Set("alt", alt)
  12357. c.urlParams_.Set("prettyPrint", "false")
  12358. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy")
  12359. urls += "?" + c.urlParams_.Encode()
  12360. req, err := http.NewRequest("POST", urls, body)
  12361. if err != nil {
  12362. return nil, err
  12363. }
  12364. req.Header = reqHeaders
  12365. googleapi.Expand(req.URL, map[string]string{
  12366. "resource": c.resource,
  12367. })
  12368. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  12369. }
  12370. // Do executes the "healthcare.projects.locations.datasets.fhirStores.securityLabels.setIamPolicy" call.
  12371. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  12372. // code is an error. Response headers are in either
  12373. // *Policy.ServerResponse.Header or (if a response was returned at all)
  12374. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  12375. // check whether the returned error was because http.StatusNotModified
  12376. // was returned.
  12377. func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  12378. gensupport.SetOptions(c.urlParams_, opts...)
  12379. res, err := c.doRequest("json")
  12380. if res != nil && res.StatusCode == http.StatusNotModified {
  12381. if res.Body != nil {
  12382. res.Body.Close()
  12383. }
  12384. return nil, &googleapi.Error{
  12385. Code: res.StatusCode,
  12386. Header: res.Header,
  12387. }
  12388. }
  12389. if err != nil {
  12390. return nil, err
  12391. }
  12392. defer googleapi.CloseBody(res)
  12393. if err := googleapi.CheckResponse(res); err != nil {
  12394. return nil, err
  12395. }
  12396. ret := &Policy{
  12397. ServerResponse: googleapi.ServerResponse{
  12398. Header: res.Header,
  12399. HTTPStatusCode: res.StatusCode,
  12400. },
  12401. }
  12402. target := &ret
  12403. if err := gensupport.DecodeResponse(target, res); err != nil {
  12404. return nil, err
  12405. }
  12406. return ret, nil
  12407. // {
  12408. // "description": "Sets the access control policy for a FHIR store or security label within a\nFHIR store. Replaces any existing policy.\n\nAuthorization requires the Google IAM permission\n'healthcare.fhirStores.setIamPolicy' for a FHIR store or\n'healthcare.securityLabels.setIamPolicy' for a security label",
  12409. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/securityLabels/{securityLabelsId}:setIamPolicy",
  12410. // "httpMethod": "POST",
  12411. // "id": "healthcare.projects.locations.datasets.fhirStores.securityLabels.setIamPolicy",
  12412. // "parameterOrder": [
  12413. // "resource"
  12414. // ],
  12415. // "parameters": {
  12416. // "resource": {
  12417. // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
  12418. // "location": "path",
  12419. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/securityLabels/[^/]+$",
  12420. // "required": true,
  12421. // "type": "string"
  12422. // }
  12423. // },
  12424. // "path": "v1alpha/{+resource}:setIamPolicy",
  12425. // "request": {
  12426. // "$ref": "SetIamPolicyRequest"
  12427. // },
  12428. // "response": {
  12429. // "$ref": "Policy"
  12430. // },
  12431. // "scopes": [
  12432. // "https://www.googleapis.com/auth/cloud-platform"
  12433. // ]
  12434. // }
  12435. }
  12436. // method id "healthcare.projects.locations.datasets.hl7V2Stores.create":
  12437. type ProjectsLocationsDatasetsHl7V2StoresCreateCall struct {
  12438. s *Service
  12439. parent string
  12440. hl7v2store *Hl7V2Store
  12441. urlParams_ gensupport.URLParams
  12442. ctx_ context.Context
  12443. header_ http.Header
  12444. }
  12445. // Create: Creates a new HL7v2 store within the parent dataset.
  12446. func (r *ProjectsLocationsDatasetsHl7V2StoresService) Create(parent string, hl7v2store *Hl7V2Store) *ProjectsLocationsDatasetsHl7V2StoresCreateCall {
  12447. c := &ProjectsLocationsDatasetsHl7V2StoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  12448. c.parent = parent
  12449. c.hl7v2store = hl7v2store
  12450. return c
  12451. }
  12452. // Hl7V2StoreId sets the optional parameter "hl7V2StoreId": The ID of
  12453. // the HL7v2 store that is being created.
  12454. // The string must match the following regex:
  12455. // `[\p{L}\p{N}_\-\.]{1,256}`.
  12456. func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Hl7V2StoreId(hl7V2StoreId string) *ProjectsLocationsDatasetsHl7V2StoresCreateCall {
  12457. c.urlParams_.Set("hl7V2StoreId", hl7V2StoreId)
  12458. return c
  12459. }
  12460. // Fields allows partial responses to be retrieved. See
  12461. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  12462. // for more information.
  12463. func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresCreateCall {
  12464. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  12465. return c
  12466. }
  12467. // Context sets the context to be used in this call's Do method. Any
  12468. // pending HTTP request will be aborted if the provided context is
  12469. // canceled.
  12470. func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresCreateCall {
  12471. c.ctx_ = ctx
  12472. return c
  12473. }
  12474. // Header returns an http.Header that can be modified by the caller to
  12475. // add HTTP headers to the request.
  12476. func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Header() http.Header {
  12477. if c.header_ == nil {
  12478. c.header_ = make(http.Header)
  12479. }
  12480. return c.header_
  12481. }
  12482. func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) doRequest(alt string) (*http.Response, error) {
  12483. reqHeaders := make(http.Header)
  12484. for k, v := range c.header_ {
  12485. reqHeaders[k] = v
  12486. }
  12487. reqHeaders.Set("User-Agent", c.s.userAgent())
  12488. var body io.Reader = nil
  12489. body, err := googleapi.WithoutDataWrapper.JSONReader(c.hl7v2store)
  12490. if err != nil {
  12491. return nil, err
  12492. }
  12493. reqHeaders.Set("Content-Type", "application/json")
  12494. c.urlParams_.Set("alt", alt)
  12495. c.urlParams_.Set("prettyPrint", "false")
  12496. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/hl7V2Stores")
  12497. urls += "?" + c.urlParams_.Encode()
  12498. req, err := http.NewRequest("POST", urls, body)
  12499. if err != nil {
  12500. return nil, err
  12501. }
  12502. req.Header = reqHeaders
  12503. googleapi.Expand(req.URL, map[string]string{
  12504. "parent": c.parent,
  12505. })
  12506. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  12507. }
  12508. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.create" call.
  12509. // Exactly one of *Hl7V2Store or error will be non-nil. Any non-2xx
  12510. // status code is an error. Response headers are in either
  12511. // *Hl7V2Store.ServerResponse.Header or (if a response was returned at
  12512. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  12513. // to check whether the returned error was because
  12514. // http.StatusNotModified was returned.
  12515. func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Do(opts ...googleapi.CallOption) (*Hl7V2Store, error) {
  12516. gensupport.SetOptions(c.urlParams_, opts...)
  12517. res, err := c.doRequest("json")
  12518. if res != nil && res.StatusCode == http.StatusNotModified {
  12519. if res.Body != nil {
  12520. res.Body.Close()
  12521. }
  12522. return nil, &googleapi.Error{
  12523. Code: res.StatusCode,
  12524. Header: res.Header,
  12525. }
  12526. }
  12527. if err != nil {
  12528. return nil, err
  12529. }
  12530. defer googleapi.CloseBody(res)
  12531. if err := googleapi.CheckResponse(res); err != nil {
  12532. return nil, err
  12533. }
  12534. ret := &Hl7V2Store{
  12535. ServerResponse: googleapi.ServerResponse{
  12536. Header: res.Header,
  12537. HTTPStatusCode: res.StatusCode,
  12538. },
  12539. }
  12540. target := &ret
  12541. if err := gensupport.DecodeResponse(target, res); err != nil {
  12542. return nil, err
  12543. }
  12544. return ret, nil
  12545. // {
  12546. // "description": "Creates a new HL7v2 store within the parent dataset.",
  12547. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores",
  12548. // "httpMethod": "POST",
  12549. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.create",
  12550. // "parameterOrder": [
  12551. // "parent"
  12552. // ],
  12553. // "parameters": {
  12554. // "hl7V2StoreId": {
  12555. // "description": "The ID of the HL7v2 store that is being created.\nThe string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.",
  12556. // "location": "query",
  12557. // "type": "string"
  12558. // },
  12559. // "parent": {
  12560. // "description": "The name of the dataset this HL7v2 store belongs to.",
  12561. // "location": "path",
  12562. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  12563. // "required": true,
  12564. // "type": "string"
  12565. // }
  12566. // },
  12567. // "path": "v1alpha/{+parent}/hl7V2Stores",
  12568. // "request": {
  12569. // "$ref": "Hl7V2Store"
  12570. // },
  12571. // "response": {
  12572. // "$ref": "Hl7V2Store"
  12573. // },
  12574. // "scopes": [
  12575. // "https://www.googleapis.com/auth/cloud-platform"
  12576. // ]
  12577. // }
  12578. }
  12579. // method id "healthcare.projects.locations.datasets.hl7V2Stores.delete":
  12580. type ProjectsLocationsDatasetsHl7V2StoresDeleteCall struct {
  12581. s *Service
  12582. name string
  12583. urlParams_ gensupport.URLParams
  12584. ctx_ context.Context
  12585. header_ http.Header
  12586. }
  12587. // Delete: Deletes the specified HL7v2 store and removes all messages
  12588. // that are
  12589. // contained within it.
  12590. func (r *ProjectsLocationsDatasetsHl7V2StoresService) Delete(name string) *ProjectsLocationsDatasetsHl7V2StoresDeleteCall {
  12591. c := &ProjectsLocationsDatasetsHl7V2StoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  12592. c.name = name
  12593. return c
  12594. }
  12595. // Fields allows partial responses to be retrieved. See
  12596. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  12597. // for more information.
  12598. func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresDeleteCall {
  12599. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  12600. return c
  12601. }
  12602. // Context sets the context to be used in this call's Do method. Any
  12603. // pending HTTP request will be aborted if the provided context is
  12604. // canceled.
  12605. func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresDeleteCall {
  12606. c.ctx_ = ctx
  12607. return c
  12608. }
  12609. // Header returns an http.Header that can be modified by the caller to
  12610. // add HTTP headers to the request.
  12611. func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) Header() http.Header {
  12612. if c.header_ == nil {
  12613. c.header_ = make(http.Header)
  12614. }
  12615. return c.header_
  12616. }
  12617. func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) doRequest(alt string) (*http.Response, error) {
  12618. reqHeaders := make(http.Header)
  12619. for k, v := range c.header_ {
  12620. reqHeaders[k] = v
  12621. }
  12622. reqHeaders.Set("User-Agent", c.s.userAgent())
  12623. var body io.Reader = nil
  12624. c.urlParams_.Set("alt", alt)
  12625. c.urlParams_.Set("prettyPrint", "false")
  12626. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  12627. urls += "?" + c.urlParams_.Encode()
  12628. req, err := http.NewRequest("DELETE", urls, body)
  12629. if err != nil {
  12630. return nil, err
  12631. }
  12632. req.Header = reqHeaders
  12633. googleapi.Expand(req.URL, map[string]string{
  12634. "name": c.name,
  12635. })
  12636. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  12637. }
  12638. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.delete" call.
  12639. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  12640. // code is an error. Response headers are in either
  12641. // *Empty.ServerResponse.Header or (if a response was returned at all)
  12642. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  12643. // check whether the returned error was because http.StatusNotModified
  12644. // was returned.
  12645. func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  12646. gensupport.SetOptions(c.urlParams_, opts...)
  12647. res, err := c.doRequest("json")
  12648. if res != nil && res.StatusCode == http.StatusNotModified {
  12649. if res.Body != nil {
  12650. res.Body.Close()
  12651. }
  12652. return nil, &googleapi.Error{
  12653. Code: res.StatusCode,
  12654. Header: res.Header,
  12655. }
  12656. }
  12657. if err != nil {
  12658. return nil, err
  12659. }
  12660. defer googleapi.CloseBody(res)
  12661. if err := googleapi.CheckResponse(res); err != nil {
  12662. return nil, err
  12663. }
  12664. ret := &Empty{
  12665. ServerResponse: googleapi.ServerResponse{
  12666. Header: res.Header,
  12667. HTTPStatusCode: res.StatusCode,
  12668. },
  12669. }
  12670. target := &ret
  12671. if err := gensupport.DecodeResponse(target, res); err != nil {
  12672. return nil, err
  12673. }
  12674. return ret, nil
  12675. // {
  12676. // "description": "Deletes the specified HL7v2 store and removes all messages that are\ncontained within it.",
  12677. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}",
  12678. // "httpMethod": "DELETE",
  12679. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.delete",
  12680. // "parameterOrder": [
  12681. // "name"
  12682. // ],
  12683. // "parameters": {
  12684. // "name": {
  12685. // "description": "The resource name of the HL7v2 store to delete.",
  12686. // "location": "path",
  12687. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$",
  12688. // "required": true,
  12689. // "type": "string"
  12690. // }
  12691. // },
  12692. // "path": "v1alpha/{+name}",
  12693. // "response": {
  12694. // "$ref": "Empty"
  12695. // },
  12696. // "scopes": [
  12697. // "https://www.googleapis.com/auth/cloud-platform"
  12698. // ]
  12699. // }
  12700. }
  12701. // method id "healthcare.projects.locations.datasets.hl7V2Stores.get":
  12702. type ProjectsLocationsDatasetsHl7V2StoresGetCall struct {
  12703. s *Service
  12704. name string
  12705. urlParams_ gensupport.URLParams
  12706. ifNoneMatch_ string
  12707. ctx_ context.Context
  12708. header_ http.Header
  12709. }
  12710. // Get: Gets the specified HL7v2 store.
  12711. func (r *ProjectsLocationsDatasetsHl7V2StoresService) Get(name string) *ProjectsLocationsDatasetsHl7V2StoresGetCall {
  12712. c := &ProjectsLocationsDatasetsHl7V2StoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  12713. c.name = name
  12714. return c
  12715. }
  12716. // Fields allows partial responses to be retrieved. See
  12717. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  12718. // for more information.
  12719. func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresGetCall {
  12720. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  12721. return c
  12722. }
  12723. // IfNoneMatch sets the optional parameter which makes the operation
  12724. // fail if the object's ETag matches the given value. This is useful for
  12725. // getting updates only after the object has changed since the last
  12726. // request. Use googleapi.IsNotModified to check whether the response
  12727. // error from Do is the result of In-None-Match.
  12728. func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresGetCall {
  12729. c.ifNoneMatch_ = entityTag
  12730. return c
  12731. }
  12732. // Context sets the context to be used in this call's Do method. Any
  12733. // pending HTTP request will be aborted if the provided context is
  12734. // canceled.
  12735. func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresGetCall {
  12736. c.ctx_ = ctx
  12737. return c
  12738. }
  12739. // Header returns an http.Header that can be modified by the caller to
  12740. // add HTTP headers to the request.
  12741. func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) Header() http.Header {
  12742. if c.header_ == nil {
  12743. c.header_ = make(http.Header)
  12744. }
  12745. return c.header_
  12746. }
  12747. func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) doRequest(alt string) (*http.Response, error) {
  12748. reqHeaders := make(http.Header)
  12749. for k, v := range c.header_ {
  12750. reqHeaders[k] = v
  12751. }
  12752. reqHeaders.Set("User-Agent", c.s.userAgent())
  12753. if c.ifNoneMatch_ != "" {
  12754. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  12755. }
  12756. var body io.Reader = nil
  12757. c.urlParams_.Set("alt", alt)
  12758. c.urlParams_.Set("prettyPrint", "false")
  12759. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  12760. urls += "?" + c.urlParams_.Encode()
  12761. req, err := http.NewRequest("GET", urls, body)
  12762. if err != nil {
  12763. return nil, err
  12764. }
  12765. req.Header = reqHeaders
  12766. googleapi.Expand(req.URL, map[string]string{
  12767. "name": c.name,
  12768. })
  12769. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  12770. }
  12771. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.get" call.
  12772. // Exactly one of *Hl7V2Store or error will be non-nil. Any non-2xx
  12773. // status code is an error. Response headers are in either
  12774. // *Hl7V2Store.ServerResponse.Header or (if a response was returned at
  12775. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  12776. // to check whether the returned error was because
  12777. // http.StatusNotModified was returned.
  12778. func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) Do(opts ...googleapi.CallOption) (*Hl7V2Store, error) {
  12779. gensupport.SetOptions(c.urlParams_, opts...)
  12780. res, err := c.doRequest("json")
  12781. if res != nil && res.StatusCode == http.StatusNotModified {
  12782. if res.Body != nil {
  12783. res.Body.Close()
  12784. }
  12785. return nil, &googleapi.Error{
  12786. Code: res.StatusCode,
  12787. Header: res.Header,
  12788. }
  12789. }
  12790. if err != nil {
  12791. return nil, err
  12792. }
  12793. defer googleapi.CloseBody(res)
  12794. if err := googleapi.CheckResponse(res); err != nil {
  12795. return nil, err
  12796. }
  12797. ret := &Hl7V2Store{
  12798. ServerResponse: googleapi.ServerResponse{
  12799. Header: res.Header,
  12800. HTTPStatusCode: res.StatusCode,
  12801. },
  12802. }
  12803. target := &ret
  12804. if err := gensupport.DecodeResponse(target, res); err != nil {
  12805. return nil, err
  12806. }
  12807. return ret, nil
  12808. // {
  12809. // "description": "Gets the specified HL7v2 store.",
  12810. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}",
  12811. // "httpMethod": "GET",
  12812. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.get",
  12813. // "parameterOrder": [
  12814. // "name"
  12815. // ],
  12816. // "parameters": {
  12817. // "name": {
  12818. // "description": "The resource name of the HL7v2 store to get.",
  12819. // "location": "path",
  12820. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$",
  12821. // "required": true,
  12822. // "type": "string"
  12823. // }
  12824. // },
  12825. // "path": "v1alpha/{+name}",
  12826. // "response": {
  12827. // "$ref": "Hl7V2Store"
  12828. // },
  12829. // "scopes": [
  12830. // "https://www.googleapis.com/auth/cloud-platform"
  12831. // ]
  12832. // }
  12833. }
  12834. // method id "healthcare.projects.locations.datasets.hl7V2Stores.getIamPolicy":
  12835. type ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall struct {
  12836. s *Service
  12837. resource string
  12838. urlParams_ gensupport.URLParams
  12839. ifNoneMatch_ string
  12840. ctx_ context.Context
  12841. header_ http.Header
  12842. }
  12843. // GetIamPolicy: Gets the access control policy for a resource.
  12844. // Returns an empty policy if the resource exists and does not have a
  12845. // policy
  12846. // set.
  12847. func (r *ProjectsLocationsDatasetsHl7V2StoresService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall {
  12848. c := &ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  12849. c.resource = resource
  12850. return c
  12851. }
  12852. // Fields allows partial responses to be retrieved. See
  12853. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  12854. // for more information.
  12855. func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall {
  12856. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  12857. return c
  12858. }
  12859. // IfNoneMatch sets the optional parameter which makes the operation
  12860. // fail if the object's ETag matches the given value. This is useful for
  12861. // getting updates only after the object has changed since the last
  12862. // request. Use googleapi.IsNotModified to check whether the response
  12863. // error from Do is the result of In-None-Match.
  12864. func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall {
  12865. c.ifNoneMatch_ = entityTag
  12866. return c
  12867. }
  12868. // Context sets the context to be used in this call's Do method. Any
  12869. // pending HTTP request will be aborted if the provided context is
  12870. // canceled.
  12871. func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall {
  12872. c.ctx_ = ctx
  12873. return c
  12874. }
  12875. // Header returns an http.Header that can be modified by the caller to
  12876. // add HTTP headers to the request.
  12877. func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Header() http.Header {
  12878. if c.header_ == nil {
  12879. c.header_ = make(http.Header)
  12880. }
  12881. return c.header_
  12882. }
  12883. func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  12884. reqHeaders := make(http.Header)
  12885. for k, v := range c.header_ {
  12886. reqHeaders[k] = v
  12887. }
  12888. reqHeaders.Set("User-Agent", c.s.userAgent())
  12889. if c.ifNoneMatch_ != "" {
  12890. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  12891. }
  12892. var body io.Reader = nil
  12893. c.urlParams_.Set("alt", alt)
  12894. c.urlParams_.Set("prettyPrint", "false")
  12895. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy")
  12896. urls += "?" + c.urlParams_.Encode()
  12897. req, err := http.NewRequest("GET", urls, body)
  12898. if err != nil {
  12899. return nil, err
  12900. }
  12901. req.Header = reqHeaders
  12902. googleapi.Expand(req.URL, map[string]string{
  12903. "resource": c.resource,
  12904. })
  12905. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  12906. }
  12907. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.getIamPolicy" call.
  12908. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  12909. // code is an error. Response headers are in either
  12910. // *Policy.ServerResponse.Header or (if a response was returned at all)
  12911. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  12912. // check whether the returned error was because http.StatusNotModified
  12913. // was returned.
  12914. func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  12915. gensupport.SetOptions(c.urlParams_, opts...)
  12916. res, err := c.doRequest("json")
  12917. if res != nil && res.StatusCode == http.StatusNotModified {
  12918. if res.Body != nil {
  12919. res.Body.Close()
  12920. }
  12921. return nil, &googleapi.Error{
  12922. Code: res.StatusCode,
  12923. Header: res.Header,
  12924. }
  12925. }
  12926. if err != nil {
  12927. return nil, err
  12928. }
  12929. defer googleapi.CloseBody(res)
  12930. if err := googleapi.CheckResponse(res); err != nil {
  12931. return nil, err
  12932. }
  12933. ret := &Policy{
  12934. ServerResponse: googleapi.ServerResponse{
  12935. Header: res.Header,
  12936. HTTPStatusCode: res.StatusCode,
  12937. },
  12938. }
  12939. target := &ret
  12940. if err := gensupport.DecodeResponse(target, res); err != nil {
  12941. return nil, err
  12942. }
  12943. return ret, nil
  12944. // {
  12945. // "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.",
  12946. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}:getIamPolicy",
  12947. // "httpMethod": "GET",
  12948. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.getIamPolicy",
  12949. // "parameterOrder": [
  12950. // "resource"
  12951. // ],
  12952. // "parameters": {
  12953. // "resource": {
  12954. // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
  12955. // "location": "path",
  12956. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$",
  12957. // "required": true,
  12958. // "type": "string"
  12959. // }
  12960. // },
  12961. // "path": "v1alpha/{+resource}:getIamPolicy",
  12962. // "response": {
  12963. // "$ref": "Policy"
  12964. // },
  12965. // "scopes": [
  12966. // "https://www.googleapis.com/auth/cloud-platform"
  12967. // ]
  12968. // }
  12969. }
  12970. // method id "healthcare.projects.locations.datasets.hl7V2Stores.list":
  12971. type ProjectsLocationsDatasetsHl7V2StoresListCall struct {
  12972. s *Service
  12973. parent string
  12974. urlParams_ gensupport.URLParams
  12975. ifNoneMatch_ string
  12976. ctx_ context.Context
  12977. header_ http.Header
  12978. }
  12979. // List: Lists the HL7v2 stores in the given dataset.
  12980. func (r *ProjectsLocationsDatasetsHl7V2StoresService) List(parent string) *ProjectsLocationsDatasetsHl7V2StoresListCall {
  12981. c := &ProjectsLocationsDatasetsHl7V2StoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  12982. c.parent = parent
  12983. return c
  12984. }
  12985. // PageSize sets the optional parameter "pageSize": Limit on the number
  12986. // of HL7v2 stores to return in a single response.
  12987. // If zero the default page size of 100 is used.
  12988. func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsHl7V2StoresListCall {
  12989. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  12990. return c
  12991. }
  12992. // PageToken sets the optional parameter "pageToken": The
  12993. // next_page_token value returned from the previous List request, if
  12994. // any.
  12995. func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsHl7V2StoresListCall {
  12996. c.urlParams_.Set("pageToken", pageToken)
  12997. return c
  12998. }
  12999. // Fields allows partial responses to be retrieved. See
  13000. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  13001. // for more information.
  13002. func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresListCall {
  13003. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  13004. return c
  13005. }
  13006. // IfNoneMatch sets the optional parameter which makes the operation
  13007. // fail if the object's ETag matches the given value. This is useful for
  13008. // getting updates only after the object has changed since the last
  13009. // request. Use googleapi.IsNotModified to check whether the response
  13010. // error from Do is the result of In-None-Match.
  13011. func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresListCall {
  13012. c.ifNoneMatch_ = entityTag
  13013. return c
  13014. }
  13015. // Context sets the context to be used in this call's Do method. Any
  13016. // pending HTTP request will be aborted if the provided context is
  13017. // canceled.
  13018. func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresListCall {
  13019. c.ctx_ = ctx
  13020. return c
  13021. }
  13022. // Header returns an http.Header that can be modified by the caller to
  13023. // add HTTP headers to the request.
  13024. func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Header() http.Header {
  13025. if c.header_ == nil {
  13026. c.header_ = make(http.Header)
  13027. }
  13028. return c.header_
  13029. }
  13030. func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) doRequest(alt string) (*http.Response, error) {
  13031. reqHeaders := make(http.Header)
  13032. for k, v := range c.header_ {
  13033. reqHeaders[k] = v
  13034. }
  13035. reqHeaders.Set("User-Agent", c.s.userAgent())
  13036. if c.ifNoneMatch_ != "" {
  13037. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  13038. }
  13039. var body io.Reader = nil
  13040. c.urlParams_.Set("alt", alt)
  13041. c.urlParams_.Set("prettyPrint", "false")
  13042. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/hl7V2Stores")
  13043. urls += "?" + c.urlParams_.Encode()
  13044. req, err := http.NewRequest("GET", urls, body)
  13045. if err != nil {
  13046. return nil, err
  13047. }
  13048. req.Header = reqHeaders
  13049. googleapi.Expand(req.URL, map[string]string{
  13050. "parent": c.parent,
  13051. })
  13052. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  13053. }
  13054. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.list" call.
  13055. // Exactly one of *ListHl7V2StoresResponse or error will be non-nil. Any
  13056. // non-2xx status code is an error. Response headers are in either
  13057. // *ListHl7V2StoresResponse.ServerResponse.Header or (if a response was
  13058. // returned at all) in error.(*googleapi.Error).Header. Use
  13059. // googleapi.IsNotModified to check whether the returned error was
  13060. // because http.StatusNotModified was returned.
  13061. func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Do(opts ...googleapi.CallOption) (*ListHl7V2StoresResponse, error) {
  13062. gensupport.SetOptions(c.urlParams_, opts...)
  13063. res, err := c.doRequest("json")
  13064. if res != nil && res.StatusCode == http.StatusNotModified {
  13065. if res.Body != nil {
  13066. res.Body.Close()
  13067. }
  13068. return nil, &googleapi.Error{
  13069. Code: res.StatusCode,
  13070. Header: res.Header,
  13071. }
  13072. }
  13073. if err != nil {
  13074. return nil, err
  13075. }
  13076. defer googleapi.CloseBody(res)
  13077. if err := googleapi.CheckResponse(res); err != nil {
  13078. return nil, err
  13079. }
  13080. ret := &ListHl7V2StoresResponse{
  13081. ServerResponse: googleapi.ServerResponse{
  13082. Header: res.Header,
  13083. HTTPStatusCode: res.StatusCode,
  13084. },
  13085. }
  13086. target := &ret
  13087. if err := gensupport.DecodeResponse(target, res); err != nil {
  13088. return nil, err
  13089. }
  13090. return ret, nil
  13091. // {
  13092. // "description": "Lists the HL7v2 stores in the given dataset.",
  13093. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores",
  13094. // "httpMethod": "GET",
  13095. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.list",
  13096. // "parameterOrder": [
  13097. // "parent"
  13098. // ],
  13099. // "parameters": {
  13100. // "pageSize": {
  13101. // "description": "Limit on the number of HL7v2 stores to return in a single response.\nIf zero the default page size of 100 is used.",
  13102. // "format": "int32",
  13103. // "location": "query",
  13104. // "type": "integer"
  13105. // },
  13106. // "pageToken": {
  13107. // "description": "The next_page_token value returned from the previous List request, if any.",
  13108. // "location": "query",
  13109. // "type": "string"
  13110. // },
  13111. // "parent": {
  13112. // "description": "Name of the dataset.",
  13113. // "location": "path",
  13114. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  13115. // "required": true,
  13116. // "type": "string"
  13117. // }
  13118. // },
  13119. // "path": "v1alpha/{+parent}/hl7V2Stores",
  13120. // "response": {
  13121. // "$ref": "ListHl7V2StoresResponse"
  13122. // },
  13123. // "scopes": [
  13124. // "https://www.googleapis.com/auth/cloud-platform"
  13125. // ]
  13126. // }
  13127. }
  13128. // Pages invokes f for each page of results.
  13129. // A non-nil error returned from f will halt the iteration.
  13130. // The provided context supersedes any context provided to the Context method.
  13131. func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Pages(ctx context.Context, f func(*ListHl7V2StoresResponse) error) error {
  13132. c.ctx_ = ctx
  13133. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  13134. for {
  13135. x, err := c.Do()
  13136. if err != nil {
  13137. return err
  13138. }
  13139. if err := f(x); err != nil {
  13140. return err
  13141. }
  13142. if x.NextPageToken == "" {
  13143. return nil
  13144. }
  13145. c.PageToken(x.NextPageToken)
  13146. }
  13147. }
  13148. // method id "healthcare.projects.locations.datasets.hl7V2Stores.patch":
  13149. type ProjectsLocationsDatasetsHl7V2StoresPatchCall struct {
  13150. s *Service
  13151. name string
  13152. hl7v2store *Hl7V2Store
  13153. urlParams_ gensupport.URLParams
  13154. ctx_ context.Context
  13155. header_ http.Header
  13156. }
  13157. // Patch: Updates the HL7v2 store.
  13158. func (r *ProjectsLocationsDatasetsHl7V2StoresService) Patch(name string, hl7v2store *Hl7V2Store) *ProjectsLocationsDatasetsHl7V2StoresPatchCall {
  13159. c := &ProjectsLocationsDatasetsHl7V2StoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  13160. c.name = name
  13161. c.hl7v2store = hl7v2store
  13162. return c
  13163. }
  13164. // UpdateMask sets the optional parameter "updateMask": The update mask
  13165. // applies to the resource. For the `FieldMask`
  13166. // definition,
  13167. // see
  13168. // https://developers.google.com/protocol-buffers/docs/re
  13169. // ference/google.protobuf#fieldmask
  13170. func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsHl7V2StoresPatchCall {
  13171. c.urlParams_.Set("updateMask", updateMask)
  13172. return c
  13173. }
  13174. // Fields allows partial responses to be retrieved. See
  13175. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  13176. // for more information.
  13177. func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresPatchCall {
  13178. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  13179. return c
  13180. }
  13181. // Context sets the context to be used in this call's Do method. Any
  13182. // pending HTTP request will be aborted if the provided context is
  13183. // canceled.
  13184. func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresPatchCall {
  13185. c.ctx_ = ctx
  13186. return c
  13187. }
  13188. // Header returns an http.Header that can be modified by the caller to
  13189. // add HTTP headers to the request.
  13190. func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Header() http.Header {
  13191. if c.header_ == nil {
  13192. c.header_ = make(http.Header)
  13193. }
  13194. return c.header_
  13195. }
  13196. func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) doRequest(alt string) (*http.Response, error) {
  13197. reqHeaders := make(http.Header)
  13198. for k, v := range c.header_ {
  13199. reqHeaders[k] = v
  13200. }
  13201. reqHeaders.Set("User-Agent", c.s.userAgent())
  13202. var body io.Reader = nil
  13203. body, err := googleapi.WithoutDataWrapper.JSONReader(c.hl7v2store)
  13204. if err != nil {
  13205. return nil, err
  13206. }
  13207. reqHeaders.Set("Content-Type", "application/json")
  13208. c.urlParams_.Set("alt", alt)
  13209. c.urlParams_.Set("prettyPrint", "false")
  13210. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  13211. urls += "?" + c.urlParams_.Encode()
  13212. req, err := http.NewRequest("PATCH", urls, body)
  13213. if err != nil {
  13214. return nil, err
  13215. }
  13216. req.Header = reqHeaders
  13217. googleapi.Expand(req.URL, map[string]string{
  13218. "name": c.name,
  13219. })
  13220. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  13221. }
  13222. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.patch" call.
  13223. // Exactly one of *Hl7V2Store or error will be non-nil. Any non-2xx
  13224. // status code is an error. Response headers are in either
  13225. // *Hl7V2Store.ServerResponse.Header or (if a response was returned at
  13226. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  13227. // to check whether the returned error was because
  13228. // http.StatusNotModified was returned.
  13229. func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Do(opts ...googleapi.CallOption) (*Hl7V2Store, error) {
  13230. gensupport.SetOptions(c.urlParams_, opts...)
  13231. res, err := c.doRequest("json")
  13232. if res != nil && res.StatusCode == http.StatusNotModified {
  13233. if res.Body != nil {
  13234. res.Body.Close()
  13235. }
  13236. return nil, &googleapi.Error{
  13237. Code: res.StatusCode,
  13238. Header: res.Header,
  13239. }
  13240. }
  13241. if err != nil {
  13242. return nil, err
  13243. }
  13244. defer googleapi.CloseBody(res)
  13245. if err := googleapi.CheckResponse(res); err != nil {
  13246. return nil, err
  13247. }
  13248. ret := &Hl7V2Store{
  13249. ServerResponse: googleapi.ServerResponse{
  13250. Header: res.Header,
  13251. HTTPStatusCode: res.StatusCode,
  13252. },
  13253. }
  13254. target := &ret
  13255. if err := gensupport.DecodeResponse(target, res); err != nil {
  13256. return nil, err
  13257. }
  13258. return ret, nil
  13259. // {
  13260. // "description": "Updates the HL7v2 store.",
  13261. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}",
  13262. // "httpMethod": "PATCH",
  13263. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.patch",
  13264. // "parameterOrder": [
  13265. // "name"
  13266. // ],
  13267. // "parameters": {
  13268. // "name": {
  13269. // "description": "Output only. Resource name of the HL7v2 store, of the form\n`projects/{project_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.",
  13270. // "location": "path",
  13271. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$",
  13272. // "required": true,
  13273. // "type": "string"
  13274. // },
  13275. // "updateMask": {
  13276. // "description": "The update mask applies to the resource. For the `FieldMask` definition,\nsee\nhttps://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask",
  13277. // "format": "google-fieldmask",
  13278. // "location": "query",
  13279. // "type": "string"
  13280. // }
  13281. // },
  13282. // "path": "v1alpha/{+name}",
  13283. // "request": {
  13284. // "$ref": "Hl7V2Store"
  13285. // },
  13286. // "response": {
  13287. // "$ref": "Hl7V2Store"
  13288. // },
  13289. // "scopes": [
  13290. // "https://www.googleapis.com/auth/cloud-platform"
  13291. // ]
  13292. // }
  13293. }
  13294. // method id "healthcare.projects.locations.datasets.hl7V2Stores.setIamPolicy":
  13295. type ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall struct {
  13296. s *Service
  13297. resource string
  13298. setiampolicyrequest *SetIamPolicyRequest
  13299. urlParams_ gensupport.URLParams
  13300. ctx_ context.Context
  13301. header_ http.Header
  13302. }
  13303. // SetIamPolicy: Sets the access control policy on the specified
  13304. // resource. Replaces any
  13305. // existing policy.
  13306. func (r *ProjectsLocationsDatasetsHl7V2StoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall {
  13307. c := &ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  13308. c.resource = resource
  13309. c.setiampolicyrequest = setiampolicyrequest
  13310. return c
  13311. }
  13312. // Fields allows partial responses to be retrieved. See
  13313. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  13314. // for more information.
  13315. func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall {
  13316. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  13317. return c
  13318. }
  13319. // Context sets the context to be used in this call's Do method. Any
  13320. // pending HTTP request will be aborted if the provided context is
  13321. // canceled.
  13322. func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall {
  13323. c.ctx_ = ctx
  13324. return c
  13325. }
  13326. // Header returns an http.Header that can be modified by the caller to
  13327. // add HTTP headers to the request.
  13328. func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Header() http.Header {
  13329. if c.header_ == nil {
  13330. c.header_ = make(http.Header)
  13331. }
  13332. return c.header_
  13333. }
  13334. func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  13335. reqHeaders := make(http.Header)
  13336. for k, v := range c.header_ {
  13337. reqHeaders[k] = v
  13338. }
  13339. reqHeaders.Set("User-Agent", c.s.userAgent())
  13340. var body io.Reader = nil
  13341. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  13342. if err != nil {
  13343. return nil, err
  13344. }
  13345. reqHeaders.Set("Content-Type", "application/json")
  13346. c.urlParams_.Set("alt", alt)
  13347. c.urlParams_.Set("prettyPrint", "false")
  13348. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy")
  13349. urls += "?" + c.urlParams_.Encode()
  13350. req, err := http.NewRequest("POST", urls, body)
  13351. if err != nil {
  13352. return nil, err
  13353. }
  13354. req.Header = reqHeaders
  13355. googleapi.Expand(req.URL, map[string]string{
  13356. "resource": c.resource,
  13357. })
  13358. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  13359. }
  13360. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.setIamPolicy" call.
  13361. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  13362. // code is an error. Response headers are in either
  13363. // *Policy.ServerResponse.Header or (if a response was returned at all)
  13364. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  13365. // check whether the returned error was because http.StatusNotModified
  13366. // was returned.
  13367. func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  13368. gensupport.SetOptions(c.urlParams_, opts...)
  13369. res, err := c.doRequest("json")
  13370. if res != nil && res.StatusCode == http.StatusNotModified {
  13371. if res.Body != nil {
  13372. res.Body.Close()
  13373. }
  13374. return nil, &googleapi.Error{
  13375. Code: res.StatusCode,
  13376. Header: res.Header,
  13377. }
  13378. }
  13379. if err != nil {
  13380. return nil, err
  13381. }
  13382. defer googleapi.CloseBody(res)
  13383. if err := googleapi.CheckResponse(res); err != nil {
  13384. return nil, err
  13385. }
  13386. ret := &Policy{
  13387. ServerResponse: googleapi.ServerResponse{
  13388. Header: res.Header,
  13389. HTTPStatusCode: res.StatusCode,
  13390. },
  13391. }
  13392. target := &ret
  13393. if err := gensupport.DecodeResponse(target, res); err != nil {
  13394. return nil, err
  13395. }
  13396. return ret, nil
  13397. // {
  13398. // "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.",
  13399. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}:setIamPolicy",
  13400. // "httpMethod": "POST",
  13401. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.setIamPolicy",
  13402. // "parameterOrder": [
  13403. // "resource"
  13404. // ],
  13405. // "parameters": {
  13406. // "resource": {
  13407. // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
  13408. // "location": "path",
  13409. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$",
  13410. // "required": true,
  13411. // "type": "string"
  13412. // }
  13413. // },
  13414. // "path": "v1alpha/{+resource}:setIamPolicy",
  13415. // "request": {
  13416. // "$ref": "SetIamPolicyRequest"
  13417. // },
  13418. // "response": {
  13419. // "$ref": "Policy"
  13420. // },
  13421. // "scopes": [
  13422. // "https://www.googleapis.com/auth/cloud-platform"
  13423. // ]
  13424. // }
  13425. }
  13426. // method id "healthcare.projects.locations.datasets.hl7V2Stores.testIamPermissions":
  13427. type ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall struct {
  13428. s *Service
  13429. resource string
  13430. testiampermissionsrequest *TestIamPermissionsRequest
  13431. urlParams_ gensupport.URLParams
  13432. ctx_ context.Context
  13433. header_ http.Header
  13434. }
  13435. // TestIamPermissions: Returns permissions that a caller has on the
  13436. // specified resource.
  13437. // If the resource does not exist, this will return an empty set
  13438. // of
  13439. // permissions, not a NOT_FOUND error.
  13440. //
  13441. // Note: This operation is designed to be used for building
  13442. // permission-aware
  13443. // UIs and command-line tools, not for authorization checking. This
  13444. // operation
  13445. // may "fail open" without warning.
  13446. func (r *ProjectsLocationsDatasetsHl7V2StoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall {
  13447. c := &ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  13448. c.resource = resource
  13449. c.testiampermissionsrequest = testiampermissionsrequest
  13450. return c
  13451. }
  13452. // Fields allows partial responses to be retrieved. See
  13453. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  13454. // for more information.
  13455. func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall {
  13456. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  13457. return c
  13458. }
  13459. // Context sets the context to be used in this call's Do method. Any
  13460. // pending HTTP request will be aborted if the provided context is
  13461. // canceled.
  13462. func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall {
  13463. c.ctx_ = ctx
  13464. return c
  13465. }
  13466. // Header returns an http.Header that can be modified by the caller to
  13467. // add HTTP headers to the request.
  13468. func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Header() http.Header {
  13469. if c.header_ == nil {
  13470. c.header_ = make(http.Header)
  13471. }
  13472. return c.header_
  13473. }
  13474. func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  13475. reqHeaders := make(http.Header)
  13476. for k, v := range c.header_ {
  13477. reqHeaders[k] = v
  13478. }
  13479. reqHeaders.Set("User-Agent", c.s.userAgent())
  13480. var body io.Reader = nil
  13481. body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  13482. if err != nil {
  13483. return nil, err
  13484. }
  13485. reqHeaders.Set("Content-Type", "application/json")
  13486. c.urlParams_.Set("alt", alt)
  13487. c.urlParams_.Set("prettyPrint", "false")
  13488. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions")
  13489. urls += "?" + c.urlParams_.Encode()
  13490. req, err := http.NewRequest("POST", urls, body)
  13491. if err != nil {
  13492. return nil, err
  13493. }
  13494. req.Header = reqHeaders
  13495. googleapi.Expand(req.URL, map[string]string{
  13496. "resource": c.resource,
  13497. })
  13498. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  13499. }
  13500. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.testIamPermissions" call.
  13501. // Exactly one of *TestIamPermissionsResponse or error will be non-nil.
  13502. // Any non-2xx status code is an error. Response headers are in either
  13503. // *TestIamPermissionsResponse.ServerResponse.Header or (if a response
  13504. // was returned at all) in error.(*googleapi.Error).Header. Use
  13505. // googleapi.IsNotModified to check whether the returned error was
  13506. // because http.StatusNotModified was returned.
  13507. func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  13508. gensupport.SetOptions(c.urlParams_, opts...)
  13509. res, err := c.doRequest("json")
  13510. if res != nil && res.StatusCode == http.StatusNotModified {
  13511. if res.Body != nil {
  13512. res.Body.Close()
  13513. }
  13514. return nil, &googleapi.Error{
  13515. Code: res.StatusCode,
  13516. Header: res.Header,
  13517. }
  13518. }
  13519. if err != nil {
  13520. return nil, err
  13521. }
  13522. defer googleapi.CloseBody(res)
  13523. if err := googleapi.CheckResponse(res); err != nil {
  13524. return nil, err
  13525. }
  13526. ret := &TestIamPermissionsResponse{
  13527. ServerResponse: googleapi.ServerResponse{
  13528. Header: res.Header,
  13529. HTTPStatusCode: res.StatusCode,
  13530. },
  13531. }
  13532. target := &ret
  13533. if err := gensupport.DecodeResponse(target, res); err != nil {
  13534. return nil, err
  13535. }
  13536. return ret, nil
  13537. // {
  13538. // "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.",
  13539. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}:testIamPermissions",
  13540. // "httpMethod": "POST",
  13541. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.testIamPermissions",
  13542. // "parameterOrder": [
  13543. // "resource"
  13544. // ],
  13545. // "parameters": {
  13546. // "resource": {
  13547. // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
  13548. // "location": "path",
  13549. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$",
  13550. // "required": true,
  13551. // "type": "string"
  13552. // }
  13553. // },
  13554. // "path": "v1alpha/{+resource}:testIamPermissions",
  13555. // "request": {
  13556. // "$ref": "TestIamPermissionsRequest"
  13557. // },
  13558. // "response": {
  13559. // "$ref": "TestIamPermissionsResponse"
  13560. // },
  13561. // "scopes": [
  13562. // "https://www.googleapis.com/auth/cloud-platform"
  13563. // ]
  13564. // }
  13565. }
  13566. // method id "healthcare.projects.locations.datasets.hl7V2Stores.messages.create":
  13567. type ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall struct {
  13568. s *Service
  13569. parent string
  13570. createmessagerequest *CreateMessageRequest
  13571. urlParams_ gensupport.URLParams
  13572. ctx_ context.Context
  13573. header_ http.Header
  13574. }
  13575. // Create: Creates a message and sends a notification to the Cloud
  13576. // Pub/Sub topic. If
  13577. // configured, the MLLP adapter listens to messages created by this
  13578. // method and
  13579. // sends those back to the hospital. A successful response indicates
  13580. // the
  13581. // message has been persisted to storage and a Cloud Pub/Sub
  13582. // notification has
  13583. // been sent. Sending to the hospital by the MLLP adapter
  13584. // happens
  13585. // asynchronously.
  13586. func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Create(parent string, createmessagerequest *CreateMessageRequest) *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall {
  13587. c := &ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  13588. c.parent = parent
  13589. c.createmessagerequest = createmessagerequest
  13590. return c
  13591. }
  13592. // Fields allows partial responses to be retrieved. See
  13593. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  13594. // for more information.
  13595. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall {
  13596. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  13597. return c
  13598. }
  13599. // Context sets the context to be used in this call's Do method. Any
  13600. // pending HTTP request will be aborted if the provided context is
  13601. // canceled.
  13602. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall {
  13603. c.ctx_ = ctx
  13604. return c
  13605. }
  13606. // Header returns an http.Header that can be modified by the caller to
  13607. // add HTTP headers to the request.
  13608. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) Header() http.Header {
  13609. if c.header_ == nil {
  13610. c.header_ = make(http.Header)
  13611. }
  13612. return c.header_
  13613. }
  13614. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) doRequest(alt string) (*http.Response, error) {
  13615. reqHeaders := make(http.Header)
  13616. for k, v := range c.header_ {
  13617. reqHeaders[k] = v
  13618. }
  13619. reqHeaders.Set("User-Agent", c.s.userAgent())
  13620. var body io.Reader = nil
  13621. body, err := googleapi.WithoutDataWrapper.JSONReader(c.createmessagerequest)
  13622. if err != nil {
  13623. return nil, err
  13624. }
  13625. reqHeaders.Set("Content-Type", "application/json")
  13626. c.urlParams_.Set("alt", alt)
  13627. c.urlParams_.Set("prettyPrint", "false")
  13628. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/messages")
  13629. urls += "?" + c.urlParams_.Encode()
  13630. req, err := http.NewRequest("POST", urls, body)
  13631. if err != nil {
  13632. return nil, err
  13633. }
  13634. req.Header = reqHeaders
  13635. googleapi.Expand(req.URL, map[string]string{
  13636. "parent": c.parent,
  13637. })
  13638. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  13639. }
  13640. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.create" call.
  13641. // Exactly one of *Message or error will be non-nil. Any non-2xx status
  13642. // code is an error. Response headers are in either
  13643. // *Message.ServerResponse.Header or (if a response was returned at all)
  13644. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  13645. // check whether the returned error was because http.StatusNotModified
  13646. // was returned.
  13647. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) Do(opts ...googleapi.CallOption) (*Message, error) {
  13648. gensupport.SetOptions(c.urlParams_, opts...)
  13649. res, err := c.doRequest("json")
  13650. if res != nil && res.StatusCode == http.StatusNotModified {
  13651. if res.Body != nil {
  13652. res.Body.Close()
  13653. }
  13654. return nil, &googleapi.Error{
  13655. Code: res.StatusCode,
  13656. Header: res.Header,
  13657. }
  13658. }
  13659. if err != nil {
  13660. return nil, err
  13661. }
  13662. defer googleapi.CloseBody(res)
  13663. if err := googleapi.CheckResponse(res); err != nil {
  13664. return nil, err
  13665. }
  13666. ret := &Message{
  13667. ServerResponse: googleapi.ServerResponse{
  13668. Header: res.Header,
  13669. HTTPStatusCode: res.StatusCode,
  13670. },
  13671. }
  13672. target := &ret
  13673. if err := gensupport.DecodeResponse(target, res); err != nil {
  13674. return nil, err
  13675. }
  13676. return ret, nil
  13677. // {
  13678. // "description": "Creates a message and sends a notification to the Cloud Pub/Sub topic. If\nconfigured, the MLLP adapter listens to messages created by this method and\nsends those back to the hospital. A successful response indicates the\nmessage has been persisted to storage and a Cloud Pub/Sub notification has\nbeen sent. Sending to the hospital by the MLLP adapter happens\nasynchronously.",
  13679. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}/messages",
  13680. // "httpMethod": "POST",
  13681. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.messages.create",
  13682. // "parameterOrder": [
  13683. // "parent"
  13684. // ],
  13685. // "parameters": {
  13686. // "parent": {
  13687. // "description": "The name of the dataset this message belongs to.",
  13688. // "location": "path",
  13689. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$",
  13690. // "required": true,
  13691. // "type": "string"
  13692. // }
  13693. // },
  13694. // "path": "v1alpha/{+parent}/messages",
  13695. // "request": {
  13696. // "$ref": "CreateMessageRequest"
  13697. // },
  13698. // "response": {
  13699. // "$ref": "Message"
  13700. // },
  13701. // "scopes": [
  13702. // "https://www.googleapis.com/auth/cloud-platform"
  13703. // ]
  13704. // }
  13705. }
  13706. // method id "healthcare.projects.locations.datasets.hl7V2Stores.messages.delete":
  13707. type ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall struct {
  13708. s *Service
  13709. name string
  13710. urlParams_ gensupport.URLParams
  13711. ctx_ context.Context
  13712. header_ http.Header
  13713. }
  13714. // Delete: Deletes an HL7v2 message.
  13715. func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Delete(name string) *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall {
  13716. c := &ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  13717. c.name = name
  13718. return c
  13719. }
  13720. // Fields allows partial responses to be retrieved. See
  13721. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  13722. // for more information.
  13723. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall {
  13724. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  13725. return c
  13726. }
  13727. // Context sets the context to be used in this call's Do method. Any
  13728. // pending HTTP request will be aborted if the provided context is
  13729. // canceled.
  13730. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall {
  13731. c.ctx_ = ctx
  13732. return c
  13733. }
  13734. // Header returns an http.Header that can be modified by the caller to
  13735. // add HTTP headers to the request.
  13736. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) Header() http.Header {
  13737. if c.header_ == nil {
  13738. c.header_ = make(http.Header)
  13739. }
  13740. return c.header_
  13741. }
  13742. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) doRequest(alt string) (*http.Response, error) {
  13743. reqHeaders := make(http.Header)
  13744. for k, v := range c.header_ {
  13745. reqHeaders[k] = v
  13746. }
  13747. reqHeaders.Set("User-Agent", c.s.userAgent())
  13748. var body io.Reader = nil
  13749. c.urlParams_.Set("alt", alt)
  13750. c.urlParams_.Set("prettyPrint", "false")
  13751. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  13752. urls += "?" + c.urlParams_.Encode()
  13753. req, err := http.NewRequest("DELETE", urls, body)
  13754. if err != nil {
  13755. return nil, err
  13756. }
  13757. req.Header = reqHeaders
  13758. googleapi.Expand(req.URL, map[string]string{
  13759. "name": c.name,
  13760. })
  13761. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  13762. }
  13763. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.delete" call.
  13764. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  13765. // code is an error. Response headers are in either
  13766. // *Empty.ServerResponse.Header or (if a response was returned at all)
  13767. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  13768. // check whether the returned error was because http.StatusNotModified
  13769. // was returned.
  13770. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  13771. gensupport.SetOptions(c.urlParams_, opts...)
  13772. res, err := c.doRequest("json")
  13773. if res != nil && res.StatusCode == http.StatusNotModified {
  13774. if res.Body != nil {
  13775. res.Body.Close()
  13776. }
  13777. return nil, &googleapi.Error{
  13778. Code: res.StatusCode,
  13779. Header: res.Header,
  13780. }
  13781. }
  13782. if err != nil {
  13783. return nil, err
  13784. }
  13785. defer googleapi.CloseBody(res)
  13786. if err := googleapi.CheckResponse(res); err != nil {
  13787. return nil, err
  13788. }
  13789. ret := &Empty{
  13790. ServerResponse: googleapi.ServerResponse{
  13791. Header: res.Header,
  13792. HTTPStatusCode: res.StatusCode,
  13793. },
  13794. }
  13795. target := &ret
  13796. if err := gensupport.DecodeResponse(target, res); err != nil {
  13797. return nil, err
  13798. }
  13799. return ret, nil
  13800. // {
  13801. // "description": "Deletes an HL7v2 message.",
  13802. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}/messages/{messagesId}",
  13803. // "httpMethod": "DELETE",
  13804. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.messages.delete",
  13805. // "parameterOrder": [
  13806. // "name"
  13807. // ],
  13808. // "parameters": {
  13809. // "name": {
  13810. // "description": "The resource name of the HL7v2 message to delete.",
  13811. // "location": "path",
  13812. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+/messages/[^/]+$",
  13813. // "required": true,
  13814. // "type": "string"
  13815. // }
  13816. // },
  13817. // "path": "v1alpha/{+name}",
  13818. // "response": {
  13819. // "$ref": "Empty"
  13820. // },
  13821. // "scopes": [
  13822. // "https://www.googleapis.com/auth/cloud-platform"
  13823. // ]
  13824. // }
  13825. }
  13826. // method id "healthcare.projects.locations.datasets.hl7V2Stores.messages.get":
  13827. type ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall struct {
  13828. s *Service
  13829. name string
  13830. urlParams_ gensupport.URLParams
  13831. ifNoneMatch_ string
  13832. ctx_ context.Context
  13833. header_ http.Header
  13834. }
  13835. // Get: Gets an HL7v2 message.
  13836. func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Get(name string) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall {
  13837. c := &ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  13838. c.name = name
  13839. return c
  13840. }
  13841. // View sets the optional parameter "view": Specifies which parts of the
  13842. // Message resource should be returned
  13843. // in the response.
  13844. //
  13845. // Possible values:
  13846. // "MESSAGE_VIEW_UNSPECIFIED"
  13847. // "RAW_ONLY"
  13848. // "PARSED_ONLY"
  13849. // "FULL"
  13850. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) View(view string) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall {
  13851. c.urlParams_.Set("view", view)
  13852. return c
  13853. }
  13854. // Fields allows partial responses to be retrieved. See
  13855. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  13856. // for more information.
  13857. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall {
  13858. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  13859. return c
  13860. }
  13861. // IfNoneMatch sets the optional parameter which makes the operation
  13862. // fail if the object's ETag matches the given value. This is useful for
  13863. // getting updates only after the object has changed since the last
  13864. // request. Use googleapi.IsNotModified to check whether the response
  13865. // error from Do is the result of In-None-Match.
  13866. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall {
  13867. c.ifNoneMatch_ = entityTag
  13868. return c
  13869. }
  13870. // Context sets the context to be used in this call's Do method. Any
  13871. // pending HTTP request will be aborted if the provided context is
  13872. // canceled.
  13873. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall {
  13874. c.ctx_ = ctx
  13875. return c
  13876. }
  13877. // Header returns an http.Header that can be modified by the caller to
  13878. // add HTTP headers to the request.
  13879. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) Header() http.Header {
  13880. if c.header_ == nil {
  13881. c.header_ = make(http.Header)
  13882. }
  13883. return c.header_
  13884. }
  13885. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) doRequest(alt string) (*http.Response, error) {
  13886. reqHeaders := make(http.Header)
  13887. for k, v := range c.header_ {
  13888. reqHeaders[k] = v
  13889. }
  13890. reqHeaders.Set("User-Agent", c.s.userAgent())
  13891. if c.ifNoneMatch_ != "" {
  13892. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  13893. }
  13894. var body io.Reader = nil
  13895. c.urlParams_.Set("alt", alt)
  13896. c.urlParams_.Set("prettyPrint", "false")
  13897. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  13898. urls += "?" + c.urlParams_.Encode()
  13899. req, err := http.NewRequest("GET", urls, body)
  13900. if err != nil {
  13901. return nil, err
  13902. }
  13903. req.Header = reqHeaders
  13904. googleapi.Expand(req.URL, map[string]string{
  13905. "name": c.name,
  13906. })
  13907. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  13908. }
  13909. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.get" call.
  13910. // Exactly one of *Message or error will be non-nil. Any non-2xx status
  13911. // code is an error. Response headers are in either
  13912. // *Message.ServerResponse.Header or (if a response was returned at all)
  13913. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  13914. // check whether the returned error was because http.StatusNotModified
  13915. // was returned.
  13916. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) Do(opts ...googleapi.CallOption) (*Message, error) {
  13917. gensupport.SetOptions(c.urlParams_, opts...)
  13918. res, err := c.doRequest("json")
  13919. if res != nil && res.StatusCode == http.StatusNotModified {
  13920. if res.Body != nil {
  13921. res.Body.Close()
  13922. }
  13923. return nil, &googleapi.Error{
  13924. Code: res.StatusCode,
  13925. Header: res.Header,
  13926. }
  13927. }
  13928. if err != nil {
  13929. return nil, err
  13930. }
  13931. defer googleapi.CloseBody(res)
  13932. if err := googleapi.CheckResponse(res); err != nil {
  13933. return nil, err
  13934. }
  13935. ret := &Message{
  13936. ServerResponse: googleapi.ServerResponse{
  13937. Header: res.Header,
  13938. HTTPStatusCode: res.StatusCode,
  13939. },
  13940. }
  13941. target := &ret
  13942. if err := gensupport.DecodeResponse(target, res); err != nil {
  13943. return nil, err
  13944. }
  13945. return ret, nil
  13946. // {
  13947. // "description": "Gets an HL7v2 message.",
  13948. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}/messages/{messagesId}",
  13949. // "httpMethod": "GET",
  13950. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.messages.get",
  13951. // "parameterOrder": [
  13952. // "name"
  13953. // ],
  13954. // "parameters": {
  13955. // "name": {
  13956. // "description": "The resource name of the HL7v2 message to retrieve.",
  13957. // "location": "path",
  13958. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+/messages/[^/]+$",
  13959. // "required": true,
  13960. // "type": "string"
  13961. // },
  13962. // "view": {
  13963. // "description": "Specifies which parts of the Message resource should be returned\nin the response.",
  13964. // "enum": [
  13965. // "MESSAGE_VIEW_UNSPECIFIED",
  13966. // "RAW_ONLY",
  13967. // "PARSED_ONLY",
  13968. // "FULL"
  13969. // ],
  13970. // "location": "query",
  13971. // "type": "string"
  13972. // }
  13973. // },
  13974. // "path": "v1alpha/{+name}",
  13975. // "response": {
  13976. // "$ref": "Message"
  13977. // },
  13978. // "scopes": [
  13979. // "https://www.googleapis.com/auth/cloud-platform"
  13980. // ]
  13981. // }
  13982. }
  13983. // method id "healthcare.projects.locations.datasets.hl7V2Stores.messages.ingest":
  13984. type ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall struct {
  13985. s *Service
  13986. parent string
  13987. ingestmessagerequest *IngestMessageRequest
  13988. urlParams_ gensupport.URLParams
  13989. ctx_ context.Context
  13990. header_ http.Header
  13991. }
  13992. // Ingest: Ingests a new HL7v2 message from the hospital and sends a
  13993. // notification to
  13994. // the Cloud Pub/Sub topic. Return is an HL7v2 ACK message if the
  13995. // message was
  13996. // successfully stored. Otherwise an error is returned. If an
  13997. // identical
  13998. // HL7v2 message is created twice only one resource is created on the
  13999. // server
  14000. // and no error is reported.
  14001. func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Ingest(parent string, ingestmessagerequest *IngestMessageRequest) *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall {
  14002. c := &ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  14003. c.parent = parent
  14004. c.ingestmessagerequest = ingestmessagerequest
  14005. return c
  14006. }
  14007. // Fields allows partial responses to be retrieved. See
  14008. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  14009. // for more information.
  14010. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall {
  14011. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  14012. return c
  14013. }
  14014. // Context sets the context to be used in this call's Do method. Any
  14015. // pending HTTP request will be aborted if the provided context is
  14016. // canceled.
  14017. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall {
  14018. c.ctx_ = ctx
  14019. return c
  14020. }
  14021. // Header returns an http.Header that can be modified by the caller to
  14022. // add HTTP headers to the request.
  14023. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) Header() http.Header {
  14024. if c.header_ == nil {
  14025. c.header_ = make(http.Header)
  14026. }
  14027. return c.header_
  14028. }
  14029. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) doRequest(alt string) (*http.Response, error) {
  14030. reqHeaders := make(http.Header)
  14031. for k, v := range c.header_ {
  14032. reqHeaders[k] = v
  14033. }
  14034. reqHeaders.Set("User-Agent", c.s.userAgent())
  14035. var body io.Reader = nil
  14036. body, err := googleapi.WithoutDataWrapper.JSONReader(c.ingestmessagerequest)
  14037. if err != nil {
  14038. return nil, err
  14039. }
  14040. reqHeaders.Set("Content-Type", "application/json")
  14041. c.urlParams_.Set("alt", alt)
  14042. c.urlParams_.Set("prettyPrint", "false")
  14043. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/messages:ingest")
  14044. urls += "?" + c.urlParams_.Encode()
  14045. req, err := http.NewRequest("POST", urls, body)
  14046. if err != nil {
  14047. return nil, err
  14048. }
  14049. req.Header = reqHeaders
  14050. googleapi.Expand(req.URL, map[string]string{
  14051. "parent": c.parent,
  14052. })
  14053. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  14054. }
  14055. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.ingest" call.
  14056. // Exactly one of *IngestMessageResponse or error will be non-nil. Any
  14057. // non-2xx status code is an error. Response headers are in either
  14058. // *IngestMessageResponse.ServerResponse.Header or (if a response was
  14059. // returned at all) in error.(*googleapi.Error).Header. Use
  14060. // googleapi.IsNotModified to check whether the returned error was
  14061. // because http.StatusNotModified was returned.
  14062. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) Do(opts ...googleapi.CallOption) (*IngestMessageResponse, error) {
  14063. gensupport.SetOptions(c.urlParams_, opts...)
  14064. res, err := c.doRequest("json")
  14065. if res != nil && res.StatusCode == http.StatusNotModified {
  14066. if res.Body != nil {
  14067. res.Body.Close()
  14068. }
  14069. return nil, &googleapi.Error{
  14070. Code: res.StatusCode,
  14071. Header: res.Header,
  14072. }
  14073. }
  14074. if err != nil {
  14075. return nil, err
  14076. }
  14077. defer googleapi.CloseBody(res)
  14078. if err := googleapi.CheckResponse(res); err != nil {
  14079. return nil, err
  14080. }
  14081. ret := &IngestMessageResponse{
  14082. ServerResponse: googleapi.ServerResponse{
  14083. Header: res.Header,
  14084. HTTPStatusCode: res.StatusCode,
  14085. },
  14086. }
  14087. target := &ret
  14088. if err := gensupport.DecodeResponse(target, res); err != nil {
  14089. return nil, err
  14090. }
  14091. return ret, nil
  14092. // {
  14093. // "description": "Ingests a new HL7v2 message from the hospital and sends a notification to\nthe Cloud Pub/Sub topic. Return is an HL7v2 ACK message if the message was\nsuccessfully stored. Otherwise an error is returned. If an identical\nHL7v2 message is created twice only one resource is created on the server\nand no error is reported.",
  14094. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}/messages:ingest",
  14095. // "httpMethod": "POST",
  14096. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.messages.ingest",
  14097. // "parameterOrder": [
  14098. // "parent"
  14099. // ],
  14100. // "parameters": {
  14101. // "parent": {
  14102. // "description": "The name of the HL7v2 store this message belongs to.",
  14103. // "location": "path",
  14104. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$",
  14105. // "required": true,
  14106. // "type": "string"
  14107. // }
  14108. // },
  14109. // "path": "v1alpha/{+parent}/messages:ingest",
  14110. // "request": {
  14111. // "$ref": "IngestMessageRequest"
  14112. // },
  14113. // "response": {
  14114. // "$ref": "IngestMessageResponse"
  14115. // },
  14116. // "scopes": [
  14117. // "https://www.googleapis.com/auth/cloud-platform"
  14118. // ]
  14119. // }
  14120. }
  14121. // method id "healthcare.projects.locations.datasets.hl7V2Stores.messages.list":
  14122. type ProjectsLocationsDatasetsHl7V2StoresMessagesListCall struct {
  14123. s *Service
  14124. parent string
  14125. urlParams_ gensupport.URLParams
  14126. ifNoneMatch_ string
  14127. ctx_ context.Context
  14128. header_ http.Header
  14129. }
  14130. // List: Lists all the messages in the given HL7v2 store with support
  14131. // for filtering.
  14132. func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) List(parent string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
  14133. c := &ProjectsLocationsDatasetsHl7V2StoresMessagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  14134. c.parent = parent
  14135. return c
  14136. }
  14137. // Filter sets the optional parameter "filter": Restricts messages
  14138. // returned to those matching a filter.
  14139. // Syntax:
  14140. // https://cloud.google.com/appengine/docs/standard/python/search
  14141. // /query_strings
  14142. // Fields/functions available for filtering are:
  14143. // - message_type, from the MSH-9 segment, e.g. 'NOT message_type =
  14144. // "ADT"'
  14145. // - send_date or sendDate, the YYYY-MM-DD date the message was sent in
  14146. // the
  14147. // dataset's time_zone, from the MSH-7 segment; e.g.
  14148. // 'send_date < "2017-01-02"'
  14149. // - send_time, the timestamp of when the message was sent, using the
  14150. // RFC3339
  14151. // time format for comparisons, from the MSH-7 segment; e.g.
  14152. // 'send_time <
  14153. // "2017-01-02T00:00:00-05:00"'
  14154. // - send_facility, the hospital/trust that the message came from, from
  14155. // the
  14156. // MSH-4 segment, e.g. 'send_facility = "RAL"'
  14157. // - HL7RegExp(expr), which does regular expression matching of expr
  14158. // against
  14159. // the HL7 message payload using re2 (http://code.google.com/p/re2/)
  14160. // syntax; e.g. 'HL7RegExp("^.*\|.*\|CERNER")'
  14161. // - PatientId(value, type), which matches if the message lists a
  14162. // patient
  14163. // having an ID of the given value and type in the PID-2, PID-3, or
  14164. // PID-4
  14165. // segments; e.g. 'PatientId("123456", "MRN")'
  14166. // - HasLabel(x), a boolean returning true if the message has a label
  14167. // with
  14168. // key x (having any value) set using the labels map in Message; e.g.
  14169. // 'HasLabel("priority")'
  14170. // - Label(x), a string value of the label with key x as set using the
  14171. // labels
  14172. // map in Message, e.g. 'Label("priority") = "high"'
  14173. // Negation on the patient ID function and the label function are
  14174. // not
  14175. // supported, e.g. invalid queries: 'NOT PatientId("123456",
  14176. // "MRN")',
  14177. // 'NOT HasLabel("tag1")', 'NOT Label("tag2") = "val2"'.
  14178. // Conjunction of multiple patient ID functions is not supported, e.g.
  14179. // an
  14180. // invalid query: 'PatientId("123456", "MRN") AND PatientId("456789",
  14181. // "MRN")'.
  14182. // Conjunction of multiple label functions is also not supported, e.g.
  14183. // an
  14184. // invalid query: 'HasLabel("tag1") AND Label("tag2") =
  14185. // "val2"'.
  14186. // Conjunction of one patient ID function, one label function and other
  14187. // fields
  14188. // is supported, e.g. a valid query:
  14189. // 'PatientId("123456", "MRN") AND HasLabel("tag1") AND message_type =
  14190. // "ADT"'.
  14191. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Filter(filter string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
  14192. c.urlParams_.Set("filter", filter)
  14193. return c
  14194. }
  14195. // OrderBy sets the optional parameter "orderBy": Orders messages
  14196. // returned by the specified order_by clause.
  14197. // Syntax:
  14198. // https://cloud.google.com/apis/design/design_patterns#sorting_order
  14199. // Fie
  14200. // lds available for ordering are:
  14201. // - send_time
  14202. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
  14203. c.urlParams_.Set("orderBy", orderBy)
  14204. return c
  14205. }
  14206. // PageSize sets the optional parameter "pageSize": Limit on the number
  14207. // of messages to return in a single response.
  14208. // If zero the default page size of 100 is used.
  14209. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
  14210. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  14211. return c
  14212. }
  14213. // PageToken sets the optional parameter "pageToken": The
  14214. // next_page_token value returned from the previous List request, if
  14215. // any.
  14216. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
  14217. c.urlParams_.Set("pageToken", pageToken)
  14218. return c
  14219. }
  14220. // Fields allows partial responses to be retrieved. See
  14221. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  14222. // for more information.
  14223. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
  14224. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  14225. return c
  14226. }
  14227. // IfNoneMatch sets the optional parameter which makes the operation
  14228. // fail if the object's ETag matches the given value. This is useful for
  14229. // getting updates only after the object has changed since the last
  14230. // request. Use googleapi.IsNotModified to check whether the response
  14231. // error from Do is the result of In-None-Match.
  14232. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
  14233. c.ifNoneMatch_ = entityTag
  14234. return c
  14235. }
  14236. // Context sets the context to be used in this call's Do method. Any
  14237. // pending HTTP request will be aborted if the provided context is
  14238. // canceled.
  14239. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
  14240. c.ctx_ = ctx
  14241. return c
  14242. }
  14243. // Header returns an http.Header that can be modified by the caller to
  14244. // add HTTP headers to the request.
  14245. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Header() http.Header {
  14246. if c.header_ == nil {
  14247. c.header_ = make(http.Header)
  14248. }
  14249. return c.header_
  14250. }
  14251. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) doRequest(alt string) (*http.Response, error) {
  14252. reqHeaders := make(http.Header)
  14253. for k, v := range c.header_ {
  14254. reqHeaders[k] = v
  14255. }
  14256. reqHeaders.Set("User-Agent", c.s.userAgent())
  14257. if c.ifNoneMatch_ != "" {
  14258. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  14259. }
  14260. var body io.Reader = nil
  14261. c.urlParams_.Set("alt", alt)
  14262. c.urlParams_.Set("prettyPrint", "false")
  14263. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/messages")
  14264. urls += "?" + c.urlParams_.Encode()
  14265. req, err := http.NewRequest("GET", urls, body)
  14266. if err != nil {
  14267. return nil, err
  14268. }
  14269. req.Header = reqHeaders
  14270. googleapi.Expand(req.URL, map[string]string{
  14271. "parent": c.parent,
  14272. })
  14273. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  14274. }
  14275. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.list" call.
  14276. // Exactly one of *ListMessagesResponse or error will be non-nil. Any
  14277. // non-2xx status code is an error. Response headers are in either
  14278. // *ListMessagesResponse.ServerResponse.Header or (if a response was
  14279. // returned at all) in error.(*googleapi.Error).Header. Use
  14280. // googleapi.IsNotModified to check whether the returned error was
  14281. // because http.StatusNotModified was returned.
  14282. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Do(opts ...googleapi.CallOption) (*ListMessagesResponse, error) {
  14283. gensupport.SetOptions(c.urlParams_, opts...)
  14284. res, err := c.doRequest("json")
  14285. if res != nil && res.StatusCode == http.StatusNotModified {
  14286. if res.Body != nil {
  14287. res.Body.Close()
  14288. }
  14289. return nil, &googleapi.Error{
  14290. Code: res.StatusCode,
  14291. Header: res.Header,
  14292. }
  14293. }
  14294. if err != nil {
  14295. return nil, err
  14296. }
  14297. defer googleapi.CloseBody(res)
  14298. if err := googleapi.CheckResponse(res); err != nil {
  14299. return nil, err
  14300. }
  14301. ret := &ListMessagesResponse{
  14302. ServerResponse: googleapi.ServerResponse{
  14303. Header: res.Header,
  14304. HTTPStatusCode: res.StatusCode,
  14305. },
  14306. }
  14307. target := &ret
  14308. if err := gensupport.DecodeResponse(target, res); err != nil {
  14309. return nil, err
  14310. }
  14311. return ret, nil
  14312. // {
  14313. // "description": "Lists all the messages in the given HL7v2 store with support for filtering.",
  14314. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}/messages",
  14315. // "httpMethod": "GET",
  14316. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.messages.list",
  14317. // "parameterOrder": [
  14318. // "parent"
  14319. // ],
  14320. // "parameters": {
  14321. // "filter": {
  14322. // "description": "Restricts messages returned to those matching a filter. Syntax:\nhttps://cloud.google.com/appengine/docs/standard/python/search/query_strings\nFields/functions available for filtering are:\n- message_type, from the MSH-9 segment, e.g. 'NOT message_type = \"ADT\"'\n- send_date or sendDate, the YYYY-MM-DD date the message was sent in the\n dataset's time_zone, from the MSH-7 segment; e.g.\n 'send_date \u003c \"2017-01-02\"'\n- send_time, the timestamp of when the message was sent, using the RFC3339\n time format for comparisons, from the MSH-7 segment; e.g. 'send_time \u003c\n \"2017-01-02T00:00:00-05:00\"'\n- send_facility, the hospital/trust that the message came from, from the\n MSH-4 segment, e.g. 'send_facility = \"RAL\"'\n- HL7RegExp(expr), which does regular expression matching of expr against\n the HL7 message payload using re2 (http://code.google.com/p/re2/)\n syntax; e.g. 'HL7RegExp(\"^.*\\|.*\\|CERNER\")'\n- PatientId(value, type), which matches if the message lists a patient\n having an ID of the given value and type in the PID-2, PID-3, or PID-4\n segments; e.g. 'PatientId(\"123456\", \"MRN\")'\n- HasLabel(x), a boolean returning true if the message has a label with\n key x (having any value) set using the labels map in Message; e.g.\n 'HasLabel(\"priority\")'\n- Label(x), a string value of the label with key x as set using the labels\n map in Message, e.g. 'Label(\"priority\") = \"high\"'\nNegation on the patient ID function and the label function are not\nsupported, e.g. invalid queries: 'NOT PatientId(\"123456\", \"MRN\")',\n'NOT HasLabel(\"tag1\")', 'NOT Label(\"tag2\") = \"val2\"'.\nConjunction of multiple patient ID functions is not supported, e.g. an\ninvalid query: 'PatientId(\"123456\", \"MRN\") AND PatientId(\"456789\", \"MRN\")'.\nConjunction of multiple label functions is also not supported, e.g. an\ninvalid query: 'HasLabel(\"tag1\") AND Label(\"tag2\") = \"val2\"'.\nConjunction of one patient ID function, one label function and other fields\nis supported, e.g. a valid query:\n'PatientId(\"123456\", \"MRN\") AND HasLabel(\"tag1\") AND message_type = \"ADT\"'.",
  14323. // "location": "query",
  14324. // "type": "string"
  14325. // },
  14326. // "orderBy": {
  14327. // "description": "Orders messages returned by the specified order_by clause.\nSyntax: https://cloud.google.com/apis/design/design_patterns#sorting_order\nFields available for ordering are:\n- send_time",
  14328. // "location": "query",
  14329. // "type": "string"
  14330. // },
  14331. // "pageSize": {
  14332. // "description": "Limit on the number of messages to return in a single response.\nIf zero the default page size of 100 is used.",
  14333. // "format": "int32",
  14334. // "location": "query",
  14335. // "type": "integer"
  14336. // },
  14337. // "pageToken": {
  14338. // "description": "The next_page_token value returned from the previous List request, if any.",
  14339. // "location": "query",
  14340. // "type": "string"
  14341. // },
  14342. // "parent": {
  14343. // "description": "Name of the HL7v2 store to retrieve messages from.",
  14344. // "location": "path",
  14345. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$",
  14346. // "required": true,
  14347. // "type": "string"
  14348. // }
  14349. // },
  14350. // "path": "v1alpha/{+parent}/messages",
  14351. // "response": {
  14352. // "$ref": "ListMessagesResponse"
  14353. // },
  14354. // "scopes": [
  14355. // "https://www.googleapis.com/auth/cloud-platform"
  14356. // ]
  14357. // }
  14358. }
  14359. // Pages invokes f for each page of results.
  14360. // A non-nil error returned from f will halt the iteration.
  14361. // The provided context supersedes any context provided to the Context method.
  14362. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Pages(ctx context.Context, f func(*ListMessagesResponse) error) error {
  14363. c.ctx_ = ctx
  14364. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  14365. for {
  14366. x, err := c.Do()
  14367. if err != nil {
  14368. return err
  14369. }
  14370. if err := f(x); err != nil {
  14371. return err
  14372. }
  14373. if x.NextPageToken == "" {
  14374. return nil
  14375. }
  14376. c.PageToken(x.NextPageToken)
  14377. }
  14378. }
  14379. // method id "healthcare.projects.locations.datasets.hl7V2Stores.messages.patch":
  14380. type ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall struct {
  14381. s *Service
  14382. name string
  14383. message *Message
  14384. urlParams_ gensupport.URLParams
  14385. ctx_ context.Context
  14386. header_ http.Header
  14387. }
  14388. // Patch: Update the message.
  14389. func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Patch(name string, message *Message) *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall {
  14390. c := &ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  14391. c.name = name
  14392. c.message = message
  14393. return c
  14394. }
  14395. // UpdateMask sets the optional parameter "updateMask": The update mask
  14396. // applies to the resource. For the `FieldMask`
  14397. // definition,
  14398. // see
  14399. // https://developers.google.com/protocol-buffers/docs/re
  14400. // ference/google.protobuf#fieldmask
  14401. // Only the `labels` field is allowed to be updated.
  14402. // The labels in the request will be merged with the existing set of
  14403. // labels.
  14404. // Existing labels with the same keys will be updated.
  14405. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall {
  14406. c.urlParams_.Set("updateMask", updateMask)
  14407. return c
  14408. }
  14409. // Fields allows partial responses to be retrieved. See
  14410. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  14411. // for more information.
  14412. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall {
  14413. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  14414. return c
  14415. }
  14416. // Context sets the context to be used in this call's Do method. Any
  14417. // pending HTTP request will be aborted if the provided context is
  14418. // canceled.
  14419. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall {
  14420. c.ctx_ = ctx
  14421. return c
  14422. }
  14423. // Header returns an http.Header that can be modified by the caller to
  14424. // add HTTP headers to the request.
  14425. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) Header() http.Header {
  14426. if c.header_ == nil {
  14427. c.header_ = make(http.Header)
  14428. }
  14429. return c.header_
  14430. }
  14431. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) doRequest(alt string) (*http.Response, error) {
  14432. reqHeaders := make(http.Header)
  14433. for k, v := range c.header_ {
  14434. reqHeaders[k] = v
  14435. }
  14436. reqHeaders.Set("User-Agent", c.s.userAgent())
  14437. var body io.Reader = nil
  14438. body, err := googleapi.WithoutDataWrapper.JSONReader(c.message)
  14439. if err != nil {
  14440. return nil, err
  14441. }
  14442. reqHeaders.Set("Content-Type", "application/json")
  14443. c.urlParams_.Set("alt", alt)
  14444. c.urlParams_.Set("prettyPrint", "false")
  14445. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  14446. urls += "?" + c.urlParams_.Encode()
  14447. req, err := http.NewRequest("PATCH", urls, body)
  14448. if err != nil {
  14449. return nil, err
  14450. }
  14451. req.Header = reqHeaders
  14452. googleapi.Expand(req.URL, map[string]string{
  14453. "name": c.name,
  14454. })
  14455. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  14456. }
  14457. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.patch" call.
  14458. // Exactly one of *Message or error will be non-nil. Any non-2xx status
  14459. // code is an error. Response headers are in either
  14460. // *Message.ServerResponse.Header or (if a response was returned at all)
  14461. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  14462. // check whether the returned error was because http.StatusNotModified
  14463. // was returned.
  14464. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) Do(opts ...googleapi.CallOption) (*Message, error) {
  14465. gensupport.SetOptions(c.urlParams_, opts...)
  14466. res, err := c.doRequest("json")
  14467. if res != nil && res.StatusCode == http.StatusNotModified {
  14468. if res.Body != nil {
  14469. res.Body.Close()
  14470. }
  14471. return nil, &googleapi.Error{
  14472. Code: res.StatusCode,
  14473. Header: res.Header,
  14474. }
  14475. }
  14476. if err != nil {
  14477. return nil, err
  14478. }
  14479. defer googleapi.CloseBody(res)
  14480. if err := googleapi.CheckResponse(res); err != nil {
  14481. return nil, err
  14482. }
  14483. ret := &Message{
  14484. ServerResponse: googleapi.ServerResponse{
  14485. Header: res.Header,
  14486. HTTPStatusCode: res.StatusCode,
  14487. },
  14488. }
  14489. target := &ret
  14490. if err := gensupport.DecodeResponse(target, res); err != nil {
  14491. return nil, err
  14492. }
  14493. return ret, nil
  14494. // {
  14495. // "description": "Update the message.",
  14496. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}/messages/{messagesId}",
  14497. // "httpMethod": "PATCH",
  14498. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.messages.patch",
  14499. // "parameterOrder": [
  14500. // "name"
  14501. // ],
  14502. // "parameters": {
  14503. // "name": {
  14504. // "description": "Resource name of the Message, of the form\n`projects/{project_id}/datasets/{dataset_id}/hl7V2Stores/{hl7_v2_store_id}/messages/{message_id}`.\nAssigned by the server.",
  14505. // "location": "path",
  14506. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+/messages/[^/]+$",
  14507. // "required": true,
  14508. // "type": "string"
  14509. // },
  14510. // "updateMask": {
  14511. // "description": "The update mask applies to the resource. For the `FieldMask` definition,\nsee\nhttps://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask\nOnly the `labels` field is allowed to be updated.\nThe labels in the request will be merged with the existing set of labels.\nExisting labels with the same keys will be updated.",
  14512. // "format": "google-fieldmask",
  14513. // "location": "query",
  14514. // "type": "string"
  14515. // }
  14516. // },
  14517. // "path": "v1alpha/{+name}",
  14518. // "request": {
  14519. // "$ref": "Message"
  14520. // },
  14521. // "response": {
  14522. // "$ref": "Message"
  14523. // },
  14524. // "scopes": [
  14525. // "https://www.googleapis.com/auth/cloud-platform"
  14526. // ]
  14527. // }
  14528. }
  14529. // method id "healthcare.projects.locations.datasets.operations.get":
  14530. type ProjectsLocationsDatasetsOperationsGetCall struct {
  14531. s *Service
  14532. name string
  14533. urlParams_ gensupport.URLParams
  14534. ifNoneMatch_ string
  14535. ctx_ context.Context
  14536. header_ http.Header
  14537. }
  14538. // Get: Gets the latest state of a long-running operation. Clients can
  14539. // use this
  14540. // method to poll the operation result at intervals as recommended by
  14541. // the API
  14542. // service.
  14543. func (r *ProjectsLocationsDatasetsOperationsService) Get(name string) *ProjectsLocationsDatasetsOperationsGetCall {
  14544. c := &ProjectsLocationsDatasetsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  14545. c.name = name
  14546. return c
  14547. }
  14548. // Fields allows partial responses to be retrieved. See
  14549. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  14550. // for more information.
  14551. func (c *ProjectsLocationsDatasetsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsGetCall {
  14552. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  14553. return c
  14554. }
  14555. // IfNoneMatch sets the optional parameter which makes the operation
  14556. // fail if the object's ETag matches the given value. This is useful for
  14557. // getting updates only after the object has changed since the last
  14558. // request. Use googleapi.IsNotModified to check whether the response
  14559. // error from Do is the result of In-None-Match.
  14560. func (c *ProjectsLocationsDatasetsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsOperationsGetCall {
  14561. c.ifNoneMatch_ = entityTag
  14562. return c
  14563. }
  14564. // Context sets the context to be used in this call's Do method. Any
  14565. // pending HTTP request will be aborted if the provided context is
  14566. // canceled.
  14567. func (c *ProjectsLocationsDatasetsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsGetCall {
  14568. c.ctx_ = ctx
  14569. return c
  14570. }
  14571. // Header returns an http.Header that can be modified by the caller to
  14572. // add HTTP headers to the request.
  14573. func (c *ProjectsLocationsDatasetsOperationsGetCall) Header() http.Header {
  14574. if c.header_ == nil {
  14575. c.header_ = make(http.Header)
  14576. }
  14577. return c.header_
  14578. }
  14579. func (c *ProjectsLocationsDatasetsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  14580. reqHeaders := make(http.Header)
  14581. for k, v := range c.header_ {
  14582. reqHeaders[k] = v
  14583. }
  14584. reqHeaders.Set("User-Agent", c.s.userAgent())
  14585. if c.ifNoneMatch_ != "" {
  14586. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  14587. }
  14588. var body io.Reader = nil
  14589. c.urlParams_.Set("alt", alt)
  14590. c.urlParams_.Set("prettyPrint", "false")
  14591. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  14592. urls += "?" + c.urlParams_.Encode()
  14593. req, err := http.NewRequest("GET", urls, body)
  14594. if err != nil {
  14595. return nil, err
  14596. }
  14597. req.Header = reqHeaders
  14598. googleapi.Expand(req.URL, map[string]string{
  14599. "name": c.name,
  14600. })
  14601. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  14602. }
  14603. // Do executes the "healthcare.projects.locations.datasets.operations.get" call.
  14604. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  14605. // status code is an error. Response headers are in either
  14606. // *Operation.ServerResponse.Header or (if a response was returned at
  14607. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  14608. // to check whether the returned error was because
  14609. // http.StatusNotModified was returned.
  14610. func (c *ProjectsLocationsDatasetsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  14611. gensupport.SetOptions(c.urlParams_, opts...)
  14612. res, err := c.doRequest("json")
  14613. if res != nil && res.StatusCode == http.StatusNotModified {
  14614. if res.Body != nil {
  14615. res.Body.Close()
  14616. }
  14617. return nil, &googleapi.Error{
  14618. Code: res.StatusCode,
  14619. Header: res.Header,
  14620. }
  14621. }
  14622. if err != nil {
  14623. return nil, err
  14624. }
  14625. defer googleapi.CloseBody(res)
  14626. if err := googleapi.CheckResponse(res); err != nil {
  14627. return nil, err
  14628. }
  14629. ret := &Operation{
  14630. ServerResponse: googleapi.ServerResponse{
  14631. Header: res.Header,
  14632. HTTPStatusCode: res.StatusCode,
  14633. },
  14634. }
  14635. target := &ret
  14636. if err := gensupport.DecodeResponse(target, res); err != nil {
  14637. return nil, err
  14638. }
  14639. return ret, nil
  14640. // {
  14641. // "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.",
  14642. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/operations/{operationsId}",
  14643. // "httpMethod": "GET",
  14644. // "id": "healthcare.projects.locations.datasets.operations.get",
  14645. // "parameterOrder": [
  14646. // "name"
  14647. // ],
  14648. // "parameters": {
  14649. // "name": {
  14650. // "description": "The name of the operation resource.",
  14651. // "location": "path",
  14652. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/operations/[^/]+$",
  14653. // "required": true,
  14654. // "type": "string"
  14655. // }
  14656. // },
  14657. // "path": "v1alpha/{+name}",
  14658. // "response": {
  14659. // "$ref": "Operation"
  14660. // },
  14661. // "scopes": [
  14662. // "https://www.googleapis.com/auth/cloud-platform"
  14663. // ]
  14664. // }
  14665. }
  14666. // method id "healthcare.projects.locations.datasets.operations.list":
  14667. type ProjectsLocationsDatasetsOperationsListCall struct {
  14668. s *Service
  14669. name string
  14670. urlParams_ gensupport.URLParams
  14671. ifNoneMatch_ string
  14672. ctx_ context.Context
  14673. header_ http.Header
  14674. }
  14675. // List: Lists operations that match the specified filter in the
  14676. // request. If the
  14677. // server doesn't support this method, it returns
  14678. // `UNIMPLEMENTED`.
  14679. //
  14680. // NOTE: the `name` binding allows API services to override the
  14681. // binding
  14682. // to use different resource name schemes, such as `users/*/operations`.
  14683. // To
  14684. // override the binding, API services can add a binding such
  14685. // as
  14686. // "/v1/{name=users/*}/operations" to their service configuration.
  14687. // For backwards compatibility, the default name includes the
  14688. // operations
  14689. // collection id, however overriding users must ensure the name
  14690. // binding
  14691. // is the parent resource, without the operations collection id.
  14692. func (r *ProjectsLocationsDatasetsOperationsService) List(name string) *ProjectsLocationsDatasetsOperationsListCall {
  14693. c := &ProjectsLocationsDatasetsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  14694. c.name = name
  14695. return c
  14696. }
  14697. // Filter sets the optional parameter "filter": The standard list
  14698. // filter.
  14699. func (c *ProjectsLocationsDatasetsOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsOperationsListCall {
  14700. c.urlParams_.Set("filter", filter)
  14701. return c
  14702. }
  14703. // PageSize sets the optional parameter "pageSize": The standard list
  14704. // page size.
  14705. func (c *ProjectsLocationsDatasetsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsOperationsListCall {
  14706. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  14707. return c
  14708. }
  14709. // PageToken sets the optional parameter "pageToken": The standard list
  14710. // page token.
  14711. func (c *ProjectsLocationsDatasetsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsOperationsListCall {
  14712. c.urlParams_.Set("pageToken", pageToken)
  14713. return c
  14714. }
  14715. // Fields allows partial responses to be retrieved. See
  14716. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  14717. // for more information.
  14718. func (c *ProjectsLocationsDatasetsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsListCall {
  14719. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  14720. return c
  14721. }
  14722. // IfNoneMatch sets the optional parameter which makes the operation
  14723. // fail if the object's ETag matches the given value. This is useful for
  14724. // getting updates only after the object has changed since the last
  14725. // request. Use googleapi.IsNotModified to check whether the response
  14726. // error from Do is the result of In-None-Match.
  14727. func (c *ProjectsLocationsDatasetsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsOperationsListCall {
  14728. c.ifNoneMatch_ = entityTag
  14729. return c
  14730. }
  14731. // Context sets the context to be used in this call's Do method. Any
  14732. // pending HTTP request will be aborted if the provided context is
  14733. // canceled.
  14734. func (c *ProjectsLocationsDatasetsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsListCall {
  14735. c.ctx_ = ctx
  14736. return c
  14737. }
  14738. // Header returns an http.Header that can be modified by the caller to
  14739. // add HTTP headers to the request.
  14740. func (c *ProjectsLocationsDatasetsOperationsListCall) Header() http.Header {
  14741. if c.header_ == nil {
  14742. c.header_ = make(http.Header)
  14743. }
  14744. return c.header_
  14745. }
  14746. func (c *ProjectsLocationsDatasetsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  14747. reqHeaders := make(http.Header)
  14748. for k, v := range c.header_ {
  14749. reqHeaders[k] = v
  14750. }
  14751. reqHeaders.Set("User-Agent", c.s.userAgent())
  14752. if c.ifNoneMatch_ != "" {
  14753. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  14754. }
  14755. var body io.Reader = nil
  14756. c.urlParams_.Set("alt", alt)
  14757. c.urlParams_.Set("prettyPrint", "false")
  14758. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations")
  14759. urls += "?" + c.urlParams_.Encode()
  14760. req, err := http.NewRequest("GET", urls, body)
  14761. if err != nil {
  14762. return nil, err
  14763. }
  14764. req.Header = reqHeaders
  14765. googleapi.Expand(req.URL, map[string]string{
  14766. "name": c.name,
  14767. })
  14768. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  14769. }
  14770. // Do executes the "healthcare.projects.locations.datasets.operations.list" call.
  14771. // Exactly one of *ListOperationsResponse or error will be non-nil. Any
  14772. // non-2xx status code is an error. Response headers are in either
  14773. // *ListOperationsResponse.ServerResponse.Header or (if a response was
  14774. // returned at all) in error.(*googleapi.Error).Header. Use
  14775. // googleapi.IsNotModified to check whether the returned error was
  14776. // because http.StatusNotModified was returned.
  14777. func (c *ProjectsLocationsDatasetsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  14778. gensupport.SetOptions(c.urlParams_, opts...)
  14779. res, err := c.doRequest("json")
  14780. if res != nil && res.StatusCode == http.StatusNotModified {
  14781. if res.Body != nil {
  14782. res.Body.Close()
  14783. }
  14784. return nil, &googleapi.Error{
  14785. Code: res.StatusCode,
  14786. Header: res.Header,
  14787. }
  14788. }
  14789. if err != nil {
  14790. return nil, err
  14791. }
  14792. defer googleapi.CloseBody(res)
  14793. if err := googleapi.CheckResponse(res); err != nil {
  14794. return nil, err
  14795. }
  14796. ret := &ListOperationsResponse{
  14797. ServerResponse: googleapi.ServerResponse{
  14798. Header: res.Header,
  14799. HTTPStatusCode: res.StatusCode,
  14800. },
  14801. }
  14802. target := &ret
  14803. if err := gensupport.DecodeResponse(target, res); err != nil {
  14804. return nil, err
  14805. }
  14806. return ret, nil
  14807. // {
  14808. // "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.",
  14809. // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/operations",
  14810. // "httpMethod": "GET",
  14811. // "id": "healthcare.projects.locations.datasets.operations.list",
  14812. // "parameterOrder": [
  14813. // "name"
  14814. // ],
  14815. // "parameters": {
  14816. // "filter": {
  14817. // "description": "The standard list filter.",
  14818. // "location": "query",
  14819. // "type": "string"
  14820. // },
  14821. // "name": {
  14822. // "description": "The name of the operation's parent resource.",
  14823. // "location": "path",
  14824. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  14825. // "required": true,
  14826. // "type": "string"
  14827. // },
  14828. // "pageSize": {
  14829. // "description": "The standard list page size.",
  14830. // "format": "int32",
  14831. // "location": "query",
  14832. // "type": "integer"
  14833. // },
  14834. // "pageToken": {
  14835. // "description": "The standard list page token.",
  14836. // "location": "query",
  14837. // "type": "string"
  14838. // }
  14839. // },
  14840. // "path": "v1alpha/{+name}/operations",
  14841. // "response": {
  14842. // "$ref": "ListOperationsResponse"
  14843. // },
  14844. // "scopes": [
  14845. // "https://www.googleapis.com/auth/cloud-platform"
  14846. // ]
  14847. // }
  14848. }
  14849. // Pages invokes f for each page of results.
  14850. // A non-nil error returned from f will halt the iteration.
  14851. // The provided context supersedes any context provided to the Context method.
  14852. func (c *ProjectsLocationsDatasetsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  14853. c.ctx_ = ctx
  14854. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  14855. for {
  14856. x, err := c.Do()
  14857. if err != nil {
  14858. return err
  14859. }
  14860. if err := f(x); err != nil {
  14861. return err
  14862. }
  14863. if x.NextPageToken == "" {
  14864. return nil
  14865. }
  14866. c.PageToken(x.NextPageToken)
  14867. }
  14868. }