Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

19354 řádky
705 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/v1alpha2"
  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/v1alpha2"
  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:v1alpha2"
  67. const apiName = "healthcare"
  68. const apiVersion = "v1alpha2"
  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. rs.Studies = NewProjectsLocationsDatasetsDicomStoresDicomWebStudiesService(s)
  183. return rs
  184. }
  185. type ProjectsLocationsDatasetsDicomStoresDicomWebService struct {
  186. s *Service
  187. Studies *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService
  188. }
  189. func NewProjectsLocationsDatasetsDicomStoresDicomWebStudiesService(s *Service) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService {
  190. rs := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService{s: s}
  191. rs.Series = NewProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService(s)
  192. return rs
  193. }
  194. type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService struct {
  195. s *Service
  196. Series *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService
  197. }
  198. func NewProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService(s *Service) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService {
  199. rs := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService{s: s}
  200. rs.Instances = NewProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService(s)
  201. return rs
  202. }
  203. type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService struct {
  204. s *Service
  205. Instances *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService
  206. }
  207. func NewProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService(s *Service) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService {
  208. rs := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService{s: s}
  209. rs.Frames = NewProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesService(s)
  210. return rs
  211. }
  212. type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService struct {
  213. s *Service
  214. Frames *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesService
  215. }
  216. func NewProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesService(s *Service) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesService {
  217. rs := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesService{s: s}
  218. return rs
  219. }
  220. type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesService struct {
  221. s *Service
  222. }
  223. func NewProjectsLocationsDatasetsFhirStoresService(s *Service) *ProjectsLocationsDatasetsFhirStoresService {
  224. rs := &ProjectsLocationsDatasetsFhirStoresService{s: s}
  225. rs.Fhir = NewProjectsLocationsDatasetsFhirStoresFhirService(s)
  226. rs.SecurityLabels = NewProjectsLocationsDatasetsFhirStoresSecurityLabelsService(s)
  227. return rs
  228. }
  229. type ProjectsLocationsDatasetsFhirStoresService struct {
  230. s *Service
  231. Fhir *ProjectsLocationsDatasetsFhirStoresFhirService
  232. SecurityLabels *ProjectsLocationsDatasetsFhirStoresSecurityLabelsService
  233. }
  234. func NewProjectsLocationsDatasetsFhirStoresFhirService(s *Service) *ProjectsLocationsDatasetsFhirStoresFhirService {
  235. rs := &ProjectsLocationsDatasetsFhirStoresFhirService{s: s}
  236. rs.Patient = NewProjectsLocationsDatasetsFhirStoresFhirPatientService(s)
  237. rs.History = NewProjectsLocationsDatasetsFhirStoresFhirHistoryService(s)
  238. return rs
  239. }
  240. type ProjectsLocationsDatasetsFhirStoresFhirService struct {
  241. s *Service
  242. Patient *ProjectsLocationsDatasetsFhirStoresFhirPatientService
  243. History *ProjectsLocationsDatasetsFhirStoresFhirHistoryService
  244. }
  245. func NewProjectsLocationsDatasetsFhirStoresFhirPatientService(s *Service) *ProjectsLocationsDatasetsFhirStoresFhirPatientService {
  246. rs := &ProjectsLocationsDatasetsFhirStoresFhirPatientService{s: s}
  247. return rs
  248. }
  249. type ProjectsLocationsDatasetsFhirStoresFhirPatientService struct {
  250. s *Service
  251. }
  252. func NewProjectsLocationsDatasetsFhirStoresFhirHistoryService(s *Service) *ProjectsLocationsDatasetsFhirStoresFhirHistoryService {
  253. rs := &ProjectsLocationsDatasetsFhirStoresFhirHistoryService{s: s}
  254. return rs
  255. }
  256. type ProjectsLocationsDatasetsFhirStoresFhirHistoryService struct {
  257. s *Service
  258. }
  259. func NewProjectsLocationsDatasetsFhirStoresSecurityLabelsService(s *Service) *ProjectsLocationsDatasetsFhirStoresSecurityLabelsService {
  260. rs := &ProjectsLocationsDatasetsFhirStoresSecurityLabelsService{s: s}
  261. return rs
  262. }
  263. type ProjectsLocationsDatasetsFhirStoresSecurityLabelsService struct {
  264. s *Service
  265. }
  266. func NewProjectsLocationsDatasetsHl7V2StoresService(s *Service) *ProjectsLocationsDatasetsHl7V2StoresService {
  267. rs := &ProjectsLocationsDatasetsHl7V2StoresService{s: s}
  268. rs.Messages = NewProjectsLocationsDatasetsHl7V2StoresMessagesService(s)
  269. return rs
  270. }
  271. type ProjectsLocationsDatasetsHl7V2StoresService struct {
  272. s *Service
  273. Messages *ProjectsLocationsDatasetsHl7V2StoresMessagesService
  274. }
  275. func NewProjectsLocationsDatasetsHl7V2StoresMessagesService(s *Service) *ProjectsLocationsDatasetsHl7V2StoresMessagesService {
  276. rs := &ProjectsLocationsDatasetsHl7V2StoresMessagesService{s: s}
  277. return rs
  278. }
  279. type ProjectsLocationsDatasetsHl7V2StoresMessagesService struct {
  280. s *Service
  281. }
  282. func NewProjectsLocationsDatasetsOperationsService(s *Service) *ProjectsLocationsDatasetsOperationsService {
  283. rs := &ProjectsLocationsDatasetsOperationsService{s: s}
  284. return rs
  285. }
  286. type ProjectsLocationsDatasetsOperationsService struct {
  287. s *Service
  288. }
  289. // Annotation: An annotation record.
  290. type Annotation struct {
  291. // AnnotationSource: Details of the source.
  292. AnnotationSource *AnnotationSource `json:"annotationSource,omitempty"`
  293. // ImageAnnotation: Annnotations for images, e.g., bounding polygons.
  294. ImageAnnotation *ImageAnnotation `json:"imageAnnotation,omitempty"`
  295. // Name: Output only. Resource name of the Annotation, of the
  296. // form
  297. // `projects/{project_id}/locations/{location_id}/datasets/{dataset_
  298. // id}/annotationStores/{annotation_store_id}/annotations/{annotation_id}
  299. // `.
  300. Name string `json:"name,omitempty"`
  301. // ResourceAnnotation: Annotations for resource, e.g., classification
  302. // tags.
  303. ResourceAnnotation *ResourceAnnotation `json:"resourceAnnotation,omitempty"`
  304. // TextAnnotation: Annotations for sentitive texts, e.g., range of such
  305. // texts.
  306. TextAnnotation *SensitiveTextAnnotation `json:"textAnnotation,omitempty"`
  307. // ServerResponse contains the HTTP response code and headers from the
  308. // server.
  309. googleapi.ServerResponse `json:"-"`
  310. // ForceSendFields is a list of field names (e.g. "AnnotationSource") to
  311. // unconditionally include in API requests. By default, fields with
  312. // empty values are omitted from API requests. However, any non-pointer,
  313. // non-interface field appearing in ForceSendFields will be sent to the
  314. // server regardless of whether the field is empty or not. This may be
  315. // used to include empty fields in Patch requests.
  316. ForceSendFields []string `json:"-"`
  317. // NullFields is a list of field names (e.g. "AnnotationSource") to
  318. // include in API requests with the JSON null value. By default, fields
  319. // with empty values are omitted from API requests. However, any field
  320. // with an empty value appearing in NullFields will be sent to the
  321. // server as null. It is an error if a field in this list has a
  322. // non-empty value. This may be used to include null fields in Patch
  323. // requests.
  324. NullFields []string `json:"-"`
  325. }
  326. func (s *Annotation) MarshalJSON() ([]byte, error) {
  327. type NoMethod Annotation
  328. raw := NoMethod(*s)
  329. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  330. }
  331. // AnnotationSource: AnnotationSource holds the source information of
  332. // the annotation.
  333. type AnnotationSource struct {
  334. // CloudHealthcareSource: Cloud Healthcare API resource.
  335. CloudHealthcareSource *CloudHealthcareSource `json:"cloudHealthcareSource,omitempty"`
  336. // ForceSendFields is a list of field names (e.g.
  337. // "CloudHealthcareSource") to unconditionally include in API requests.
  338. // By default, fields with empty values are omitted from API requests.
  339. // However, any non-pointer, non-interface field appearing in
  340. // ForceSendFields will be sent to the server regardless of whether the
  341. // field is empty or not. This may be used to include empty fields in
  342. // Patch requests.
  343. ForceSendFields []string `json:"-"`
  344. // NullFields is a list of field names (e.g. "CloudHealthcareSource") to
  345. // include in API requests with the JSON null value. By default, fields
  346. // with empty values are omitted from API requests. However, any field
  347. // with an empty value appearing in NullFields will be sent to the
  348. // server as null. It is an error if a field in this list has a
  349. // non-empty value. This may be used to include null fields in Patch
  350. // requests.
  351. NullFields []string `json:"-"`
  352. }
  353. func (s *AnnotationSource) MarshalJSON() ([]byte, error) {
  354. type NoMethod AnnotationSource
  355. raw := NoMethod(*s)
  356. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  357. }
  358. // AnnotationStore: An Annotation store that can store annotation
  359. // resources such as
  360. // labels and tags for text, image and audio.
  361. type AnnotationStore struct {
  362. // Labels: User-supplied key-value pairs used to organize Annotation
  363. // stores.
  364. //
  365. // Label keys must be between 1 and 63 characters long, have a UTF-8
  366. // encoding
  367. // of maximum 128 bytes, and must conform to the
  368. // following PCRE regular expression:
  369. // \p{Ll}\p{Lo}{0,62}
  370. //
  371. // Label values are optional, must be between 1 and 63 characters long,
  372. // have
  373. // a UTF-8 encoding of maximum 128 bytes, and must conform to
  374. // the
  375. // following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
  376. //
  377. // No more than 64 labels can be associated with a given store.
  378. Labels map[string]string `json:"labels,omitempty"`
  379. // Name: Output only. Resource name of the Annotation store, of the
  380. // form
  381. // `projects/{project_id}/locations/{location_id}/datasets/{dataset_
  382. // id}/annotationStores/{annotation_store_id}`.
  383. Name string `json:"name,omitempty"`
  384. // ServerResponse contains the HTTP response code and headers from the
  385. // server.
  386. googleapi.ServerResponse `json:"-"`
  387. // ForceSendFields is a list of field names (e.g. "Labels") to
  388. // unconditionally include in API requests. By default, fields with
  389. // empty values are omitted from API requests. However, any non-pointer,
  390. // non-interface field appearing in ForceSendFields will be sent to the
  391. // server regardless of whether the field is empty or not. This may be
  392. // used to include empty fields in Patch requests.
  393. ForceSendFields []string `json:"-"`
  394. // NullFields is a list of field names (e.g. "Labels") to include in API
  395. // requests with the JSON null value. By default, fields with empty
  396. // values are omitted from API requests. However, any field with an
  397. // empty value appearing in NullFields will be sent to the server as
  398. // null. It is an error if a field in this list has a non-empty value.
  399. // This may be used to include null fields in Patch requests.
  400. NullFields []string `json:"-"`
  401. }
  402. func (s *AnnotationStore) MarshalJSON() ([]byte, error) {
  403. type NoMethod AnnotationStore
  404. raw := NoMethod(*s)
  405. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  406. }
  407. // AuditConfig: Specifies the audit configuration for a service.
  408. // The configuration determines which permission types are logged, and
  409. // what
  410. // identities, if any, are exempted from logging.
  411. // An AuditConfig must have one or more AuditLogConfigs.
  412. //
  413. // If there are AuditConfigs for both `allServices` and a specific
  414. // service,
  415. // the union of the two AuditConfigs is used for that service: the
  416. // log_types
  417. // specified in each AuditConfig are enabled, and the exempted_members
  418. // in each
  419. // AuditLogConfig are exempted.
  420. //
  421. // Example Policy with multiple AuditConfigs:
  422. //
  423. // {
  424. // "audit_configs": [
  425. // {
  426. // "service": "allServices"
  427. // "audit_log_configs": [
  428. // {
  429. // "log_type": "DATA_READ",
  430. // "exempted_members": [
  431. // "user:foo@gmail.com"
  432. // ]
  433. // },
  434. // {
  435. // "log_type": "DATA_WRITE",
  436. // },
  437. // {
  438. // "log_type": "ADMIN_READ",
  439. // }
  440. // ]
  441. // },
  442. // {
  443. // "service": "fooservice.googleapis.com"
  444. // "audit_log_configs": [
  445. // {
  446. // "log_type": "DATA_READ",
  447. // },
  448. // {
  449. // "log_type": "DATA_WRITE",
  450. // "exempted_members": [
  451. // "user:bar@gmail.com"
  452. // ]
  453. // }
  454. // ]
  455. // }
  456. // ]
  457. // }
  458. //
  459. // For fooservice, this policy enables DATA_READ, DATA_WRITE and
  460. // ADMIN_READ
  461. // logging. It also exempts foo@gmail.com from DATA_READ logging,
  462. // and
  463. // bar@gmail.com from DATA_WRITE logging.
  464. type AuditConfig struct {
  465. // AuditLogConfigs: The configuration for logging of each type of
  466. // permission.
  467. AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
  468. // Service: Specifies a service that will be enabled for audit
  469. // logging.
  470. // For example, `storage.googleapis.com`,
  471. // `cloudsql.googleapis.com`.
  472. // `allServices` is a special value that covers all services.
  473. Service string `json:"service,omitempty"`
  474. // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
  475. // unconditionally include in API requests. By default, fields with
  476. // empty values are omitted from API requests. However, any non-pointer,
  477. // non-interface field appearing in ForceSendFields will be sent to the
  478. // server regardless of whether the field is empty or not. This may be
  479. // used to include empty fields in Patch requests.
  480. ForceSendFields []string `json:"-"`
  481. // NullFields is a list of field names (e.g. "AuditLogConfigs") to
  482. // include in API requests with the JSON null value. By default, fields
  483. // with empty values are omitted from API requests. However, any field
  484. // with an empty value appearing in NullFields will be sent to the
  485. // server as null. It is an error if a field in this list has a
  486. // non-empty value. This may be used to include null fields in Patch
  487. // requests.
  488. NullFields []string `json:"-"`
  489. }
  490. func (s *AuditConfig) MarshalJSON() ([]byte, error) {
  491. type NoMethod AuditConfig
  492. raw := NoMethod(*s)
  493. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  494. }
  495. // AuditLogConfig: Provides the configuration for logging a type of
  496. // permissions.
  497. // Example:
  498. //
  499. // {
  500. // "audit_log_configs": [
  501. // {
  502. // "log_type": "DATA_READ",
  503. // "exempted_members": [
  504. // "user:foo@gmail.com"
  505. // ]
  506. // },
  507. // {
  508. // "log_type": "DATA_WRITE",
  509. // }
  510. // ]
  511. // }
  512. //
  513. // This enables 'DATA_READ' and 'DATA_WRITE' logging, while
  514. // exempting
  515. // foo@gmail.com from DATA_READ logging.
  516. type AuditLogConfig struct {
  517. // ExemptedMembers: Specifies the identities that do not cause logging
  518. // for this type of
  519. // permission.
  520. // Follows the same format of Binding.members.
  521. ExemptedMembers []string `json:"exemptedMembers,omitempty"`
  522. // LogType: The log type that this config enables.
  523. //
  524. // Possible values:
  525. // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
  526. // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
  527. // "DATA_WRITE" - Data writes. Example: CloudSQL Users create
  528. // "DATA_READ" - Data reads. Example: CloudSQL Users list
  529. LogType string `json:"logType,omitempty"`
  530. // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
  531. // unconditionally include in API requests. By default, fields with
  532. // empty values are omitted from API requests. However, any non-pointer,
  533. // non-interface field appearing in ForceSendFields will be sent to the
  534. // server regardless of whether the field is empty or not. This may be
  535. // used to include empty fields in Patch requests.
  536. ForceSendFields []string `json:"-"`
  537. // NullFields is a list of field names (e.g. "ExemptedMembers") to
  538. // include in API requests with the JSON null value. By default, fields
  539. // with empty values are omitted from API requests. However, any field
  540. // with an empty value appearing in NullFields will be sent to the
  541. // server as null. It is an error if a field in this list has a
  542. // non-empty value. This may be used to include null fields in Patch
  543. // requests.
  544. NullFields []string `json:"-"`
  545. }
  546. func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
  547. type NoMethod AuditLogConfig
  548. raw := NoMethod(*s)
  549. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  550. }
  551. // BigQueryDestination: The BigQuery table for export.
  552. type BigQueryDestination struct {
  553. // Force: If the destination table already exists and this flag is
  554. // `TRUE`, the table
  555. // will be overwritten by the contents of the input store. If the flag
  556. // is not
  557. // set and the destination table already exists, the export call returns
  558. // an
  559. // error.
  560. Force bool `json:"force,omitempty"`
  561. // TableUri: BigQuery URI to a table, up to 2000 characters long, must
  562. // be of the form
  563. // bq://projectId.bqDatasetId.tableId.
  564. TableUri string `json:"tableUri,omitempty"`
  565. // ForceSendFields is a list of field names (e.g. "Force") to
  566. // unconditionally include in API requests. By default, fields with
  567. // empty values are omitted from API requests. However, any non-pointer,
  568. // non-interface field appearing in ForceSendFields will be sent to the
  569. // server regardless of whether the field is empty or not. This may be
  570. // used to include empty fields in Patch requests.
  571. ForceSendFields []string `json:"-"`
  572. // NullFields is a list of field names (e.g. "Force") to include in API
  573. // requests with the JSON null value. By default, fields with empty
  574. // values are omitted from API requests. However, any field with an
  575. // empty value appearing in NullFields will be sent to the server as
  576. // null. It is an error if a field in this list has a non-empty value.
  577. // This may be used to include null fields in Patch requests.
  578. NullFields []string `json:"-"`
  579. }
  580. func (s *BigQueryDestination) MarshalJSON() ([]byte, error) {
  581. type NoMethod BigQueryDestination
  582. raw := NoMethod(*s)
  583. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  584. }
  585. // Binding: Associates `members` with a `role`.
  586. type Binding struct {
  587. // Condition: Unimplemented. The condition that is associated with this
  588. // binding.
  589. // NOTE: an unsatisfied condition will not allow user access via
  590. // current
  591. // binding. Different bindings, including their conditions, are
  592. // examined
  593. // independently.
  594. Condition *Expr `json:"condition,omitempty"`
  595. // Members: Specifies the identities requesting access for a Cloud
  596. // Platform resource.
  597. // `members` can have the following values:
  598. //
  599. // * `allUsers`: A special identifier that represents anyone who is
  600. // on the internet; with or without a Google account.
  601. //
  602. // * `allAuthenticatedUsers`: A special identifier that represents
  603. // anyone
  604. // who is authenticated with a Google account or a service
  605. // account.
  606. //
  607. // * `user:{emailid}`: An email address that represents a specific
  608. // Google
  609. // account. For example, `alice@gmail.com` .
  610. //
  611. //
  612. // * `serviceAccount:{emailid}`: An email address that represents a
  613. // service
  614. // account. For example,
  615. // `my-other-app@appspot.gserviceaccount.com`.
  616. //
  617. // * `group:{emailid}`: An email address that represents a Google
  618. // group.
  619. // For example, `admins@example.com`.
  620. //
  621. //
  622. // * `domain:{domain}`: The G Suite domain (primary) that represents all
  623. // the
  624. // users of that domain. For example, `google.com` or
  625. // `example.com`.
  626. //
  627. //
  628. Members []string `json:"members,omitempty"`
  629. // Role: Role that is assigned to `members`.
  630. // For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
  631. Role string `json:"role,omitempty"`
  632. // ForceSendFields is a list of field names (e.g. "Condition") to
  633. // unconditionally include in API requests. By default, fields with
  634. // empty values are omitted from API requests. However, any non-pointer,
  635. // non-interface field appearing in ForceSendFields will be sent to the
  636. // server regardless of whether the field is empty or not. This may be
  637. // used to include empty fields in Patch requests.
  638. ForceSendFields []string `json:"-"`
  639. // NullFields is a list of field names (e.g. "Condition") to include in
  640. // API requests with the JSON null value. By default, fields with empty
  641. // values are omitted from API requests. However, any field with an
  642. // empty value appearing in NullFields will be sent to the server as
  643. // null. It is an error if a field in this list has a non-empty value.
  644. // This may be used to include null fields in Patch requests.
  645. NullFields []string `json:"-"`
  646. }
  647. func (s *Binding) MarshalJSON() ([]byte, error) {
  648. type NoMethod Binding
  649. raw := NoMethod(*s)
  650. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  651. }
  652. // BoundingPoly: A bounding polygon for the detected image annotation.
  653. type BoundingPoly struct {
  654. Label string `json:"label,omitempty"`
  655. Vertices []*Vertex `json:"vertices,omitempty"`
  656. // ForceSendFields is a list of field names (e.g. "Label") to
  657. // unconditionally include in API requests. By default, fields with
  658. // empty values are omitted from API requests. However, any non-pointer,
  659. // non-interface field appearing in ForceSendFields will be sent to the
  660. // server regardless of whether the field is empty or not. This may be
  661. // used to include empty fields in Patch requests.
  662. ForceSendFields []string `json:"-"`
  663. // NullFields is a list of field names (e.g. "Label") to include in API
  664. // requests with the JSON null value. By default, fields with empty
  665. // values are omitted from API requests. However, any field with an
  666. // empty value appearing in NullFields will be sent to the server as
  667. // null. It is an error if a field in this list has a non-empty value.
  668. // This may be used to include null fields in Patch requests.
  669. NullFields []string `json:"-"`
  670. }
  671. func (s *BoundingPoly) MarshalJSON() ([]byte, error) {
  672. type NoMethod BoundingPoly
  673. raw := NoMethod(*s)
  674. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  675. }
  676. // CloudHealthcareSource: Cloud Healthcare API resource.
  677. type CloudHealthcareSource struct {
  678. // Name: Full path of a Cloud Healthcare API resource.
  679. Name string `json:"name,omitempty"`
  680. // ForceSendFields is a list of field names (e.g. "Name") to
  681. // unconditionally include in API requests. By default, fields with
  682. // empty values are omitted from API requests. However, any non-pointer,
  683. // non-interface field appearing in ForceSendFields will be sent to the
  684. // server regardless of whether the field is empty or not. This may be
  685. // used to include empty fields in Patch requests.
  686. ForceSendFields []string `json:"-"`
  687. // NullFields is a list of field names (e.g. "Name") to include in API
  688. // requests with the JSON null value. By default, fields with empty
  689. // values are omitted from API requests. However, any field with an
  690. // empty value appearing in NullFields will be sent to the server as
  691. // null. It is an error if a field in this list has a non-empty value.
  692. // This may be used to include null fields in Patch requests.
  693. NullFields []string `json:"-"`
  694. }
  695. func (s *CloudHealthcareSource) MarshalJSON() ([]byte, error) {
  696. type NoMethod CloudHealthcareSource
  697. raw := NoMethod(*s)
  698. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  699. }
  700. // CreateMessageRequest: Creates a new message.
  701. type CreateMessageRequest struct {
  702. // Message: HL7v2 message.
  703. Message *Message `json:"message,omitempty"`
  704. // ForceSendFields is a list of field names (e.g. "Message") to
  705. // unconditionally include in API requests. By default, fields with
  706. // empty values are omitted from API requests. However, any non-pointer,
  707. // non-interface field appearing in ForceSendFields will be sent to the
  708. // server regardless of whether the field is empty or not. This may be
  709. // used to include empty fields in Patch requests.
  710. ForceSendFields []string `json:"-"`
  711. // NullFields is a list of field names (e.g. "Message") to include in
  712. // API requests with the JSON null value. By default, fields with empty
  713. // values are omitted from API requests. However, any field with an
  714. // empty value appearing in NullFields will be sent to the server as
  715. // null. It is an error if a field in this list has a non-empty value.
  716. // This may be used to include null fields in Patch requests.
  717. NullFields []string `json:"-"`
  718. }
  719. func (s *CreateMessageRequest) MarshalJSON() ([]byte, error) {
  720. type NoMethod CreateMessageRequest
  721. raw := NoMethod(*s)
  722. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  723. }
  724. // Dataset: A message representing a health dataset.
  725. //
  726. // A health dataset represents a collection of healthcare data
  727. // pertaining to one
  728. // or more patients. This may include multiple modalities of healthcare
  729. // data,
  730. // such as electronic medical records or medical imaging data.
  731. type Dataset struct {
  732. // Name: Output only. Resource name of the dataset, of the
  733. // form
  734. // `projects/{project_id}/locations/{location_id}/datasets/{dataset_
  735. // id}`.
  736. Name string `json:"name,omitempty"`
  737. // TimeZone: The default timezone used by this dataset. Must be a either
  738. // a valid IANA
  739. // time zone name such as "America/New_York" or empty, which defaults to
  740. // UTC.
  741. // This is used for parsing times in resources (e.g., HL7 messages)
  742. // where no
  743. // explicit timezone is specified.
  744. TimeZone string `json:"timeZone,omitempty"`
  745. // ServerResponse contains the HTTP response code and headers from the
  746. // server.
  747. googleapi.ServerResponse `json:"-"`
  748. // ForceSendFields is a list of field names (e.g. "Name") to
  749. // unconditionally include in API requests. By default, fields with
  750. // empty values are omitted from API requests. However, any non-pointer,
  751. // non-interface field appearing in ForceSendFields will be sent to the
  752. // server regardless of whether the field is empty or not. This may be
  753. // used to include empty fields in Patch requests.
  754. ForceSendFields []string `json:"-"`
  755. // NullFields is a list of field names (e.g. "Name") to include in API
  756. // requests with the JSON null value. By default, fields with empty
  757. // values are omitted from API requests. However, any field with an
  758. // empty value appearing in NullFields will be sent to the server as
  759. // null. It is an error if a field in this list has a non-empty value.
  760. // This may be used to include null fields in Patch requests.
  761. NullFields []string `json:"-"`
  762. }
  763. func (s *Dataset) MarshalJSON() ([]byte, error) {
  764. type NoMethod Dataset
  765. raw := NoMethod(*s)
  766. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  767. }
  768. // DeidentifyConfig: Configures de-id options specific to different
  769. // types of content.
  770. // Each submessage customizes the handling of
  771. // an
  772. // https://tools.ietf.org/html/rfc6838 media type or subtype. Configs
  773. // are
  774. // applied in a nested manner at runtime.
  775. type DeidentifyConfig struct {
  776. // Dicom: Configures de-id of application/DICOM content.
  777. Dicom *DicomConfig `json:"dicom,omitempty"`
  778. // Fhir: Configures de-id of application/FHIR content.
  779. Fhir *FhirConfig `json:"fhir,omitempty"`
  780. // Image: Configures de-identification of image pixels wherever they are
  781. // found in the
  782. // source_dataset.
  783. Image *ImageConfig `json:"image,omitempty"`
  784. // ForceSendFields is a list of field names (e.g. "Dicom") to
  785. // unconditionally include in API requests. By default, fields with
  786. // empty values are omitted from API requests. However, any non-pointer,
  787. // non-interface field appearing in ForceSendFields will be sent to the
  788. // server regardless of whether the field is empty or not. This may be
  789. // used to include empty fields in Patch requests.
  790. ForceSendFields []string `json:"-"`
  791. // NullFields is a list of field names (e.g. "Dicom") to include in API
  792. // requests with the JSON null value. By default, fields with empty
  793. // values are omitted from API requests. However, any field with an
  794. // empty value appearing in NullFields will be sent to the server as
  795. // null. It is an error if a field in this list has a non-empty value.
  796. // This may be used to include null fields in Patch requests.
  797. NullFields []string `json:"-"`
  798. }
  799. func (s *DeidentifyConfig) MarshalJSON() ([]byte, error) {
  800. type NoMethod DeidentifyConfig
  801. raw := NoMethod(*s)
  802. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  803. }
  804. // DeidentifyDatasetRequest: Redacts identifying information from the
  805. // specified dataset.
  806. type DeidentifyDatasetRequest struct {
  807. // Config: Deidentify configuration
  808. Config *DeidentifyConfig `json:"config,omitempty"`
  809. // DestinationDataset: The name of the dataset resource to which the
  810. // redacted data should be
  811. // written
  812. // (e.g.,
  813. // `projects/{project_id}/locations/{location_id}/datasets/{datase
  814. // t_id}`).
  815. // The new dataset must not exist, or the request will fail.
  816. DestinationDataset string `json:"destinationDataset,omitempty"`
  817. // ForceSendFields is a list of field names (e.g. "Config") to
  818. // unconditionally include in API requests. By default, fields with
  819. // empty values are omitted from API requests. However, any non-pointer,
  820. // non-interface field appearing in ForceSendFields will be sent to the
  821. // server regardless of whether the field is empty or not. This may be
  822. // used to include empty fields in Patch requests.
  823. ForceSendFields []string `json:"-"`
  824. // NullFields is a list of field names (e.g. "Config") to include in API
  825. // requests with the JSON null value. By default, fields with empty
  826. // values are omitted from API requests. However, any field with an
  827. // empty value appearing in NullFields will be sent to the server as
  828. // null. It is an error if a field in this list has a non-empty value.
  829. // This may be used to include null fields in Patch requests.
  830. NullFields []string `json:"-"`
  831. }
  832. func (s *DeidentifyDatasetRequest) MarshalJSON() ([]byte, error) {
  833. type NoMethod DeidentifyDatasetRequest
  834. raw := NoMethod(*s)
  835. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  836. }
  837. // Detail: Contains multiple sensitive information findings for each
  838. // resource slice.
  839. type Detail struct {
  840. Findings []*Finding `json:"findings,omitempty"`
  841. // ForceSendFields is a list of field names (e.g. "Findings") to
  842. // unconditionally include in API requests. By default, fields with
  843. // empty values are omitted from API requests. However, any non-pointer,
  844. // non-interface field appearing in ForceSendFields will be sent to the
  845. // server regardless of whether the field is empty or not. This may be
  846. // used to include empty fields in Patch requests.
  847. ForceSendFields []string `json:"-"`
  848. // NullFields is a list of field names (e.g. "Findings") to include in
  849. // API requests with the JSON null value. By default, fields with empty
  850. // values are omitted from API requests. However, any field with an
  851. // empty value appearing in NullFields will be sent to the server as
  852. // null. It is an error if a field in this list has a non-empty value.
  853. // This may be used to include null fields in Patch requests.
  854. NullFields []string `json:"-"`
  855. }
  856. func (s *Detail) MarshalJSON() ([]byte, error) {
  857. type NoMethod Detail
  858. raw := NoMethod(*s)
  859. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  860. }
  861. // DicomConfig: Specifies the parameters needed for de-identification of
  862. // DICOM stores.
  863. type DicomConfig struct {
  864. // KeepList: List of tags to keep. Remove all other tags.
  865. KeepList *TagFilterList `json:"keepList,omitempty"`
  866. // ForceSendFields is a list of field names (e.g. "KeepList") to
  867. // unconditionally include in API requests. By default, fields with
  868. // empty values are omitted from API requests. However, any non-pointer,
  869. // non-interface field appearing in ForceSendFields will be sent to the
  870. // server regardless of whether the field is empty or not. This may be
  871. // used to include empty fields in Patch requests.
  872. ForceSendFields []string `json:"-"`
  873. // NullFields is a list of field names (e.g. "KeepList") to include in
  874. // API requests with the JSON null value. By default, fields with empty
  875. // values are omitted from API requests. However, any field with an
  876. // empty value appearing in NullFields will be sent to the server as
  877. // null. It is an error if a field in this list has a non-empty value.
  878. // This may be used to include null fields in Patch requests.
  879. NullFields []string `json:"-"`
  880. }
  881. func (s *DicomConfig) MarshalJSON() ([]byte, error) {
  882. type NoMethod DicomConfig
  883. raw := NoMethod(*s)
  884. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  885. }
  886. // DicomStore: Represents a DICOM store.
  887. type DicomStore struct {
  888. // Labels: User-supplied key-value pairs used to organize DICOM
  889. // stores.
  890. //
  891. // Label keys must be between 1 and 63 characters long, have a UTF-8
  892. // encoding
  893. // of maximum 128 bytes, and must conform to the
  894. // following PCRE regular expression:
  895. // \p{Ll}\p{Lo}{0,62}
  896. //
  897. // Label values are optional, must be between 1 and 63 characters long,
  898. // have
  899. // a UTF-8 encoding of maximum 128 bytes, and must conform to
  900. // the
  901. // following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
  902. //
  903. // No more than 64 labels can be associated with a given store.
  904. Labels map[string]string `json:"labels,omitempty"`
  905. // Name: Output only. Resource name of the DICOM store, of the
  906. // form
  907. // `projects/{project_id}/locations/{location_id}/datasets/{dataset_
  908. // id}/dicomStores/{dicom_store_id}`.
  909. Name string `json:"name,omitempty"`
  910. // NotificationConfig: Notification destination for new DICOM
  911. // instances.
  912. // Supplied by the client.
  913. NotificationConfig *NotificationConfig `json:"notificationConfig,omitempty"`
  914. // ServerResponse contains the HTTP response code and headers from the
  915. // server.
  916. googleapi.ServerResponse `json:"-"`
  917. // ForceSendFields is a list of field names (e.g. "Labels") to
  918. // unconditionally include in API requests. By default, fields with
  919. // empty values are omitted from API requests. However, any non-pointer,
  920. // non-interface field appearing in ForceSendFields will be sent to the
  921. // server regardless of whether the field is empty or not. This may be
  922. // used to include empty fields in Patch requests.
  923. ForceSendFields []string `json:"-"`
  924. // NullFields is a list of field names (e.g. "Labels") to include in API
  925. // requests with the JSON null value. By default, fields with empty
  926. // values are omitted from API requests. However, any field with an
  927. // empty value appearing in NullFields will be sent to the server as
  928. // null. It is an error if a field in this list has a non-empty value.
  929. // This may be used to include null fields in Patch requests.
  930. NullFields []string `json:"-"`
  931. }
  932. func (s *DicomStore) MarshalJSON() ([]byte, error) {
  933. type NoMethod DicomStore
  934. raw := NoMethod(*s)
  935. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  936. }
  937. // Empty: A generic empty message that you can re-use to avoid defining
  938. // duplicated
  939. // empty messages in your APIs. A typical example is to use it as the
  940. // request
  941. // or the response type of an API method. For instance:
  942. //
  943. // service Foo {
  944. // rpc Bar(google.protobuf.Empty) returns
  945. // (google.protobuf.Empty);
  946. // }
  947. //
  948. // The JSON representation for `Empty` is empty JSON object `{}`.
  949. type Empty struct {
  950. // ServerResponse contains the HTTP response code and headers from the
  951. // server.
  952. googleapi.ServerResponse `json:"-"`
  953. }
  954. // ErrorDetail: Structure to describe the error encountered during batch
  955. // operation on one
  956. // resource. This is used both for sample errors in operation response,
  957. // and
  958. // for format of errors in error reports.
  959. type ErrorDetail struct {
  960. // Error: The status of the error.
  961. Error *Status `json:"error,omitempty"`
  962. // Resource: The identifier of the resource.
  963. Resource string `json:"resource,omitempty"`
  964. // ForceSendFields is a list of field names (e.g. "Error") to
  965. // unconditionally include in API requests. By default, fields with
  966. // empty values are omitted from API requests. However, any non-pointer,
  967. // non-interface field appearing in ForceSendFields will be sent to the
  968. // server regardless of whether the field is empty or not. This may be
  969. // used to include empty fields in Patch requests.
  970. ForceSendFields []string `json:"-"`
  971. // NullFields is a list of field names (e.g. "Error") to include in API
  972. // requests with the JSON null value. By default, fields with empty
  973. // values are omitted from API requests. However, any field with an
  974. // empty value appearing in NullFields will be sent to the server as
  975. // null. It is an error if a field in this list has a non-empty value.
  976. // This may be used to include null fields in Patch requests.
  977. NullFields []string `json:"-"`
  978. }
  979. func (s *ErrorDetail) MarshalJSON() ([]byte, error) {
  980. type NoMethod ErrorDetail
  981. raw := NoMethod(*s)
  982. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  983. }
  984. // ExportAnnotationsRequest: Request to export
  985. // Annotations. The
  986. // export operation is not atomic; in the event of a failure any
  987. // annotations
  988. // already exported will not be removed.
  989. type ExportAnnotationsRequest struct {
  990. // BigqueryDestination: The BigQuery output destination.
  991. // The table schema is the flattened version of
  992. // Annotation
  993. // For now, only exporting to a dataset in the current project is
  994. // supported.
  995. // The BigQuery location requires two IAM roles:
  996. // `roles/bigquery.dataEditor` and `roles/bigquery.jobUser`.
  997. BigqueryDestination *BigQueryDestination `json:"bigqueryDestination,omitempty"`
  998. // GcsDestination: The Cloud Storage destination, which requires
  999. // the
  1000. // `roles/storage.objectAdmin` Cloud IAM role.
  1001. GcsDestination *GcsDestination `json:"gcsDestination,omitempty"`
  1002. // ForceSendFields is a list of field names (e.g. "BigqueryDestination")
  1003. // to unconditionally include in API requests. By default, fields with
  1004. // empty values are omitted from API requests. However, any non-pointer,
  1005. // non-interface field appearing in ForceSendFields will be sent to the
  1006. // server regardless of whether the field is empty or not. This may be
  1007. // used to include empty fields in Patch requests.
  1008. ForceSendFields []string `json:"-"`
  1009. // NullFields is a list of field names (e.g. "BigqueryDestination") to
  1010. // include in API requests with the JSON null value. By default, fields
  1011. // with empty values are omitted from API requests. However, any field
  1012. // with an empty value appearing in NullFields will be sent to the
  1013. // server as null. It is an error if a field in this list has a
  1014. // non-empty value. This may be used to include null fields in Patch
  1015. // requests.
  1016. NullFields []string `json:"-"`
  1017. }
  1018. func (s *ExportAnnotationsRequest) MarshalJSON() ([]byte, error) {
  1019. type NoMethod ExportAnnotationsRequest
  1020. raw := NoMethod(*s)
  1021. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1022. }
  1023. // ExportDicomDataRequest: Exports data from the specified DICOM
  1024. // store.
  1025. // If a given resource (e.g., a DICOM object with the same SOPInstance
  1026. // UID)
  1027. // already exists in the output, it is overwritten with the version
  1028. // in the source dataset.
  1029. // Exported DICOM data will persist when the DICOM store from which it
  1030. // was
  1031. // exported is deleted.
  1032. type ExportDicomDataRequest struct {
  1033. // BigqueryDestination: The BigQuery output destination.
  1034. //
  1035. // For now, only exporting to a dataset in the current project is
  1036. // supported
  1037. //
  1038. // The BigQuery location requires two IAM
  1039. // roles:
  1040. // `roles/bigquery.dataEditor` and `roles/bigquery.jobUser`.
  1041. BigqueryDestination *GoogleCloudHealthcareV1alpha2DicomBigQueryDestination `json:"bigqueryDestination,omitempty"`
  1042. // GcsDestination: The Cloud Storage output destination.
  1043. //
  1044. // The Cloud Storage location requires the `roles/storage.objectAdmin`
  1045. // Cloud
  1046. // IAM role.
  1047. GcsDestination *GoogleCloudHealthcareV1alpha2DicomGcsDestination `json:"gcsDestination,omitempty"`
  1048. // ForceSendFields is a list of field names (e.g. "BigqueryDestination")
  1049. // to unconditionally include in API requests. By default, fields with
  1050. // empty values are omitted from API requests. However, any non-pointer,
  1051. // non-interface field appearing in ForceSendFields will be sent to the
  1052. // server regardless of whether the field is empty or not. This may be
  1053. // used to include empty fields in Patch requests.
  1054. ForceSendFields []string `json:"-"`
  1055. // NullFields is a list of field names (e.g. "BigqueryDestination") to
  1056. // include in API requests with the JSON null value. By default, fields
  1057. // with empty values are omitted from API requests. However, any field
  1058. // with an empty value appearing in NullFields will be sent to the
  1059. // server as null. It is an error if a field in this list has a
  1060. // non-empty value. This may be used to include null fields in Patch
  1061. // requests.
  1062. NullFields []string `json:"-"`
  1063. }
  1064. func (s *ExportDicomDataRequest) MarshalJSON() ([]byte, error) {
  1065. type NoMethod ExportDicomDataRequest
  1066. raw := NoMethod(*s)
  1067. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1068. }
  1069. // ExportResourcesRequest: Request to export resources.
  1070. type ExportResourcesRequest struct {
  1071. // BigqueryDestination: The BigQuery output destination.
  1072. //
  1073. // The BigQuery location requires two IAM
  1074. // roles:
  1075. // `roles/bigquery.dataEditor` and `roles/bigquery.jobUser`.
  1076. //
  1077. // The output will be one BigQuery table per resource type.
  1078. BigqueryDestination *GoogleCloudHealthcareV1alpha2FhirBigQueryDestination `json:"bigqueryDestination,omitempty"`
  1079. // GcsDestination: The Cloud Storage output destination.
  1080. //
  1081. // The Cloud Storage location requires the `roles/storage.objectAdmin`
  1082. // Cloud
  1083. // IAM role.
  1084. //
  1085. // The exported outputs are
  1086. // organized by FHIR resource types. The server will create one object
  1087. // per
  1088. // resource type. Each object contains newline delimited JSON, and each
  1089. // line
  1090. // is a FHIR resource.
  1091. GcsDestination *GoogleCloudHealthcareV1alpha2FhirRestGcsDestination `json:"gcsDestination,omitempty"`
  1092. // ForceSendFields is a list of field names (e.g. "BigqueryDestination")
  1093. // to unconditionally include in API requests. By default, fields with
  1094. // empty values are omitted from API requests. However, any non-pointer,
  1095. // non-interface field appearing in ForceSendFields will be sent to the
  1096. // server regardless of whether the field is empty or not. This may be
  1097. // used to include empty fields in Patch requests.
  1098. ForceSendFields []string `json:"-"`
  1099. // NullFields is a list of field names (e.g. "BigqueryDestination") to
  1100. // include in API requests with the JSON null value. By default, fields
  1101. // with empty values are omitted from API requests. However, any field
  1102. // with an empty value appearing in NullFields will be sent to the
  1103. // server as null. It is an error if a field in this list has a
  1104. // non-empty value. This may be used to include null fields in Patch
  1105. // requests.
  1106. NullFields []string `json:"-"`
  1107. }
  1108. func (s *ExportResourcesRequest) MarshalJSON() ([]byte, error) {
  1109. type NoMethod ExportResourcesRequest
  1110. raw := NoMethod(*s)
  1111. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1112. }
  1113. // Expr: Represents an expression text. Example:
  1114. //
  1115. // title: "User account presence"
  1116. // description: "Determines whether the request has a user account"
  1117. // expression: "size(request.user) > 0"
  1118. type Expr struct {
  1119. // Description: An optional description of the expression. This is a
  1120. // longer text which
  1121. // describes the expression, e.g. when hovered over it in a UI.
  1122. Description string `json:"description,omitempty"`
  1123. // Expression: Textual representation of an expression in
  1124. // Common Expression Language syntax.
  1125. //
  1126. // The application context of the containing message determines
  1127. // which
  1128. // well-known feature set of CEL is supported.
  1129. Expression string `json:"expression,omitempty"`
  1130. // Location: An optional string indicating the location of the
  1131. // expression for error
  1132. // reporting, e.g. a file name and a position in the file.
  1133. Location string `json:"location,omitempty"`
  1134. // Title: An optional title for the expression, i.e. a short string
  1135. // describing
  1136. // its purpose. This can be used e.g. in UIs which allow to enter
  1137. // the
  1138. // expression.
  1139. Title string `json:"title,omitempty"`
  1140. // ForceSendFields is a list of field names (e.g. "Description") to
  1141. // unconditionally include in API requests. By default, fields with
  1142. // empty values are omitted from API requests. However, any non-pointer,
  1143. // non-interface field appearing in ForceSendFields will be sent to the
  1144. // server regardless of whether the field is empty or not. This may be
  1145. // used to include empty fields in Patch requests.
  1146. ForceSendFields []string `json:"-"`
  1147. // NullFields is a list of field names (e.g. "Description") to include
  1148. // in API requests with the JSON null value. By default, fields with
  1149. // empty values are omitted from API requests. However, any field with
  1150. // an empty value appearing in NullFields will be sent to the server as
  1151. // null. It is an error if a field in this list has a non-empty value.
  1152. // This may be used to include null fields in Patch requests.
  1153. NullFields []string `json:"-"`
  1154. }
  1155. func (s *Expr) MarshalJSON() ([]byte, error) {
  1156. type NoMethod Expr
  1157. raw := NoMethod(*s)
  1158. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1159. }
  1160. // FhirConfig: Specifies how de-identification of a FHIR store should be
  1161. // handled.
  1162. type FhirConfig struct {
  1163. }
  1164. // FhirStore: Represents a FHIR store.
  1165. type FhirStore struct {
  1166. // DisableReferentialIntegrity: Whether to disable referential integrity
  1167. // in this FHIR store. This field is
  1168. // immutable after FHIR store creation.
  1169. // The default value is false, meaning that the API will enforce
  1170. // referential
  1171. // integrity and fail the requests that will result in inconsistent
  1172. // state in
  1173. // the FHIR store.
  1174. // When this field is set to true, the API will skip referential
  1175. // integrity
  1176. // check. Consequently, operations that rely on references, such
  1177. // as
  1178. // GetPatientEverything, will not return all the results if broken
  1179. // references
  1180. // exist.
  1181. DisableReferentialIntegrity bool `json:"disableReferentialIntegrity,omitempty"`
  1182. // DisableResourceVersioning: Whether to disable resource versioning for
  1183. // this FHIR store. This field can
  1184. // not be changed after the creation of FHIR store.
  1185. // If set to false, which is the default behavior, all write operations
  1186. // will
  1187. // cause historical versions to be recorded automatically. The
  1188. // historical
  1189. // versions can be fetched through the history APIs, but cannot be
  1190. // updated.
  1191. // If set to true, no historical versions will be kept. The server will
  1192. // send
  1193. // back errors for attempts to read the historical versions.
  1194. DisableResourceVersioning bool `json:"disableResourceVersioning,omitempty"`
  1195. // EnableHistoryImport: Whether to allow the bulk import API to accept
  1196. // history bundles and directly
  1197. // insert historical resource versions into the FHIR store. Importing
  1198. // resource
  1199. // histories creates resource interactions that appear to have occurred
  1200. // in the
  1201. // past, which clients may not want to allow. If set to false, history
  1202. // bundles
  1203. // within an import will fail with an error.
  1204. EnableHistoryImport bool `json:"enableHistoryImport,omitempty"`
  1205. // EnableUpdateCreate: Whether this FHIR store has the
  1206. // [updateCreate
  1207. // capability](https://www.hl7.org/fhir/capabilitystatement
  1208. // -definitions.html#CapabilityStatement.rest.resource.updateCreate).
  1209. // Thi
  1210. // s determines if the client can use an Update operation to create a
  1211. // new
  1212. // resource with a client-specified ID. If false, all IDs are
  1213. // server-assigned
  1214. // through the Create operation and attempts to Update a non-existent
  1215. // resource
  1216. // will return errors. Please treat the audit logs with appropriate
  1217. // levels of
  1218. // care if client-specified resource IDs contain sensitive data such
  1219. // as
  1220. // patient identifiers, those IDs will be part of the FHIR resource
  1221. // path
  1222. // recorded in Cloud audit logs and Cloud Pub/Sub notifications.
  1223. EnableUpdateCreate bool `json:"enableUpdateCreate,omitempty"`
  1224. // Labels: User-supplied key-value pairs used to organize FHIR
  1225. // stores.
  1226. //
  1227. // Label keys must be between 1 and 63 characters long, have a UTF-8
  1228. // encoding
  1229. // of maximum 128 bytes, and must conform to the
  1230. // following PCRE regular expression:
  1231. // \p{Ll}\p{Lo}{0,62}
  1232. //
  1233. // Label values are optional, must be between 1 and 63 characters long,
  1234. // have
  1235. // a UTF-8 encoding of maximum 128 bytes, and must conform to
  1236. // the
  1237. // following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
  1238. //
  1239. // No more than 64 labels can be associated with a given store.
  1240. Labels map[string]string `json:"labels,omitempty"`
  1241. // Name: Output only. Resource name of the FHIR store, of the
  1242. // form
  1243. // `projects/{project_id}/datasets/{dataset_id}/fhirStores/{fhir_sto
  1244. // re_id}`.
  1245. Name string `json:"name,omitempty"`
  1246. // NotificationConfig: If non-empty, publish all resource modifications
  1247. // of this FHIR store to
  1248. // this destination. The Cloud Pub/Sub message attributes will contain a
  1249. // map
  1250. // with a string describing the action that has triggered the
  1251. // notification,
  1252. // e.g. "action":"CreateResource".
  1253. NotificationConfig *NotificationConfig `json:"notificationConfig,omitempty"`
  1254. // ServerResponse contains the HTTP response code and headers from the
  1255. // server.
  1256. googleapi.ServerResponse `json:"-"`
  1257. // ForceSendFields is a list of field names (e.g.
  1258. // "DisableReferentialIntegrity") to unconditionally include in API
  1259. // requests. By default, fields with empty values are omitted from API
  1260. // requests. However, any non-pointer, non-interface field appearing in
  1261. // ForceSendFields will be sent to the server regardless of whether the
  1262. // field is empty or not. This may be used to include empty fields in
  1263. // Patch requests.
  1264. ForceSendFields []string `json:"-"`
  1265. // NullFields is a list of field names (e.g.
  1266. // "DisableReferentialIntegrity") to include in API requests with the
  1267. // JSON null value. By default, fields with empty values are omitted
  1268. // from API requests. However, any field with an empty value appearing
  1269. // in NullFields will be sent to the server as null. It is an error if a
  1270. // field in this list has a non-empty value. This may be used to include
  1271. // null fields in Patch requests.
  1272. NullFields []string `json:"-"`
  1273. }
  1274. func (s *FhirStore) MarshalJSON() ([]byte, error) {
  1275. type NoMethod FhirStore
  1276. raw := NoMethod(*s)
  1277. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1278. }
  1279. type Finding struct {
  1280. // End: Zero-based ending index of the found text, exclusively.
  1281. End int64 `json:"end,omitempty,string"`
  1282. // InfoType: The type of information stored in this text range (e.g.
  1283. // HumanName,
  1284. // BirthDate, Address, etc.)
  1285. InfoType string `json:"infoType,omitempty"`
  1286. // Start: Zero-based starting index of the found text, inclusively.
  1287. Start int64 `json:"start,omitempty,string"`
  1288. // ForceSendFields is a list of field names (e.g. "End") to
  1289. // unconditionally include in API requests. By default, fields with
  1290. // empty values are omitted from API requests. However, any non-pointer,
  1291. // non-interface field appearing in ForceSendFields will be sent to the
  1292. // server regardless of whether the field is empty or not. This may be
  1293. // used to include empty fields in Patch requests.
  1294. ForceSendFields []string `json:"-"`
  1295. // NullFields is a list of field names (e.g. "End") to include in API
  1296. // requests with the JSON null value. By default, fields with empty
  1297. // values are omitted from API requests. However, any field with an
  1298. // empty value appearing in NullFields will be sent to the server as
  1299. // null. It is an error if a field in this list has a non-empty value.
  1300. // This may be used to include null fields in Patch requests.
  1301. NullFields []string `json:"-"`
  1302. }
  1303. func (s *Finding) MarshalJSON() ([]byte, error) {
  1304. type NoMethod Finding
  1305. raw := NoMethod(*s)
  1306. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1307. }
  1308. // GcsDestination: The Cloud Storage location for export.
  1309. type GcsDestination struct {
  1310. // UriPrefix: The Cloud Storage destination to export to.
  1311. // URI for a Cloud Storage directory where result files should be
  1312. // written (in
  1313. // the format `gs://{bucket-id}/{path/to/destination/dir}`). If there is
  1314. // no
  1315. // trailing slash, the service will append one when composing the object
  1316. // path.
  1317. // The user is responsible for creating the Cloud Storage bucket
  1318. // referenced in
  1319. // `uri_prefix`.
  1320. UriPrefix string `json:"uriPrefix,omitempty"`
  1321. // ForceSendFields is a list of field names (e.g. "UriPrefix") to
  1322. // unconditionally include in API requests. By default, fields with
  1323. // empty values are omitted from API requests. However, any non-pointer,
  1324. // non-interface field appearing in ForceSendFields will be sent to the
  1325. // server regardless of whether the field is empty or not. This may be
  1326. // used to include empty fields in Patch requests.
  1327. ForceSendFields []string `json:"-"`
  1328. // NullFields is a list of field names (e.g. "UriPrefix") to include in
  1329. // API requests with the JSON null value. By default, fields with empty
  1330. // values are omitted from API requests. However, any field with an
  1331. // empty value appearing in NullFields will be sent to the server as
  1332. // null. It is an error if a field in this list has a non-empty value.
  1333. // This may be used to include null fields in Patch requests.
  1334. NullFields []string `json:"-"`
  1335. }
  1336. func (s *GcsDestination) MarshalJSON() ([]byte, error) {
  1337. type NoMethod GcsDestination
  1338. raw := NoMethod(*s)
  1339. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1340. }
  1341. // GetIamPolicyRequest: Request message for `GetIamPolicy` method.
  1342. type GetIamPolicyRequest struct {
  1343. }
  1344. // GoogleCloudHealthcareV1alpha2DicomBigQueryDestination: The BigQuery
  1345. // table where the output should be written.
  1346. type GoogleCloudHealthcareV1alpha2DicomBigQueryDestination struct {
  1347. // Force: If the destination table already exists and this flag is
  1348. // `TRUE`, the table
  1349. // will be overwritten by the contents of the DICOM store. If the flag
  1350. // is not
  1351. // set and the destination table already exists, the export call returns
  1352. // an
  1353. // error.
  1354. Force bool `json:"force,omitempty"`
  1355. // TableUri: BigQuery URI to a table, up to 2000 characters long, in the
  1356. // format
  1357. // `bq://projectId.bqDatasetId.tableId`
  1358. TableUri string `json:"tableUri,omitempty"`
  1359. // ForceSendFields is a list of field names (e.g. "Force") to
  1360. // unconditionally include in API requests. By default, fields with
  1361. // empty values are omitted from API requests. However, any non-pointer,
  1362. // non-interface field appearing in ForceSendFields will be sent to the
  1363. // server regardless of whether the field is empty or not. This may be
  1364. // used to include empty fields in Patch requests.
  1365. ForceSendFields []string `json:"-"`
  1366. // NullFields is a list of field names (e.g. "Force") to include in API
  1367. // requests with the JSON null value. By default, fields with empty
  1368. // values are omitted from API requests. However, any field with an
  1369. // empty value appearing in NullFields will be sent to the server as
  1370. // null. It is an error if a field in this list has a non-empty value.
  1371. // This may be used to include null fields in Patch requests.
  1372. NullFields []string `json:"-"`
  1373. }
  1374. func (s *GoogleCloudHealthcareV1alpha2DicomBigQueryDestination) MarshalJSON() ([]byte, error) {
  1375. type NoMethod GoogleCloudHealthcareV1alpha2DicomBigQueryDestination
  1376. raw := NoMethod(*s)
  1377. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1378. }
  1379. // GoogleCloudHealthcareV1alpha2DicomGcsDestination: The Cloud Storage
  1380. // location where the output should be written, and the
  1381. // export
  1382. // configuration.
  1383. type GoogleCloudHealthcareV1alpha2DicomGcsDestination struct {
  1384. // MimeType: MIME types supported by DICOM spec.
  1385. // Each file will be written in the following
  1386. // format:
  1387. // `.../{study_id}/{series_id}/{instance_id}[/{frame_number}].{ex
  1388. // tension}`
  1389. // The frame_number component will exist only for multi-frame
  1390. // instances.
  1391. //
  1392. // Refer to the DICOM conformance statement for permissible MIME
  1393. // types:
  1394. // https://cloud.google.com/healthcare/docs/dicom#wado-rs
  1395. //
  1396. // The following extensions will be used for output files:
  1397. // application/dicom -> .dcm
  1398. // image/jpeg -> .jpg
  1399. // image/png -> .png
  1400. //
  1401. // If unspecified, the instances will be exported in their
  1402. // original
  1403. // DICOM format.
  1404. MimeType string `json:"mimeType,omitempty"`
  1405. // UriPrefix: The Cloud Storage destination to export to.
  1406. //
  1407. // URI for a Cloud Storage directory where result files should be
  1408. // written (in
  1409. // the format `gs://{bucket-id}/{path/to/destination/dir}`). If there is
  1410. // no
  1411. // trailing slash, the service will append one when composing the object
  1412. // path.
  1413. // The user is responsible for creating the Cloud Storage bucket
  1414. // referenced in
  1415. // `uri_prefix`.
  1416. UriPrefix string `json:"uriPrefix,omitempty"`
  1417. // ForceSendFields is a list of field names (e.g. "MimeType") to
  1418. // unconditionally include in API requests. By default, fields with
  1419. // empty values are omitted from API requests. However, any non-pointer,
  1420. // non-interface field appearing in ForceSendFields will be sent to the
  1421. // server regardless of whether the field is empty or not. This may be
  1422. // used to include empty fields in Patch requests.
  1423. ForceSendFields []string `json:"-"`
  1424. // NullFields is a list of field names (e.g. "MimeType") to include in
  1425. // API requests with the JSON null value. By default, fields with empty
  1426. // values are omitted from API requests. However, any field with an
  1427. // empty value appearing in NullFields will be sent to the server as
  1428. // null. It is an error if a field in this list has a non-empty value.
  1429. // This may be used to include null fields in Patch requests.
  1430. NullFields []string `json:"-"`
  1431. }
  1432. func (s *GoogleCloudHealthcareV1alpha2DicomGcsDestination) MarshalJSON() ([]byte, error) {
  1433. type NoMethod GoogleCloudHealthcareV1alpha2DicomGcsDestination
  1434. raw := NoMethod(*s)
  1435. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1436. }
  1437. // GoogleCloudHealthcareV1alpha2DicomGcsSource: Specifies the
  1438. // configuration for importing data from Cloud Storage.
  1439. type GoogleCloudHealthcareV1alpha2DicomGcsSource struct {
  1440. // Uri: Points to a Cloud Storage URI containing file(s) with
  1441. // content only. The URI must be in the following
  1442. // format:
  1443. // `gs://{bucket_id}/{object_id}`. The URI can include wildcards
  1444. // in
  1445. // `object_id` and thus identify multiple files. Supported wildcards:
  1446. // '*' to match 0 or more non-separator characters
  1447. // '**' to match 0 or more characters (including separators). Must be
  1448. // used at
  1449. // the end of a path and with no other wildcards in the
  1450. // path. Can also be used with a file extension (such as .dcm),
  1451. // which
  1452. // imports all files with the extension in the specified directory
  1453. // and
  1454. // its sub-directories. For example,
  1455. // `gs://my-bucket/my-directory/**.dcm` imports all files with
  1456. // .dcm
  1457. // extensions in `my-directory/` and its sub-directories.
  1458. // '?' to match 1 character
  1459. // All other URI formats are invalid.
  1460. // Files matching the wildcard are expected to contain content only,
  1461. // no
  1462. // metadata.
  1463. Uri string `json:"uri,omitempty"`
  1464. // ForceSendFields is a list of field names (e.g. "Uri") to
  1465. // unconditionally include in API requests. By default, fields with
  1466. // empty values are omitted from API requests. However, any non-pointer,
  1467. // non-interface field appearing in ForceSendFields will be sent to the
  1468. // server regardless of whether the field is empty or not. This may be
  1469. // used to include empty fields in Patch requests.
  1470. ForceSendFields []string `json:"-"`
  1471. // NullFields is a list of field names (e.g. "Uri") to include in API
  1472. // requests with the JSON null value. By default, fields with empty
  1473. // values are omitted from API requests. However, any field with an
  1474. // empty value appearing in NullFields will be sent to the server as
  1475. // null. It is an error if a field in this list has a non-empty value.
  1476. // This may be used to include null fields in Patch requests.
  1477. NullFields []string `json:"-"`
  1478. }
  1479. func (s *GoogleCloudHealthcareV1alpha2DicomGcsSource) MarshalJSON() ([]byte, error) {
  1480. type NoMethod GoogleCloudHealthcareV1alpha2DicomGcsSource
  1481. raw := NoMethod(*s)
  1482. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1483. }
  1484. // GoogleCloudHealthcareV1alpha2FhirBigQueryDestination: The
  1485. // configuration for exporting to BigQuery.
  1486. type GoogleCloudHealthcareV1alpha2FhirBigQueryDestination struct {
  1487. // DatasetUri: BigQuery URI to a dataset, up to 2000 characters long, in
  1488. // the format
  1489. // `bq://projectId.bqDatasetId`
  1490. DatasetUri string `json:"datasetUri,omitempty"`
  1491. // SchemaConfig: The configuration for the exported BigQuery schema.
  1492. SchemaConfig *SchemaConfig `json:"schemaConfig,omitempty"`
  1493. // ForceSendFields is a list of field names (e.g. "DatasetUri") to
  1494. // unconditionally include in API requests. By default, fields with
  1495. // empty values are omitted from API requests. However, any non-pointer,
  1496. // non-interface field appearing in ForceSendFields will be sent to the
  1497. // server regardless of whether the field is empty or not. This may be
  1498. // used to include empty fields in Patch requests.
  1499. ForceSendFields []string `json:"-"`
  1500. // NullFields is a list of field names (e.g. "DatasetUri") to include in
  1501. // API requests with the JSON null value. By default, fields with empty
  1502. // values are omitted from API requests. However, any field with an
  1503. // empty value appearing in NullFields will be sent to the server as
  1504. // null. It is an error if a field in this list has a non-empty value.
  1505. // This may be used to include null fields in Patch requests.
  1506. NullFields []string `json:"-"`
  1507. }
  1508. func (s *GoogleCloudHealthcareV1alpha2FhirBigQueryDestination) MarshalJSON() ([]byte, error) {
  1509. type NoMethod GoogleCloudHealthcareV1alpha2FhirBigQueryDestination
  1510. raw := NoMethod(*s)
  1511. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1512. }
  1513. // GoogleCloudHealthcareV1alpha2FhirRestExportResourcesResponse: Final
  1514. // response of exporting resources.
  1515. // This structure will be included in the
  1516. // response to describe the detailed
  1517. // outcome. It will only be included when the operation finishes.
  1518. type GoogleCloudHealthcareV1alpha2FhirRestExportResourcesResponse struct {
  1519. // FhirStore: The name of the FHIR store where resources have been
  1520. // exported, in
  1521. // the
  1522. // format
  1523. // `projects/{project_id}/locations/{location_id}/datasets/{da
  1524. // taset_id}/fhirStores/{fhir_store_id}`.
  1525. FhirStore string `json:"fhirStore,omitempty"`
  1526. // ResourceCount: The total number of resources exported from the
  1527. // requested FHIR store.
  1528. ResourceCount int64 `json:"resourceCount,omitempty,string"`
  1529. // ForceSendFields is a list of field names (e.g. "FhirStore") to
  1530. // unconditionally include in API requests. By default, fields with
  1531. // empty values are omitted from API requests. However, any non-pointer,
  1532. // non-interface field appearing in ForceSendFields will be sent to the
  1533. // server regardless of whether the field is empty or not. This may be
  1534. // used to include empty fields in Patch requests.
  1535. ForceSendFields []string `json:"-"`
  1536. // NullFields is a list of field names (e.g. "FhirStore") to include in
  1537. // API requests with the JSON null value. By default, fields with empty
  1538. // values are omitted from API requests. However, any field with an
  1539. // empty value appearing in NullFields will be sent to the server as
  1540. // null. It is an error if a field in this list has a non-empty value.
  1541. // This may be used to include null fields in Patch requests.
  1542. NullFields []string `json:"-"`
  1543. }
  1544. func (s *GoogleCloudHealthcareV1alpha2FhirRestExportResourcesResponse) MarshalJSON() ([]byte, error) {
  1545. type NoMethod GoogleCloudHealthcareV1alpha2FhirRestExportResourcesResponse
  1546. raw := NoMethod(*s)
  1547. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1548. }
  1549. // GoogleCloudHealthcareV1alpha2FhirRestGcsDestination: The
  1550. // configuration for exporting to Cloud Storage.
  1551. type GoogleCloudHealthcareV1alpha2FhirRestGcsDestination struct {
  1552. // UriPrefix: URI for a Cloud Storage directory where result files
  1553. // should be written (in
  1554. // the format `gs://{bucket-id}/{path/to/destination/dir}`). If there is
  1555. // no
  1556. // trailing slash, the service will append one when composing the object
  1557. // path.
  1558. // The user is responsible for creating the Cloud Storage bucket
  1559. // referenced in
  1560. // `uri_prefix`.
  1561. UriPrefix string `json:"uriPrefix,omitempty"`
  1562. // ForceSendFields is a list of field names (e.g. "UriPrefix") to
  1563. // unconditionally include in API requests. By default, fields with
  1564. // empty values are omitted from API requests. However, any non-pointer,
  1565. // non-interface field appearing in ForceSendFields will be sent to the
  1566. // server regardless of whether the field is empty or not. This may be
  1567. // used to include empty fields in Patch requests.
  1568. ForceSendFields []string `json:"-"`
  1569. // NullFields is a list of field names (e.g. "UriPrefix") to include in
  1570. // API requests with the JSON null value. By default, fields with empty
  1571. // values are omitted from API requests. However, any field with an
  1572. // empty value appearing in NullFields will be sent to the server as
  1573. // null. It is an error if a field in this list has a non-empty value.
  1574. // This may be used to include null fields in Patch requests.
  1575. NullFields []string `json:"-"`
  1576. }
  1577. func (s *GoogleCloudHealthcareV1alpha2FhirRestGcsDestination) MarshalJSON() ([]byte, error) {
  1578. type NoMethod GoogleCloudHealthcareV1alpha2FhirRestGcsDestination
  1579. raw := NoMethod(*s)
  1580. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1581. }
  1582. // GoogleCloudHealthcareV1alpha2FhirRestGcsErrorDestination: Specifies
  1583. // the Cloud Storage destination where errors will be recorded.
  1584. type GoogleCloudHealthcareV1alpha2FhirRestGcsErrorDestination struct {
  1585. // UriPrefix: URI for a Cloud Storage directory to which error report
  1586. // files should be
  1587. // written (in the format `gs://{bucket-id}/{path/to/destination/dir}`).
  1588. // If
  1589. // there is no trailing slash, the service will append one when
  1590. // composing the
  1591. // object path. The user is responsible for creating the Cloud Storage
  1592. // bucket
  1593. // referenced in `uri_prefix`.
  1594. UriPrefix string `json:"uriPrefix,omitempty"`
  1595. // ForceSendFields is a list of field names (e.g. "UriPrefix") 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. "UriPrefix") to include in
  1603. // API requests with the JSON null value. By default, fields with empty
  1604. // values are omitted from API requests. However, any field with an
  1605. // 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 *GoogleCloudHealthcareV1alpha2FhirRestGcsErrorDestination) MarshalJSON() ([]byte, error) {
  1611. type NoMethod GoogleCloudHealthcareV1alpha2FhirRestGcsErrorDestination
  1612. raw := NoMethod(*s)
  1613. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1614. }
  1615. // GoogleCloudHealthcareV1alpha2FhirRestGcsSource: Specifies the
  1616. // configuration for importing data from Cloud Storage.
  1617. type GoogleCloudHealthcareV1alpha2FhirRestGcsSource struct {
  1618. // Uri: Points to a Cloud Storage URI containing file(s) to import.
  1619. //
  1620. // The URI must be in the following format:
  1621. // `gs://{bucket_id}/{object_id}`.
  1622. // The URI can include wildcards in `object_id` and thus identify
  1623. // multiple
  1624. // files. Supported wildcards:
  1625. //
  1626. // * `*` to match 0 or more non-separator characters
  1627. // * `**` to match 0 or more characters (including separators). Must be
  1628. // used
  1629. // at the end of a path and with no other wildcards in the
  1630. // path. Can also be used with a file extension (such as .ndjson),
  1631. // which
  1632. // imports all files with the extension in the specified directory
  1633. // and
  1634. // its sub-directories. For example,
  1635. // `gs://my-bucket/my-directory/**.ndjson`
  1636. // imports all files with `.ndjson` extensions in `my-directory/` and
  1637. // its
  1638. // sub-directories.
  1639. // * `?` to match 1 character
  1640. //
  1641. // Files matching the wildcard are expected to contain content only,
  1642. // no
  1643. // metadata.
  1644. Uri string `json:"uri,omitempty"`
  1645. // ForceSendFields is a list of field names (e.g. "Uri") to
  1646. // unconditionally include in API requests. By default, fields with
  1647. // empty values are omitted from API requests. However, any non-pointer,
  1648. // non-interface field appearing in ForceSendFields will be sent to the
  1649. // server regardless of whether the field is empty or not. This may be
  1650. // used to include empty fields in Patch requests.
  1651. ForceSendFields []string `json:"-"`
  1652. // NullFields is a list of field names (e.g. "Uri") to include in API
  1653. // requests with the JSON null value. By default, fields with empty
  1654. // values are omitted from API requests. However, any field with an
  1655. // empty value appearing in NullFields will be sent to the server as
  1656. // null. It is an error if a field in this list has a non-empty value.
  1657. // This may be used to include null fields in Patch requests.
  1658. NullFields []string `json:"-"`
  1659. }
  1660. func (s *GoogleCloudHealthcareV1alpha2FhirRestGcsSource) MarshalJSON() ([]byte, error) {
  1661. type NoMethod GoogleCloudHealthcareV1alpha2FhirRestGcsSource
  1662. raw := NoMethod(*s)
  1663. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1664. }
  1665. // GoogleCloudHealthcareV1alpha2FhirRestImportResourcesErrorDetails:
  1666. // Error response of importing resources.
  1667. // This structure will be included in the
  1668. // error details to describe the
  1669. // detailed error. It will only be included when the operation finishes
  1670. // with
  1671. // some failure.
  1672. type GoogleCloudHealthcareV1alpha2FhirRestImportResourcesErrorDetails struct {
  1673. // ErrorCount: The number of resources that had errors.
  1674. ErrorCount int64 `json:"errorCount,omitempty,string"`
  1675. // FhirStore: The name of the FHIR store where resources have been
  1676. // imported, in
  1677. // the
  1678. // format
  1679. // `projects/{project_id}/locations/{location_id}/datasets/{da
  1680. // taset_id}/fhirStores/{fhir_store_id}`.
  1681. FhirStore string `json:"fhirStore,omitempty"`
  1682. // InputSize: The total number of resources included in the source data.
  1683. // This is the sum
  1684. // of the success and error counts.
  1685. InputSize int64 `json:"inputSize,omitempty,string"`
  1686. // SuccessCount: The number of resources that have been imported.
  1687. SuccessCount int64 `json:"successCount,omitempty,string"`
  1688. // ForceSendFields is a list of field names (e.g. "ErrorCount") to
  1689. // unconditionally include in API requests. By default, fields with
  1690. // empty values are omitted from API requests. However, any non-pointer,
  1691. // non-interface field appearing in ForceSendFields will be sent to the
  1692. // server regardless of whether the field is empty or not. This may be
  1693. // used to include empty fields in Patch requests.
  1694. ForceSendFields []string `json:"-"`
  1695. // NullFields is a list of field names (e.g. "ErrorCount") to include in
  1696. // API requests with the JSON null value. By default, fields with empty
  1697. // values are omitted from API requests. However, any field with an
  1698. // empty value appearing in NullFields will be sent to the server as
  1699. // null. It is an error if a field in this list has a non-empty value.
  1700. // This may be used to include null fields in Patch requests.
  1701. NullFields []string `json:"-"`
  1702. }
  1703. func (s *GoogleCloudHealthcareV1alpha2FhirRestImportResourcesErrorDetails) MarshalJSON() ([]byte, error) {
  1704. type NoMethod GoogleCloudHealthcareV1alpha2FhirRestImportResourcesErrorDetails
  1705. raw := NoMethod(*s)
  1706. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1707. }
  1708. // GoogleCloudHealthcareV1alpha2FhirRestImportResourcesResponse: Final
  1709. // response of importing resources.
  1710. // This structure will be included in the
  1711. // response to describe the detailed
  1712. // outcome. It will only be included when the operation finishes
  1713. // successfully.
  1714. type GoogleCloudHealthcareV1alpha2FhirRestImportResourcesResponse struct {
  1715. // FhirStore: The name of the FHIR store where the resources have been
  1716. // imported, in
  1717. // the
  1718. // format
  1719. // `projects/{project_id}/locations/{location_id}/datasets/{da
  1720. // taset_id}/fhirStores/{fhir_store_id}`.
  1721. FhirStore string `json:"fhirStore,omitempty"`
  1722. // InputSize: The total number of resources included in the source data.
  1723. InputSize int64 `json:"inputSize,omitempty,string"`
  1724. // ForceSendFields is a list of field names (e.g. "FhirStore") to
  1725. // unconditionally include in API requests. By default, fields with
  1726. // empty values are omitted from API requests. However, any non-pointer,
  1727. // non-interface field appearing in ForceSendFields will be sent to the
  1728. // server regardless of whether the field is empty or not. This may be
  1729. // used to include empty fields in Patch requests.
  1730. ForceSendFields []string `json:"-"`
  1731. // NullFields is a list of field names (e.g. "FhirStore") to include in
  1732. // API requests with the JSON null value. By default, fields with empty
  1733. // values are omitted from API requests. However, any field with an
  1734. // empty value appearing in NullFields will be sent to the server as
  1735. // null. It is an error if a field in this list has a non-empty value.
  1736. // This may be used to include null fields in Patch requests.
  1737. NullFields []string `json:"-"`
  1738. }
  1739. func (s *GoogleCloudHealthcareV1alpha2FhirRestImportResourcesResponse) MarshalJSON() ([]byte, error) {
  1740. type NoMethod GoogleCloudHealthcareV1alpha2FhirRestImportResourcesResponse
  1741. raw := NoMethod(*s)
  1742. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1743. }
  1744. // Hl7V2Store: Represents an HL7v2 store.
  1745. type Hl7V2Store struct {
  1746. // Labels: User-supplied key-value pairs used to organize HL7v2
  1747. // stores.
  1748. //
  1749. // Label keys must be between 1 and 63 characters long, have a UTF-8
  1750. // encoding
  1751. // of maximum 128 bytes, and must conform to the
  1752. // following PCRE regular expression:
  1753. // \p{Ll}\p{Lo}{0,62}
  1754. //
  1755. // Label values are optional, must be between 1 and 63 characters long,
  1756. // have
  1757. // a UTF-8 encoding of maximum 128 bytes, and must conform to
  1758. // the
  1759. // following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
  1760. //
  1761. // No more than 64 labels can be associated with a given store.
  1762. Labels map[string]string `json:"labels,omitempty"`
  1763. // Name: Output only. Resource name of the HL7v2 store, of the
  1764. // form
  1765. // `projects/{project_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_s
  1766. // tore_id}`.
  1767. Name string `json:"name,omitempty"`
  1768. // NotificationConfig: The notification destination all messages (both
  1769. // Ingest & Create) are
  1770. // published on. Only the message name is sent as part of the
  1771. // notification. If
  1772. // this is unset, no notifications will be sent. Supplied by the client.
  1773. NotificationConfig *NotificationConfig `json:"notificationConfig,omitempty"`
  1774. // ParserConfig: The configuration for the parser. It determines how the
  1775. // server parses the
  1776. // messages.
  1777. ParserConfig *ParserConfig `json:"parserConfig,omitempty"`
  1778. // ServerResponse contains the HTTP response code and headers from the
  1779. // server.
  1780. googleapi.ServerResponse `json:"-"`
  1781. // ForceSendFields is a list of field names (e.g. "Labels") to
  1782. // unconditionally include in API requests. By default, fields with
  1783. // empty values are omitted from API requests. However, any non-pointer,
  1784. // non-interface field appearing in ForceSendFields will be sent to the
  1785. // server regardless of whether the field is empty or not. This may be
  1786. // used to include empty fields in Patch requests.
  1787. ForceSendFields []string `json:"-"`
  1788. // NullFields is a list of field names (e.g. "Labels") to include in API
  1789. // requests with the JSON null value. By default, fields with empty
  1790. // values are omitted from API requests. However, any field with an
  1791. // empty value appearing in NullFields will be sent to the server as
  1792. // null. It is an error if a field in this list has a non-empty value.
  1793. // This may be used to include null fields in Patch requests.
  1794. NullFields []string `json:"-"`
  1795. }
  1796. func (s *Hl7V2Store) MarshalJSON() ([]byte, error) {
  1797. type NoMethod Hl7V2Store
  1798. raw := NoMethod(*s)
  1799. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1800. }
  1801. // HttpBody: Message that represents an arbitrary HTTP body. It should
  1802. // only be used for
  1803. // payload formats that can't be represented as JSON, such as raw binary
  1804. // or
  1805. // an HTML page.
  1806. //
  1807. //
  1808. // This message can be used both in streaming and non-streaming API
  1809. // methods in
  1810. // the request as well as the response.
  1811. //
  1812. // It can be used as a top-level request field, which is convenient if
  1813. // one
  1814. // wants to extract parameters from either the URL or HTTP template into
  1815. // the
  1816. // request fields and also want access to the raw HTTP body.
  1817. //
  1818. // Example:
  1819. //
  1820. // message GetResourceRequest {
  1821. // // A unique request id.
  1822. // string request_id = 1;
  1823. //
  1824. // // The raw HTTP body is bound to this field.
  1825. // google.api.HttpBody http_body = 2;
  1826. // }
  1827. //
  1828. // service ResourceService {
  1829. // rpc GetResource(GetResourceRequest) returns
  1830. // (google.api.HttpBody);
  1831. // rpc UpdateResource(google.api.HttpBody) returns
  1832. // (google.protobuf.Empty);
  1833. // }
  1834. //
  1835. // Example with streaming methods:
  1836. //
  1837. // service CaldavService {
  1838. // rpc GetCalendar(stream google.api.HttpBody)
  1839. // returns (stream google.api.HttpBody);
  1840. // rpc UpdateCalendar(stream google.api.HttpBody)
  1841. // returns (stream google.api.HttpBody);
  1842. // }
  1843. //
  1844. // Use of this type only changes how the request and response bodies
  1845. // are
  1846. // handled, all other features will continue to work unchanged.
  1847. type HttpBody struct {
  1848. // ContentType: The HTTP Content-Type header value specifying the
  1849. // content type of the body.
  1850. ContentType string `json:"contentType,omitempty"`
  1851. // Data: The HTTP request/response body as raw binary.
  1852. Data string `json:"data,omitempty"`
  1853. // Extensions: Application specific response metadata. Must be set in
  1854. // the first response
  1855. // for streaming APIs.
  1856. Extensions []googleapi.RawMessage `json:"extensions,omitempty"`
  1857. // ServerResponse contains the HTTP response code and headers from the
  1858. // server.
  1859. googleapi.ServerResponse `json:"-"`
  1860. // ForceSendFields is a list of field names (e.g. "ContentType") to
  1861. // unconditionally include in API requests. By default, fields with
  1862. // empty values are omitted from API requests. However, any non-pointer,
  1863. // non-interface field appearing in ForceSendFields will be sent to the
  1864. // server regardless of whether the field is empty or not. This may be
  1865. // used to include empty fields in Patch requests.
  1866. ForceSendFields []string `json:"-"`
  1867. // NullFields is a list of field names (e.g. "ContentType") to include
  1868. // in API requests with the JSON null value. By default, fields with
  1869. // empty values are omitted from API requests. However, any field with
  1870. // an empty value appearing in NullFields will be sent to the server as
  1871. // null. It is an error if a field in this list has a non-empty value.
  1872. // This may be used to include null fields in Patch requests.
  1873. NullFields []string `json:"-"`
  1874. }
  1875. func (s *HttpBody) MarshalJSON() ([]byte, error) {
  1876. type NoMethod HttpBody
  1877. raw := NoMethod(*s)
  1878. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1879. }
  1880. // ImageAnnotation: Image annotation.
  1881. type ImageAnnotation struct {
  1882. // BoundingPolys: The list of polygons outlining the sensitive regions
  1883. // in the image.
  1884. BoundingPolys []*BoundingPoly `json:"boundingPolys,omitempty"`
  1885. // ForceSendFields is a list of field names (e.g. "BoundingPolys") to
  1886. // unconditionally include in API requests. By default, fields with
  1887. // empty values are omitted from API requests. However, any non-pointer,
  1888. // non-interface field appearing in ForceSendFields will be sent to the
  1889. // server regardless of whether the field is empty or not. This may be
  1890. // used to include empty fields in Patch requests.
  1891. ForceSendFields []string `json:"-"`
  1892. // NullFields is a list of field names (e.g. "BoundingPolys") to include
  1893. // in API requests with the JSON null value. By default, fields with
  1894. // empty values are omitted from API requests. However, any field with
  1895. // an empty value appearing in NullFields will be sent to the server as
  1896. // null. It is an error if a field in this list has a non-empty value.
  1897. // This may be used to include null fields in Patch requests.
  1898. NullFields []string `json:"-"`
  1899. }
  1900. func (s *ImageAnnotation) MarshalJSON() ([]byte, error) {
  1901. type NoMethod ImageAnnotation
  1902. raw := NoMethod(*s)
  1903. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1904. }
  1905. // ImageConfig: Specifies how de-identification of image pixel should be
  1906. // handled.
  1907. type ImageConfig struct {
  1908. // TextRedactionMode: Determines how to redact text from image.
  1909. //
  1910. // Possible values:
  1911. // "TEXT_REDACTION_MODE_UNSPECIFIED" - No text redaction specified.
  1912. // Same as REDACT_NO_TEXT.
  1913. // "REDACT_ALL_TEXT" - Redact all text.
  1914. TextRedactionMode string `json:"textRedactionMode,omitempty"`
  1915. // ForceSendFields is a list of field names (e.g. "TextRedactionMode")
  1916. // to unconditionally include in API requests. By default, fields with
  1917. // empty values are omitted from API requests. However, any non-pointer,
  1918. // non-interface field appearing in ForceSendFields will be sent to the
  1919. // server regardless of whether the field is empty or not. This may be
  1920. // used to include empty fields in Patch requests.
  1921. ForceSendFields []string `json:"-"`
  1922. // NullFields is a list of field names (e.g. "TextRedactionMode") to
  1923. // include in API requests with the JSON null value. By default, fields
  1924. // with empty values are omitted from API requests. However, any field
  1925. // with an empty value appearing in NullFields will be sent to the
  1926. // server as null. It is an error if a field in this list has a
  1927. // non-empty value. This may be used to include null fields in Patch
  1928. // requests.
  1929. NullFields []string `json:"-"`
  1930. }
  1931. func (s *ImageConfig) MarshalJSON() ([]byte, error) {
  1932. type NoMethod ImageConfig
  1933. raw := NoMethod(*s)
  1934. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1935. }
  1936. // ImportDicomDataErrorDetails: Returns the errors encountered during
  1937. // DICOM store import.
  1938. type ImportDicomDataErrorDetails struct {
  1939. // DicomStore: The name of the DICOM store where the resources have been
  1940. // imported, in
  1941. // the
  1942. // format
  1943. // `projects/{project_id}/locations/{location_id}/datasets/{da
  1944. // taset_id}/dicomStores/{dicom_store_id}`
  1945. DicomStore string `json:"dicomStore,omitempty"`
  1946. // SampleErrors: Contains sample errors encountered in imports of
  1947. // individual resources
  1948. // (e.g., a Cloud Storage object).
  1949. SampleErrors []*ErrorDetail `json:"sampleErrors,omitempty"`
  1950. // ForceSendFields is a list of field names (e.g. "DicomStore") to
  1951. // unconditionally include in API requests. By default, fields with
  1952. // empty values are omitted from API requests. However, any non-pointer,
  1953. // non-interface field appearing in ForceSendFields will be sent to the
  1954. // server regardless of whether the field is empty or not. This may be
  1955. // used to include empty fields in Patch requests.
  1956. ForceSendFields []string `json:"-"`
  1957. // NullFields is a list of field names (e.g. "DicomStore") to include in
  1958. // API requests with the JSON null value. By default, fields with empty
  1959. // values are omitted from API requests. However, any field with an
  1960. // empty value appearing in NullFields will be sent to the server as
  1961. // null. It is an error if a field in this list has a non-empty value.
  1962. // This may be used to include null fields in Patch requests.
  1963. NullFields []string `json:"-"`
  1964. }
  1965. func (s *ImportDicomDataErrorDetails) MarshalJSON() ([]byte, error) {
  1966. type NoMethod ImportDicomDataErrorDetails
  1967. raw := NoMethod(*s)
  1968. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1969. }
  1970. // ImportDicomDataRequest: Imports data into the specified DICOM
  1971. // store.
  1972. // Returns an error if any of the files to import are not DICOM files.
  1973. // This
  1974. // API will accept duplicate DICOM instances, by simply ignoring the
  1975. // newly
  1976. // pushed instance (it will not overwrite).
  1977. type ImportDicomDataRequest struct {
  1978. // GcsSource: Cloud Storage source data location and import
  1979. // configuration.
  1980. //
  1981. // The Cloud Storage location requires the
  1982. // `roles/storage.objectViewer`
  1983. // Cloud IAM role.
  1984. GcsSource *GoogleCloudHealthcareV1alpha2DicomGcsSource `json:"gcsSource,omitempty"`
  1985. // ForceSendFields is a list of field names (e.g. "GcsSource") to
  1986. // unconditionally include in API requests. By default, fields with
  1987. // empty values are omitted from API requests. However, any non-pointer,
  1988. // non-interface field appearing in ForceSendFields will be sent to the
  1989. // server regardless of whether the field is empty or not. This may be
  1990. // used to include empty fields in Patch requests.
  1991. ForceSendFields []string `json:"-"`
  1992. // NullFields is a list of field names (e.g. "GcsSource") to include in
  1993. // API requests with the JSON null value. By default, fields with empty
  1994. // values are omitted from API requests. However, any field with an
  1995. // empty value appearing in NullFields will be sent to the server as
  1996. // null. It is an error if a field in this list has a non-empty value.
  1997. // This may be used to include null fields in Patch requests.
  1998. NullFields []string `json:"-"`
  1999. }
  2000. func (s *ImportDicomDataRequest) MarshalJSON() ([]byte, error) {
  2001. type NoMethod ImportDicomDataRequest
  2002. raw := NoMethod(*s)
  2003. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2004. }
  2005. // ImportResourcesRequest: Request to import resources.
  2006. // The FHIR resources to be imported must have client supplied IDs. The
  2007. // server
  2008. // will retain the resource IDs. The import operation is idempotent.
  2009. // Retry will
  2010. // overwrite existing data identified by client supplied IDs. The
  2011. // import
  2012. // operation is not transactional. The server will not roll back any
  2013. // committed
  2014. // changes upon partial failures.
  2015. type ImportResourcesRequest struct {
  2016. // ContentStructure: The content structure in the source location. The
  2017. // default is
  2018. // BUNDLE.
  2019. //
  2020. // Possible values:
  2021. // "CONTENT_STRUCTURE_UNSPECIFIED"
  2022. // "BUNDLE" - Each unit is a bundle, which contains one or more
  2023. // resources.
  2024. // "RESOURCE" - Each unit is a single resource.
  2025. ContentStructure string `json:"contentStructure,omitempty"`
  2026. // GcsErrorDestination: The Cloud Storage destination to write the error
  2027. // report to.
  2028. //
  2029. // The Cloud Storage location requires the `roles/storage.objectAdmin`
  2030. // Cloud
  2031. // IAM role.
  2032. //
  2033. // Note that writing a file to the same destination multiple times
  2034. // will
  2035. // result in the previous version of the file being overwritten.
  2036. GcsErrorDestination *GoogleCloudHealthcareV1alpha2FhirRestGcsErrorDestination `json:"gcsErrorDestination,omitempty"`
  2037. // GcsSource: Cloud Storage source data location and import
  2038. // configuration.
  2039. //
  2040. // The Cloud Storage location requires the
  2041. // `roles/storage.objectViewer`
  2042. // Cloud IAM role.
  2043. //
  2044. // Each Cloud Storage object should be a text file that contains
  2045. // newline
  2046. // delimited JSON structures conforming to FHIR standard.
  2047. GcsSource *GoogleCloudHealthcareV1alpha2FhirRestGcsSource `json:"gcsSource,omitempty"`
  2048. // ForceSendFields is a list of field names (e.g. "ContentStructure") to
  2049. // unconditionally include in API requests. By default, fields with
  2050. // empty values are omitted from API requests. However, any non-pointer,
  2051. // non-interface field appearing in ForceSendFields will be sent to the
  2052. // server regardless of whether the field is empty or not. This may be
  2053. // used to include empty fields in Patch requests.
  2054. ForceSendFields []string `json:"-"`
  2055. // NullFields is a list of field names (e.g. "ContentStructure") to
  2056. // include in API requests with the JSON null value. By default, fields
  2057. // with empty values are omitted from API requests. However, any field
  2058. // with an empty value appearing in NullFields will be sent to the
  2059. // server as null. It is an error if a field in this list has a
  2060. // non-empty value. This may be used to include null fields in Patch
  2061. // requests.
  2062. NullFields []string `json:"-"`
  2063. }
  2064. func (s *ImportResourcesRequest) MarshalJSON() ([]byte, error) {
  2065. type NoMethod ImportResourcesRequest
  2066. raw := NoMethod(*s)
  2067. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2068. }
  2069. // IngestMessageRequest: Ingests a message into the specified HL7v2
  2070. // store.
  2071. type IngestMessageRequest struct {
  2072. // Message: HL7v2 message to ingest.
  2073. Message *Message `json:"message,omitempty"`
  2074. // ForceSendFields is a list of field names (e.g. "Message") to
  2075. // unconditionally include in API requests. By default, fields with
  2076. // empty values are omitted from API requests. However, any non-pointer,
  2077. // non-interface field appearing in ForceSendFields will be sent to the
  2078. // server regardless of whether the field is empty or not. This may be
  2079. // used to include empty fields in Patch requests.
  2080. ForceSendFields []string `json:"-"`
  2081. // NullFields is a list of field names (e.g. "Message") to include in
  2082. // API requests with the JSON null value. By default, fields with empty
  2083. // values are omitted from API requests. However, any field with an
  2084. // empty value appearing in NullFields will be sent to the server as
  2085. // null. It is an error if a field in this list has a non-empty value.
  2086. // This may be used to include null fields in Patch requests.
  2087. NullFields []string `json:"-"`
  2088. }
  2089. func (s *IngestMessageRequest) MarshalJSON() ([]byte, error) {
  2090. type NoMethod IngestMessageRequest
  2091. raw := NoMethod(*s)
  2092. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2093. }
  2094. // IngestMessageResponse: Acknowledges that a message has been ingested
  2095. // into the specified
  2096. // HL7v2 store.
  2097. type IngestMessageResponse struct {
  2098. // Hl7Ack: HL7v2 ACK message.
  2099. Hl7Ack string `json:"hl7Ack,omitempty"`
  2100. // Message: Created message resource.
  2101. Message *Message `json:"message,omitempty"`
  2102. // ServerResponse contains the HTTP response code and headers from the
  2103. // server.
  2104. googleapi.ServerResponse `json:"-"`
  2105. // ForceSendFields is a list of field names (e.g. "Hl7Ack") to
  2106. // unconditionally include in API requests. By default, fields with
  2107. // empty values are omitted from API requests. However, any non-pointer,
  2108. // non-interface field appearing in ForceSendFields will be sent to the
  2109. // server regardless of whether the field is empty or not. This may be
  2110. // used to include empty fields in Patch requests.
  2111. ForceSendFields []string `json:"-"`
  2112. // NullFields is a list of field names (e.g. "Hl7Ack") to include in API
  2113. // requests with the JSON null value. By default, fields with empty
  2114. // values are omitted from API requests. However, any field with an
  2115. // empty value appearing in NullFields will be sent to the server as
  2116. // null. It is an error if a field in this list has a non-empty value.
  2117. // This may be used to include null fields in Patch requests.
  2118. NullFields []string `json:"-"`
  2119. }
  2120. func (s *IngestMessageResponse) MarshalJSON() ([]byte, error) {
  2121. type NoMethod IngestMessageResponse
  2122. raw := NoMethod(*s)
  2123. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2124. }
  2125. // ListAnnotationStoresResponse: Lists the Annotation stores
  2126. // in the given dataset.
  2127. type ListAnnotationStoresResponse struct {
  2128. // AnnotationStores: The returned Annotation stores. Won't be more
  2129. // Annotation stores than the
  2130. // value of page_size in the request.
  2131. AnnotationStores []*AnnotationStore `json:"annotationStores,omitempty"`
  2132. // NextPageToken: Token to retrieve the next page of results or empty if
  2133. // there are no more
  2134. // results in the list.
  2135. NextPageToken string `json:"nextPageToken,omitempty"`
  2136. // ServerResponse contains the HTTP response code and headers from the
  2137. // server.
  2138. googleapi.ServerResponse `json:"-"`
  2139. // ForceSendFields is a list of field names (e.g. "AnnotationStores") to
  2140. // unconditionally include in API requests. By default, fields with
  2141. // empty values are omitted from API requests. However, any non-pointer,
  2142. // non-interface field appearing in ForceSendFields will be sent to the
  2143. // server regardless of whether the field is empty or not. This may be
  2144. // used to include empty fields in Patch requests.
  2145. ForceSendFields []string `json:"-"`
  2146. // NullFields is a list of field names (e.g. "AnnotationStores") to
  2147. // include in API requests with the JSON null value. By default, fields
  2148. // with empty values are omitted from API requests. However, any field
  2149. // with an empty value appearing in NullFields will be sent to the
  2150. // server as null. It is an error if a field in this list has a
  2151. // non-empty value. This may be used to include null fields in Patch
  2152. // requests.
  2153. NullFields []string `json:"-"`
  2154. }
  2155. func (s *ListAnnotationStoresResponse) MarshalJSON() ([]byte, error) {
  2156. type NoMethod ListAnnotationStoresResponse
  2157. raw := NoMethod(*s)
  2158. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2159. }
  2160. // ListAnnotationsResponse: Lists the Annotations in the
  2161. // specified
  2162. // Annotation store.
  2163. type ListAnnotationsResponse struct {
  2164. // Annotations: The returned Annotations names. Won't be more values
  2165. // than the value of
  2166. // page_size in the request.
  2167. Annotations []string `json:"annotations,omitempty"`
  2168. // NextPageToken: Token to retrieve the next page of results or empty if
  2169. // there are no more
  2170. // results in the list.
  2171. NextPageToken string `json:"nextPageToken,omitempty"`
  2172. // ServerResponse contains the HTTP response code and headers from the
  2173. // server.
  2174. googleapi.ServerResponse `json:"-"`
  2175. // ForceSendFields is a list of field names (e.g. "Annotations") to
  2176. // unconditionally include in API requests. By default, fields with
  2177. // empty values are omitted from API requests. However, any non-pointer,
  2178. // non-interface field appearing in ForceSendFields will be sent to the
  2179. // server regardless of whether the field is empty or not. This may be
  2180. // used to include empty fields in Patch requests.
  2181. ForceSendFields []string `json:"-"`
  2182. // NullFields is a list of field names (e.g. "Annotations") to include
  2183. // in API requests with the JSON null value. By default, fields with
  2184. // empty values are omitted from API requests. However, any field with
  2185. // an empty value appearing in NullFields will be sent to the server as
  2186. // null. It is an error if a field in this list has a non-empty value.
  2187. // This may be used to include null fields in Patch requests.
  2188. NullFields []string `json:"-"`
  2189. }
  2190. func (s *ListAnnotationsResponse) MarshalJSON() ([]byte, error) {
  2191. type NoMethod ListAnnotationsResponse
  2192. raw := NoMethod(*s)
  2193. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2194. }
  2195. // ListDatasetsResponse: Lists the available datasets.
  2196. type ListDatasetsResponse struct {
  2197. // Datasets: The first page of datasets.
  2198. Datasets []*Dataset `json:"datasets,omitempty"`
  2199. // NextPageToken: Token to retrieve the next page of results, or empty
  2200. // if there are no
  2201. // more results in the list.
  2202. NextPageToken string `json:"nextPageToken,omitempty"`
  2203. // ServerResponse contains the HTTP response code and headers from the
  2204. // server.
  2205. googleapi.ServerResponse `json:"-"`
  2206. // ForceSendFields is a list of field names (e.g. "Datasets") to
  2207. // unconditionally include in API requests. By default, fields with
  2208. // empty values are omitted from API requests. However, any non-pointer,
  2209. // non-interface field appearing in ForceSendFields will be sent to the
  2210. // server regardless of whether the field is empty or not. This may be
  2211. // used to include empty fields in Patch requests.
  2212. ForceSendFields []string `json:"-"`
  2213. // NullFields is a list of field names (e.g. "Datasets") to include in
  2214. // API requests with the JSON null value. By default, fields with empty
  2215. // values are omitted from API requests. However, any field with an
  2216. // empty value appearing in NullFields will be sent to the server as
  2217. // null. It is an error if a field in this list has a non-empty value.
  2218. // This may be used to include null fields in Patch requests.
  2219. NullFields []string `json:"-"`
  2220. }
  2221. func (s *ListDatasetsResponse) MarshalJSON() ([]byte, error) {
  2222. type NoMethod ListDatasetsResponse
  2223. raw := NoMethod(*s)
  2224. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2225. }
  2226. // ListDicomStoresResponse: Lists the DICOM stores in the given dataset.
  2227. type ListDicomStoresResponse struct {
  2228. // DicomStores: The returned DICOM stores. Won't be more DICOM stores
  2229. // than the value of
  2230. // page_size in the request.
  2231. DicomStores []*DicomStore `json:"dicomStores,omitempty"`
  2232. // NextPageToken: Token to retrieve the next page of results or empty if
  2233. // there are no more
  2234. // results in the list.
  2235. NextPageToken string `json:"nextPageToken,omitempty"`
  2236. // ServerResponse contains the HTTP response code and headers from the
  2237. // server.
  2238. googleapi.ServerResponse `json:"-"`
  2239. // ForceSendFields is a list of field names (e.g. "DicomStores") to
  2240. // unconditionally include in API requests. By default, fields with
  2241. // empty values are omitted from API requests. However, any non-pointer,
  2242. // non-interface field appearing in ForceSendFields will be sent to the
  2243. // server regardless of whether the field is empty or not. This may be
  2244. // used to include empty fields in Patch requests.
  2245. ForceSendFields []string `json:"-"`
  2246. // NullFields is a list of field names (e.g. "DicomStores") to include
  2247. // in API requests with the JSON null value. By default, fields with
  2248. // empty values are omitted from API requests. However, any field with
  2249. // an empty value appearing in NullFields will be sent to the server as
  2250. // null. It is an error if a field in this list has a non-empty value.
  2251. // This may be used to include null fields in Patch requests.
  2252. NullFields []string `json:"-"`
  2253. }
  2254. func (s *ListDicomStoresResponse) MarshalJSON() ([]byte, error) {
  2255. type NoMethod ListDicomStoresResponse
  2256. raw := NoMethod(*s)
  2257. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2258. }
  2259. // ListFhirStoresResponse: Lists the FHIR stores in the given dataset.
  2260. type ListFhirStoresResponse struct {
  2261. // FhirStores: The returned FHIR stores. Won't be more FHIR stores than
  2262. // the value of
  2263. // page_size in the request.
  2264. FhirStores []*FhirStore `json:"fhirStores,omitempty"`
  2265. // NextPageToken: Token to retrieve the next page of results or empty if
  2266. // there are no more
  2267. // results in the list.
  2268. NextPageToken string `json:"nextPageToken,omitempty"`
  2269. // ServerResponse contains the HTTP response code and headers from the
  2270. // server.
  2271. googleapi.ServerResponse `json:"-"`
  2272. // ForceSendFields is a list of field names (e.g. "FhirStores") to
  2273. // unconditionally include in API requests. By default, fields with
  2274. // empty values are omitted from API requests. However, any non-pointer,
  2275. // non-interface field appearing in ForceSendFields will be sent to the
  2276. // server regardless of whether the field is empty or not. This may be
  2277. // used to include empty fields in Patch requests.
  2278. ForceSendFields []string `json:"-"`
  2279. // NullFields is a list of field names (e.g. "FhirStores") to include in
  2280. // API requests with the JSON null value. By default, fields with empty
  2281. // values are omitted from API requests. However, any field with an
  2282. // empty value appearing in NullFields will be sent to the server as
  2283. // null. It is an error if a field in this list has a non-empty value.
  2284. // This may be used to include null fields in Patch requests.
  2285. NullFields []string `json:"-"`
  2286. }
  2287. func (s *ListFhirStoresResponse) MarshalJSON() ([]byte, error) {
  2288. type NoMethod ListFhirStoresResponse
  2289. raw := NoMethod(*s)
  2290. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2291. }
  2292. // ListHl7V2StoresResponse: Lists the HL7v2 stores in the given dataset.
  2293. type ListHl7V2StoresResponse struct {
  2294. // Hl7V2Stores: The returned HL7v2 stores. Won't be more HL7v2 stores
  2295. // than the value of
  2296. // page_size in the request.
  2297. Hl7V2Stores []*Hl7V2Store `json:"hl7V2Stores,omitempty"`
  2298. // NextPageToken: Token to retrieve the next page of results or empty if
  2299. // there are no more
  2300. // results in the list.
  2301. NextPageToken string `json:"nextPageToken,omitempty"`
  2302. // ServerResponse contains the HTTP response code and headers from the
  2303. // server.
  2304. googleapi.ServerResponse `json:"-"`
  2305. // ForceSendFields is a list of field names (e.g. "Hl7V2Stores") to
  2306. // unconditionally include in API requests. By default, fields with
  2307. // empty values are omitted from API requests. However, any non-pointer,
  2308. // non-interface field appearing in ForceSendFields will be sent to the
  2309. // server regardless of whether the field is empty or not. This may be
  2310. // used to include empty fields in Patch requests.
  2311. ForceSendFields []string `json:"-"`
  2312. // NullFields is a list of field names (e.g. "Hl7V2Stores") to include
  2313. // in API requests with the JSON null value. By default, fields with
  2314. // empty values are omitted from API requests. However, any field with
  2315. // an empty value appearing in NullFields will be sent to the server as
  2316. // null. It is an error if a field in this list has a non-empty value.
  2317. // This may be used to include null fields in Patch requests.
  2318. NullFields []string `json:"-"`
  2319. }
  2320. func (s *ListHl7V2StoresResponse) MarshalJSON() ([]byte, error) {
  2321. type NoMethod ListHl7V2StoresResponse
  2322. raw := NoMethod(*s)
  2323. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2324. }
  2325. // ListLocationsResponse: The response message for
  2326. // Locations.ListLocations.
  2327. type ListLocationsResponse struct {
  2328. // Locations: A list of locations that matches the specified filter in
  2329. // the request.
  2330. Locations []*Location `json:"locations,omitempty"`
  2331. // NextPageToken: The standard List next-page token.
  2332. NextPageToken string `json:"nextPageToken,omitempty"`
  2333. // ServerResponse contains the HTTP response code and headers from the
  2334. // server.
  2335. googleapi.ServerResponse `json:"-"`
  2336. // ForceSendFields is a list of field names (e.g. "Locations") to
  2337. // unconditionally include in API requests. By default, fields with
  2338. // empty values are omitted from API requests. However, any non-pointer,
  2339. // non-interface field appearing in ForceSendFields will be sent to the
  2340. // server regardless of whether the field is empty or not. This may be
  2341. // used to include empty fields in Patch requests.
  2342. ForceSendFields []string `json:"-"`
  2343. // NullFields is a list of field names (e.g. "Locations") to include in
  2344. // API requests with the JSON null value. By default, fields with empty
  2345. // values are omitted from API requests. However, any field with an
  2346. // empty value appearing in NullFields will be sent to the server as
  2347. // null. It is an error if a field in this list has a non-empty value.
  2348. // This may be used to include null fields in Patch requests.
  2349. NullFields []string `json:"-"`
  2350. }
  2351. func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
  2352. type NoMethod ListLocationsResponse
  2353. raw := NoMethod(*s)
  2354. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2355. }
  2356. // ListMessagesResponse: Lists the messages in the specified HL7v2
  2357. // store.
  2358. type ListMessagesResponse struct {
  2359. // Messages: The returned message names. Won't be more values than the
  2360. // value of
  2361. // page_size in the request.
  2362. Messages []string `json:"messages,omitempty"`
  2363. // NextPageToken: Token to retrieve the next page of results or empty if
  2364. // there are no more
  2365. // results in the list.
  2366. NextPageToken string `json:"nextPageToken,omitempty"`
  2367. // ServerResponse contains the HTTP response code and headers from the
  2368. // server.
  2369. googleapi.ServerResponse `json:"-"`
  2370. // ForceSendFields is a list of field names (e.g. "Messages") to
  2371. // unconditionally include in API requests. By default, fields with
  2372. // empty values are omitted from API requests. However, any non-pointer,
  2373. // non-interface field appearing in ForceSendFields will be sent to the
  2374. // server regardless of whether the field is empty or not. This may be
  2375. // used to include empty fields in Patch requests.
  2376. ForceSendFields []string `json:"-"`
  2377. // NullFields is a list of field names (e.g. "Messages") to include in
  2378. // API requests with the JSON null value. By default, fields with empty
  2379. // values are omitted from API requests. However, any field with an
  2380. // empty value appearing in NullFields will be sent to the server as
  2381. // null. It is an error if a field in this list has a non-empty value.
  2382. // This may be used to include null fields in Patch requests.
  2383. NullFields []string `json:"-"`
  2384. }
  2385. func (s *ListMessagesResponse) MarshalJSON() ([]byte, error) {
  2386. type NoMethod ListMessagesResponse
  2387. raw := NoMethod(*s)
  2388. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2389. }
  2390. // ListOperationsResponse: The response message for
  2391. // Operations.ListOperations.
  2392. type ListOperationsResponse struct {
  2393. // NextPageToken: The standard List next-page token.
  2394. NextPageToken string `json:"nextPageToken,omitempty"`
  2395. // Operations: A list of operations that matches the specified filter in
  2396. // the request.
  2397. Operations []*Operation `json:"operations,omitempty"`
  2398. // ServerResponse contains the HTTP response code and headers from the
  2399. // server.
  2400. googleapi.ServerResponse `json:"-"`
  2401. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2402. // unconditionally include in API requests. By default, fields with
  2403. // empty values are omitted from API requests. However, any non-pointer,
  2404. // non-interface field appearing in ForceSendFields will be sent to the
  2405. // server regardless of whether the field is empty or not. This may be
  2406. // used to include empty fields in Patch requests.
  2407. ForceSendFields []string `json:"-"`
  2408. // NullFields is a list of field names (e.g. "NextPageToken") to include
  2409. // in API requests with the JSON null value. By default, fields with
  2410. // empty values are omitted from API requests. However, any field with
  2411. // an empty value appearing in NullFields will be sent to the server as
  2412. // null. It is an error if a field in this list has a non-empty value.
  2413. // This may be used to include null fields in Patch requests.
  2414. NullFields []string `json:"-"`
  2415. }
  2416. func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  2417. type NoMethod ListOperationsResponse
  2418. raw := NoMethod(*s)
  2419. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2420. }
  2421. // Location: A resource that represents Google Cloud Platform location.
  2422. type Location struct {
  2423. // DisplayName: The friendly name for this location, typically a nearby
  2424. // city name.
  2425. // For example, "Tokyo".
  2426. DisplayName string `json:"displayName,omitempty"`
  2427. // Labels: Cross-service attributes for the location. For example
  2428. //
  2429. // {"cloud.googleapis.com/region": "us-east1"}
  2430. Labels map[string]string `json:"labels,omitempty"`
  2431. // LocationId: The canonical id for this location. For example:
  2432. // "us-east1".
  2433. LocationId string `json:"locationId,omitempty"`
  2434. // Metadata: Service-specific metadata. For example the available
  2435. // capacity at the given
  2436. // location.
  2437. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  2438. // Name: Resource name for the location, which may vary between
  2439. // implementations.
  2440. // For example: "projects/example-project/locations/us-east1"
  2441. Name string `json:"name,omitempty"`
  2442. // ServerResponse contains the HTTP response code and headers from the
  2443. // server.
  2444. googleapi.ServerResponse `json:"-"`
  2445. // ForceSendFields is a list of field names (e.g. "DisplayName") to
  2446. // unconditionally include in API requests. By default, fields with
  2447. // empty values are omitted from API requests. However, any non-pointer,
  2448. // non-interface field appearing in ForceSendFields will be sent to the
  2449. // server regardless of whether the field is empty or not. This may be
  2450. // used to include empty fields in Patch requests.
  2451. ForceSendFields []string `json:"-"`
  2452. // NullFields is a list of field names (e.g. "DisplayName") to include
  2453. // in API requests with the JSON null value. By default, fields with
  2454. // empty values are omitted from API requests. However, any field with
  2455. // an empty value appearing in NullFields will be sent to the server as
  2456. // null. It is an error if a field in this list has a non-empty value.
  2457. // This may be used to include null fields in Patch requests.
  2458. NullFields []string `json:"-"`
  2459. }
  2460. func (s *Location) MarshalJSON() ([]byte, error) {
  2461. type NoMethod Location
  2462. raw := NoMethod(*s)
  2463. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2464. }
  2465. // Message: A complete HL7v2 message.
  2466. // See http://www.hl7.org/implement/standards/index.cfm?ref=common for
  2467. // details
  2468. // on the standard.
  2469. type Message struct {
  2470. // CreateTime: The datetime when the message was created. Set by the
  2471. // server.
  2472. CreateTime string `json:"createTime,omitempty"`
  2473. // Data: Raw message bytes.
  2474. Data string `json:"data,omitempty"`
  2475. // Labels: User-supplied key-value pairs used to organize HL7v2
  2476. // stores.
  2477. //
  2478. // Label keys must be between 1 and 63 characters long, have a UTF-8
  2479. // encoding
  2480. // of maximum 128 bytes, and must conform to the
  2481. // following PCRE regular expression:
  2482. // \p{Ll}\p{Lo}{0,62}
  2483. //
  2484. // Label values are optional, must be between 1 and 63 characters long,
  2485. // have
  2486. // a UTF-8 encoding of maximum 128 bytes, and must conform to
  2487. // the
  2488. // following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
  2489. //
  2490. // No more than 64 labels can be associated with a given store.
  2491. Labels map[string]string `json:"labels,omitempty"`
  2492. // MessageType: The message type and trigger event for this message.
  2493. // MSH-9.
  2494. MessageType string `json:"messageType,omitempty"`
  2495. // Name: Resource name of the Message, of the
  2496. // form
  2497. // `projects/{project_id}/datasets/{dataset_id}/hl7V2Stores/{hl7_v2_
  2498. // store_id}/messages/{message_id}`.
  2499. // Assigned by the server.
  2500. Name string `json:"name,omitempty"`
  2501. // ParsedData: The parsed version of the raw message data.
  2502. ParsedData *ParsedData `json:"parsedData,omitempty"`
  2503. // PatientIds: All patient IDs listed in the PID-2, PID-3, and PID-4
  2504. // segments of this
  2505. // message.
  2506. PatientIds []*PatientId `json:"patientIds,omitempty"`
  2507. // SendFacility: The hospital that this message came from. MSH-4.
  2508. SendFacility string `json:"sendFacility,omitempty"`
  2509. // SendTime: The datetime the sending application sent this message.
  2510. // MSH-7.
  2511. SendTime string `json:"sendTime,omitempty"`
  2512. // ServerResponse contains the HTTP response code and headers from the
  2513. // server.
  2514. googleapi.ServerResponse `json:"-"`
  2515. // ForceSendFields is a list of field names (e.g. "CreateTime") to
  2516. // unconditionally include in API requests. By default, fields with
  2517. // empty values are omitted from API requests. However, any non-pointer,
  2518. // non-interface field appearing in ForceSendFields will be sent to the
  2519. // server regardless of whether the field is empty or not. This may be
  2520. // used to include empty fields in Patch requests.
  2521. ForceSendFields []string `json:"-"`
  2522. // NullFields is a list of field names (e.g. "CreateTime") to include in
  2523. // API requests with the JSON null value. By default, fields with empty
  2524. // values are omitted from API requests. However, any field with an
  2525. // empty value appearing in NullFields will be sent to the server as
  2526. // null. It is an error if a field in this list has a non-empty value.
  2527. // This may be used to include null fields in Patch requests.
  2528. NullFields []string `json:"-"`
  2529. }
  2530. func (s *Message) MarshalJSON() ([]byte, error) {
  2531. type NoMethod Message
  2532. raw := NoMethod(*s)
  2533. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2534. }
  2535. // NotificationConfig: Specifies where notifications should be sent upon
  2536. // changes to a data store.
  2537. type NotificationConfig struct {
  2538. // PubsubTopic: The [Cloud
  2539. // Pub/Sub](https://cloud.google.com/pubsub/docs/) topic
  2540. // that
  2541. // notifications of changes are published on. Supplied by the
  2542. // client.
  2543. // PubsubMessage.Data will contain the resource
  2544. // name.
  2545. // PubsubMessage.MessageId is the ID of this message. It is guaranteed
  2546. // to be
  2547. // unique within the topic.
  2548. // PubsubMessage.PublishTime is the time at which the message was
  2549. // published.
  2550. // Notifications are only sent if the topic is
  2551. // non-empty.
  2552. // [Topic
  2553. // names](https://cloud.google.com/pubsub/docs/overview#names) must be
  2554. // scoped
  2555. // to a project. cloud-healthcare@system.gserviceaccount.com must
  2556. // have
  2557. // publisher permissions on the given Cloud Pub/Sub topic. Not having
  2558. // adequate
  2559. // permissions will cause the calls that send notifications to fail.
  2560. PubsubTopic string `json:"pubsubTopic,omitempty"`
  2561. // ForceSendFields is a list of field names (e.g. "PubsubTopic") to
  2562. // unconditionally include in API requests. By default, fields with
  2563. // empty values are omitted from API requests. However, any non-pointer,
  2564. // non-interface field appearing in ForceSendFields will be sent to the
  2565. // server regardless of whether the field is empty or not. This may be
  2566. // used to include empty fields in Patch requests.
  2567. ForceSendFields []string `json:"-"`
  2568. // NullFields is a list of field names (e.g. "PubsubTopic") to include
  2569. // in API requests with the JSON null value. By default, fields with
  2570. // empty values are omitted from API requests. However, any field with
  2571. // an empty value appearing in NullFields will be sent to the server as
  2572. // null. It is an error if a field in this list has a non-empty value.
  2573. // This may be used to include null fields in Patch requests.
  2574. NullFields []string `json:"-"`
  2575. }
  2576. func (s *NotificationConfig) MarshalJSON() ([]byte, error) {
  2577. type NoMethod NotificationConfig
  2578. raw := NoMethod(*s)
  2579. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2580. }
  2581. // Operation: This resource represents a long-running operation that is
  2582. // the result of a
  2583. // network API call.
  2584. type Operation struct {
  2585. // Done: If the value is `false`, it means the operation is still in
  2586. // progress.
  2587. // If `true`, the operation is completed, and either `error` or
  2588. // `response` is
  2589. // available.
  2590. Done bool `json:"done,omitempty"`
  2591. // Error: The error result of the operation in case of failure or
  2592. // cancellation.
  2593. Error *Status `json:"error,omitempty"`
  2594. // Metadata: Service-specific metadata associated with the operation.
  2595. // It typically
  2596. // contains progress information and common metadata such as create
  2597. // time.
  2598. // Some services might not provide such metadata. Any method that
  2599. // returns a
  2600. // long-running operation should document the metadata type, if any.
  2601. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  2602. // Name: The server-assigned name, which is only unique within the same
  2603. // service that
  2604. // originally returns it. If you use the default HTTP mapping,
  2605. // the
  2606. // `name` should have the format of `operations/some/unique/name`.
  2607. Name string `json:"name,omitempty"`
  2608. // Response: The normal response of the operation in case of success.
  2609. // If the original
  2610. // method returns no data on success, such as `Delete`, the response
  2611. // is
  2612. // `google.protobuf.Empty`. If the original method is
  2613. // standard
  2614. // `Get`/`Create`/`Update`, the response should be the resource. For
  2615. // other
  2616. // methods, the response should have the type `XxxResponse`, where
  2617. // `Xxx`
  2618. // is the original method name. For example, if the original method
  2619. // name
  2620. // is `TakeSnapshot()`, the inferred response type
  2621. // is
  2622. // `TakeSnapshotResponse`.
  2623. Response googleapi.RawMessage `json:"response,omitempty"`
  2624. // ServerResponse contains the HTTP response code and headers from the
  2625. // server.
  2626. googleapi.ServerResponse `json:"-"`
  2627. // ForceSendFields is a list of field names (e.g. "Done") to
  2628. // unconditionally include in API requests. By default, fields with
  2629. // empty values are omitted from API requests. However, any non-pointer,
  2630. // non-interface field appearing in ForceSendFields will be sent to the
  2631. // server regardless of whether the field is empty or not. This may be
  2632. // used to include empty fields in Patch requests.
  2633. ForceSendFields []string `json:"-"`
  2634. // NullFields is a list of field names (e.g. "Done") to include in API
  2635. // requests with the JSON null value. By default, fields with empty
  2636. // values are omitted from API requests. However, any field with an
  2637. // empty value appearing in NullFields will be sent to the server as
  2638. // null. It is an error if a field in this list has a non-empty value.
  2639. // This may be used to include null fields in Patch requests.
  2640. NullFields []string `json:"-"`
  2641. }
  2642. func (s *Operation) MarshalJSON() ([]byte, error) {
  2643. type NoMethod Operation
  2644. raw := NoMethod(*s)
  2645. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2646. }
  2647. // OperationMetadata: OperationMetadata provides information about the
  2648. // operation execution.
  2649. // Returned in the long-running operation's metadata field.
  2650. type OperationMetadata struct {
  2651. // ApiMethodName: The name of the API method that initiated the
  2652. // operation.
  2653. ApiMethodName string `json:"apiMethodName,omitempty"`
  2654. Counter *ProgressCounter `json:"counter,omitempty"`
  2655. // CreateTime: The time at which the operation was created by the API.
  2656. CreateTime string `json:"createTime,omitempty"`
  2657. // EndTime: The time at which execution was completed.
  2658. EndTime string `json:"endTime,omitempty"`
  2659. // ForceSendFields is a list of field names (e.g. "ApiMethodName") to
  2660. // unconditionally include in API requests. By default, fields with
  2661. // empty values are omitted from API requests. However, any non-pointer,
  2662. // non-interface field appearing in ForceSendFields will be sent to the
  2663. // server regardless of whether the field is empty or not. This may be
  2664. // used to include empty fields in Patch requests.
  2665. ForceSendFields []string `json:"-"`
  2666. // NullFields is a list of field names (e.g. "ApiMethodName") to include
  2667. // in API requests with the JSON null value. By default, fields with
  2668. // empty values are omitted from API requests. However, any field with
  2669. // an empty value appearing in NullFields will be sent to the server as
  2670. // null. It is an error if a field in this list has a non-empty value.
  2671. // This may be used to include null fields in Patch requests.
  2672. NullFields []string `json:"-"`
  2673. }
  2674. func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  2675. type NoMethod OperationMetadata
  2676. raw := NoMethod(*s)
  2677. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2678. }
  2679. // ParsedData: The content of a HL7v2 message in a structured format.
  2680. type ParsedData struct {
  2681. Segments []*Segment `json:"segments,omitempty"`
  2682. // ForceSendFields is a list of field names (e.g. "Segments") to
  2683. // unconditionally include in API requests. By default, fields with
  2684. // empty values are omitted from API requests. However, any non-pointer,
  2685. // non-interface field appearing in ForceSendFields will be sent to the
  2686. // server regardless of whether the field is empty or not. This may be
  2687. // used to include empty fields in Patch requests.
  2688. ForceSendFields []string `json:"-"`
  2689. // NullFields is a list of field names (e.g. "Segments") to include in
  2690. // API requests with the JSON null value. By default, fields with empty
  2691. // values are omitted from API requests. However, any field with an
  2692. // empty value appearing in NullFields will be sent to the server as
  2693. // null. It is an error if a field in this list has a non-empty value.
  2694. // This may be used to include null fields in Patch requests.
  2695. NullFields []string `json:"-"`
  2696. }
  2697. func (s *ParsedData) MarshalJSON() ([]byte, error) {
  2698. type NoMethod ParsedData
  2699. raw := NoMethod(*s)
  2700. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2701. }
  2702. // ParserConfig: The configuration for the parser. It determines how the
  2703. // server parses the
  2704. // messages.
  2705. type ParserConfig struct {
  2706. // AllowNullHeader: Determines whether messages with no header are
  2707. // allowed.
  2708. AllowNullHeader bool `json:"allowNullHeader,omitempty"`
  2709. // SegmentTerminator: Byte(s) to be used as the segment terminator. If
  2710. // this is unset, '\r' will
  2711. // be used as segment terminator.
  2712. SegmentTerminator string `json:"segmentTerminator,omitempty"`
  2713. // ForceSendFields is a list of field names (e.g. "AllowNullHeader") to
  2714. // unconditionally include in API requests. By default, fields with
  2715. // empty values are omitted from API requests. However, any non-pointer,
  2716. // non-interface field appearing in ForceSendFields will be sent to the
  2717. // server regardless of whether the field is empty or not. This may be
  2718. // used to include empty fields in Patch requests.
  2719. ForceSendFields []string `json:"-"`
  2720. // NullFields is a list of field names (e.g. "AllowNullHeader") to
  2721. // include in API requests with the JSON null value. By default, fields
  2722. // with empty values are omitted from API requests. However, any field
  2723. // with an empty value appearing in NullFields will be sent to the
  2724. // server as null. It is an error if a field in this list has a
  2725. // non-empty value. This may be used to include null fields in Patch
  2726. // requests.
  2727. NullFields []string `json:"-"`
  2728. }
  2729. func (s *ParserConfig) MarshalJSON() ([]byte, error) {
  2730. type NoMethod ParserConfig
  2731. raw := NoMethod(*s)
  2732. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2733. }
  2734. // PatientId: A patient identifier and associated type.
  2735. type PatientId struct {
  2736. // Type: ID type, e.g. MRN or NHS.
  2737. Type string `json:"type,omitempty"`
  2738. // Value: The patient's unique identifier.
  2739. Value string `json:"value,omitempty"`
  2740. // ForceSendFields is a list of field names (e.g. "Type") to
  2741. // unconditionally include in API requests. By default, fields with
  2742. // empty values are omitted from API requests. However, any non-pointer,
  2743. // non-interface field appearing in ForceSendFields will be sent to the
  2744. // server regardless of whether the field is empty or not. This may be
  2745. // used to include empty fields in Patch requests.
  2746. ForceSendFields []string `json:"-"`
  2747. // NullFields is a list of field names (e.g. "Type") to include in API
  2748. // requests with the JSON null value. By default, fields with empty
  2749. // values are omitted from API requests. However, any field with an
  2750. // empty value appearing in NullFields will be sent to the server as
  2751. // null. It is an error if a field in this list has a non-empty value.
  2752. // This may be used to include null fields in Patch requests.
  2753. NullFields []string `json:"-"`
  2754. }
  2755. func (s *PatientId) MarshalJSON() ([]byte, error) {
  2756. type NoMethod PatientId
  2757. raw := NoMethod(*s)
  2758. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2759. }
  2760. // Policy: Defines an Identity and Access Management (IAM) policy. It is
  2761. // used to
  2762. // specify access control policies for Cloud Platform resources.
  2763. //
  2764. //
  2765. // A `Policy` consists of a list of `bindings`. A `binding` binds a list
  2766. // of
  2767. // `members` to a `role`, where the members can be user accounts, Google
  2768. // groups,
  2769. // Google domains, and service accounts. A `role` is a named list of
  2770. // permissions
  2771. // defined by IAM.
  2772. //
  2773. // **JSON Example**
  2774. //
  2775. // {
  2776. // "bindings": [
  2777. // {
  2778. // "role": "roles/owner",
  2779. // "members": [
  2780. // "user:mike@example.com",
  2781. // "group:admins@example.com",
  2782. // "domain:google.com",
  2783. //
  2784. // "serviceAccount:my-other-app@appspot.gserviceaccount.com"
  2785. // ]
  2786. // },
  2787. // {
  2788. // "role": "roles/viewer",
  2789. // "members": ["user:sean@example.com"]
  2790. // }
  2791. // ]
  2792. // }
  2793. //
  2794. // **YAML Example**
  2795. //
  2796. // bindings:
  2797. // - members:
  2798. // - user:mike@example.com
  2799. // - group:admins@example.com
  2800. // - domain:google.com
  2801. // - serviceAccount:my-other-app@appspot.gserviceaccount.com
  2802. // role: roles/owner
  2803. // - members:
  2804. // - user:sean@example.com
  2805. // role: roles/viewer
  2806. //
  2807. //
  2808. // For a description of IAM and its features, see the
  2809. // [IAM developer's guide](https://cloud.google.com/iam/docs).
  2810. type Policy struct {
  2811. // AuditConfigs: Specifies cloud audit logging configuration for this
  2812. // policy.
  2813. AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
  2814. // Bindings: Associates a list of `members` to a `role`.
  2815. // `bindings` with no members will result in an error.
  2816. Bindings []*Binding `json:"bindings,omitempty"`
  2817. // Etag: `etag` is used for optimistic concurrency control as a way to
  2818. // help
  2819. // prevent simultaneous updates of a policy from overwriting each
  2820. // other.
  2821. // It is strongly suggested that systems make use of the `etag` in
  2822. // the
  2823. // read-modify-write cycle to perform policy updates in order to avoid
  2824. // race
  2825. // conditions: An `etag` is returned in the response to `getIamPolicy`,
  2826. // and
  2827. // systems are expected to put that etag in the request to
  2828. // `setIamPolicy` to
  2829. // ensure that their change will be applied to the same version of the
  2830. // policy.
  2831. //
  2832. // If no `etag` is provided in the call to `setIamPolicy`, then the
  2833. // existing
  2834. // policy is overwritten blindly.
  2835. Etag string `json:"etag,omitempty"`
  2836. // Version: Deprecated.
  2837. Version int64 `json:"version,omitempty"`
  2838. // ServerResponse contains the HTTP response code and headers from the
  2839. // server.
  2840. googleapi.ServerResponse `json:"-"`
  2841. // ForceSendFields is a list of field names (e.g. "AuditConfigs") to
  2842. // unconditionally include in API requests. By default, fields with
  2843. // empty values are omitted from API requests. However, any non-pointer,
  2844. // non-interface field appearing in ForceSendFields will be sent to the
  2845. // server regardless of whether the field is empty or not. This may be
  2846. // used to include empty fields in Patch requests.
  2847. ForceSendFields []string `json:"-"`
  2848. // NullFields is a list of field names (e.g. "AuditConfigs") to include
  2849. // in API requests with the JSON null value. By default, fields with
  2850. // empty values are omitted from API requests. However, any field with
  2851. // an empty value appearing in NullFields will be sent to the server as
  2852. // null. It is an error if a field in this list has a non-empty value.
  2853. // This may be used to include null fields in Patch requests.
  2854. NullFields []string `json:"-"`
  2855. }
  2856. func (s *Policy) MarshalJSON() ([]byte, error) {
  2857. type NoMethod Policy
  2858. raw := NoMethod(*s)
  2859. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2860. }
  2861. // ProgressCounter: ProgressCounter provides counters to describe an
  2862. // operation's progress.
  2863. type ProgressCounter struct {
  2864. // Failure: The number of units that failed in the operation.
  2865. Failure int64 `json:"failure,omitempty,string"`
  2866. // Pending: The number of units that are pending in the operation.
  2867. Pending int64 `json:"pending,omitempty,string"`
  2868. // Success: The number of units that succeeded in the operation.
  2869. Success int64 `json:"success,omitempty,string"`
  2870. // ForceSendFields is a list of field names (e.g. "Failure") to
  2871. // unconditionally include in API requests. By default, fields with
  2872. // empty values are omitted from API requests. However, any non-pointer,
  2873. // non-interface field appearing in ForceSendFields will be sent to the
  2874. // server regardless of whether the field is empty or not. This may be
  2875. // used to include empty fields in Patch requests.
  2876. ForceSendFields []string `json:"-"`
  2877. // NullFields is a list of field names (e.g. "Failure") to include in
  2878. // API requests with the JSON null value. By default, fields with empty
  2879. // values are omitted from API requests. However, any field with an
  2880. // empty value appearing in NullFields will be sent to the server as
  2881. // null. It is an error if a field in this list has a non-empty value.
  2882. // This may be used to include null fields in Patch requests.
  2883. NullFields []string `json:"-"`
  2884. }
  2885. func (s *ProgressCounter) MarshalJSON() ([]byte, error) {
  2886. type NoMethod ProgressCounter
  2887. raw := NoMethod(*s)
  2888. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2889. }
  2890. // ResourceAnnotation: Resource level annotation.
  2891. type ResourceAnnotation struct {
  2892. Label string `json:"label,omitempty"`
  2893. // ForceSendFields is a list of field names (e.g. "Label") to
  2894. // unconditionally include in API requests. By default, fields with
  2895. // empty values are omitted from API requests. However, any non-pointer,
  2896. // non-interface field appearing in ForceSendFields will be sent to the
  2897. // server regardless of whether the field is empty or not. This may be
  2898. // used to include empty fields in Patch requests.
  2899. ForceSendFields []string `json:"-"`
  2900. // NullFields is a list of field names (e.g. "Label") to include in API
  2901. // requests with the JSON null value. By default, fields with empty
  2902. // values are omitted from API requests. However, any field with an
  2903. // empty value appearing in NullFields will be sent to the server as
  2904. // null. It is an error if a field in this list has a non-empty value.
  2905. // This may be used to include null fields in Patch requests.
  2906. NullFields []string `json:"-"`
  2907. }
  2908. func (s *ResourceAnnotation) MarshalJSON() ([]byte, error) {
  2909. type NoMethod ResourceAnnotation
  2910. raw := NoMethod(*s)
  2911. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2912. }
  2913. // SchemaConfig: Configuration for the FHIR BigQuery schema. Determines
  2914. // how the server
  2915. // generates the schema.
  2916. type SchemaConfig struct {
  2917. // RecursiveStructureDepth: The depth for all recursive structures in
  2918. // the output analytics
  2919. // schema. For example, `concept` in the CodeSystem resource is a
  2920. // recursive
  2921. // structure; when the depth is 2, the CodeSystem table will have a
  2922. // column
  2923. // called `concept.concept` but not `concept.concept.concept`. If
  2924. // not
  2925. // specified or set to 0, the server will use the default value 2.
  2926. RecursiveStructureDepth int64 `json:"recursiveStructureDepth,omitempty,string"`
  2927. // SchemaType: Specifies the output schema type. If unspecified, the
  2928. // default is
  2929. // `LOSSLESS`.
  2930. //
  2931. // Possible values:
  2932. // "SCHEMA_TYPE_UNSPECIFIED" - No schema type specified. Same as
  2933. // `LOSSLESS`.
  2934. // "LOSSLESS" - A data-driven schema generated from the fields present
  2935. // in the FHIR data
  2936. // being exported, with no additional simplification.
  2937. // "ANALYTICS" - Analytics schema defined by the FHIR community.
  2938. // See https://github.com/FHIR/sql-on-fhir/blob/master/sql-on-fhir.md.
  2939. SchemaType string `json:"schemaType,omitempty"`
  2940. // ForceSendFields is a list of field names (e.g.
  2941. // "RecursiveStructureDepth") to unconditionally include in API
  2942. // requests. By default, fields with empty values are omitted from API
  2943. // requests. However, any non-pointer, non-interface field appearing in
  2944. // ForceSendFields will be sent to the server regardless of whether the
  2945. // field is empty or not. This may be used to include empty fields in
  2946. // Patch requests.
  2947. ForceSendFields []string `json:"-"`
  2948. // NullFields is a list of field names (e.g. "RecursiveStructureDepth")
  2949. // to include in API requests with the JSON null value. By default,
  2950. // fields with empty values are omitted from API requests. However, any
  2951. // field with an empty value appearing in NullFields will be sent to the
  2952. // server as null. It is an error if a field in this list has a
  2953. // non-empty value. This may be used to include null fields in Patch
  2954. // requests.
  2955. NullFields []string `json:"-"`
  2956. }
  2957. func (s *SchemaConfig) MarshalJSON() ([]byte, error) {
  2958. type NoMethod SchemaConfig
  2959. raw := NoMethod(*s)
  2960. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2961. }
  2962. // SearchResourcesRequest: Request to search the resources in the
  2963. // specified FHIR store.
  2964. type SearchResourcesRequest struct {
  2965. // ResourceType: The type of the resource to search.
  2966. ResourceType string `json:"resourceType,omitempty"`
  2967. // ForceSendFields is a list of field names (e.g. "ResourceType") to
  2968. // unconditionally include in API requests. By default, fields with
  2969. // empty values are omitted from API requests. However, any non-pointer,
  2970. // non-interface field appearing in ForceSendFields will be sent to the
  2971. // server regardless of whether the field is empty or not. This may be
  2972. // used to include empty fields in Patch requests.
  2973. ForceSendFields []string `json:"-"`
  2974. // NullFields is a list of field names (e.g. "ResourceType") to include
  2975. // in API requests with the JSON null value. By default, fields with
  2976. // empty values are omitted from API requests. However, any field with
  2977. // an empty value appearing in NullFields will be sent to the server as
  2978. // null. It is an error if a field in this list has a non-empty value.
  2979. // This may be used to include null fields in Patch requests.
  2980. NullFields []string `json:"-"`
  2981. }
  2982. func (s *SearchResourcesRequest) MarshalJSON() ([]byte, error) {
  2983. type NoMethod SearchResourcesRequest
  2984. raw := NoMethod(*s)
  2985. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2986. }
  2987. // Segment: A segment in a structured format.
  2988. type Segment struct {
  2989. // Fields: A mapping from the positional location to the value.
  2990. // The key string uses zero-based indexes separated by dots to
  2991. // identify
  2992. // Fields, components and sub-components. A bracket notation is also
  2993. // used to
  2994. // identify different instances of a repeated field.
  2995. // Regex for key: (\d+)(\[\d+\])?(.\d+)?(.\d+)?
  2996. //
  2997. // Examples of (key, value) pairs:
  2998. // - (0.1, "foo"): Component 1 of Field 0 has the value "foo".
  2999. // - (1.1.2, "bar"): Sub-component 2 of Component 1 of field 1 has the
  3000. // value
  3001. // "bar".
  3002. // - (1[2].1, "baz"): Component 1 of Instance 2 of Field 1, which is
  3003. // repeated,
  3004. // has the value "baz".
  3005. Fields map[string]string `json:"fields,omitempty"`
  3006. // SegmentId: A string that indicates the type of segment, e.g., EVN,
  3007. // PID.
  3008. SegmentId string `json:"segmentId,omitempty"`
  3009. // SetId: Set ID for segments that can be in a set. This can be empty if
  3010. // it is
  3011. // missing or it is not applicable.
  3012. SetId string `json:"setId,omitempty"`
  3013. // ForceSendFields is a list of field names (e.g. "Fields") to
  3014. // unconditionally include in API requests. By default, fields with
  3015. // empty values are omitted from API requests. However, any non-pointer,
  3016. // non-interface field appearing in ForceSendFields will be sent to the
  3017. // server regardless of whether the field is empty or not. This may be
  3018. // used to include empty fields in Patch requests.
  3019. ForceSendFields []string `json:"-"`
  3020. // NullFields is a list of field names (e.g. "Fields") to include in API
  3021. // requests with the JSON null value. By default, fields with empty
  3022. // values are omitted from API requests. However, any field with an
  3023. // empty value appearing in NullFields will be sent to the server as
  3024. // null. It is an error if a field in this list has a non-empty value.
  3025. // This may be used to include null fields in Patch requests.
  3026. NullFields []string `json:"-"`
  3027. }
  3028. func (s *Segment) MarshalJSON() ([]byte, error) {
  3029. type NoMethod Segment
  3030. raw := NoMethod(*s)
  3031. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3032. }
  3033. // SensitiveTextAnnotation: A TextAnnotation specifies a text range that
  3034. // includes sensitive information.
  3035. type SensitiveTextAnnotation struct {
  3036. // Details: Maps from a resource slice (e.g. FHIR resource field path)
  3037. // to a set of
  3038. // sensitive text findings. For example,
  3039. // Appointment.Narrative text1 --> {findings_1, findings_2, findings_3}
  3040. Details map[string]Detail `json:"details,omitempty"`
  3041. // ForceSendFields is a list of field names (e.g. "Details") to
  3042. // unconditionally include in API requests. By default, fields with
  3043. // empty values are omitted from API requests. However, any non-pointer,
  3044. // non-interface field appearing in ForceSendFields will be sent to the
  3045. // server regardless of whether the field is empty or not. This may be
  3046. // used to include empty fields in Patch requests.
  3047. ForceSendFields []string `json:"-"`
  3048. // NullFields is a list of field names (e.g. "Details") to include in
  3049. // API requests with the JSON null value. By default, fields with empty
  3050. // values are omitted from API requests. However, any field with an
  3051. // empty value appearing in NullFields will be sent to the server as
  3052. // null. It is an error if a field in this list has a non-empty value.
  3053. // This may be used to include null fields in Patch requests.
  3054. NullFields []string `json:"-"`
  3055. }
  3056. func (s *SensitiveTextAnnotation) MarshalJSON() ([]byte, error) {
  3057. type NoMethod SensitiveTextAnnotation
  3058. raw := NoMethod(*s)
  3059. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3060. }
  3061. // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
  3062. type SetIamPolicyRequest struct {
  3063. // Policy: REQUIRED: The complete policy to be applied to the
  3064. // `resource`. The size of
  3065. // the policy is limited to a few 10s of KB. An empty policy is a
  3066. // valid policy but certain Cloud Platform services (such as
  3067. // Projects)
  3068. // might reject them.
  3069. Policy *Policy `json:"policy,omitempty"`
  3070. // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the
  3071. // policy to modify. Only
  3072. // the fields in the mask will be modified. If no mask is provided,
  3073. // the
  3074. // following default mask is used:
  3075. // paths: "bindings, etag"
  3076. // This field is only used by Cloud IAM.
  3077. UpdateMask string `json:"updateMask,omitempty"`
  3078. // ForceSendFields is a list of field names (e.g. "Policy") to
  3079. // unconditionally include in API requests. By default, fields with
  3080. // empty values are omitted from API requests. However, any non-pointer,
  3081. // non-interface field appearing in ForceSendFields will be sent to the
  3082. // server regardless of whether the field is empty or not. This may be
  3083. // used to include empty fields in Patch requests.
  3084. ForceSendFields []string `json:"-"`
  3085. // NullFields is a list of field names (e.g. "Policy") to include in API
  3086. // requests with the JSON null value. By default, fields with empty
  3087. // values are omitted from API requests. However, any field with an
  3088. // empty value appearing in NullFields will be sent to the server as
  3089. // null. It is an error if a field in this list has a non-empty value.
  3090. // This may be used to include null fields in Patch requests.
  3091. NullFields []string `json:"-"`
  3092. }
  3093. func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  3094. type NoMethod SetIamPolicyRequest
  3095. raw := NoMethod(*s)
  3096. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3097. }
  3098. // Status: The `Status` type defines a logical error model that is
  3099. // suitable for
  3100. // different programming environments, including REST APIs and RPC APIs.
  3101. // It is
  3102. // used by [gRPC](https://github.com/grpc). The error model is designed
  3103. // to be:
  3104. //
  3105. // - Simple to use and understand for most users
  3106. // - Flexible enough to meet unexpected needs
  3107. //
  3108. // # Overview
  3109. //
  3110. // The `Status` message contains three pieces of data: error code,
  3111. // error
  3112. // message, and error details. The error code should be an enum value
  3113. // of
  3114. // google.rpc.Code, but it may accept additional error codes if needed.
  3115. // The
  3116. // error message should be a developer-facing English message that
  3117. // helps
  3118. // developers *understand* and *resolve* the error. If a localized
  3119. // user-facing
  3120. // error message is needed, put the localized message in the error
  3121. // details or
  3122. // localize it in the client. The optional error details may contain
  3123. // arbitrary
  3124. // information about the error. There is a predefined set of error
  3125. // detail types
  3126. // in the package `google.rpc` that can be used for common error
  3127. // conditions.
  3128. //
  3129. // # Language mapping
  3130. //
  3131. // The `Status` message is the logical representation of the error
  3132. // model, but it
  3133. // is not necessarily the actual wire format. When the `Status` message
  3134. // is
  3135. // exposed in different client libraries and different wire protocols,
  3136. // it can be
  3137. // mapped differently. For example, it will likely be mapped to some
  3138. // exceptions
  3139. // in Java, but more likely mapped to some error codes in C.
  3140. //
  3141. // # Other uses
  3142. //
  3143. // The error model and the `Status` message can be used in a variety
  3144. // of
  3145. // environments, either with or without APIs, to provide a
  3146. // consistent developer experience across different
  3147. // environments.
  3148. //
  3149. // Example uses of this error model include:
  3150. //
  3151. // - Partial errors. If a service needs to return partial errors to the
  3152. // client,
  3153. // it may embed the `Status` in the normal response to indicate the
  3154. // partial
  3155. // errors.
  3156. //
  3157. // - Workflow errors. A typical workflow has multiple steps. Each step
  3158. // may
  3159. // have a `Status` message for error reporting.
  3160. //
  3161. // - Batch operations. If a client uses batch request and batch
  3162. // response, the
  3163. // `Status` message should be used directly inside batch response,
  3164. // one for
  3165. // each error sub-response.
  3166. //
  3167. // - Asynchronous operations. If an API call embeds asynchronous
  3168. // operation
  3169. // results in its response, the status of those operations should
  3170. // be
  3171. // represented directly using the `Status` message.
  3172. //
  3173. // - Logging. If some API errors are stored in logs, the message
  3174. // `Status` could
  3175. // be used directly after any stripping needed for security/privacy
  3176. // reasons.
  3177. type Status struct {
  3178. // Code: The status code, which should be an enum value of
  3179. // google.rpc.Code.
  3180. Code int64 `json:"code,omitempty"`
  3181. // Details: A list of messages that carry the error details. There is a
  3182. // common set of
  3183. // message types for APIs to use.
  3184. Details []googleapi.RawMessage `json:"details,omitempty"`
  3185. // Message: A developer-facing error message, which should be in
  3186. // English. Any
  3187. // user-facing error message should be localized and sent in
  3188. // the
  3189. // google.rpc.Status.details field, or localized by the client.
  3190. Message string `json:"message,omitempty"`
  3191. // ForceSendFields is a list of field names (e.g. "Code") to
  3192. // unconditionally include in API requests. By default, fields with
  3193. // empty values are omitted from API requests. However, any non-pointer,
  3194. // non-interface field appearing in ForceSendFields will be sent to the
  3195. // server regardless of whether the field is empty or not. This may be
  3196. // used to include empty fields in Patch requests.
  3197. ForceSendFields []string `json:"-"`
  3198. // NullFields is a list of field names (e.g. "Code") to include in API
  3199. // requests with the JSON null value. By default, fields with empty
  3200. // values are omitted from API requests. However, any field with an
  3201. // empty value appearing in NullFields will be sent to the server as
  3202. // null. It is an error if a field in this list has a non-empty value.
  3203. // This may be used to include null fields in Patch requests.
  3204. NullFields []string `json:"-"`
  3205. }
  3206. func (s *Status) MarshalJSON() ([]byte, error) {
  3207. type NoMethod Status
  3208. raw := NoMethod(*s)
  3209. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3210. }
  3211. // TagFilterList: List of tags to be filtered.
  3212. type TagFilterList struct {
  3213. // Tags: Tags to be filtered. Tags must be DICOM Data Elements, File
  3214. // Meta
  3215. // Elements, or Directory Structuring Elements, as defined
  3216. // at:
  3217. // http://dicom.nema.org/medical/dicom/current/output/html/part06.htm
  3218. // l#table_6-1,.
  3219. // They may be provided by "Keyword" or "Tag". For example
  3220. // "PatientID",
  3221. // "0010,0010".
  3222. Tags []string `json:"tags,omitempty"`
  3223. // ForceSendFields is a list of field names (e.g. "Tags") to
  3224. // unconditionally include in API requests. By default, fields with
  3225. // empty values are omitted from API requests. However, any non-pointer,
  3226. // non-interface field appearing in ForceSendFields will be sent to the
  3227. // server regardless of whether the field is empty or not. This may be
  3228. // used to include empty fields in Patch requests.
  3229. ForceSendFields []string `json:"-"`
  3230. // NullFields is a list of field names (e.g. "Tags") to include in API
  3231. // requests with the JSON null value. By default, fields with empty
  3232. // values are omitted from API requests. However, any field with an
  3233. // empty value appearing in NullFields will be sent to the server as
  3234. // null. It is an error if a field in this list has a non-empty value.
  3235. // This may be used to include null fields in Patch requests.
  3236. NullFields []string `json:"-"`
  3237. }
  3238. func (s *TagFilterList) MarshalJSON() ([]byte, error) {
  3239. type NoMethod TagFilterList
  3240. raw := NoMethod(*s)
  3241. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3242. }
  3243. // TestIamPermissionsRequest: Request message for `TestIamPermissions`
  3244. // method.
  3245. type TestIamPermissionsRequest struct {
  3246. // Permissions: The set of permissions to check for the `resource`.
  3247. // Permissions with
  3248. // wildcards (such as '*' or 'storage.*') are not allowed. For
  3249. // more
  3250. // information see
  3251. // [IAM
  3252. // Overview](https://cloud.google.com/iam/docs/overview#permissions).
  3253. Permissions []string `json:"permissions,omitempty"`
  3254. // ForceSendFields is a list of field names (e.g. "Permissions") to
  3255. // unconditionally include in API requests. By default, fields with
  3256. // empty values are omitted from API requests. However, any non-pointer,
  3257. // non-interface field appearing in ForceSendFields will be sent to the
  3258. // server regardless of whether the field is empty or not. This may be
  3259. // used to include empty fields in Patch requests.
  3260. ForceSendFields []string `json:"-"`
  3261. // NullFields is a list of field names (e.g. "Permissions") to include
  3262. // in API requests with the JSON null value. By default, fields with
  3263. // empty values are omitted from API requests. However, any field with
  3264. // an empty value appearing in NullFields will be sent to the server as
  3265. // null. It is an error if a field in this list has a non-empty value.
  3266. // This may be used to include null fields in Patch requests.
  3267. NullFields []string `json:"-"`
  3268. }
  3269. func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  3270. type NoMethod TestIamPermissionsRequest
  3271. raw := NoMethod(*s)
  3272. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3273. }
  3274. // TestIamPermissionsResponse: Response message for `TestIamPermissions`
  3275. // method.
  3276. type TestIamPermissionsResponse struct {
  3277. // Permissions: A subset of `TestPermissionsRequest.permissions` that
  3278. // the caller is
  3279. // allowed.
  3280. Permissions []string `json:"permissions,omitempty"`
  3281. // ServerResponse contains the HTTP response code and headers from the
  3282. // server.
  3283. googleapi.ServerResponse `json:"-"`
  3284. // ForceSendFields is a list of field names (e.g. "Permissions") to
  3285. // unconditionally include in API requests. By default, fields with
  3286. // empty values are omitted from API requests. However, any non-pointer,
  3287. // non-interface field appearing in ForceSendFields will be sent to the
  3288. // server regardless of whether the field is empty or not. This may be
  3289. // used to include empty fields in Patch requests.
  3290. ForceSendFields []string `json:"-"`
  3291. // NullFields is a list of field names (e.g. "Permissions") to include
  3292. // in API requests with the JSON null value. By default, fields with
  3293. // empty values are omitted from API requests. However, any field with
  3294. // an empty value appearing in NullFields will be sent to the server as
  3295. // null. It is an error if a field in this list has a non-empty value.
  3296. // This may be used to include null fields in Patch requests.
  3297. NullFields []string `json:"-"`
  3298. }
  3299. func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  3300. type NoMethod TestIamPermissionsResponse
  3301. raw := NoMethod(*s)
  3302. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3303. }
  3304. // Vertex: A 2D coordinate in an image. The origin is the top-left.
  3305. type Vertex struct {
  3306. // X: X coordinate.
  3307. X float64 `json:"x,omitempty"`
  3308. // Y: Y coordinate.
  3309. Y float64 `json:"y,omitempty"`
  3310. // ForceSendFields is a list of field names (e.g. "X") to
  3311. // unconditionally include in API requests. By default, fields with
  3312. // empty values are omitted from API requests. However, any non-pointer,
  3313. // non-interface field appearing in ForceSendFields will be sent to the
  3314. // server regardless of whether the field is empty or not. This may be
  3315. // used to include empty fields in Patch requests.
  3316. ForceSendFields []string `json:"-"`
  3317. // NullFields is a list of field names (e.g. "X") to include in API
  3318. // requests with the JSON null value. By default, fields with empty
  3319. // values are omitted from API requests. However, any field with an
  3320. // empty value appearing in NullFields will be sent to the server as
  3321. // null. It is an error if a field in this list has a non-empty value.
  3322. // This may be used to include null fields in Patch requests.
  3323. NullFields []string `json:"-"`
  3324. }
  3325. func (s *Vertex) MarshalJSON() ([]byte, error) {
  3326. type NoMethod Vertex
  3327. raw := NoMethod(*s)
  3328. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3329. }
  3330. func (s *Vertex) UnmarshalJSON(data []byte) error {
  3331. type NoMethod Vertex
  3332. var s1 struct {
  3333. X gensupport.JSONFloat64 `json:"x"`
  3334. Y gensupport.JSONFloat64 `json:"y"`
  3335. *NoMethod
  3336. }
  3337. s1.NoMethod = (*NoMethod)(s)
  3338. if err := json.Unmarshal(data, &s1); err != nil {
  3339. return err
  3340. }
  3341. s.X = float64(s1.X)
  3342. s.Y = float64(s1.Y)
  3343. return nil
  3344. }
  3345. // method id "healthcare.projects.locations.get":
  3346. type ProjectsLocationsGetCall struct {
  3347. s *Service
  3348. name string
  3349. urlParams_ gensupport.URLParams
  3350. ifNoneMatch_ string
  3351. ctx_ context.Context
  3352. header_ http.Header
  3353. }
  3354. // Get: Gets information about a location.
  3355. func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  3356. c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3357. c.name = name
  3358. return c
  3359. }
  3360. // Fields allows partial responses to be retrieved. See
  3361. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3362. // for more information.
  3363. func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  3364. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3365. return c
  3366. }
  3367. // IfNoneMatch sets the optional parameter which makes the operation
  3368. // fail if the object's ETag matches the given value. This is useful for
  3369. // getting updates only after the object has changed since the last
  3370. // request. Use googleapi.IsNotModified to check whether the response
  3371. // error from Do is the result of In-None-Match.
  3372. func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  3373. c.ifNoneMatch_ = entityTag
  3374. return c
  3375. }
  3376. // Context sets the context to be used in this call's Do method. Any
  3377. // pending HTTP request will be aborted if the provided context is
  3378. // canceled.
  3379. func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  3380. c.ctx_ = ctx
  3381. return c
  3382. }
  3383. // Header returns an http.Header that can be modified by the caller to
  3384. // add HTTP headers to the request.
  3385. func (c *ProjectsLocationsGetCall) Header() http.Header {
  3386. if c.header_ == nil {
  3387. c.header_ = make(http.Header)
  3388. }
  3389. return c.header_
  3390. }
  3391. func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  3392. reqHeaders := make(http.Header)
  3393. for k, v := range c.header_ {
  3394. reqHeaders[k] = v
  3395. }
  3396. reqHeaders.Set("User-Agent", c.s.userAgent())
  3397. if c.ifNoneMatch_ != "" {
  3398. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3399. }
  3400. var body io.Reader = nil
  3401. c.urlParams_.Set("alt", alt)
  3402. c.urlParams_.Set("prettyPrint", "false")
  3403. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  3404. urls += "?" + c.urlParams_.Encode()
  3405. req, err := http.NewRequest("GET", urls, body)
  3406. if err != nil {
  3407. return nil, err
  3408. }
  3409. req.Header = reqHeaders
  3410. googleapi.Expand(req.URL, map[string]string{
  3411. "name": c.name,
  3412. })
  3413. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3414. }
  3415. // Do executes the "healthcare.projects.locations.get" call.
  3416. // Exactly one of *Location or error will be non-nil. Any non-2xx status
  3417. // code is an error. Response headers are in either
  3418. // *Location.ServerResponse.Header or (if a response was returned at
  3419. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3420. // to check whether the returned error was because
  3421. // http.StatusNotModified was returned.
  3422. func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  3423. gensupport.SetOptions(c.urlParams_, opts...)
  3424. res, err := c.doRequest("json")
  3425. if res != nil && res.StatusCode == http.StatusNotModified {
  3426. if res.Body != nil {
  3427. res.Body.Close()
  3428. }
  3429. return nil, &googleapi.Error{
  3430. Code: res.StatusCode,
  3431. Header: res.Header,
  3432. }
  3433. }
  3434. if err != nil {
  3435. return nil, err
  3436. }
  3437. defer googleapi.CloseBody(res)
  3438. if err := googleapi.CheckResponse(res); err != nil {
  3439. return nil, err
  3440. }
  3441. ret := &Location{
  3442. ServerResponse: googleapi.ServerResponse{
  3443. Header: res.Header,
  3444. HTTPStatusCode: res.StatusCode,
  3445. },
  3446. }
  3447. target := &ret
  3448. if err := gensupport.DecodeResponse(target, res); err != nil {
  3449. return nil, err
  3450. }
  3451. return ret, nil
  3452. // {
  3453. // "description": "Gets information about a location.",
  3454. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}",
  3455. // "httpMethod": "GET",
  3456. // "id": "healthcare.projects.locations.get",
  3457. // "parameterOrder": [
  3458. // "name"
  3459. // ],
  3460. // "parameters": {
  3461. // "name": {
  3462. // "description": "Resource name for the location.",
  3463. // "location": "path",
  3464. // "pattern": "^projects/[^/]+/locations/[^/]+$",
  3465. // "required": true,
  3466. // "type": "string"
  3467. // }
  3468. // },
  3469. // "path": "v1alpha2/{+name}",
  3470. // "response": {
  3471. // "$ref": "Location"
  3472. // },
  3473. // "scopes": [
  3474. // "https://www.googleapis.com/auth/cloud-platform"
  3475. // ]
  3476. // }
  3477. }
  3478. // method id "healthcare.projects.locations.list":
  3479. type ProjectsLocationsListCall struct {
  3480. s *Service
  3481. name string
  3482. urlParams_ gensupport.URLParams
  3483. ifNoneMatch_ string
  3484. ctx_ context.Context
  3485. header_ http.Header
  3486. }
  3487. // List: Lists information about the supported locations for this
  3488. // service.
  3489. func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  3490. c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3491. c.name = name
  3492. return c
  3493. }
  3494. // Filter sets the optional parameter "filter": The standard list
  3495. // filter.
  3496. func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  3497. c.urlParams_.Set("filter", filter)
  3498. return c
  3499. }
  3500. // PageSize sets the optional parameter "pageSize": The standard list
  3501. // page size.
  3502. func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  3503. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3504. return c
  3505. }
  3506. // PageToken sets the optional parameter "pageToken": The standard list
  3507. // page token.
  3508. func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  3509. c.urlParams_.Set("pageToken", pageToken)
  3510. return c
  3511. }
  3512. // Fields allows partial responses to be retrieved. See
  3513. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3514. // for more information.
  3515. func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  3516. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3517. return c
  3518. }
  3519. // IfNoneMatch sets the optional parameter which makes the operation
  3520. // fail if the object's ETag matches the given value. This is useful for
  3521. // getting updates only after the object has changed since the last
  3522. // request. Use googleapi.IsNotModified to check whether the response
  3523. // error from Do is the result of In-None-Match.
  3524. func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  3525. c.ifNoneMatch_ = entityTag
  3526. return c
  3527. }
  3528. // Context sets the context to be used in this call's Do method. Any
  3529. // pending HTTP request will be aborted if the provided context is
  3530. // canceled.
  3531. func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  3532. c.ctx_ = ctx
  3533. return c
  3534. }
  3535. // Header returns an http.Header that can be modified by the caller to
  3536. // add HTTP headers to the request.
  3537. func (c *ProjectsLocationsListCall) Header() http.Header {
  3538. if c.header_ == nil {
  3539. c.header_ = make(http.Header)
  3540. }
  3541. return c.header_
  3542. }
  3543. func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  3544. reqHeaders := make(http.Header)
  3545. for k, v := range c.header_ {
  3546. reqHeaders[k] = v
  3547. }
  3548. reqHeaders.Set("User-Agent", c.s.userAgent())
  3549. if c.ifNoneMatch_ != "" {
  3550. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3551. }
  3552. var body io.Reader = nil
  3553. c.urlParams_.Set("alt", alt)
  3554. c.urlParams_.Set("prettyPrint", "false")
  3555. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}/locations")
  3556. urls += "?" + c.urlParams_.Encode()
  3557. req, err := http.NewRequest("GET", urls, body)
  3558. if err != nil {
  3559. return nil, err
  3560. }
  3561. req.Header = reqHeaders
  3562. googleapi.Expand(req.URL, map[string]string{
  3563. "name": c.name,
  3564. })
  3565. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3566. }
  3567. // Do executes the "healthcare.projects.locations.list" call.
  3568. // Exactly one of *ListLocationsResponse or error will be non-nil. Any
  3569. // non-2xx status code is an error. Response headers are in either
  3570. // *ListLocationsResponse.ServerResponse.Header or (if a response was
  3571. // returned at all) in error.(*googleapi.Error).Header. Use
  3572. // googleapi.IsNotModified to check whether the returned error was
  3573. // because http.StatusNotModified was returned.
  3574. func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  3575. gensupport.SetOptions(c.urlParams_, opts...)
  3576. res, err := c.doRequest("json")
  3577. if res != nil && res.StatusCode == http.StatusNotModified {
  3578. if res.Body != nil {
  3579. res.Body.Close()
  3580. }
  3581. return nil, &googleapi.Error{
  3582. Code: res.StatusCode,
  3583. Header: res.Header,
  3584. }
  3585. }
  3586. if err != nil {
  3587. return nil, err
  3588. }
  3589. defer googleapi.CloseBody(res)
  3590. if err := googleapi.CheckResponse(res); err != nil {
  3591. return nil, err
  3592. }
  3593. ret := &ListLocationsResponse{
  3594. ServerResponse: googleapi.ServerResponse{
  3595. Header: res.Header,
  3596. HTTPStatusCode: res.StatusCode,
  3597. },
  3598. }
  3599. target := &ret
  3600. if err := gensupport.DecodeResponse(target, res); err != nil {
  3601. return nil, err
  3602. }
  3603. return ret, nil
  3604. // {
  3605. // "description": "Lists information about the supported locations for this service.",
  3606. // "flatPath": "v1alpha2/projects/{projectsId}/locations",
  3607. // "httpMethod": "GET",
  3608. // "id": "healthcare.projects.locations.list",
  3609. // "parameterOrder": [
  3610. // "name"
  3611. // ],
  3612. // "parameters": {
  3613. // "filter": {
  3614. // "description": "The standard list filter.",
  3615. // "location": "query",
  3616. // "type": "string"
  3617. // },
  3618. // "name": {
  3619. // "description": "The resource that owns the locations collection, if applicable.",
  3620. // "location": "path",
  3621. // "pattern": "^projects/[^/]+$",
  3622. // "required": true,
  3623. // "type": "string"
  3624. // },
  3625. // "pageSize": {
  3626. // "description": "The standard list page size.",
  3627. // "format": "int32",
  3628. // "location": "query",
  3629. // "type": "integer"
  3630. // },
  3631. // "pageToken": {
  3632. // "description": "The standard list page token.",
  3633. // "location": "query",
  3634. // "type": "string"
  3635. // }
  3636. // },
  3637. // "path": "v1alpha2/{+name}/locations",
  3638. // "response": {
  3639. // "$ref": "ListLocationsResponse"
  3640. // },
  3641. // "scopes": [
  3642. // "https://www.googleapis.com/auth/cloud-platform"
  3643. // ]
  3644. // }
  3645. }
  3646. // Pages invokes f for each page of results.
  3647. // A non-nil error returned from f will halt the iteration.
  3648. // The provided context supersedes any context provided to the Context method.
  3649. func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  3650. c.ctx_ = ctx
  3651. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  3652. for {
  3653. x, err := c.Do()
  3654. if err != nil {
  3655. return err
  3656. }
  3657. if err := f(x); err != nil {
  3658. return err
  3659. }
  3660. if x.NextPageToken == "" {
  3661. return nil
  3662. }
  3663. c.PageToken(x.NextPageToken)
  3664. }
  3665. }
  3666. // method id "healthcare.projects.locations.datasets.create":
  3667. type ProjectsLocationsDatasetsCreateCall struct {
  3668. s *Service
  3669. parent string
  3670. dataset *Dataset
  3671. urlParams_ gensupport.URLParams
  3672. ctx_ context.Context
  3673. header_ http.Header
  3674. }
  3675. // Create: Creates a new health dataset. Results are returned through
  3676. // the
  3677. // Operation interface which returns either an
  3678. // `Operation.response` which contains a Dataset or
  3679. // `Operation.error`. The metadata
  3680. // field type is OperationMetadata.
  3681. func (r *ProjectsLocationsDatasetsService) Create(parent string, dataset *Dataset) *ProjectsLocationsDatasetsCreateCall {
  3682. c := &ProjectsLocationsDatasetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3683. c.parent = parent
  3684. c.dataset = dataset
  3685. return c
  3686. }
  3687. // DatasetId sets the optional parameter "datasetId": The ID of the
  3688. // dataset that is being created.
  3689. // The string must match the following regex:
  3690. // `[\p{L}\p{N}_\-\.]{1,256}`.
  3691. func (c *ProjectsLocationsDatasetsCreateCall) DatasetId(datasetId string) *ProjectsLocationsDatasetsCreateCall {
  3692. c.urlParams_.Set("datasetId", datasetId)
  3693. return c
  3694. }
  3695. // Fields allows partial responses to be retrieved. See
  3696. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3697. // for more information.
  3698. func (c *ProjectsLocationsDatasetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsCreateCall {
  3699. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3700. return c
  3701. }
  3702. // Context sets the context to be used in this call's Do method. Any
  3703. // pending HTTP request will be aborted if the provided context is
  3704. // canceled.
  3705. func (c *ProjectsLocationsDatasetsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsCreateCall {
  3706. c.ctx_ = ctx
  3707. return c
  3708. }
  3709. // Header returns an http.Header that can be modified by the caller to
  3710. // add HTTP headers to the request.
  3711. func (c *ProjectsLocationsDatasetsCreateCall) Header() http.Header {
  3712. if c.header_ == nil {
  3713. c.header_ = make(http.Header)
  3714. }
  3715. return c.header_
  3716. }
  3717. func (c *ProjectsLocationsDatasetsCreateCall) doRequest(alt string) (*http.Response, error) {
  3718. reqHeaders := make(http.Header)
  3719. for k, v := range c.header_ {
  3720. reqHeaders[k] = v
  3721. }
  3722. reqHeaders.Set("User-Agent", c.s.userAgent())
  3723. var body io.Reader = nil
  3724. body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataset)
  3725. if err != nil {
  3726. return nil, err
  3727. }
  3728. reqHeaders.Set("Content-Type", "application/json")
  3729. c.urlParams_.Set("alt", alt)
  3730. c.urlParams_.Set("prettyPrint", "false")
  3731. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/datasets")
  3732. urls += "?" + c.urlParams_.Encode()
  3733. req, err := http.NewRequest("POST", urls, body)
  3734. if err != nil {
  3735. return nil, err
  3736. }
  3737. req.Header = reqHeaders
  3738. googleapi.Expand(req.URL, map[string]string{
  3739. "parent": c.parent,
  3740. })
  3741. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3742. }
  3743. // Do executes the "healthcare.projects.locations.datasets.create" call.
  3744. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3745. // status code is an error. Response headers are in either
  3746. // *Operation.ServerResponse.Header or (if a response was returned at
  3747. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3748. // to check whether the returned error was because
  3749. // http.StatusNotModified was returned.
  3750. func (c *ProjectsLocationsDatasetsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3751. gensupport.SetOptions(c.urlParams_, opts...)
  3752. res, err := c.doRequest("json")
  3753. if res != nil && res.StatusCode == http.StatusNotModified {
  3754. if res.Body != nil {
  3755. res.Body.Close()
  3756. }
  3757. return nil, &googleapi.Error{
  3758. Code: res.StatusCode,
  3759. Header: res.Header,
  3760. }
  3761. }
  3762. if err != nil {
  3763. return nil, err
  3764. }
  3765. defer googleapi.CloseBody(res)
  3766. if err := googleapi.CheckResponse(res); err != nil {
  3767. return nil, err
  3768. }
  3769. ret := &Operation{
  3770. ServerResponse: googleapi.ServerResponse{
  3771. Header: res.Header,
  3772. HTTPStatusCode: res.StatusCode,
  3773. },
  3774. }
  3775. target := &ret
  3776. if err := gensupport.DecodeResponse(target, res); err != nil {
  3777. return nil, err
  3778. }
  3779. return ret, nil
  3780. // {
  3781. // "description": "Creates a new health dataset. Results are returned through the\nOperation interface which returns either an\n`Operation.response` which contains a Dataset or\n`Operation.error`. The metadata\nfield type is OperationMetadata.",
  3782. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets",
  3783. // "httpMethod": "POST",
  3784. // "id": "healthcare.projects.locations.datasets.create",
  3785. // "parameterOrder": [
  3786. // "parent"
  3787. // ],
  3788. // "parameters": {
  3789. // "datasetId": {
  3790. // "description": "The ID of the dataset that is being created.\nThe string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.",
  3791. // "location": "query",
  3792. // "type": "string"
  3793. // },
  3794. // "parent": {
  3795. // "description": "The name of the project in which the dataset should be created (e.g.,\n`projects/{project_id}/locations/{location_id}`).",
  3796. // "location": "path",
  3797. // "pattern": "^projects/[^/]+/locations/[^/]+$",
  3798. // "required": true,
  3799. // "type": "string"
  3800. // }
  3801. // },
  3802. // "path": "v1alpha2/{+parent}/datasets",
  3803. // "request": {
  3804. // "$ref": "Dataset"
  3805. // },
  3806. // "response": {
  3807. // "$ref": "Operation"
  3808. // },
  3809. // "scopes": [
  3810. // "https://www.googleapis.com/auth/cloud-platform"
  3811. // ]
  3812. // }
  3813. }
  3814. // method id "healthcare.projects.locations.datasets.deidentify":
  3815. type ProjectsLocationsDatasetsDeidentifyCall struct {
  3816. s *Service
  3817. sourceDataset string
  3818. deidentifydatasetrequest *DeidentifyDatasetRequest
  3819. urlParams_ gensupport.URLParams
  3820. ctx_ context.Context
  3821. header_ http.Header
  3822. }
  3823. // Deidentify: Creates a new dataset containing de-identified data from
  3824. // the source
  3825. // dataset. The metadata field type
  3826. // is OperationMetadata.
  3827. // If the request is successful, the
  3828. // response field type is
  3829. // DeidentifySummary.
  3830. // If errors occur,
  3831. // details field type is
  3832. // DeidentifyErrorDetails.
  3833. func (r *ProjectsLocationsDatasetsService) Deidentify(sourceDataset string, deidentifydatasetrequest *DeidentifyDatasetRequest) *ProjectsLocationsDatasetsDeidentifyCall {
  3834. c := &ProjectsLocationsDatasetsDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3835. c.sourceDataset = sourceDataset
  3836. c.deidentifydatasetrequest = deidentifydatasetrequest
  3837. return c
  3838. }
  3839. // Fields allows partial responses to be retrieved. See
  3840. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3841. // for more information.
  3842. func (c *ProjectsLocationsDatasetsDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDeidentifyCall {
  3843. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3844. return c
  3845. }
  3846. // Context sets the context to be used in this call's Do method. Any
  3847. // pending HTTP request will be aborted if the provided context is
  3848. // canceled.
  3849. func (c *ProjectsLocationsDatasetsDeidentifyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDeidentifyCall {
  3850. c.ctx_ = ctx
  3851. return c
  3852. }
  3853. // Header returns an http.Header that can be modified by the caller to
  3854. // add HTTP headers to the request.
  3855. func (c *ProjectsLocationsDatasetsDeidentifyCall) Header() http.Header {
  3856. if c.header_ == nil {
  3857. c.header_ = make(http.Header)
  3858. }
  3859. return c.header_
  3860. }
  3861. func (c *ProjectsLocationsDatasetsDeidentifyCall) doRequest(alt string) (*http.Response, error) {
  3862. reqHeaders := make(http.Header)
  3863. for k, v := range c.header_ {
  3864. reqHeaders[k] = v
  3865. }
  3866. reqHeaders.Set("User-Agent", c.s.userAgent())
  3867. var body io.Reader = nil
  3868. body, err := googleapi.WithoutDataWrapper.JSONReader(c.deidentifydatasetrequest)
  3869. if err != nil {
  3870. return nil, err
  3871. }
  3872. reqHeaders.Set("Content-Type", "application/json")
  3873. c.urlParams_.Set("alt", alt)
  3874. c.urlParams_.Set("prettyPrint", "false")
  3875. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+sourceDataset}:deidentify")
  3876. urls += "?" + c.urlParams_.Encode()
  3877. req, err := http.NewRequest("POST", urls, body)
  3878. if err != nil {
  3879. return nil, err
  3880. }
  3881. req.Header = reqHeaders
  3882. googleapi.Expand(req.URL, map[string]string{
  3883. "sourceDataset": c.sourceDataset,
  3884. })
  3885. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3886. }
  3887. // Do executes the "healthcare.projects.locations.datasets.deidentify" call.
  3888. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3889. // status code is an error. Response headers are in either
  3890. // *Operation.ServerResponse.Header or (if a response was returned at
  3891. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3892. // to check whether the returned error was because
  3893. // http.StatusNotModified was returned.
  3894. func (c *ProjectsLocationsDatasetsDeidentifyCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3895. gensupport.SetOptions(c.urlParams_, opts...)
  3896. res, err := c.doRequest("json")
  3897. if res != nil && res.StatusCode == http.StatusNotModified {
  3898. if res.Body != nil {
  3899. res.Body.Close()
  3900. }
  3901. return nil, &googleapi.Error{
  3902. Code: res.StatusCode,
  3903. Header: res.Header,
  3904. }
  3905. }
  3906. if err != nil {
  3907. return nil, err
  3908. }
  3909. defer googleapi.CloseBody(res)
  3910. if err := googleapi.CheckResponse(res); err != nil {
  3911. return nil, err
  3912. }
  3913. ret := &Operation{
  3914. ServerResponse: googleapi.ServerResponse{
  3915. Header: res.Header,
  3916. HTTPStatusCode: res.StatusCode,
  3917. },
  3918. }
  3919. target := &ret
  3920. if err := gensupport.DecodeResponse(target, res); err != nil {
  3921. return nil, err
  3922. }
  3923. return ret, nil
  3924. // {
  3925. // "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.",
  3926. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}:deidentify",
  3927. // "httpMethod": "POST",
  3928. // "id": "healthcare.projects.locations.datasets.deidentify",
  3929. // "parameterOrder": [
  3930. // "sourceDataset"
  3931. // ],
  3932. // "parameters": {
  3933. // "sourceDataset": {
  3934. // "description": "Source dataset resource name. (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`).",
  3935. // "location": "path",
  3936. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  3937. // "required": true,
  3938. // "type": "string"
  3939. // }
  3940. // },
  3941. // "path": "v1alpha2/{+sourceDataset}:deidentify",
  3942. // "request": {
  3943. // "$ref": "DeidentifyDatasetRequest"
  3944. // },
  3945. // "response": {
  3946. // "$ref": "Operation"
  3947. // },
  3948. // "scopes": [
  3949. // "https://www.googleapis.com/auth/cloud-platform"
  3950. // ]
  3951. // }
  3952. }
  3953. // method id "healthcare.projects.locations.datasets.delete":
  3954. type ProjectsLocationsDatasetsDeleteCall struct {
  3955. s *Service
  3956. name string
  3957. urlParams_ gensupport.URLParams
  3958. ctx_ context.Context
  3959. header_ http.Header
  3960. }
  3961. // Delete: Deletes the specified health dataset and all data contained
  3962. // in the dataset.
  3963. // Deleting a dataset does not affect the sources from which the dataset
  3964. // was
  3965. // imported (if any).
  3966. func (r *ProjectsLocationsDatasetsService) Delete(name string) *ProjectsLocationsDatasetsDeleteCall {
  3967. c := &ProjectsLocationsDatasetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3968. c.name = name
  3969. return c
  3970. }
  3971. // Fields allows partial responses to be retrieved. See
  3972. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3973. // for more information.
  3974. func (c *ProjectsLocationsDatasetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDeleteCall {
  3975. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3976. return c
  3977. }
  3978. // Context sets the context to be used in this call's Do method. Any
  3979. // pending HTTP request will be aborted if the provided context is
  3980. // canceled.
  3981. func (c *ProjectsLocationsDatasetsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDeleteCall {
  3982. c.ctx_ = ctx
  3983. return c
  3984. }
  3985. // Header returns an http.Header that can be modified by the caller to
  3986. // add HTTP headers to the request.
  3987. func (c *ProjectsLocationsDatasetsDeleteCall) Header() http.Header {
  3988. if c.header_ == nil {
  3989. c.header_ = make(http.Header)
  3990. }
  3991. return c.header_
  3992. }
  3993. func (c *ProjectsLocationsDatasetsDeleteCall) doRequest(alt string) (*http.Response, error) {
  3994. reqHeaders := make(http.Header)
  3995. for k, v := range c.header_ {
  3996. reqHeaders[k] = v
  3997. }
  3998. reqHeaders.Set("User-Agent", c.s.userAgent())
  3999. var body io.Reader = nil
  4000. c.urlParams_.Set("alt", alt)
  4001. c.urlParams_.Set("prettyPrint", "false")
  4002. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  4003. urls += "?" + c.urlParams_.Encode()
  4004. req, err := http.NewRequest("DELETE", urls, body)
  4005. if err != nil {
  4006. return nil, err
  4007. }
  4008. req.Header = reqHeaders
  4009. googleapi.Expand(req.URL, map[string]string{
  4010. "name": c.name,
  4011. })
  4012. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4013. }
  4014. // Do executes the "healthcare.projects.locations.datasets.delete" call.
  4015. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  4016. // code is an error. Response headers are in either
  4017. // *Empty.ServerResponse.Header or (if a response was returned at all)
  4018. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4019. // check whether the returned error was because http.StatusNotModified
  4020. // was returned.
  4021. func (c *ProjectsLocationsDatasetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  4022. gensupport.SetOptions(c.urlParams_, opts...)
  4023. res, err := c.doRequest("json")
  4024. if res != nil && res.StatusCode == http.StatusNotModified {
  4025. if res.Body != nil {
  4026. res.Body.Close()
  4027. }
  4028. return nil, &googleapi.Error{
  4029. Code: res.StatusCode,
  4030. Header: res.Header,
  4031. }
  4032. }
  4033. if err != nil {
  4034. return nil, err
  4035. }
  4036. defer googleapi.CloseBody(res)
  4037. if err := googleapi.CheckResponse(res); err != nil {
  4038. return nil, err
  4039. }
  4040. ret := &Empty{
  4041. ServerResponse: googleapi.ServerResponse{
  4042. Header: res.Header,
  4043. HTTPStatusCode: res.StatusCode,
  4044. },
  4045. }
  4046. target := &ret
  4047. if err := gensupport.DecodeResponse(target, res); err != nil {
  4048. return nil, err
  4049. }
  4050. return ret, nil
  4051. // {
  4052. // "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).",
  4053. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}",
  4054. // "httpMethod": "DELETE",
  4055. // "id": "healthcare.projects.locations.datasets.delete",
  4056. // "parameterOrder": [
  4057. // "name"
  4058. // ],
  4059. // "parameters": {
  4060. // "name": {
  4061. // "description": "The name of the dataset to delete (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`).",
  4062. // "location": "path",
  4063. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  4064. // "required": true,
  4065. // "type": "string"
  4066. // }
  4067. // },
  4068. // "path": "v1alpha2/{+name}",
  4069. // "response": {
  4070. // "$ref": "Empty"
  4071. // },
  4072. // "scopes": [
  4073. // "https://www.googleapis.com/auth/cloud-platform"
  4074. // ]
  4075. // }
  4076. }
  4077. // method id "healthcare.projects.locations.datasets.get":
  4078. type ProjectsLocationsDatasetsGetCall struct {
  4079. s *Service
  4080. name string
  4081. urlParams_ gensupport.URLParams
  4082. ifNoneMatch_ string
  4083. ctx_ context.Context
  4084. header_ http.Header
  4085. }
  4086. // Get: Gets any metadata associated with a dataset.
  4087. func (r *ProjectsLocationsDatasetsService) Get(name string) *ProjectsLocationsDatasetsGetCall {
  4088. c := &ProjectsLocationsDatasetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4089. c.name = name
  4090. return c
  4091. }
  4092. // Fields allows partial responses to be retrieved. See
  4093. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4094. // for more information.
  4095. func (c *ProjectsLocationsDatasetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsGetCall {
  4096. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4097. return c
  4098. }
  4099. // IfNoneMatch sets the optional parameter which makes the operation
  4100. // fail if the object's ETag matches the given value. This is useful for
  4101. // getting updates only after the object has changed since the last
  4102. // request. Use googleapi.IsNotModified to check whether the response
  4103. // error from Do is the result of In-None-Match.
  4104. func (c *ProjectsLocationsDatasetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsGetCall {
  4105. c.ifNoneMatch_ = entityTag
  4106. return c
  4107. }
  4108. // Context sets the context to be used in this call's Do method. Any
  4109. // pending HTTP request will be aborted if the provided context is
  4110. // canceled.
  4111. func (c *ProjectsLocationsDatasetsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsGetCall {
  4112. c.ctx_ = ctx
  4113. return c
  4114. }
  4115. // Header returns an http.Header that can be modified by the caller to
  4116. // add HTTP headers to the request.
  4117. func (c *ProjectsLocationsDatasetsGetCall) Header() http.Header {
  4118. if c.header_ == nil {
  4119. c.header_ = make(http.Header)
  4120. }
  4121. return c.header_
  4122. }
  4123. func (c *ProjectsLocationsDatasetsGetCall) doRequest(alt string) (*http.Response, error) {
  4124. reqHeaders := make(http.Header)
  4125. for k, v := range c.header_ {
  4126. reqHeaders[k] = v
  4127. }
  4128. reqHeaders.Set("User-Agent", c.s.userAgent())
  4129. if c.ifNoneMatch_ != "" {
  4130. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4131. }
  4132. var body io.Reader = nil
  4133. c.urlParams_.Set("alt", alt)
  4134. c.urlParams_.Set("prettyPrint", "false")
  4135. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  4136. urls += "?" + c.urlParams_.Encode()
  4137. req, err := http.NewRequest("GET", urls, body)
  4138. if err != nil {
  4139. return nil, err
  4140. }
  4141. req.Header = reqHeaders
  4142. googleapi.Expand(req.URL, map[string]string{
  4143. "name": c.name,
  4144. })
  4145. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4146. }
  4147. // Do executes the "healthcare.projects.locations.datasets.get" call.
  4148. // Exactly one of *Dataset or error will be non-nil. Any non-2xx status
  4149. // code is an error. Response headers are in either
  4150. // *Dataset.ServerResponse.Header or (if a response was returned at all)
  4151. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4152. // check whether the returned error was because http.StatusNotModified
  4153. // was returned.
  4154. func (c *ProjectsLocationsDatasetsGetCall) Do(opts ...googleapi.CallOption) (*Dataset, error) {
  4155. gensupport.SetOptions(c.urlParams_, opts...)
  4156. res, err := c.doRequest("json")
  4157. if res != nil && res.StatusCode == http.StatusNotModified {
  4158. if res.Body != nil {
  4159. res.Body.Close()
  4160. }
  4161. return nil, &googleapi.Error{
  4162. Code: res.StatusCode,
  4163. Header: res.Header,
  4164. }
  4165. }
  4166. if err != nil {
  4167. return nil, err
  4168. }
  4169. defer googleapi.CloseBody(res)
  4170. if err := googleapi.CheckResponse(res); err != nil {
  4171. return nil, err
  4172. }
  4173. ret := &Dataset{
  4174. ServerResponse: googleapi.ServerResponse{
  4175. Header: res.Header,
  4176. HTTPStatusCode: res.StatusCode,
  4177. },
  4178. }
  4179. target := &ret
  4180. if err := gensupport.DecodeResponse(target, res); err != nil {
  4181. return nil, err
  4182. }
  4183. return ret, nil
  4184. // {
  4185. // "description": "Gets any metadata associated with a dataset.",
  4186. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}",
  4187. // "httpMethod": "GET",
  4188. // "id": "healthcare.projects.locations.datasets.get",
  4189. // "parameterOrder": [
  4190. // "name"
  4191. // ],
  4192. // "parameters": {
  4193. // "name": {
  4194. // "description": "The name of the dataset to read (e.g.,\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`).",
  4195. // "location": "path",
  4196. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  4197. // "required": true,
  4198. // "type": "string"
  4199. // }
  4200. // },
  4201. // "path": "v1alpha2/{+name}",
  4202. // "response": {
  4203. // "$ref": "Dataset"
  4204. // },
  4205. // "scopes": [
  4206. // "https://www.googleapis.com/auth/cloud-platform"
  4207. // ]
  4208. // }
  4209. }
  4210. // method id "healthcare.projects.locations.datasets.getIamPolicy":
  4211. type ProjectsLocationsDatasetsGetIamPolicyCall struct {
  4212. s *Service
  4213. resource string
  4214. urlParams_ gensupport.URLParams
  4215. ifNoneMatch_ string
  4216. ctx_ context.Context
  4217. header_ http.Header
  4218. }
  4219. // GetIamPolicy: Gets the access control policy for a resource.
  4220. // Returns an empty policy if the resource exists and does not have a
  4221. // policy
  4222. // set.
  4223. func (r *ProjectsLocationsDatasetsService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsGetIamPolicyCall {
  4224. c := &ProjectsLocationsDatasetsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4225. c.resource = resource
  4226. return c
  4227. }
  4228. // Fields allows partial responses to be retrieved. See
  4229. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4230. // for more information.
  4231. func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsGetIamPolicyCall {
  4232. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4233. return c
  4234. }
  4235. // IfNoneMatch sets the optional parameter which makes the operation
  4236. // fail if the object's ETag matches the given value. This is useful for
  4237. // getting updates only after the object has changed since the last
  4238. // request. Use googleapi.IsNotModified to check whether the response
  4239. // error from Do is the result of In-None-Match.
  4240. func (c *ProjectsLocationsDatasetsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsGetIamPolicyCall {
  4241. c.ifNoneMatch_ = entityTag
  4242. return c
  4243. }
  4244. // Context sets the context to be used in this call's Do method. Any
  4245. // pending HTTP request will be aborted if the provided context is
  4246. // canceled.
  4247. func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsGetIamPolicyCall {
  4248. c.ctx_ = ctx
  4249. return c
  4250. }
  4251. // Header returns an http.Header that can be modified by the caller to
  4252. // add HTTP headers to the request.
  4253. func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Header() http.Header {
  4254. if c.header_ == nil {
  4255. c.header_ = make(http.Header)
  4256. }
  4257. return c.header_
  4258. }
  4259. func (c *ProjectsLocationsDatasetsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4260. reqHeaders := make(http.Header)
  4261. for k, v := range c.header_ {
  4262. reqHeaders[k] = v
  4263. }
  4264. reqHeaders.Set("User-Agent", c.s.userAgent())
  4265. if c.ifNoneMatch_ != "" {
  4266. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4267. }
  4268. var body io.Reader = nil
  4269. c.urlParams_.Set("alt", alt)
  4270. c.urlParams_.Set("prettyPrint", "false")
  4271. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:getIamPolicy")
  4272. urls += "?" + c.urlParams_.Encode()
  4273. req, err := http.NewRequest("GET", urls, body)
  4274. if err != nil {
  4275. return nil, err
  4276. }
  4277. req.Header = reqHeaders
  4278. googleapi.Expand(req.URL, map[string]string{
  4279. "resource": c.resource,
  4280. })
  4281. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4282. }
  4283. // Do executes the "healthcare.projects.locations.datasets.getIamPolicy" call.
  4284. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  4285. // code is an error. Response headers are in either
  4286. // *Policy.ServerResponse.Header or (if a response was returned at all)
  4287. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4288. // check whether the returned error was because http.StatusNotModified
  4289. // was returned.
  4290. func (c *ProjectsLocationsDatasetsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4291. gensupport.SetOptions(c.urlParams_, opts...)
  4292. res, err := c.doRequest("json")
  4293. if res != nil && res.StatusCode == http.StatusNotModified {
  4294. if res.Body != nil {
  4295. res.Body.Close()
  4296. }
  4297. return nil, &googleapi.Error{
  4298. Code: res.StatusCode,
  4299. Header: res.Header,
  4300. }
  4301. }
  4302. if err != nil {
  4303. return nil, err
  4304. }
  4305. defer googleapi.CloseBody(res)
  4306. if err := googleapi.CheckResponse(res); err != nil {
  4307. return nil, err
  4308. }
  4309. ret := &Policy{
  4310. ServerResponse: googleapi.ServerResponse{
  4311. Header: res.Header,
  4312. HTTPStatusCode: res.StatusCode,
  4313. },
  4314. }
  4315. target := &ret
  4316. if err := gensupport.DecodeResponse(target, res); err != nil {
  4317. return nil, err
  4318. }
  4319. return ret, nil
  4320. // {
  4321. // "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.",
  4322. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}:getIamPolicy",
  4323. // "httpMethod": "GET",
  4324. // "id": "healthcare.projects.locations.datasets.getIamPolicy",
  4325. // "parameterOrder": [
  4326. // "resource"
  4327. // ],
  4328. // "parameters": {
  4329. // "resource": {
  4330. // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
  4331. // "location": "path",
  4332. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  4333. // "required": true,
  4334. // "type": "string"
  4335. // }
  4336. // },
  4337. // "path": "v1alpha2/{+resource}:getIamPolicy",
  4338. // "response": {
  4339. // "$ref": "Policy"
  4340. // },
  4341. // "scopes": [
  4342. // "https://www.googleapis.com/auth/cloud-platform"
  4343. // ]
  4344. // }
  4345. }
  4346. // method id "healthcare.projects.locations.datasets.list":
  4347. type ProjectsLocationsDatasetsListCall struct {
  4348. s *Service
  4349. parent string
  4350. urlParams_ gensupport.URLParams
  4351. ifNoneMatch_ string
  4352. ctx_ context.Context
  4353. header_ http.Header
  4354. }
  4355. // List: Lists the health datasets in the current project.
  4356. func (r *ProjectsLocationsDatasetsService) List(parent string) *ProjectsLocationsDatasetsListCall {
  4357. c := &ProjectsLocationsDatasetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4358. c.parent = parent
  4359. return c
  4360. }
  4361. // PageSize sets the optional parameter "pageSize": The maximum number
  4362. // of items to return. Capped to 100 if not specified.
  4363. // May not be larger than 1000.
  4364. func (c *ProjectsLocationsDatasetsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsListCall {
  4365. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4366. return c
  4367. }
  4368. // PageToken sets the optional parameter "pageToken": The
  4369. // next_page_token value returned from a previous List request, if any.
  4370. func (c *ProjectsLocationsDatasetsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsListCall {
  4371. c.urlParams_.Set("pageToken", pageToken)
  4372. return c
  4373. }
  4374. // Fields allows partial responses to be retrieved. See
  4375. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4376. // for more information.
  4377. func (c *ProjectsLocationsDatasetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsListCall {
  4378. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4379. return c
  4380. }
  4381. // IfNoneMatch sets the optional parameter which makes the operation
  4382. // fail if the object's ETag matches the given value. This is useful for
  4383. // getting updates only after the object has changed since the last
  4384. // request. Use googleapi.IsNotModified to check whether the response
  4385. // error from Do is the result of In-None-Match.
  4386. func (c *ProjectsLocationsDatasetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsListCall {
  4387. c.ifNoneMatch_ = entityTag
  4388. return c
  4389. }
  4390. // Context sets the context to be used in this call's Do method. Any
  4391. // pending HTTP request will be aborted if the provided context is
  4392. // canceled.
  4393. func (c *ProjectsLocationsDatasetsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsListCall {
  4394. c.ctx_ = ctx
  4395. return c
  4396. }
  4397. // Header returns an http.Header that can be modified by the caller to
  4398. // add HTTP headers to the request.
  4399. func (c *ProjectsLocationsDatasetsListCall) Header() http.Header {
  4400. if c.header_ == nil {
  4401. c.header_ = make(http.Header)
  4402. }
  4403. return c.header_
  4404. }
  4405. func (c *ProjectsLocationsDatasetsListCall) doRequest(alt string) (*http.Response, error) {
  4406. reqHeaders := make(http.Header)
  4407. for k, v := range c.header_ {
  4408. reqHeaders[k] = v
  4409. }
  4410. reqHeaders.Set("User-Agent", c.s.userAgent())
  4411. if c.ifNoneMatch_ != "" {
  4412. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4413. }
  4414. var body io.Reader = nil
  4415. c.urlParams_.Set("alt", alt)
  4416. c.urlParams_.Set("prettyPrint", "false")
  4417. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/datasets")
  4418. urls += "?" + c.urlParams_.Encode()
  4419. req, err := http.NewRequest("GET", urls, body)
  4420. if err != nil {
  4421. return nil, err
  4422. }
  4423. req.Header = reqHeaders
  4424. googleapi.Expand(req.URL, map[string]string{
  4425. "parent": c.parent,
  4426. })
  4427. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4428. }
  4429. // Do executes the "healthcare.projects.locations.datasets.list" call.
  4430. // Exactly one of *ListDatasetsResponse or error will be non-nil. Any
  4431. // non-2xx status code is an error. Response headers are in either
  4432. // *ListDatasetsResponse.ServerResponse.Header or (if a response was
  4433. // returned at all) in error.(*googleapi.Error).Header. Use
  4434. // googleapi.IsNotModified to check whether the returned error was
  4435. // because http.StatusNotModified was returned.
  4436. func (c *ProjectsLocationsDatasetsListCall) Do(opts ...googleapi.CallOption) (*ListDatasetsResponse, error) {
  4437. gensupport.SetOptions(c.urlParams_, opts...)
  4438. res, err := c.doRequest("json")
  4439. if res != nil && res.StatusCode == http.StatusNotModified {
  4440. if res.Body != nil {
  4441. res.Body.Close()
  4442. }
  4443. return nil, &googleapi.Error{
  4444. Code: res.StatusCode,
  4445. Header: res.Header,
  4446. }
  4447. }
  4448. if err != nil {
  4449. return nil, err
  4450. }
  4451. defer googleapi.CloseBody(res)
  4452. if err := googleapi.CheckResponse(res); err != nil {
  4453. return nil, err
  4454. }
  4455. ret := &ListDatasetsResponse{
  4456. ServerResponse: googleapi.ServerResponse{
  4457. Header: res.Header,
  4458. HTTPStatusCode: res.StatusCode,
  4459. },
  4460. }
  4461. target := &ret
  4462. if err := gensupport.DecodeResponse(target, res); err != nil {
  4463. return nil, err
  4464. }
  4465. return ret, nil
  4466. // {
  4467. // "description": "Lists the health datasets in the current project.",
  4468. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets",
  4469. // "httpMethod": "GET",
  4470. // "id": "healthcare.projects.locations.datasets.list",
  4471. // "parameterOrder": [
  4472. // "parent"
  4473. // ],
  4474. // "parameters": {
  4475. // "pageSize": {
  4476. // "description": "The maximum number of items to return. Capped to 100 if not specified.\nMay not be larger than 1000.",
  4477. // "format": "int32",
  4478. // "location": "query",
  4479. // "type": "integer"
  4480. // },
  4481. // "pageToken": {
  4482. // "description": "The next_page_token value returned from a previous List request, if any.",
  4483. // "location": "query",
  4484. // "type": "string"
  4485. // },
  4486. // "parent": {
  4487. // "description": "The name of the project whose datasets should be listed (e.g.,\n`projects/{project_id}/locations/{location_id}`).",
  4488. // "location": "path",
  4489. // "pattern": "^projects/[^/]+/locations/[^/]+$",
  4490. // "required": true,
  4491. // "type": "string"
  4492. // }
  4493. // },
  4494. // "path": "v1alpha2/{+parent}/datasets",
  4495. // "response": {
  4496. // "$ref": "ListDatasetsResponse"
  4497. // },
  4498. // "scopes": [
  4499. // "https://www.googleapis.com/auth/cloud-platform"
  4500. // ]
  4501. // }
  4502. }
  4503. // Pages invokes f for each page of results.
  4504. // A non-nil error returned from f will halt the iteration.
  4505. // The provided context supersedes any context provided to the Context method.
  4506. func (c *ProjectsLocationsDatasetsListCall) Pages(ctx context.Context, f func(*ListDatasetsResponse) error) error {
  4507. c.ctx_ = ctx
  4508. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4509. for {
  4510. x, err := c.Do()
  4511. if err != nil {
  4512. return err
  4513. }
  4514. if err := f(x); err != nil {
  4515. return err
  4516. }
  4517. if x.NextPageToken == "" {
  4518. return nil
  4519. }
  4520. c.PageToken(x.NextPageToken)
  4521. }
  4522. }
  4523. // method id "healthcare.projects.locations.datasets.patch":
  4524. type ProjectsLocationsDatasetsPatchCall struct {
  4525. s *Service
  4526. name string
  4527. dataset *Dataset
  4528. urlParams_ gensupport.URLParams
  4529. ctx_ context.Context
  4530. header_ http.Header
  4531. }
  4532. // Patch: Updates dataset metadata.
  4533. func (r *ProjectsLocationsDatasetsService) Patch(name string, dataset *Dataset) *ProjectsLocationsDatasetsPatchCall {
  4534. c := &ProjectsLocationsDatasetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4535. c.name = name
  4536. c.dataset = dataset
  4537. return c
  4538. }
  4539. // UpdateMask sets the optional parameter "updateMask": The update mask
  4540. // applies to the resource. For the `FieldMask`
  4541. // definition,
  4542. // see
  4543. // https://developers.google.com/protocol-buffers/docs/re
  4544. // ference/google.protobuf#fieldmask
  4545. func (c *ProjectsLocationsDatasetsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsPatchCall {
  4546. c.urlParams_.Set("updateMask", updateMask)
  4547. return c
  4548. }
  4549. // Fields allows partial responses to be retrieved. See
  4550. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4551. // for more information.
  4552. func (c *ProjectsLocationsDatasetsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsPatchCall {
  4553. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4554. return c
  4555. }
  4556. // Context sets the context to be used in this call's Do method. Any
  4557. // pending HTTP request will be aborted if the provided context is
  4558. // canceled.
  4559. func (c *ProjectsLocationsDatasetsPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsPatchCall {
  4560. c.ctx_ = ctx
  4561. return c
  4562. }
  4563. // Header returns an http.Header that can be modified by the caller to
  4564. // add HTTP headers to the request.
  4565. func (c *ProjectsLocationsDatasetsPatchCall) Header() http.Header {
  4566. if c.header_ == nil {
  4567. c.header_ = make(http.Header)
  4568. }
  4569. return c.header_
  4570. }
  4571. func (c *ProjectsLocationsDatasetsPatchCall) doRequest(alt string) (*http.Response, error) {
  4572. reqHeaders := make(http.Header)
  4573. for k, v := range c.header_ {
  4574. reqHeaders[k] = v
  4575. }
  4576. reqHeaders.Set("User-Agent", c.s.userAgent())
  4577. var body io.Reader = nil
  4578. body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataset)
  4579. if err != nil {
  4580. return nil, err
  4581. }
  4582. reqHeaders.Set("Content-Type", "application/json")
  4583. c.urlParams_.Set("alt", alt)
  4584. c.urlParams_.Set("prettyPrint", "false")
  4585. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  4586. urls += "?" + c.urlParams_.Encode()
  4587. req, err := http.NewRequest("PATCH", urls, body)
  4588. if err != nil {
  4589. return nil, err
  4590. }
  4591. req.Header = reqHeaders
  4592. googleapi.Expand(req.URL, map[string]string{
  4593. "name": c.name,
  4594. })
  4595. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4596. }
  4597. // Do executes the "healthcare.projects.locations.datasets.patch" call.
  4598. // Exactly one of *Dataset or error will be non-nil. Any non-2xx status
  4599. // code is an error. Response headers are in either
  4600. // *Dataset.ServerResponse.Header or (if a response was returned at all)
  4601. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4602. // check whether the returned error was because http.StatusNotModified
  4603. // was returned.
  4604. func (c *ProjectsLocationsDatasetsPatchCall) Do(opts ...googleapi.CallOption) (*Dataset, error) {
  4605. gensupport.SetOptions(c.urlParams_, opts...)
  4606. res, err := c.doRequest("json")
  4607. if res != nil && res.StatusCode == http.StatusNotModified {
  4608. if res.Body != nil {
  4609. res.Body.Close()
  4610. }
  4611. return nil, &googleapi.Error{
  4612. Code: res.StatusCode,
  4613. Header: res.Header,
  4614. }
  4615. }
  4616. if err != nil {
  4617. return nil, err
  4618. }
  4619. defer googleapi.CloseBody(res)
  4620. if err := googleapi.CheckResponse(res); err != nil {
  4621. return nil, err
  4622. }
  4623. ret := &Dataset{
  4624. ServerResponse: googleapi.ServerResponse{
  4625. Header: res.Header,
  4626. HTTPStatusCode: res.StatusCode,
  4627. },
  4628. }
  4629. target := &ret
  4630. if err := gensupport.DecodeResponse(target, res); err != nil {
  4631. return nil, err
  4632. }
  4633. return ret, nil
  4634. // {
  4635. // "description": "Updates dataset metadata.",
  4636. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}",
  4637. // "httpMethod": "PATCH",
  4638. // "id": "healthcare.projects.locations.datasets.patch",
  4639. // "parameterOrder": [
  4640. // "name"
  4641. // ],
  4642. // "parameters": {
  4643. // "name": {
  4644. // "description": "Output only. Resource name of the dataset, of the form\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.",
  4645. // "location": "path",
  4646. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  4647. // "required": true,
  4648. // "type": "string"
  4649. // },
  4650. // "updateMask": {
  4651. // "description": "The update mask applies to the resource. For the `FieldMask` definition,\nsee\nhttps://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask",
  4652. // "format": "google-fieldmask",
  4653. // "location": "query",
  4654. // "type": "string"
  4655. // }
  4656. // },
  4657. // "path": "v1alpha2/{+name}",
  4658. // "request": {
  4659. // "$ref": "Dataset"
  4660. // },
  4661. // "response": {
  4662. // "$ref": "Dataset"
  4663. // },
  4664. // "scopes": [
  4665. // "https://www.googleapis.com/auth/cloud-platform"
  4666. // ]
  4667. // }
  4668. }
  4669. // method id "healthcare.projects.locations.datasets.setIamPolicy":
  4670. type ProjectsLocationsDatasetsSetIamPolicyCall struct {
  4671. s *Service
  4672. resource string
  4673. setiampolicyrequest *SetIamPolicyRequest
  4674. urlParams_ gensupport.URLParams
  4675. ctx_ context.Context
  4676. header_ http.Header
  4677. }
  4678. // SetIamPolicy: Sets the access control policy on the specified
  4679. // resource. Replaces any
  4680. // existing policy.
  4681. func (r *ProjectsLocationsDatasetsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsSetIamPolicyCall {
  4682. c := &ProjectsLocationsDatasetsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4683. c.resource = resource
  4684. c.setiampolicyrequest = setiampolicyrequest
  4685. return c
  4686. }
  4687. // Fields allows partial responses to be retrieved. See
  4688. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4689. // for more information.
  4690. func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSetIamPolicyCall {
  4691. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4692. return c
  4693. }
  4694. // Context sets the context to be used in this call's Do method. Any
  4695. // pending HTTP request will be aborted if the provided context is
  4696. // canceled.
  4697. func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSetIamPolicyCall {
  4698. c.ctx_ = ctx
  4699. return c
  4700. }
  4701. // Header returns an http.Header that can be modified by the caller to
  4702. // add HTTP headers to the request.
  4703. func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Header() http.Header {
  4704. if c.header_ == nil {
  4705. c.header_ = make(http.Header)
  4706. }
  4707. return c.header_
  4708. }
  4709. func (c *ProjectsLocationsDatasetsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4710. reqHeaders := make(http.Header)
  4711. for k, v := range c.header_ {
  4712. reqHeaders[k] = v
  4713. }
  4714. reqHeaders.Set("User-Agent", c.s.userAgent())
  4715. var body io.Reader = nil
  4716. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  4717. if err != nil {
  4718. return nil, err
  4719. }
  4720. reqHeaders.Set("Content-Type", "application/json")
  4721. c.urlParams_.Set("alt", alt)
  4722. c.urlParams_.Set("prettyPrint", "false")
  4723. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:setIamPolicy")
  4724. urls += "?" + c.urlParams_.Encode()
  4725. req, err := http.NewRequest("POST", urls, body)
  4726. if err != nil {
  4727. return nil, err
  4728. }
  4729. req.Header = reqHeaders
  4730. googleapi.Expand(req.URL, map[string]string{
  4731. "resource": c.resource,
  4732. })
  4733. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4734. }
  4735. // Do executes the "healthcare.projects.locations.datasets.setIamPolicy" call.
  4736. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  4737. // code is an error. Response headers are in either
  4738. // *Policy.ServerResponse.Header or (if a response was returned at all)
  4739. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4740. // check whether the returned error was because http.StatusNotModified
  4741. // was returned.
  4742. func (c *ProjectsLocationsDatasetsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4743. gensupport.SetOptions(c.urlParams_, opts...)
  4744. res, err := c.doRequest("json")
  4745. if res != nil && res.StatusCode == http.StatusNotModified {
  4746. if res.Body != nil {
  4747. res.Body.Close()
  4748. }
  4749. return nil, &googleapi.Error{
  4750. Code: res.StatusCode,
  4751. Header: res.Header,
  4752. }
  4753. }
  4754. if err != nil {
  4755. return nil, err
  4756. }
  4757. defer googleapi.CloseBody(res)
  4758. if err := googleapi.CheckResponse(res); err != nil {
  4759. return nil, err
  4760. }
  4761. ret := &Policy{
  4762. ServerResponse: googleapi.ServerResponse{
  4763. Header: res.Header,
  4764. HTTPStatusCode: res.StatusCode,
  4765. },
  4766. }
  4767. target := &ret
  4768. if err := gensupport.DecodeResponse(target, res); err != nil {
  4769. return nil, err
  4770. }
  4771. return ret, nil
  4772. // {
  4773. // "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.",
  4774. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}:setIamPolicy",
  4775. // "httpMethod": "POST",
  4776. // "id": "healthcare.projects.locations.datasets.setIamPolicy",
  4777. // "parameterOrder": [
  4778. // "resource"
  4779. // ],
  4780. // "parameters": {
  4781. // "resource": {
  4782. // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
  4783. // "location": "path",
  4784. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  4785. // "required": true,
  4786. // "type": "string"
  4787. // }
  4788. // },
  4789. // "path": "v1alpha2/{+resource}:setIamPolicy",
  4790. // "request": {
  4791. // "$ref": "SetIamPolicyRequest"
  4792. // },
  4793. // "response": {
  4794. // "$ref": "Policy"
  4795. // },
  4796. // "scopes": [
  4797. // "https://www.googleapis.com/auth/cloud-platform"
  4798. // ]
  4799. // }
  4800. }
  4801. // method id "healthcare.projects.locations.datasets.testIamPermissions":
  4802. type ProjectsLocationsDatasetsTestIamPermissionsCall struct {
  4803. s *Service
  4804. resource string
  4805. testiampermissionsrequest *TestIamPermissionsRequest
  4806. urlParams_ gensupport.URLParams
  4807. ctx_ context.Context
  4808. header_ http.Header
  4809. }
  4810. // TestIamPermissions: Returns permissions that a caller has on the
  4811. // specified resource.
  4812. // If the resource does not exist, this will return an empty set
  4813. // of
  4814. // permissions, not a NOT_FOUND error.
  4815. //
  4816. // Note: This operation is designed to be used for building
  4817. // permission-aware
  4818. // UIs and command-line tools, not for authorization checking. This
  4819. // operation
  4820. // may "fail open" without warning.
  4821. func (r *ProjectsLocationsDatasetsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsTestIamPermissionsCall {
  4822. c := &ProjectsLocationsDatasetsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4823. c.resource = resource
  4824. c.testiampermissionsrequest = testiampermissionsrequest
  4825. return c
  4826. }
  4827. // Fields allows partial responses to be retrieved. See
  4828. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4829. // for more information.
  4830. func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsTestIamPermissionsCall {
  4831. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4832. return c
  4833. }
  4834. // Context sets the context to be used in this call's Do method. Any
  4835. // pending HTTP request will be aborted if the provided context is
  4836. // canceled.
  4837. func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsTestIamPermissionsCall {
  4838. c.ctx_ = ctx
  4839. return c
  4840. }
  4841. // Header returns an http.Header that can be modified by the caller to
  4842. // add HTTP headers to the request.
  4843. func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Header() http.Header {
  4844. if c.header_ == nil {
  4845. c.header_ = make(http.Header)
  4846. }
  4847. return c.header_
  4848. }
  4849. func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  4850. reqHeaders := make(http.Header)
  4851. for k, v := range c.header_ {
  4852. reqHeaders[k] = v
  4853. }
  4854. reqHeaders.Set("User-Agent", c.s.userAgent())
  4855. var body io.Reader = nil
  4856. body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  4857. if err != nil {
  4858. return nil, err
  4859. }
  4860. reqHeaders.Set("Content-Type", "application/json")
  4861. c.urlParams_.Set("alt", alt)
  4862. c.urlParams_.Set("prettyPrint", "false")
  4863. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:testIamPermissions")
  4864. urls += "?" + c.urlParams_.Encode()
  4865. req, err := http.NewRequest("POST", urls, body)
  4866. if err != nil {
  4867. return nil, err
  4868. }
  4869. req.Header = reqHeaders
  4870. googleapi.Expand(req.URL, map[string]string{
  4871. "resource": c.resource,
  4872. })
  4873. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4874. }
  4875. // Do executes the "healthcare.projects.locations.datasets.testIamPermissions" call.
  4876. // Exactly one of *TestIamPermissionsResponse or error will be non-nil.
  4877. // Any non-2xx status code is an error. Response headers are in either
  4878. // *TestIamPermissionsResponse.ServerResponse.Header or (if a response
  4879. // was returned at all) in error.(*googleapi.Error).Header. Use
  4880. // googleapi.IsNotModified to check whether the returned error was
  4881. // because http.StatusNotModified was returned.
  4882. func (c *ProjectsLocationsDatasetsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  4883. gensupport.SetOptions(c.urlParams_, opts...)
  4884. res, err := c.doRequest("json")
  4885. if res != nil && res.StatusCode == http.StatusNotModified {
  4886. if res.Body != nil {
  4887. res.Body.Close()
  4888. }
  4889. return nil, &googleapi.Error{
  4890. Code: res.StatusCode,
  4891. Header: res.Header,
  4892. }
  4893. }
  4894. if err != nil {
  4895. return nil, err
  4896. }
  4897. defer googleapi.CloseBody(res)
  4898. if err := googleapi.CheckResponse(res); err != nil {
  4899. return nil, err
  4900. }
  4901. ret := &TestIamPermissionsResponse{
  4902. ServerResponse: googleapi.ServerResponse{
  4903. Header: res.Header,
  4904. HTTPStatusCode: res.StatusCode,
  4905. },
  4906. }
  4907. target := &ret
  4908. if err := gensupport.DecodeResponse(target, res); err != nil {
  4909. return nil, err
  4910. }
  4911. return ret, nil
  4912. // {
  4913. // "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.",
  4914. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}:testIamPermissions",
  4915. // "httpMethod": "POST",
  4916. // "id": "healthcare.projects.locations.datasets.testIamPermissions",
  4917. // "parameterOrder": [
  4918. // "resource"
  4919. // ],
  4920. // "parameters": {
  4921. // "resource": {
  4922. // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
  4923. // "location": "path",
  4924. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  4925. // "required": true,
  4926. // "type": "string"
  4927. // }
  4928. // },
  4929. // "path": "v1alpha2/{+resource}:testIamPermissions",
  4930. // "request": {
  4931. // "$ref": "TestIamPermissionsRequest"
  4932. // },
  4933. // "response": {
  4934. // "$ref": "TestIamPermissionsResponse"
  4935. // },
  4936. // "scopes": [
  4937. // "https://www.googleapis.com/auth/cloud-platform"
  4938. // ]
  4939. // }
  4940. }
  4941. // method id "healthcare.projects.locations.datasets.annotationStores.create":
  4942. type ProjectsLocationsDatasetsAnnotationStoresCreateCall struct {
  4943. s *Service
  4944. parent string
  4945. annotationstore *AnnotationStore
  4946. urlParams_ gensupport.URLParams
  4947. ctx_ context.Context
  4948. header_ http.Header
  4949. }
  4950. // Create: Creates a new Annotation store within the parent dataset.
  4951. func (r *ProjectsLocationsDatasetsAnnotationStoresService) Create(parent string, annotationstore *AnnotationStore) *ProjectsLocationsDatasetsAnnotationStoresCreateCall {
  4952. c := &ProjectsLocationsDatasetsAnnotationStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4953. c.parent = parent
  4954. c.annotationstore = annotationstore
  4955. return c
  4956. }
  4957. // AnnotationStoreId sets the optional parameter "annotationStoreId":
  4958. // The ID of the Annotation store that is being created.
  4959. // The string must match the following regex:
  4960. // `[\p{L}\p{N}_\-\.]{1,256}`.
  4961. func (c *ProjectsLocationsDatasetsAnnotationStoresCreateCall) AnnotationStoreId(annotationStoreId string) *ProjectsLocationsDatasetsAnnotationStoresCreateCall {
  4962. c.urlParams_.Set("annotationStoreId", annotationStoreId)
  4963. return c
  4964. }
  4965. // Fields allows partial responses to be retrieved. See
  4966. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4967. // for more information.
  4968. func (c *ProjectsLocationsDatasetsAnnotationStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresCreateCall {
  4969. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4970. return c
  4971. }
  4972. // Context sets the context to be used in this call's Do method. Any
  4973. // pending HTTP request will be aborted if the provided context is
  4974. // canceled.
  4975. func (c *ProjectsLocationsDatasetsAnnotationStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresCreateCall {
  4976. c.ctx_ = ctx
  4977. return c
  4978. }
  4979. // Header returns an http.Header that can be modified by the caller to
  4980. // add HTTP headers to the request.
  4981. func (c *ProjectsLocationsDatasetsAnnotationStoresCreateCall) Header() http.Header {
  4982. if c.header_ == nil {
  4983. c.header_ = make(http.Header)
  4984. }
  4985. return c.header_
  4986. }
  4987. func (c *ProjectsLocationsDatasetsAnnotationStoresCreateCall) doRequest(alt string) (*http.Response, error) {
  4988. reqHeaders := make(http.Header)
  4989. for k, v := range c.header_ {
  4990. reqHeaders[k] = v
  4991. }
  4992. reqHeaders.Set("User-Agent", c.s.userAgent())
  4993. var body io.Reader = nil
  4994. body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotationstore)
  4995. if err != nil {
  4996. return nil, err
  4997. }
  4998. reqHeaders.Set("Content-Type", "application/json")
  4999. c.urlParams_.Set("alt", alt)
  5000. c.urlParams_.Set("prettyPrint", "false")
  5001. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/annotationStores")
  5002. urls += "?" + c.urlParams_.Encode()
  5003. req, err := http.NewRequest("POST", urls, body)
  5004. if err != nil {
  5005. return nil, err
  5006. }
  5007. req.Header = reqHeaders
  5008. googleapi.Expand(req.URL, map[string]string{
  5009. "parent": c.parent,
  5010. })
  5011. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5012. }
  5013. // Do executes the "healthcare.projects.locations.datasets.annotationStores.create" call.
  5014. // Exactly one of *AnnotationStore or error will be non-nil. Any non-2xx
  5015. // status code is an error. Response headers are in either
  5016. // *AnnotationStore.ServerResponse.Header or (if a response was returned
  5017. // at all) in error.(*googleapi.Error).Header. Use
  5018. // googleapi.IsNotModified to check whether the returned error was
  5019. // because http.StatusNotModified was returned.
  5020. func (c *ProjectsLocationsDatasetsAnnotationStoresCreateCall) Do(opts ...googleapi.CallOption) (*AnnotationStore, error) {
  5021. gensupport.SetOptions(c.urlParams_, opts...)
  5022. res, err := c.doRequest("json")
  5023. if res != nil && res.StatusCode == http.StatusNotModified {
  5024. if res.Body != nil {
  5025. res.Body.Close()
  5026. }
  5027. return nil, &googleapi.Error{
  5028. Code: res.StatusCode,
  5029. Header: res.Header,
  5030. }
  5031. }
  5032. if err != nil {
  5033. return nil, err
  5034. }
  5035. defer googleapi.CloseBody(res)
  5036. if err := googleapi.CheckResponse(res); err != nil {
  5037. return nil, err
  5038. }
  5039. ret := &AnnotationStore{
  5040. ServerResponse: googleapi.ServerResponse{
  5041. Header: res.Header,
  5042. HTTPStatusCode: res.StatusCode,
  5043. },
  5044. }
  5045. target := &ret
  5046. if err := gensupport.DecodeResponse(target, res); err != nil {
  5047. return nil, err
  5048. }
  5049. return ret, nil
  5050. // {
  5051. // "description": "Creates a new Annotation store within the parent dataset.",
  5052. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores",
  5053. // "httpMethod": "POST",
  5054. // "id": "healthcare.projects.locations.datasets.annotationStores.create",
  5055. // "parameterOrder": [
  5056. // "parent"
  5057. // ],
  5058. // "parameters": {
  5059. // "annotationStoreId": {
  5060. // "description": "The ID of the Annotation store that is being created.\nThe string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.",
  5061. // "location": "query",
  5062. // "type": "string"
  5063. // },
  5064. // "parent": {
  5065. // "description": "The name of the dataset this Annotation store belongs to.",
  5066. // "location": "path",
  5067. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  5068. // "required": true,
  5069. // "type": "string"
  5070. // }
  5071. // },
  5072. // "path": "v1alpha2/{+parent}/annotationStores",
  5073. // "request": {
  5074. // "$ref": "AnnotationStore"
  5075. // },
  5076. // "response": {
  5077. // "$ref": "AnnotationStore"
  5078. // },
  5079. // "scopes": [
  5080. // "https://www.googleapis.com/auth/cloud-platform"
  5081. // ]
  5082. // }
  5083. }
  5084. // method id "healthcare.projects.locations.datasets.annotationStores.delete":
  5085. type ProjectsLocationsDatasetsAnnotationStoresDeleteCall struct {
  5086. s *Service
  5087. name string
  5088. urlParams_ gensupport.URLParams
  5089. ctx_ context.Context
  5090. header_ http.Header
  5091. }
  5092. // Delete: Deletes the specified Annotation store and removes all
  5093. // annotations that are
  5094. // contained within it.
  5095. func (r *ProjectsLocationsDatasetsAnnotationStoresService) Delete(name string) *ProjectsLocationsDatasetsAnnotationStoresDeleteCall {
  5096. c := &ProjectsLocationsDatasetsAnnotationStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5097. c.name = name
  5098. return c
  5099. }
  5100. // Fields allows partial responses to be retrieved. See
  5101. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5102. // for more information.
  5103. func (c *ProjectsLocationsDatasetsAnnotationStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresDeleteCall {
  5104. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5105. return c
  5106. }
  5107. // Context sets the context to be used in this call's Do method. Any
  5108. // pending HTTP request will be aborted if the provided context is
  5109. // canceled.
  5110. func (c *ProjectsLocationsDatasetsAnnotationStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresDeleteCall {
  5111. c.ctx_ = ctx
  5112. return c
  5113. }
  5114. // Header returns an http.Header that can be modified by the caller to
  5115. // add HTTP headers to the request.
  5116. func (c *ProjectsLocationsDatasetsAnnotationStoresDeleteCall) Header() http.Header {
  5117. if c.header_ == nil {
  5118. c.header_ = make(http.Header)
  5119. }
  5120. return c.header_
  5121. }
  5122. func (c *ProjectsLocationsDatasetsAnnotationStoresDeleteCall) doRequest(alt string) (*http.Response, error) {
  5123. reqHeaders := make(http.Header)
  5124. for k, v := range c.header_ {
  5125. reqHeaders[k] = v
  5126. }
  5127. reqHeaders.Set("User-Agent", c.s.userAgent())
  5128. var body io.Reader = nil
  5129. c.urlParams_.Set("alt", alt)
  5130. c.urlParams_.Set("prettyPrint", "false")
  5131. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  5132. urls += "?" + c.urlParams_.Encode()
  5133. req, err := http.NewRequest("DELETE", urls, body)
  5134. if err != nil {
  5135. return nil, err
  5136. }
  5137. req.Header = reqHeaders
  5138. googleapi.Expand(req.URL, map[string]string{
  5139. "name": c.name,
  5140. })
  5141. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5142. }
  5143. // Do executes the "healthcare.projects.locations.datasets.annotationStores.delete" call.
  5144. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  5145. // code is an error. Response headers are in either
  5146. // *Empty.ServerResponse.Header or (if a response was returned at all)
  5147. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5148. // check whether the returned error was because http.StatusNotModified
  5149. // was returned.
  5150. func (c *ProjectsLocationsDatasetsAnnotationStoresDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5151. gensupport.SetOptions(c.urlParams_, opts...)
  5152. res, err := c.doRequest("json")
  5153. if res != nil && res.StatusCode == http.StatusNotModified {
  5154. if res.Body != nil {
  5155. res.Body.Close()
  5156. }
  5157. return nil, &googleapi.Error{
  5158. Code: res.StatusCode,
  5159. Header: res.Header,
  5160. }
  5161. }
  5162. if err != nil {
  5163. return nil, err
  5164. }
  5165. defer googleapi.CloseBody(res)
  5166. if err := googleapi.CheckResponse(res); err != nil {
  5167. return nil, err
  5168. }
  5169. ret := &Empty{
  5170. ServerResponse: googleapi.ServerResponse{
  5171. Header: res.Header,
  5172. HTTPStatusCode: res.StatusCode,
  5173. },
  5174. }
  5175. target := &ret
  5176. if err := gensupport.DecodeResponse(target, res); err != nil {
  5177. return nil, err
  5178. }
  5179. return ret, nil
  5180. // {
  5181. // "description": "Deletes the specified Annotation store and removes all annotations that are\ncontained within it.",
  5182. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}",
  5183. // "httpMethod": "DELETE",
  5184. // "id": "healthcare.projects.locations.datasets.annotationStores.delete",
  5185. // "parameterOrder": [
  5186. // "name"
  5187. // ],
  5188. // "parameters": {
  5189. // "name": {
  5190. // "description": "The resource name of the Annotation store to delete.",
  5191. // "location": "path",
  5192. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$",
  5193. // "required": true,
  5194. // "type": "string"
  5195. // }
  5196. // },
  5197. // "path": "v1alpha2/{+name}",
  5198. // "response": {
  5199. // "$ref": "Empty"
  5200. // },
  5201. // "scopes": [
  5202. // "https://www.googleapis.com/auth/cloud-platform"
  5203. // ]
  5204. // }
  5205. }
  5206. // method id "healthcare.projects.locations.datasets.annotationStores.export":
  5207. type ProjectsLocationsDatasetsAnnotationStoresExportCall struct {
  5208. s *Service
  5209. annotationStore string
  5210. exportannotationsrequest *ExportAnnotationsRequest
  5211. urlParams_ gensupport.URLParams
  5212. ctx_ context.Context
  5213. header_ http.Header
  5214. }
  5215. // Export: Export
  5216. // Annotations from
  5217. // the Annotation
  5218. // store.
  5219. // Errors are noted in the error
  5220. // field. Otherwise, a detailed response is returned of
  5221. // type
  5222. // ExportAnnotationsResponse, contained in the
  5223. // response field when the
  5224. // operation finishes. The metadata
  5225. // field type is OperationMetadata.
  5226. func (r *ProjectsLocationsDatasetsAnnotationStoresService) Export(annotationStore string, exportannotationsrequest *ExportAnnotationsRequest) *ProjectsLocationsDatasetsAnnotationStoresExportCall {
  5227. c := &ProjectsLocationsDatasetsAnnotationStoresExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5228. c.annotationStore = annotationStore
  5229. c.exportannotationsrequest = exportannotationsrequest
  5230. return c
  5231. }
  5232. // Fields allows partial responses to be retrieved. See
  5233. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5234. // for more information.
  5235. func (c *ProjectsLocationsDatasetsAnnotationStoresExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresExportCall {
  5236. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5237. return c
  5238. }
  5239. // Context sets the context to be used in this call's Do method. Any
  5240. // pending HTTP request will be aborted if the provided context is
  5241. // canceled.
  5242. func (c *ProjectsLocationsDatasetsAnnotationStoresExportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresExportCall {
  5243. c.ctx_ = ctx
  5244. return c
  5245. }
  5246. // Header returns an http.Header that can be modified by the caller to
  5247. // add HTTP headers to the request.
  5248. func (c *ProjectsLocationsDatasetsAnnotationStoresExportCall) Header() http.Header {
  5249. if c.header_ == nil {
  5250. c.header_ = make(http.Header)
  5251. }
  5252. return c.header_
  5253. }
  5254. func (c *ProjectsLocationsDatasetsAnnotationStoresExportCall) doRequest(alt string) (*http.Response, error) {
  5255. reqHeaders := make(http.Header)
  5256. for k, v := range c.header_ {
  5257. reqHeaders[k] = v
  5258. }
  5259. reqHeaders.Set("User-Agent", c.s.userAgent())
  5260. var body io.Reader = nil
  5261. body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportannotationsrequest)
  5262. if err != nil {
  5263. return nil, err
  5264. }
  5265. reqHeaders.Set("Content-Type", "application/json")
  5266. c.urlParams_.Set("alt", alt)
  5267. c.urlParams_.Set("prettyPrint", "false")
  5268. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+annotationStore}:export")
  5269. urls += "?" + c.urlParams_.Encode()
  5270. req, err := http.NewRequest("POST", urls, body)
  5271. if err != nil {
  5272. return nil, err
  5273. }
  5274. req.Header = reqHeaders
  5275. googleapi.Expand(req.URL, map[string]string{
  5276. "annotationStore": c.annotationStore,
  5277. })
  5278. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5279. }
  5280. // Do executes the "healthcare.projects.locations.datasets.annotationStores.export" call.
  5281. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  5282. // status code is an error. Response headers are in either
  5283. // *Operation.ServerResponse.Header or (if a response was returned at
  5284. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5285. // to check whether the returned error was because
  5286. // http.StatusNotModified was returned.
  5287. func (c *ProjectsLocationsDatasetsAnnotationStoresExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5288. gensupport.SetOptions(c.urlParams_, opts...)
  5289. res, err := c.doRequest("json")
  5290. if res != nil && res.StatusCode == http.StatusNotModified {
  5291. if res.Body != nil {
  5292. res.Body.Close()
  5293. }
  5294. return nil, &googleapi.Error{
  5295. Code: res.StatusCode,
  5296. Header: res.Header,
  5297. }
  5298. }
  5299. if err != nil {
  5300. return nil, err
  5301. }
  5302. defer googleapi.CloseBody(res)
  5303. if err := googleapi.CheckResponse(res); err != nil {
  5304. return nil, err
  5305. }
  5306. ret := &Operation{
  5307. ServerResponse: googleapi.ServerResponse{
  5308. Header: res.Header,
  5309. HTTPStatusCode: res.StatusCode,
  5310. },
  5311. }
  5312. target := &ret
  5313. if err := gensupport.DecodeResponse(target, res); err != nil {
  5314. return nil, err
  5315. }
  5316. return ret, nil
  5317. // {
  5318. // "description": "Export\nAnnotations from\nthe Annotation\nstore.\nErrors are noted in the error\nfield. Otherwise, a detailed response is returned of type\nExportAnnotationsResponse, contained in the\nresponse field when the\noperation finishes. The metadata\nfield type is OperationMetadata.",
  5319. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}:export",
  5320. // "httpMethod": "POST",
  5321. // "id": "healthcare.projects.locations.datasets.annotationStores.export",
  5322. // "parameterOrder": [
  5323. // "annotationStore"
  5324. // ],
  5325. // "parameters": {
  5326. // "annotationStore": {
  5327. // "description": "The Annotation store name to export annotations to. The name should be in\nthe format\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}`.",
  5328. // "location": "path",
  5329. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$",
  5330. // "required": true,
  5331. // "type": "string"
  5332. // }
  5333. // },
  5334. // "path": "v1alpha2/{+annotationStore}:export",
  5335. // "request": {
  5336. // "$ref": "ExportAnnotationsRequest"
  5337. // },
  5338. // "response": {
  5339. // "$ref": "Operation"
  5340. // },
  5341. // "scopes": [
  5342. // "https://www.googleapis.com/auth/cloud-platform"
  5343. // ]
  5344. // }
  5345. }
  5346. // method id "healthcare.projects.locations.datasets.annotationStores.get":
  5347. type ProjectsLocationsDatasetsAnnotationStoresGetCall struct {
  5348. s *Service
  5349. name string
  5350. urlParams_ gensupport.URLParams
  5351. ifNoneMatch_ string
  5352. ctx_ context.Context
  5353. header_ http.Header
  5354. }
  5355. // Get: Gets the specified Annotation store or returns NOT_FOUND if it
  5356. // does not
  5357. // exist.
  5358. func (r *ProjectsLocationsDatasetsAnnotationStoresService) Get(name string) *ProjectsLocationsDatasetsAnnotationStoresGetCall {
  5359. c := &ProjectsLocationsDatasetsAnnotationStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5360. c.name = name
  5361. return c
  5362. }
  5363. // Fields allows partial responses to be retrieved. See
  5364. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5365. // for more information.
  5366. func (c *ProjectsLocationsDatasetsAnnotationStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresGetCall {
  5367. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5368. return c
  5369. }
  5370. // IfNoneMatch sets the optional parameter which makes the operation
  5371. // fail if the object's ETag matches the given value. This is useful for
  5372. // getting updates only after the object has changed since the last
  5373. // request. Use googleapi.IsNotModified to check whether the response
  5374. // error from Do is the result of In-None-Match.
  5375. func (c *ProjectsLocationsDatasetsAnnotationStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsAnnotationStoresGetCall {
  5376. c.ifNoneMatch_ = entityTag
  5377. return c
  5378. }
  5379. // Context sets the context to be used in this call's Do method. Any
  5380. // pending HTTP request will be aborted if the provided context is
  5381. // canceled.
  5382. func (c *ProjectsLocationsDatasetsAnnotationStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresGetCall {
  5383. c.ctx_ = ctx
  5384. return c
  5385. }
  5386. // Header returns an http.Header that can be modified by the caller to
  5387. // add HTTP headers to the request.
  5388. func (c *ProjectsLocationsDatasetsAnnotationStoresGetCall) Header() http.Header {
  5389. if c.header_ == nil {
  5390. c.header_ = make(http.Header)
  5391. }
  5392. return c.header_
  5393. }
  5394. func (c *ProjectsLocationsDatasetsAnnotationStoresGetCall) doRequest(alt string) (*http.Response, error) {
  5395. reqHeaders := make(http.Header)
  5396. for k, v := range c.header_ {
  5397. reqHeaders[k] = v
  5398. }
  5399. reqHeaders.Set("User-Agent", c.s.userAgent())
  5400. if c.ifNoneMatch_ != "" {
  5401. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5402. }
  5403. var body io.Reader = nil
  5404. c.urlParams_.Set("alt", alt)
  5405. c.urlParams_.Set("prettyPrint", "false")
  5406. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  5407. urls += "?" + c.urlParams_.Encode()
  5408. req, err := http.NewRequest("GET", urls, body)
  5409. if err != nil {
  5410. return nil, err
  5411. }
  5412. req.Header = reqHeaders
  5413. googleapi.Expand(req.URL, map[string]string{
  5414. "name": c.name,
  5415. })
  5416. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5417. }
  5418. // Do executes the "healthcare.projects.locations.datasets.annotationStores.get" call.
  5419. // Exactly one of *AnnotationStore or error will be non-nil. Any non-2xx
  5420. // status code is an error. Response headers are in either
  5421. // *AnnotationStore.ServerResponse.Header or (if a response was returned
  5422. // at all) in error.(*googleapi.Error).Header. Use
  5423. // googleapi.IsNotModified to check whether the returned error was
  5424. // because http.StatusNotModified was returned.
  5425. func (c *ProjectsLocationsDatasetsAnnotationStoresGetCall) Do(opts ...googleapi.CallOption) (*AnnotationStore, error) {
  5426. gensupport.SetOptions(c.urlParams_, opts...)
  5427. res, err := c.doRequest("json")
  5428. if res != nil && res.StatusCode == http.StatusNotModified {
  5429. if res.Body != nil {
  5430. res.Body.Close()
  5431. }
  5432. return nil, &googleapi.Error{
  5433. Code: res.StatusCode,
  5434. Header: res.Header,
  5435. }
  5436. }
  5437. if err != nil {
  5438. return nil, err
  5439. }
  5440. defer googleapi.CloseBody(res)
  5441. if err := googleapi.CheckResponse(res); err != nil {
  5442. return nil, err
  5443. }
  5444. ret := &AnnotationStore{
  5445. ServerResponse: googleapi.ServerResponse{
  5446. Header: res.Header,
  5447. HTTPStatusCode: res.StatusCode,
  5448. },
  5449. }
  5450. target := &ret
  5451. if err := gensupport.DecodeResponse(target, res); err != nil {
  5452. return nil, err
  5453. }
  5454. return ret, nil
  5455. // {
  5456. // "description": "Gets the specified Annotation store or returns NOT_FOUND if it does not\nexist.",
  5457. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}",
  5458. // "httpMethod": "GET",
  5459. // "id": "healthcare.projects.locations.datasets.annotationStores.get",
  5460. // "parameterOrder": [
  5461. // "name"
  5462. // ],
  5463. // "parameters": {
  5464. // "name": {
  5465. // "description": "The resource name of the Annotation store to get.",
  5466. // "location": "path",
  5467. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$",
  5468. // "required": true,
  5469. // "type": "string"
  5470. // }
  5471. // },
  5472. // "path": "v1alpha2/{+name}",
  5473. // "response": {
  5474. // "$ref": "AnnotationStore"
  5475. // },
  5476. // "scopes": [
  5477. // "https://www.googleapis.com/auth/cloud-platform"
  5478. // ]
  5479. // }
  5480. }
  5481. // method id "healthcare.projects.locations.datasets.annotationStores.getIamPolicy":
  5482. type ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall struct {
  5483. s *Service
  5484. resource string
  5485. getiampolicyrequest *GetIamPolicyRequest
  5486. urlParams_ gensupport.URLParams
  5487. ctx_ context.Context
  5488. header_ http.Header
  5489. }
  5490. // GetIamPolicy: Gets the access control policy for a resource. Returns
  5491. // NOT_FOUND error if
  5492. // the resource does not exist. Returns an empty policy if the resource
  5493. // exists
  5494. // but does not have a policy set.
  5495. //
  5496. // Authorization requires the Google IAM
  5497. // permission
  5498. // `healthcare.AnnotationStores.getIamPolicy` on the specified resource
  5499. func (r *ProjectsLocationsDatasetsAnnotationStoresService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall {
  5500. c := &ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5501. c.resource = resource
  5502. c.getiampolicyrequest = getiampolicyrequest
  5503. return c
  5504. }
  5505. // Fields allows partial responses to be retrieved. See
  5506. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5507. // for more information.
  5508. func (c *ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall {
  5509. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5510. return c
  5511. }
  5512. // Context sets the context to be used in this call's Do method. Any
  5513. // pending HTTP request will be aborted if the provided context is
  5514. // canceled.
  5515. func (c *ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall {
  5516. c.ctx_ = ctx
  5517. return c
  5518. }
  5519. // Header returns an http.Header that can be modified by the caller to
  5520. // add HTTP headers to the request.
  5521. func (c *ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall) Header() http.Header {
  5522. if c.header_ == nil {
  5523. c.header_ = make(http.Header)
  5524. }
  5525. return c.header_
  5526. }
  5527. func (c *ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  5528. reqHeaders := make(http.Header)
  5529. for k, v := range c.header_ {
  5530. reqHeaders[k] = v
  5531. }
  5532. reqHeaders.Set("User-Agent", c.s.userAgent())
  5533. var body io.Reader = nil
  5534. body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
  5535. if err != nil {
  5536. return nil, err
  5537. }
  5538. reqHeaders.Set("Content-Type", "application/json")
  5539. c.urlParams_.Set("alt", alt)
  5540. c.urlParams_.Set("prettyPrint", "false")
  5541. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:getIamPolicy")
  5542. urls += "?" + c.urlParams_.Encode()
  5543. req, err := http.NewRequest("POST", urls, body)
  5544. if err != nil {
  5545. return nil, err
  5546. }
  5547. req.Header = reqHeaders
  5548. googleapi.Expand(req.URL, map[string]string{
  5549. "resource": c.resource,
  5550. })
  5551. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5552. }
  5553. // Do executes the "healthcare.projects.locations.datasets.annotationStores.getIamPolicy" call.
  5554. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  5555. // code is an error. Response headers are in either
  5556. // *Policy.ServerResponse.Header or (if a response was returned at all)
  5557. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5558. // check whether the returned error was because http.StatusNotModified
  5559. // was returned.
  5560. func (c *ProjectsLocationsDatasetsAnnotationStoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  5561. gensupport.SetOptions(c.urlParams_, opts...)
  5562. res, err := c.doRequest("json")
  5563. if res != nil && res.StatusCode == http.StatusNotModified {
  5564. if res.Body != nil {
  5565. res.Body.Close()
  5566. }
  5567. return nil, &googleapi.Error{
  5568. Code: res.StatusCode,
  5569. Header: res.Header,
  5570. }
  5571. }
  5572. if err != nil {
  5573. return nil, err
  5574. }
  5575. defer googleapi.CloseBody(res)
  5576. if err := googleapi.CheckResponse(res); err != nil {
  5577. return nil, err
  5578. }
  5579. ret := &Policy{
  5580. ServerResponse: googleapi.ServerResponse{
  5581. Header: res.Header,
  5582. HTTPStatusCode: res.StatusCode,
  5583. },
  5584. }
  5585. target := &ret
  5586. if err := gensupport.DecodeResponse(target, res); err != nil {
  5587. return nil, err
  5588. }
  5589. return ret, nil
  5590. // {
  5591. // "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",
  5592. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}:getIamPolicy",
  5593. // "httpMethod": "POST",
  5594. // "id": "healthcare.projects.locations.datasets.annotationStores.getIamPolicy",
  5595. // "parameterOrder": [
  5596. // "resource"
  5597. // ],
  5598. // "parameters": {
  5599. // "resource": {
  5600. // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
  5601. // "location": "path",
  5602. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$",
  5603. // "required": true,
  5604. // "type": "string"
  5605. // }
  5606. // },
  5607. // "path": "v1alpha2/{+resource}:getIamPolicy",
  5608. // "request": {
  5609. // "$ref": "GetIamPolicyRequest"
  5610. // },
  5611. // "response": {
  5612. // "$ref": "Policy"
  5613. // },
  5614. // "scopes": [
  5615. // "https://www.googleapis.com/auth/cloud-platform"
  5616. // ]
  5617. // }
  5618. }
  5619. // method id "healthcare.projects.locations.datasets.annotationStores.list":
  5620. type ProjectsLocationsDatasetsAnnotationStoresListCall struct {
  5621. s *Service
  5622. parent string
  5623. urlParams_ gensupport.URLParams
  5624. ifNoneMatch_ string
  5625. ctx_ context.Context
  5626. header_ http.Header
  5627. }
  5628. // List: Lists the Annotation stores in the given dataset for a source
  5629. // store.
  5630. func (r *ProjectsLocationsDatasetsAnnotationStoresService) List(parent string) *ProjectsLocationsDatasetsAnnotationStoresListCall {
  5631. c := &ProjectsLocationsDatasetsAnnotationStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5632. c.parent = parent
  5633. return c
  5634. }
  5635. // Filter sets the optional parameter "filter": Restricts stores
  5636. // returned to those matching a filter.
  5637. // Syntax:
  5638. // https://cloud.google.com/appengine/docs/standard/python/search
  5639. // /query_strings
  5640. // Only filtering on labels is supported, for example
  5641. // `labels.key=value`.
  5642. func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) Filter(filter string) *ProjectsLocationsDatasetsAnnotationStoresListCall {
  5643. c.urlParams_.Set("filter", filter)
  5644. return c
  5645. }
  5646. // PageSize sets the optional parameter "pageSize": Limit on the number
  5647. // of Annotation stores to return in a single response.
  5648. // If zero the default page size of 100 is used.
  5649. func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsAnnotationStoresListCall {
  5650. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5651. return c
  5652. }
  5653. // PageToken sets the optional parameter "pageToken": The
  5654. // next_page_token value returned from the previous List request, if
  5655. // any.
  5656. func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsAnnotationStoresListCall {
  5657. c.urlParams_.Set("pageToken", pageToken)
  5658. return c
  5659. }
  5660. // Fields allows partial responses to be retrieved. See
  5661. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5662. // for more information.
  5663. func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresListCall {
  5664. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5665. return c
  5666. }
  5667. // IfNoneMatch sets the optional parameter which makes the operation
  5668. // fail if the object's ETag matches the given value. This is useful for
  5669. // getting updates only after the object has changed since the last
  5670. // request. Use googleapi.IsNotModified to check whether the response
  5671. // error from Do is the result of In-None-Match.
  5672. func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsAnnotationStoresListCall {
  5673. c.ifNoneMatch_ = entityTag
  5674. return c
  5675. }
  5676. // Context sets the context to be used in this call's Do method. Any
  5677. // pending HTTP request will be aborted if the provided context is
  5678. // canceled.
  5679. func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresListCall {
  5680. c.ctx_ = ctx
  5681. return c
  5682. }
  5683. // Header returns an http.Header that can be modified by the caller to
  5684. // add HTTP headers to the request.
  5685. func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) Header() http.Header {
  5686. if c.header_ == nil {
  5687. c.header_ = make(http.Header)
  5688. }
  5689. return c.header_
  5690. }
  5691. func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) doRequest(alt string) (*http.Response, error) {
  5692. reqHeaders := make(http.Header)
  5693. for k, v := range c.header_ {
  5694. reqHeaders[k] = v
  5695. }
  5696. reqHeaders.Set("User-Agent", c.s.userAgent())
  5697. if c.ifNoneMatch_ != "" {
  5698. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5699. }
  5700. var body io.Reader = nil
  5701. c.urlParams_.Set("alt", alt)
  5702. c.urlParams_.Set("prettyPrint", "false")
  5703. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/annotationStores")
  5704. urls += "?" + c.urlParams_.Encode()
  5705. req, err := http.NewRequest("GET", urls, body)
  5706. if err != nil {
  5707. return nil, err
  5708. }
  5709. req.Header = reqHeaders
  5710. googleapi.Expand(req.URL, map[string]string{
  5711. "parent": c.parent,
  5712. })
  5713. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5714. }
  5715. // Do executes the "healthcare.projects.locations.datasets.annotationStores.list" call.
  5716. // Exactly one of *ListAnnotationStoresResponse or error will be
  5717. // non-nil. Any non-2xx status code is an error. Response headers are in
  5718. // either *ListAnnotationStoresResponse.ServerResponse.Header or (if a
  5719. // response was returned at all) in error.(*googleapi.Error).Header. Use
  5720. // googleapi.IsNotModified to check whether the returned error was
  5721. // because http.StatusNotModified was returned.
  5722. func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) Do(opts ...googleapi.CallOption) (*ListAnnotationStoresResponse, error) {
  5723. gensupport.SetOptions(c.urlParams_, opts...)
  5724. res, err := c.doRequest("json")
  5725. if res != nil && res.StatusCode == http.StatusNotModified {
  5726. if res.Body != nil {
  5727. res.Body.Close()
  5728. }
  5729. return nil, &googleapi.Error{
  5730. Code: res.StatusCode,
  5731. Header: res.Header,
  5732. }
  5733. }
  5734. if err != nil {
  5735. return nil, err
  5736. }
  5737. defer googleapi.CloseBody(res)
  5738. if err := googleapi.CheckResponse(res); err != nil {
  5739. return nil, err
  5740. }
  5741. ret := &ListAnnotationStoresResponse{
  5742. ServerResponse: googleapi.ServerResponse{
  5743. Header: res.Header,
  5744. HTTPStatusCode: res.StatusCode,
  5745. },
  5746. }
  5747. target := &ret
  5748. if err := gensupport.DecodeResponse(target, res); err != nil {
  5749. return nil, err
  5750. }
  5751. return ret, nil
  5752. // {
  5753. // "description": "Lists the Annotation stores in the given dataset for a source store.",
  5754. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores",
  5755. // "httpMethod": "GET",
  5756. // "id": "healthcare.projects.locations.datasets.annotationStores.list",
  5757. // "parameterOrder": [
  5758. // "parent"
  5759. // ],
  5760. // "parameters": {
  5761. // "filter": {
  5762. // "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`.",
  5763. // "location": "query",
  5764. // "type": "string"
  5765. // },
  5766. // "pageSize": {
  5767. // "description": "Limit on the number of Annotation stores to return in a single response.\nIf zero the default page size of 100 is used.",
  5768. // "format": "int32",
  5769. // "location": "query",
  5770. // "type": "integer"
  5771. // },
  5772. // "pageToken": {
  5773. // "description": "The next_page_token value returned from the previous List request, if any.",
  5774. // "location": "query",
  5775. // "type": "string"
  5776. // },
  5777. // "parent": {
  5778. // "description": "Name of the dataset.",
  5779. // "location": "path",
  5780. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  5781. // "required": true,
  5782. // "type": "string"
  5783. // }
  5784. // },
  5785. // "path": "v1alpha2/{+parent}/annotationStores",
  5786. // "response": {
  5787. // "$ref": "ListAnnotationStoresResponse"
  5788. // },
  5789. // "scopes": [
  5790. // "https://www.googleapis.com/auth/cloud-platform"
  5791. // ]
  5792. // }
  5793. }
  5794. // Pages invokes f for each page of results.
  5795. // A non-nil error returned from f will halt the iteration.
  5796. // The provided context supersedes any context provided to the Context method.
  5797. func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) Pages(ctx context.Context, f func(*ListAnnotationStoresResponse) error) error {
  5798. c.ctx_ = ctx
  5799. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5800. for {
  5801. x, err := c.Do()
  5802. if err != nil {
  5803. return err
  5804. }
  5805. if err := f(x); err != nil {
  5806. return err
  5807. }
  5808. if x.NextPageToken == "" {
  5809. return nil
  5810. }
  5811. c.PageToken(x.NextPageToken)
  5812. }
  5813. }
  5814. // method id "healthcare.projects.locations.datasets.annotationStores.patch":
  5815. type ProjectsLocationsDatasetsAnnotationStoresPatchCall struct {
  5816. s *Service
  5817. name string
  5818. annotationstore *AnnotationStore
  5819. urlParams_ gensupport.URLParams
  5820. ctx_ context.Context
  5821. header_ http.Header
  5822. }
  5823. // Patch: Updates the specified Annotation store.
  5824. func (r *ProjectsLocationsDatasetsAnnotationStoresService) Patch(name string, annotationstore *AnnotationStore) *ProjectsLocationsDatasetsAnnotationStoresPatchCall {
  5825. c := &ProjectsLocationsDatasetsAnnotationStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5826. c.name = name
  5827. c.annotationstore = annotationstore
  5828. return c
  5829. }
  5830. // UpdateMask sets the optional parameter "updateMask": The update mask
  5831. // applies to the resource. For the `FieldMask`
  5832. // definition,
  5833. // see
  5834. // https://developers.google.com/protocol-buffers/docs/re
  5835. // ference/google.protobuf#fieldmask
  5836. func (c *ProjectsLocationsDatasetsAnnotationStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsAnnotationStoresPatchCall {
  5837. c.urlParams_.Set("updateMask", updateMask)
  5838. return c
  5839. }
  5840. // Fields allows partial responses to be retrieved. See
  5841. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5842. // for more information.
  5843. func (c *ProjectsLocationsDatasetsAnnotationStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresPatchCall {
  5844. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5845. return c
  5846. }
  5847. // Context sets the context to be used in this call's Do method. Any
  5848. // pending HTTP request will be aborted if the provided context is
  5849. // canceled.
  5850. func (c *ProjectsLocationsDatasetsAnnotationStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresPatchCall {
  5851. c.ctx_ = ctx
  5852. return c
  5853. }
  5854. // Header returns an http.Header that can be modified by the caller to
  5855. // add HTTP headers to the request.
  5856. func (c *ProjectsLocationsDatasetsAnnotationStoresPatchCall) Header() http.Header {
  5857. if c.header_ == nil {
  5858. c.header_ = make(http.Header)
  5859. }
  5860. return c.header_
  5861. }
  5862. func (c *ProjectsLocationsDatasetsAnnotationStoresPatchCall) doRequest(alt string) (*http.Response, error) {
  5863. reqHeaders := make(http.Header)
  5864. for k, v := range c.header_ {
  5865. reqHeaders[k] = v
  5866. }
  5867. reqHeaders.Set("User-Agent", c.s.userAgent())
  5868. var body io.Reader = nil
  5869. body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotationstore)
  5870. if err != nil {
  5871. return nil, err
  5872. }
  5873. reqHeaders.Set("Content-Type", "application/json")
  5874. c.urlParams_.Set("alt", alt)
  5875. c.urlParams_.Set("prettyPrint", "false")
  5876. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  5877. urls += "?" + c.urlParams_.Encode()
  5878. req, err := http.NewRequest("PATCH", urls, body)
  5879. if err != nil {
  5880. return nil, err
  5881. }
  5882. req.Header = reqHeaders
  5883. googleapi.Expand(req.URL, map[string]string{
  5884. "name": c.name,
  5885. })
  5886. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5887. }
  5888. // Do executes the "healthcare.projects.locations.datasets.annotationStores.patch" call.
  5889. // Exactly one of *AnnotationStore or error will be non-nil. Any non-2xx
  5890. // status code is an error. Response headers are in either
  5891. // *AnnotationStore.ServerResponse.Header or (if a response was returned
  5892. // at all) in error.(*googleapi.Error).Header. Use
  5893. // googleapi.IsNotModified to check whether the returned error was
  5894. // because http.StatusNotModified was returned.
  5895. func (c *ProjectsLocationsDatasetsAnnotationStoresPatchCall) Do(opts ...googleapi.CallOption) (*AnnotationStore, error) {
  5896. gensupport.SetOptions(c.urlParams_, opts...)
  5897. res, err := c.doRequest("json")
  5898. if res != nil && res.StatusCode == http.StatusNotModified {
  5899. if res.Body != nil {
  5900. res.Body.Close()
  5901. }
  5902. return nil, &googleapi.Error{
  5903. Code: res.StatusCode,
  5904. Header: res.Header,
  5905. }
  5906. }
  5907. if err != nil {
  5908. return nil, err
  5909. }
  5910. defer googleapi.CloseBody(res)
  5911. if err := googleapi.CheckResponse(res); err != nil {
  5912. return nil, err
  5913. }
  5914. ret := &AnnotationStore{
  5915. ServerResponse: googleapi.ServerResponse{
  5916. Header: res.Header,
  5917. HTTPStatusCode: res.StatusCode,
  5918. },
  5919. }
  5920. target := &ret
  5921. if err := gensupport.DecodeResponse(target, res); err != nil {
  5922. return nil, err
  5923. }
  5924. return ret, nil
  5925. // {
  5926. // "description": "Updates the specified Annotation store.",
  5927. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}",
  5928. // "httpMethod": "PATCH",
  5929. // "id": "healthcare.projects.locations.datasets.annotationStores.patch",
  5930. // "parameterOrder": [
  5931. // "name"
  5932. // ],
  5933. // "parameters": {
  5934. // "name": {
  5935. // "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}`.",
  5936. // "location": "path",
  5937. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$",
  5938. // "required": true,
  5939. // "type": "string"
  5940. // },
  5941. // "updateMask": {
  5942. // "description": "The update mask applies to the resource. For the `FieldMask` definition,\nsee\nhttps://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask",
  5943. // "format": "google-fieldmask",
  5944. // "location": "query",
  5945. // "type": "string"
  5946. // }
  5947. // },
  5948. // "path": "v1alpha2/{+name}",
  5949. // "request": {
  5950. // "$ref": "AnnotationStore"
  5951. // },
  5952. // "response": {
  5953. // "$ref": "AnnotationStore"
  5954. // },
  5955. // "scopes": [
  5956. // "https://www.googleapis.com/auth/cloud-platform"
  5957. // ]
  5958. // }
  5959. }
  5960. // method id "healthcare.projects.locations.datasets.annotationStores.setIamPolicy":
  5961. type ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall struct {
  5962. s *Service
  5963. resource string
  5964. setiampolicyrequest *SetIamPolicyRequest
  5965. urlParams_ gensupport.URLParams
  5966. ctx_ context.Context
  5967. header_ http.Header
  5968. }
  5969. // SetIamPolicy: POLICIES
  5970. // Sets the access control policy for a resource. Replaces any
  5971. // existing
  5972. // policy.
  5973. //
  5974. // Authorization requires the Google IAM
  5975. // permission
  5976. // 'healthcare.annotationStores.setIamPolicy' on the specified resource
  5977. func (r *ProjectsLocationsDatasetsAnnotationStoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall {
  5978. c := &ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5979. c.resource = resource
  5980. c.setiampolicyrequest = setiampolicyrequest
  5981. return c
  5982. }
  5983. // Fields allows partial responses to be retrieved. See
  5984. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5985. // for more information.
  5986. func (c *ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall {
  5987. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5988. return c
  5989. }
  5990. // Context sets the context to be used in this call's Do method. Any
  5991. // pending HTTP request will be aborted if the provided context is
  5992. // canceled.
  5993. func (c *ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall {
  5994. c.ctx_ = ctx
  5995. return c
  5996. }
  5997. // Header returns an http.Header that can be modified by the caller to
  5998. // add HTTP headers to the request.
  5999. func (c *ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall) Header() http.Header {
  6000. if c.header_ == nil {
  6001. c.header_ = make(http.Header)
  6002. }
  6003. return c.header_
  6004. }
  6005. func (c *ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  6006. reqHeaders := make(http.Header)
  6007. for k, v := range c.header_ {
  6008. reqHeaders[k] = v
  6009. }
  6010. reqHeaders.Set("User-Agent", c.s.userAgent())
  6011. var body io.Reader = nil
  6012. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  6013. if err != nil {
  6014. return nil, err
  6015. }
  6016. reqHeaders.Set("Content-Type", "application/json")
  6017. c.urlParams_.Set("alt", alt)
  6018. c.urlParams_.Set("prettyPrint", "false")
  6019. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:setIamPolicy")
  6020. urls += "?" + c.urlParams_.Encode()
  6021. req, err := http.NewRequest("POST", urls, body)
  6022. if err != nil {
  6023. return nil, err
  6024. }
  6025. req.Header = reqHeaders
  6026. googleapi.Expand(req.URL, map[string]string{
  6027. "resource": c.resource,
  6028. })
  6029. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6030. }
  6031. // Do executes the "healthcare.projects.locations.datasets.annotationStores.setIamPolicy" call.
  6032. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  6033. // code is an error. Response headers are in either
  6034. // *Policy.ServerResponse.Header or (if a response was returned at all)
  6035. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6036. // check whether the returned error was because http.StatusNotModified
  6037. // was returned.
  6038. func (c *ProjectsLocationsDatasetsAnnotationStoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  6039. gensupport.SetOptions(c.urlParams_, opts...)
  6040. res, err := c.doRequest("json")
  6041. if res != nil && res.StatusCode == http.StatusNotModified {
  6042. if res.Body != nil {
  6043. res.Body.Close()
  6044. }
  6045. return nil, &googleapi.Error{
  6046. Code: res.StatusCode,
  6047. Header: res.Header,
  6048. }
  6049. }
  6050. if err != nil {
  6051. return nil, err
  6052. }
  6053. defer googleapi.CloseBody(res)
  6054. if err := googleapi.CheckResponse(res); err != nil {
  6055. return nil, err
  6056. }
  6057. ret := &Policy{
  6058. ServerResponse: googleapi.ServerResponse{
  6059. Header: res.Header,
  6060. HTTPStatusCode: res.StatusCode,
  6061. },
  6062. }
  6063. target := &ret
  6064. if err := gensupport.DecodeResponse(target, res); err != nil {
  6065. return nil, err
  6066. }
  6067. return ret, nil
  6068. // {
  6069. // "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",
  6070. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}:setIamPolicy",
  6071. // "httpMethod": "POST",
  6072. // "id": "healthcare.projects.locations.datasets.annotationStores.setIamPolicy",
  6073. // "parameterOrder": [
  6074. // "resource"
  6075. // ],
  6076. // "parameters": {
  6077. // "resource": {
  6078. // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
  6079. // "location": "path",
  6080. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$",
  6081. // "required": true,
  6082. // "type": "string"
  6083. // }
  6084. // },
  6085. // "path": "v1alpha2/{+resource}:setIamPolicy",
  6086. // "request": {
  6087. // "$ref": "SetIamPolicyRequest"
  6088. // },
  6089. // "response": {
  6090. // "$ref": "Policy"
  6091. // },
  6092. // "scopes": [
  6093. // "https://www.googleapis.com/auth/cloud-platform"
  6094. // ]
  6095. // }
  6096. }
  6097. // method id "healthcare.projects.locations.datasets.annotationStores.testIamPermissions":
  6098. type ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall struct {
  6099. s *Service
  6100. resource string
  6101. testiampermissionsrequest *TestIamPermissionsRequest
  6102. urlParams_ gensupport.URLParams
  6103. ctx_ context.Context
  6104. header_ http.Header
  6105. }
  6106. // TestIamPermissions: Returns permissions that a caller has on the
  6107. // specified resource.
  6108. // If the resource does not exist, this will return an empty set
  6109. // of
  6110. // permissions, not a NOT_FOUND error.
  6111. //
  6112. // There is no permission required to make this API call.
  6113. func (r *ProjectsLocationsDatasetsAnnotationStoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall {
  6114. c := &ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6115. c.resource = resource
  6116. c.testiampermissionsrequest = testiampermissionsrequest
  6117. return c
  6118. }
  6119. // Fields allows partial responses to be retrieved. See
  6120. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6121. // for more information.
  6122. func (c *ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall {
  6123. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6124. return c
  6125. }
  6126. // Context sets the context to be used in this call's Do method. Any
  6127. // pending HTTP request will be aborted if the provided context is
  6128. // canceled.
  6129. func (c *ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall {
  6130. c.ctx_ = ctx
  6131. return c
  6132. }
  6133. // Header returns an http.Header that can be modified by the caller to
  6134. // add HTTP headers to the request.
  6135. func (c *ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall) Header() http.Header {
  6136. if c.header_ == nil {
  6137. c.header_ = make(http.Header)
  6138. }
  6139. return c.header_
  6140. }
  6141. func (c *ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  6142. reqHeaders := make(http.Header)
  6143. for k, v := range c.header_ {
  6144. reqHeaders[k] = v
  6145. }
  6146. reqHeaders.Set("User-Agent", c.s.userAgent())
  6147. var body io.Reader = nil
  6148. body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  6149. if err != nil {
  6150. return nil, err
  6151. }
  6152. reqHeaders.Set("Content-Type", "application/json")
  6153. c.urlParams_.Set("alt", alt)
  6154. c.urlParams_.Set("prettyPrint", "false")
  6155. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:testIamPermissions")
  6156. urls += "?" + c.urlParams_.Encode()
  6157. req, err := http.NewRequest("POST", urls, body)
  6158. if err != nil {
  6159. return nil, err
  6160. }
  6161. req.Header = reqHeaders
  6162. googleapi.Expand(req.URL, map[string]string{
  6163. "resource": c.resource,
  6164. })
  6165. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6166. }
  6167. // Do executes the "healthcare.projects.locations.datasets.annotationStores.testIamPermissions" call.
  6168. // Exactly one of *TestIamPermissionsResponse or error will be non-nil.
  6169. // Any non-2xx status code is an error. Response headers are in either
  6170. // *TestIamPermissionsResponse.ServerResponse.Header or (if a response
  6171. // was returned at all) in error.(*googleapi.Error).Header. Use
  6172. // googleapi.IsNotModified to check whether the returned error was
  6173. // because http.StatusNotModified was returned.
  6174. func (c *ProjectsLocationsDatasetsAnnotationStoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  6175. gensupport.SetOptions(c.urlParams_, opts...)
  6176. res, err := c.doRequest("json")
  6177. if res != nil && res.StatusCode == http.StatusNotModified {
  6178. if res.Body != nil {
  6179. res.Body.Close()
  6180. }
  6181. return nil, &googleapi.Error{
  6182. Code: res.StatusCode,
  6183. Header: res.Header,
  6184. }
  6185. }
  6186. if err != nil {
  6187. return nil, err
  6188. }
  6189. defer googleapi.CloseBody(res)
  6190. if err := googleapi.CheckResponse(res); err != nil {
  6191. return nil, err
  6192. }
  6193. ret := &TestIamPermissionsResponse{
  6194. ServerResponse: googleapi.ServerResponse{
  6195. Header: res.Header,
  6196. HTTPStatusCode: res.StatusCode,
  6197. },
  6198. }
  6199. target := &ret
  6200. if err := gensupport.DecodeResponse(target, res); err != nil {
  6201. return nil, err
  6202. }
  6203. return ret, nil
  6204. // {
  6205. // "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.",
  6206. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}:testIamPermissions",
  6207. // "httpMethod": "POST",
  6208. // "id": "healthcare.projects.locations.datasets.annotationStores.testIamPermissions",
  6209. // "parameterOrder": [
  6210. // "resource"
  6211. // ],
  6212. // "parameters": {
  6213. // "resource": {
  6214. // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
  6215. // "location": "path",
  6216. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$",
  6217. // "required": true,
  6218. // "type": "string"
  6219. // }
  6220. // },
  6221. // "path": "v1alpha2/{+resource}:testIamPermissions",
  6222. // "request": {
  6223. // "$ref": "TestIamPermissionsRequest"
  6224. // },
  6225. // "response": {
  6226. // "$ref": "TestIamPermissionsResponse"
  6227. // },
  6228. // "scopes": [
  6229. // "https://www.googleapis.com/auth/cloud-platform"
  6230. // ]
  6231. // }
  6232. }
  6233. // method id "healthcare.projects.locations.datasets.annotationStores.annotations.create":
  6234. type ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall struct {
  6235. s *Service
  6236. parent string
  6237. annotation *Annotation
  6238. urlParams_ gensupport.URLParams
  6239. ctx_ context.Context
  6240. header_ http.Header
  6241. }
  6242. // Create: Creates a new Annotation record. It is
  6243. // valid to create Annotation objects for the same source more than once
  6244. // since
  6245. // a unique ID is assigned to each record by this service.
  6246. func (r *ProjectsLocationsDatasetsAnnotationStoresAnnotationsService) Create(parent string, annotation *Annotation) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall {
  6247. c := &ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6248. c.parent = parent
  6249. c.annotation = annotation
  6250. return c
  6251. }
  6252. // Fields allows partial responses to be retrieved. See
  6253. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6254. // for more information.
  6255. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall {
  6256. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6257. return c
  6258. }
  6259. // Context sets the context to be used in this call's Do method. Any
  6260. // pending HTTP request will be aborted if the provided context is
  6261. // canceled.
  6262. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall {
  6263. c.ctx_ = ctx
  6264. return c
  6265. }
  6266. // Header returns an http.Header that can be modified by the caller to
  6267. // add HTTP headers to the request.
  6268. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall) Header() http.Header {
  6269. if c.header_ == nil {
  6270. c.header_ = make(http.Header)
  6271. }
  6272. return c.header_
  6273. }
  6274. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall) doRequest(alt string) (*http.Response, error) {
  6275. reqHeaders := make(http.Header)
  6276. for k, v := range c.header_ {
  6277. reqHeaders[k] = v
  6278. }
  6279. reqHeaders.Set("User-Agent", c.s.userAgent())
  6280. var body io.Reader = nil
  6281. body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotation)
  6282. if err != nil {
  6283. return nil, err
  6284. }
  6285. reqHeaders.Set("Content-Type", "application/json")
  6286. c.urlParams_.Set("alt", alt)
  6287. c.urlParams_.Set("prettyPrint", "false")
  6288. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/annotations")
  6289. urls += "?" + c.urlParams_.Encode()
  6290. req, err := http.NewRequest("POST", urls, body)
  6291. if err != nil {
  6292. return nil, err
  6293. }
  6294. req.Header = reqHeaders
  6295. googleapi.Expand(req.URL, map[string]string{
  6296. "parent": c.parent,
  6297. })
  6298. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6299. }
  6300. // Do executes the "healthcare.projects.locations.datasets.annotationStores.annotations.create" call.
  6301. // Exactly one of *Annotation or error will be non-nil. Any non-2xx
  6302. // status code is an error. Response headers are in either
  6303. // *Annotation.ServerResponse.Header or (if a response was returned at
  6304. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6305. // to check whether the returned error was because
  6306. // http.StatusNotModified was returned.
  6307. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall) Do(opts ...googleapi.CallOption) (*Annotation, error) {
  6308. gensupport.SetOptions(c.urlParams_, opts...)
  6309. res, err := c.doRequest("json")
  6310. if res != nil && res.StatusCode == http.StatusNotModified {
  6311. if res.Body != nil {
  6312. res.Body.Close()
  6313. }
  6314. return nil, &googleapi.Error{
  6315. Code: res.StatusCode,
  6316. Header: res.Header,
  6317. }
  6318. }
  6319. if err != nil {
  6320. return nil, err
  6321. }
  6322. defer googleapi.CloseBody(res)
  6323. if err := googleapi.CheckResponse(res); err != nil {
  6324. return nil, err
  6325. }
  6326. ret := &Annotation{
  6327. ServerResponse: googleapi.ServerResponse{
  6328. Header: res.Header,
  6329. HTTPStatusCode: res.StatusCode,
  6330. },
  6331. }
  6332. target := &ret
  6333. if err := gensupport.DecodeResponse(target, res); err != nil {
  6334. return nil, err
  6335. }
  6336. return ret, nil
  6337. // {
  6338. // "description": "Creates a new Annotation record. It is\nvalid to create Annotation objects for the same source more than once since\na unique ID is assigned to each record by this service.",
  6339. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}/annotations",
  6340. // "httpMethod": "POST",
  6341. // "id": "healthcare.projects.locations.datasets.annotationStores.annotations.create",
  6342. // "parameterOrder": [
  6343. // "parent"
  6344. // ],
  6345. // "parameters": {
  6346. // "parent": {
  6347. // "description": "The name of the Annotation store this annotation belongs to. For example,\n`projects/my-project/locations/us-central1/datasets/mydataset/annotationStores/myannotationstore`.",
  6348. // "location": "path",
  6349. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$",
  6350. // "required": true,
  6351. // "type": "string"
  6352. // }
  6353. // },
  6354. // "path": "v1alpha2/{+parent}/annotations",
  6355. // "request": {
  6356. // "$ref": "Annotation"
  6357. // },
  6358. // "response": {
  6359. // "$ref": "Annotation"
  6360. // },
  6361. // "scopes": [
  6362. // "https://www.googleapis.com/auth/cloud-platform"
  6363. // ]
  6364. // }
  6365. }
  6366. // method id "healthcare.projects.locations.datasets.annotationStores.annotations.delete":
  6367. type ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall struct {
  6368. s *Service
  6369. name string
  6370. urlParams_ gensupport.URLParams
  6371. ctx_ context.Context
  6372. header_ http.Header
  6373. }
  6374. // Delete: Deletes an Annotation or returns
  6375. // NOT_FOUND if it does not exist.
  6376. func (r *ProjectsLocationsDatasetsAnnotationStoresAnnotationsService) Delete(name string) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall {
  6377. c := &ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6378. c.name = name
  6379. return c
  6380. }
  6381. // Fields allows partial responses to be retrieved. See
  6382. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6383. // for more information.
  6384. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall {
  6385. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6386. return c
  6387. }
  6388. // Context sets the context to be used in this call's Do method. Any
  6389. // pending HTTP request will be aborted if the provided context is
  6390. // canceled.
  6391. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall {
  6392. c.ctx_ = ctx
  6393. return c
  6394. }
  6395. // Header returns an http.Header that can be modified by the caller to
  6396. // add HTTP headers to the request.
  6397. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall) Header() http.Header {
  6398. if c.header_ == nil {
  6399. c.header_ = make(http.Header)
  6400. }
  6401. return c.header_
  6402. }
  6403. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  6404. reqHeaders := make(http.Header)
  6405. for k, v := range c.header_ {
  6406. reqHeaders[k] = v
  6407. }
  6408. reqHeaders.Set("User-Agent", c.s.userAgent())
  6409. var body io.Reader = nil
  6410. c.urlParams_.Set("alt", alt)
  6411. c.urlParams_.Set("prettyPrint", "false")
  6412. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  6413. urls += "?" + c.urlParams_.Encode()
  6414. req, err := http.NewRequest("DELETE", urls, body)
  6415. if err != nil {
  6416. return nil, err
  6417. }
  6418. req.Header = reqHeaders
  6419. googleapi.Expand(req.URL, map[string]string{
  6420. "name": c.name,
  6421. })
  6422. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6423. }
  6424. // Do executes the "healthcare.projects.locations.datasets.annotationStores.annotations.delete" call.
  6425. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  6426. // code is an error. Response headers are in either
  6427. // *Empty.ServerResponse.Header or (if a response was returned at all)
  6428. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6429. // check whether the returned error was because http.StatusNotModified
  6430. // was returned.
  6431. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  6432. gensupport.SetOptions(c.urlParams_, opts...)
  6433. res, err := c.doRequest("json")
  6434. if res != nil && res.StatusCode == http.StatusNotModified {
  6435. if res.Body != nil {
  6436. res.Body.Close()
  6437. }
  6438. return nil, &googleapi.Error{
  6439. Code: res.StatusCode,
  6440. Header: res.Header,
  6441. }
  6442. }
  6443. if err != nil {
  6444. return nil, err
  6445. }
  6446. defer googleapi.CloseBody(res)
  6447. if err := googleapi.CheckResponse(res); err != nil {
  6448. return nil, err
  6449. }
  6450. ret := &Empty{
  6451. ServerResponse: googleapi.ServerResponse{
  6452. Header: res.Header,
  6453. HTTPStatusCode: res.StatusCode,
  6454. },
  6455. }
  6456. target := &ret
  6457. if err := gensupport.DecodeResponse(target, res); err != nil {
  6458. return nil, err
  6459. }
  6460. return ret, nil
  6461. // {
  6462. // "description": "Deletes an Annotation or returns\nNOT_FOUND if it does not exist.",
  6463. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}/annotations/{annotationsId}",
  6464. // "httpMethod": "DELETE",
  6465. // "id": "healthcare.projects.locations.datasets.annotationStores.annotations.delete",
  6466. // "parameterOrder": [
  6467. // "name"
  6468. // ],
  6469. // "parameters": {
  6470. // "name": {
  6471. // "description": "The resource name of the Annotation to delete.",
  6472. // "location": "path",
  6473. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+/annotations/[^/]+$",
  6474. // "required": true,
  6475. // "type": "string"
  6476. // }
  6477. // },
  6478. // "path": "v1alpha2/{+name}",
  6479. // "response": {
  6480. // "$ref": "Empty"
  6481. // },
  6482. // "scopes": [
  6483. // "https://www.googleapis.com/auth/cloud-platform"
  6484. // ]
  6485. // }
  6486. }
  6487. // method id "healthcare.projects.locations.datasets.annotationStores.annotations.get":
  6488. type ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall struct {
  6489. s *Service
  6490. name string
  6491. urlParams_ gensupport.URLParams
  6492. ifNoneMatch_ string
  6493. ctx_ context.Context
  6494. header_ http.Header
  6495. }
  6496. // Get: Gets an Annotation.
  6497. func (r *ProjectsLocationsDatasetsAnnotationStoresAnnotationsService) Get(name string) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall {
  6498. c := &ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6499. c.name = name
  6500. return c
  6501. }
  6502. // Fields allows partial responses to be retrieved. See
  6503. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6504. // for more information.
  6505. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall {
  6506. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6507. return c
  6508. }
  6509. // IfNoneMatch sets the optional parameter which makes the operation
  6510. // fail if the object's ETag matches the given value. This is useful for
  6511. // getting updates only after the object has changed since the last
  6512. // request. Use googleapi.IsNotModified to check whether the response
  6513. // error from Do is the result of In-None-Match.
  6514. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall {
  6515. c.ifNoneMatch_ = entityTag
  6516. return c
  6517. }
  6518. // Context sets the context to be used in this call's Do method. Any
  6519. // pending HTTP request will be aborted if the provided context is
  6520. // canceled.
  6521. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall {
  6522. c.ctx_ = ctx
  6523. return c
  6524. }
  6525. // Header returns an http.Header that can be modified by the caller to
  6526. // add HTTP headers to the request.
  6527. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall) Header() http.Header {
  6528. if c.header_ == nil {
  6529. c.header_ = make(http.Header)
  6530. }
  6531. return c.header_
  6532. }
  6533. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall) doRequest(alt string) (*http.Response, error) {
  6534. reqHeaders := make(http.Header)
  6535. for k, v := range c.header_ {
  6536. reqHeaders[k] = v
  6537. }
  6538. reqHeaders.Set("User-Agent", c.s.userAgent())
  6539. if c.ifNoneMatch_ != "" {
  6540. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6541. }
  6542. var body io.Reader = nil
  6543. c.urlParams_.Set("alt", alt)
  6544. c.urlParams_.Set("prettyPrint", "false")
  6545. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  6546. urls += "?" + c.urlParams_.Encode()
  6547. req, err := http.NewRequest("GET", urls, body)
  6548. if err != nil {
  6549. return nil, err
  6550. }
  6551. req.Header = reqHeaders
  6552. googleapi.Expand(req.URL, map[string]string{
  6553. "name": c.name,
  6554. })
  6555. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6556. }
  6557. // Do executes the "healthcare.projects.locations.datasets.annotationStores.annotations.get" call.
  6558. // Exactly one of *Annotation or error will be non-nil. Any non-2xx
  6559. // status code is an error. Response headers are in either
  6560. // *Annotation.ServerResponse.Header or (if a response was returned at
  6561. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6562. // to check whether the returned error was because
  6563. // http.StatusNotModified was returned.
  6564. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall) Do(opts ...googleapi.CallOption) (*Annotation, error) {
  6565. gensupport.SetOptions(c.urlParams_, opts...)
  6566. res, err := c.doRequest("json")
  6567. if res != nil && res.StatusCode == http.StatusNotModified {
  6568. if res.Body != nil {
  6569. res.Body.Close()
  6570. }
  6571. return nil, &googleapi.Error{
  6572. Code: res.StatusCode,
  6573. Header: res.Header,
  6574. }
  6575. }
  6576. if err != nil {
  6577. return nil, err
  6578. }
  6579. defer googleapi.CloseBody(res)
  6580. if err := googleapi.CheckResponse(res); err != nil {
  6581. return nil, err
  6582. }
  6583. ret := &Annotation{
  6584. ServerResponse: googleapi.ServerResponse{
  6585. Header: res.Header,
  6586. HTTPStatusCode: res.StatusCode,
  6587. },
  6588. }
  6589. target := &ret
  6590. if err := gensupport.DecodeResponse(target, res); err != nil {
  6591. return nil, err
  6592. }
  6593. return ret, nil
  6594. // {
  6595. // "description": "Gets an Annotation.",
  6596. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}/annotations/{annotationsId}",
  6597. // "httpMethod": "GET",
  6598. // "id": "healthcare.projects.locations.datasets.annotationStores.annotations.get",
  6599. // "parameterOrder": [
  6600. // "name"
  6601. // ],
  6602. // "parameters": {
  6603. // "name": {
  6604. // "description": "The resource name of the Annotation to retrieve.",
  6605. // "location": "path",
  6606. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+/annotations/[^/]+$",
  6607. // "required": true,
  6608. // "type": "string"
  6609. // }
  6610. // },
  6611. // "path": "v1alpha2/{+name}",
  6612. // "response": {
  6613. // "$ref": "Annotation"
  6614. // },
  6615. // "scopes": [
  6616. // "https://www.googleapis.com/auth/cloud-platform"
  6617. // ]
  6618. // }
  6619. }
  6620. // method id "healthcare.projects.locations.datasets.annotationStores.annotations.list":
  6621. type ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall struct {
  6622. s *Service
  6623. parent string
  6624. urlParams_ gensupport.URLParams
  6625. ifNoneMatch_ string
  6626. ctx_ context.Context
  6627. header_ http.Header
  6628. }
  6629. // List: Lists the Annotations in the given
  6630. // Annotation store for a source
  6631. // resource.
  6632. func (r *ProjectsLocationsDatasetsAnnotationStoresAnnotationsService) List(parent string) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall {
  6633. c := &ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6634. c.parent = parent
  6635. return c
  6636. }
  6637. // Filter sets the optional parameter "filter": Restricts Annotations
  6638. // returned to those matching a filter.
  6639. // Syntax:
  6640. // https://cloud.google.com/appengine/docs/standard/python/search
  6641. // /query_strings
  6642. // Fields/functions available for filtering are:
  6643. // - source_version
  6644. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) Filter(filter string) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall {
  6645. c.urlParams_.Set("filter", filter)
  6646. return c
  6647. }
  6648. // PageSize sets the optional parameter "pageSize": Limit on the number
  6649. // of Annotations to return in a single response.
  6650. // If zero the default page size of 100 is used.
  6651. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall {
  6652. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6653. return c
  6654. }
  6655. // PageToken sets the optional parameter "pageToken": The
  6656. // next_page_token value returned from the previous List request, if
  6657. // any.
  6658. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall {
  6659. c.urlParams_.Set("pageToken", pageToken)
  6660. return c
  6661. }
  6662. // Fields allows partial responses to be retrieved. See
  6663. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6664. // for more information.
  6665. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall {
  6666. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6667. return c
  6668. }
  6669. // IfNoneMatch sets the optional parameter which makes the operation
  6670. // fail if the object's ETag matches the given value. This is useful for
  6671. // getting updates only after the object has changed since the last
  6672. // request. Use googleapi.IsNotModified to check whether the response
  6673. // error from Do is the result of In-None-Match.
  6674. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall {
  6675. c.ifNoneMatch_ = entityTag
  6676. return c
  6677. }
  6678. // Context sets the context to be used in this call's Do method. Any
  6679. // pending HTTP request will be aborted if the provided context is
  6680. // canceled.
  6681. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall {
  6682. c.ctx_ = ctx
  6683. return c
  6684. }
  6685. // Header returns an http.Header that can be modified by the caller to
  6686. // add HTTP headers to the request.
  6687. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) Header() http.Header {
  6688. if c.header_ == nil {
  6689. c.header_ = make(http.Header)
  6690. }
  6691. return c.header_
  6692. }
  6693. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) doRequest(alt string) (*http.Response, error) {
  6694. reqHeaders := make(http.Header)
  6695. for k, v := range c.header_ {
  6696. reqHeaders[k] = v
  6697. }
  6698. reqHeaders.Set("User-Agent", c.s.userAgent())
  6699. if c.ifNoneMatch_ != "" {
  6700. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6701. }
  6702. var body io.Reader = nil
  6703. c.urlParams_.Set("alt", alt)
  6704. c.urlParams_.Set("prettyPrint", "false")
  6705. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/annotations")
  6706. urls += "?" + c.urlParams_.Encode()
  6707. req, err := http.NewRequest("GET", urls, body)
  6708. if err != nil {
  6709. return nil, err
  6710. }
  6711. req.Header = reqHeaders
  6712. googleapi.Expand(req.URL, map[string]string{
  6713. "parent": c.parent,
  6714. })
  6715. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6716. }
  6717. // Do executes the "healthcare.projects.locations.datasets.annotationStores.annotations.list" call.
  6718. // Exactly one of *ListAnnotationsResponse or error will be non-nil. Any
  6719. // non-2xx status code is an error. Response headers are in either
  6720. // *ListAnnotationsResponse.ServerResponse.Header or (if a response was
  6721. // returned at all) in error.(*googleapi.Error).Header. Use
  6722. // googleapi.IsNotModified to check whether the returned error was
  6723. // because http.StatusNotModified was returned.
  6724. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) Do(opts ...googleapi.CallOption) (*ListAnnotationsResponse, error) {
  6725. gensupport.SetOptions(c.urlParams_, opts...)
  6726. res, err := c.doRequest("json")
  6727. if res != nil && res.StatusCode == http.StatusNotModified {
  6728. if res.Body != nil {
  6729. res.Body.Close()
  6730. }
  6731. return nil, &googleapi.Error{
  6732. Code: res.StatusCode,
  6733. Header: res.Header,
  6734. }
  6735. }
  6736. if err != nil {
  6737. return nil, err
  6738. }
  6739. defer googleapi.CloseBody(res)
  6740. if err := googleapi.CheckResponse(res); err != nil {
  6741. return nil, err
  6742. }
  6743. ret := &ListAnnotationsResponse{
  6744. ServerResponse: googleapi.ServerResponse{
  6745. Header: res.Header,
  6746. HTTPStatusCode: res.StatusCode,
  6747. },
  6748. }
  6749. target := &ret
  6750. if err := gensupport.DecodeResponse(target, res); err != nil {
  6751. return nil, err
  6752. }
  6753. return ret, nil
  6754. // {
  6755. // "description": "Lists the Annotations in the given\nAnnotation store for a source\nresource.",
  6756. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}/annotations",
  6757. // "httpMethod": "GET",
  6758. // "id": "healthcare.projects.locations.datasets.annotationStores.annotations.list",
  6759. // "parameterOrder": [
  6760. // "parent"
  6761. // ],
  6762. // "parameters": {
  6763. // "filter": {
  6764. // "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",
  6765. // "location": "query",
  6766. // "type": "string"
  6767. // },
  6768. // "pageSize": {
  6769. // "description": "Limit on the number of Annotations to return in a single response.\nIf zero the default page size of 100 is used.",
  6770. // "format": "int32",
  6771. // "location": "query",
  6772. // "type": "integer"
  6773. // },
  6774. // "pageToken": {
  6775. // "description": "The next_page_token value returned from the previous List request, if any.",
  6776. // "location": "query",
  6777. // "type": "string"
  6778. // },
  6779. // "parent": {
  6780. // "description": "Name of the Annotation store to retrieve Annotations from.",
  6781. // "location": "path",
  6782. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$",
  6783. // "required": true,
  6784. // "type": "string"
  6785. // }
  6786. // },
  6787. // "path": "v1alpha2/{+parent}/annotations",
  6788. // "response": {
  6789. // "$ref": "ListAnnotationsResponse"
  6790. // },
  6791. // "scopes": [
  6792. // "https://www.googleapis.com/auth/cloud-platform"
  6793. // ]
  6794. // }
  6795. }
  6796. // Pages invokes f for each page of results.
  6797. // A non-nil error returned from f will halt the iteration.
  6798. // The provided context supersedes any context provided to the Context method.
  6799. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) Pages(ctx context.Context, f func(*ListAnnotationsResponse) error) error {
  6800. c.ctx_ = ctx
  6801. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6802. for {
  6803. x, err := c.Do()
  6804. if err != nil {
  6805. return err
  6806. }
  6807. if err := f(x); err != nil {
  6808. return err
  6809. }
  6810. if x.NextPageToken == "" {
  6811. return nil
  6812. }
  6813. c.PageToken(x.NextPageToken)
  6814. }
  6815. }
  6816. // method id "healthcare.projects.locations.datasets.annotationStores.annotations.patch":
  6817. type ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall struct {
  6818. s *Service
  6819. name string
  6820. annotation *Annotation
  6821. urlParams_ gensupport.URLParams
  6822. ctx_ context.Context
  6823. header_ http.Header
  6824. }
  6825. // Patch: Updates the Annotation.
  6826. func (r *ProjectsLocationsDatasetsAnnotationStoresAnnotationsService) Patch(name string, annotation *Annotation) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall {
  6827. c := &ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6828. c.name = name
  6829. c.annotation = annotation
  6830. return c
  6831. }
  6832. // UpdateMask sets the optional parameter "updateMask": The update mask
  6833. // applies to the resource. For the `FieldMask`
  6834. // definition,
  6835. // see
  6836. // https://developers.google.com/protocol-buffers/docs/re
  6837. // ference/google.protobuf#fieldmask
  6838. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall {
  6839. c.urlParams_.Set("updateMask", updateMask)
  6840. return c
  6841. }
  6842. // Fields allows partial responses to be retrieved. See
  6843. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6844. // for more information.
  6845. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall {
  6846. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6847. return c
  6848. }
  6849. // Context sets the context to be used in this call's Do method. Any
  6850. // pending HTTP request will be aborted if the provided context is
  6851. // canceled.
  6852. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall {
  6853. c.ctx_ = ctx
  6854. return c
  6855. }
  6856. // Header returns an http.Header that can be modified by the caller to
  6857. // add HTTP headers to the request.
  6858. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall) Header() http.Header {
  6859. if c.header_ == nil {
  6860. c.header_ = make(http.Header)
  6861. }
  6862. return c.header_
  6863. }
  6864. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall) doRequest(alt string) (*http.Response, error) {
  6865. reqHeaders := make(http.Header)
  6866. for k, v := range c.header_ {
  6867. reqHeaders[k] = v
  6868. }
  6869. reqHeaders.Set("User-Agent", c.s.userAgent())
  6870. var body io.Reader = nil
  6871. body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotation)
  6872. if err != nil {
  6873. return nil, err
  6874. }
  6875. reqHeaders.Set("Content-Type", "application/json")
  6876. c.urlParams_.Set("alt", alt)
  6877. c.urlParams_.Set("prettyPrint", "false")
  6878. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  6879. urls += "?" + c.urlParams_.Encode()
  6880. req, err := http.NewRequest("PATCH", urls, body)
  6881. if err != nil {
  6882. return nil, err
  6883. }
  6884. req.Header = reqHeaders
  6885. googleapi.Expand(req.URL, map[string]string{
  6886. "name": c.name,
  6887. })
  6888. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6889. }
  6890. // Do executes the "healthcare.projects.locations.datasets.annotationStores.annotations.patch" call.
  6891. // Exactly one of *Annotation or error will be non-nil. Any non-2xx
  6892. // status code is an error. Response headers are in either
  6893. // *Annotation.ServerResponse.Header or (if a response was returned at
  6894. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6895. // to check whether the returned error was because
  6896. // http.StatusNotModified was returned.
  6897. func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall) Do(opts ...googleapi.CallOption) (*Annotation, error) {
  6898. gensupport.SetOptions(c.urlParams_, opts...)
  6899. res, err := c.doRequest("json")
  6900. if res != nil && res.StatusCode == http.StatusNotModified {
  6901. if res.Body != nil {
  6902. res.Body.Close()
  6903. }
  6904. return nil, &googleapi.Error{
  6905. Code: res.StatusCode,
  6906. Header: res.Header,
  6907. }
  6908. }
  6909. if err != nil {
  6910. return nil, err
  6911. }
  6912. defer googleapi.CloseBody(res)
  6913. if err := googleapi.CheckResponse(res); err != nil {
  6914. return nil, err
  6915. }
  6916. ret := &Annotation{
  6917. ServerResponse: googleapi.ServerResponse{
  6918. Header: res.Header,
  6919. HTTPStatusCode: res.StatusCode,
  6920. },
  6921. }
  6922. target := &ret
  6923. if err := gensupport.DecodeResponse(target, res); err != nil {
  6924. return nil, err
  6925. }
  6926. return ret, nil
  6927. // {
  6928. // "description": "Updates the Annotation.",
  6929. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/annotationStores/{annotationStoresId}/annotations/{annotationsId}",
  6930. // "httpMethod": "PATCH",
  6931. // "id": "healthcare.projects.locations.datasets.annotationStores.annotations.patch",
  6932. // "parameterOrder": [
  6933. // "name"
  6934. // ],
  6935. // "parameters": {
  6936. // "name": {
  6937. // "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}`.",
  6938. // "location": "path",
  6939. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+/annotations/[^/]+$",
  6940. // "required": true,
  6941. // "type": "string"
  6942. // },
  6943. // "updateMask": {
  6944. // "description": "The update mask applies to the resource. For the `FieldMask` definition,\nsee\nhttps://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask",
  6945. // "format": "google-fieldmask",
  6946. // "location": "query",
  6947. // "type": "string"
  6948. // }
  6949. // },
  6950. // "path": "v1alpha2/{+name}",
  6951. // "request": {
  6952. // "$ref": "Annotation"
  6953. // },
  6954. // "response": {
  6955. // "$ref": "Annotation"
  6956. // },
  6957. // "scopes": [
  6958. // "https://www.googleapis.com/auth/cloud-platform"
  6959. // ]
  6960. // }
  6961. }
  6962. // method id "healthcare.projects.locations.datasets.dicomStores.create":
  6963. type ProjectsLocationsDatasetsDicomStoresCreateCall struct {
  6964. s *Service
  6965. parent string
  6966. dicomstore *DicomStore
  6967. urlParams_ gensupport.URLParams
  6968. ctx_ context.Context
  6969. header_ http.Header
  6970. }
  6971. // Create: Creates a new DICOM store within the parent dataset.
  6972. func (r *ProjectsLocationsDatasetsDicomStoresService) Create(parent string, dicomstore *DicomStore) *ProjectsLocationsDatasetsDicomStoresCreateCall {
  6973. c := &ProjectsLocationsDatasetsDicomStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6974. c.parent = parent
  6975. c.dicomstore = dicomstore
  6976. return c
  6977. }
  6978. // DicomStoreId sets the optional parameter "dicomStoreId": The ID of
  6979. // the DICOM store that is being created.
  6980. // Any string value up to 256 characters in length.
  6981. func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) DicomStoreId(dicomStoreId string) *ProjectsLocationsDatasetsDicomStoresCreateCall {
  6982. c.urlParams_.Set("dicomStoreId", dicomStoreId)
  6983. return c
  6984. }
  6985. // Fields allows partial responses to be retrieved. See
  6986. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6987. // for more information.
  6988. func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresCreateCall {
  6989. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6990. return c
  6991. }
  6992. // Context sets the context to be used in this call's Do method. Any
  6993. // pending HTTP request will be aborted if the provided context is
  6994. // canceled.
  6995. func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresCreateCall {
  6996. c.ctx_ = ctx
  6997. return c
  6998. }
  6999. // Header returns an http.Header that can be modified by the caller to
  7000. // add HTTP headers to the request.
  7001. func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) Header() http.Header {
  7002. if c.header_ == nil {
  7003. c.header_ = make(http.Header)
  7004. }
  7005. return c.header_
  7006. }
  7007. func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) doRequest(alt string) (*http.Response, error) {
  7008. reqHeaders := make(http.Header)
  7009. for k, v := range c.header_ {
  7010. reqHeaders[k] = v
  7011. }
  7012. reqHeaders.Set("User-Agent", c.s.userAgent())
  7013. var body io.Reader = nil
  7014. body, err := googleapi.WithoutDataWrapper.JSONReader(c.dicomstore)
  7015. if err != nil {
  7016. return nil, err
  7017. }
  7018. reqHeaders.Set("Content-Type", "application/json")
  7019. c.urlParams_.Set("alt", alt)
  7020. c.urlParams_.Set("prettyPrint", "false")
  7021. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomStores")
  7022. urls += "?" + c.urlParams_.Encode()
  7023. req, err := http.NewRequest("POST", urls, body)
  7024. if err != nil {
  7025. return nil, err
  7026. }
  7027. req.Header = reqHeaders
  7028. googleapi.Expand(req.URL, map[string]string{
  7029. "parent": c.parent,
  7030. })
  7031. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7032. }
  7033. // Do executes the "healthcare.projects.locations.datasets.dicomStores.create" call.
  7034. // Exactly one of *DicomStore or error will be non-nil. Any non-2xx
  7035. // status code is an error. Response headers are in either
  7036. // *DicomStore.ServerResponse.Header or (if a response was returned at
  7037. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7038. // to check whether the returned error was because
  7039. // http.StatusNotModified was returned.
  7040. func (c *ProjectsLocationsDatasetsDicomStoresCreateCall) Do(opts ...googleapi.CallOption) (*DicomStore, error) {
  7041. gensupport.SetOptions(c.urlParams_, opts...)
  7042. res, err := c.doRequest("json")
  7043. if res != nil && res.StatusCode == http.StatusNotModified {
  7044. if res.Body != nil {
  7045. res.Body.Close()
  7046. }
  7047. return nil, &googleapi.Error{
  7048. Code: res.StatusCode,
  7049. Header: res.Header,
  7050. }
  7051. }
  7052. if err != nil {
  7053. return nil, err
  7054. }
  7055. defer googleapi.CloseBody(res)
  7056. if err := googleapi.CheckResponse(res); err != nil {
  7057. return nil, err
  7058. }
  7059. ret := &DicomStore{
  7060. ServerResponse: googleapi.ServerResponse{
  7061. Header: res.Header,
  7062. HTTPStatusCode: res.StatusCode,
  7063. },
  7064. }
  7065. target := &ret
  7066. if err := gensupport.DecodeResponse(target, res); err != nil {
  7067. return nil, err
  7068. }
  7069. return ret, nil
  7070. // {
  7071. // "description": "Creates a new DICOM store within the parent dataset.",
  7072. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores",
  7073. // "httpMethod": "POST",
  7074. // "id": "healthcare.projects.locations.datasets.dicomStores.create",
  7075. // "parameterOrder": [
  7076. // "parent"
  7077. // ],
  7078. // "parameters": {
  7079. // "dicomStoreId": {
  7080. // "description": "The ID of the DICOM store that is being created.\nAny string value up to 256 characters in length.",
  7081. // "location": "query",
  7082. // "type": "string"
  7083. // },
  7084. // "parent": {
  7085. // "description": "The name of the dataset this DICOM store belongs to.",
  7086. // "location": "path",
  7087. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  7088. // "required": true,
  7089. // "type": "string"
  7090. // }
  7091. // },
  7092. // "path": "v1alpha2/{+parent}/dicomStores",
  7093. // "request": {
  7094. // "$ref": "DicomStore"
  7095. // },
  7096. // "response": {
  7097. // "$ref": "DicomStore"
  7098. // },
  7099. // "scopes": [
  7100. // "https://www.googleapis.com/auth/cloud-platform"
  7101. // ]
  7102. // }
  7103. }
  7104. // method id "healthcare.projects.locations.datasets.dicomStores.delete":
  7105. type ProjectsLocationsDatasetsDicomStoresDeleteCall struct {
  7106. s *Service
  7107. name string
  7108. urlParams_ gensupport.URLParams
  7109. ctx_ context.Context
  7110. header_ http.Header
  7111. }
  7112. // Delete: Deletes the specified DICOM store and removes all images that
  7113. // are contained
  7114. // within it.
  7115. func (r *ProjectsLocationsDatasetsDicomStoresService) Delete(name string) *ProjectsLocationsDatasetsDicomStoresDeleteCall {
  7116. c := &ProjectsLocationsDatasetsDicomStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7117. c.name = name
  7118. return c
  7119. }
  7120. // Fields allows partial responses to be retrieved. See
  7121. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7122. // for more information.
  7123. func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDeleteCall {
  7124. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7125. return c
  7126. }
  7127. // Context sets the context to be used in this call's Do method. Any
  7128. // pending HTTP request will be aborted if the provided context is
  7129. // canceled.
  7130. func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDeleteCall {
  7131. c.ctx_ = ctx
  7132. return c
  7133. }
  7134. // Header returns an http.Header that can be modified by the caller to
  7135. // add HTTP headers to the request.
  7136. func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) Header() http.Header {
  7137. if c.header_ == nil {
  7138. c.header_ = make(http.Header)
  7139. }
  7140. return c.header_
  7141. }
  7142. func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) doRequest(alt string) (*http.Response, error) {
  7143. reqHeaders := make(http.Header)
  7144. for k, v := range c.header_ {
  7145. reqHeaders[k] = v
  7146. }
  7147. reqHeaders.Set("User-Agent", c.s.userAgent())
  7148. var body io.Reader = nil
  7149. c.urlParams_.Set("alt", alt)
  7150. c.urlParams_.Set("prettyPrint", "false")
  7151. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  7152. urls += "?" + c.urlParams_.Encode()
  7153. req, err := http.NewRequest("DELETE", urls, body)
  7154. if err != nil {
  7155. return nil, err
  7156. }
  7157. req.Header = reqHeaders
  7158. googleapi.Expand(req.URL, map[string]string{
  7159. "name": c.name,
  7160. })
  7161. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7162. }
  7163. // Do executes the "healthcare.projects.locations.datasets.dicomStores.delete" call.
  7164. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  7165. // code is an error. Response headers are in either
  7166. // *Empty.ServerResponse.Header or (if a response was returned at all)
  7167. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7168. // check whether the returned error was because http.StatusNotModified
  7169. // was returned.
  7170. func (c *ProjectsLocationsDatasetsDicomStoresDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  7171. gensupport.SetOptions(c.urlParams_, opts...)
  7172. res, err := c.doRequest("json")
  7173. if res != nil && res.StatusCode == http.StatusNotModified {
  7174. if res.Body != nil {
  7175. res.Body.Close()
  7176. }
  7177. return nil, &googleapi.Error{
  7178. Code: res.StatusCode,
  7179. Header: res.Header,
  7180. }
  7181. }
  7182. if err != nil {
  7183. return nil, err
  7184. }
  7185. defer googleapi.CloseBody(res)
  7186. if err := googleapi.CheckResponse(res); err != nil {
  7187. return nil, err
  7188. }
  7189. ret := &Empty{
  7190. ServerResponse: googleapi.ServerResponse{
  7191. Header: res.Header,
  7192. HTTPStatusCode: res.StatusCode,
  7193. },
  7194. }
  7195. target := &ret
  7196. if err := gensupport.DecodeResponse(target, res); err != nil {
  7197. return nil, err
  7198. }
  7199. return ret, nil
  7200. // {
  7201. // "description": "Deletes the specified DICOM store and removes all images that are contained\nwithin it.",
  7202. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}",
  7203. // "httpMethod": "DELETE",
  7204. // "id": "healthcare.projects.locations.datasets.dicomStores.delete",
  7205. // "parameterOrder": [
  7206. // "name"
  7207. // ],
  7208. // "parameters": {
  7209. // "name": {
  7210. // "description": "The resource name of the DICOM store to delete.",
  7211. // "location": "path",
  7212. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  7213. // "required": true,
  7214. // "type": "string"
  7215. // }
  7216. // },
  7217. // "path": "v1alpha2/{+name}",
  7218. // "response": {
  7219. // "$ref": "Empty"
  7220. // },
  7221. // "scopes": [
  7222. // "https://www.googleapis.com/auth/cloud-platform"
  7223. // ]
  7224. // }
  7225. }
  7226. // method id "healthcare.projects.locations.datasets.dicomStores.export":
  7227. type ProjectsLocationsDatasetsDicomStoresExportCall struct {
  7228. s *Service
  7229. name string
  7230. exportdicomdatarequest *ExportDicomDataRequest
  7231. urlParams_ gensupport.URLParams
  7232. ctx_ context.Context
  7233. header_ http.Header
  7234. }
  7235. // Export: Exports data to the specified destination by copying it from
  7236. // the DICOM
  7237. // store.
  7238. // The metadata field type is
  7239. // OperationMetadata.
  7240. func (r *ProjectsLocationsDatasetsDicomStoresService) Export(name string, exportdicomdatarequest *ExportDicomDataRequest) *ProjectsLocationsDatasetsDicomStoresExportCall {
  7241. c := &ProjectsLocationsDatasetsDicomStoresExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7242. c.name = name
  7243. c.exportdicomdatarequest = exportdicomdatarequest
  7244. return c
  7245. }
  7246. // Fields allows partial responses to be retrieved. See
  7247. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7248. // for more information.
  7249. func (c *ProjectsLocationsDatasetsDicomStoresExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresExportCall {
  7250. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7251. return c
  7252. }
  7253. // Context sets the context to be used in this call's Do method. Any
  7254. // pending HTTP request will be aborted if the provided context is
  7255. // canceled.
  7256. func (c *ProjectsLocationsDatasetsDicomStoresExportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresExportCall {
  7257. c.ctx_ = ctx
  7258. return c
  7259. }
  7260. // Header returns an http.Header that can be modified by the caller to
  7261. // add HTTP headers to the request.
  7262. func (c *ProjectsLocationsDatasetsDicomStoresExportCall) Header() http.Header {
  7263. if c.header_ == nil {
  7264. c.header_ = make(http.Header)
  7265. }
  7266. return c.header_
  7267. }
  7268. func (c *ProjectsLocationsDatasetsDicomStoresExportCall) doRequest(alt string) (*http.Response, error) {
  7269. reqHeaders := make(http.Header)
  7270. for k, v := range c.header_ {
  7271. reqHeaders[k] = v
  7272. }
  7273. reqHeaders.Set("User-Agent", c.s.userAgent())
  7274. var body io.Reader = nil
  7275. body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportdicomdatarequest)
  7276. if err != nil {
  7277. return nil, err
  7278. }
  7279. reqHeaders.Set("Content-Type", "application/json")
  7280. c.urlParams_.Set("alt", alt)
  7281. c.urlParams_.Set("prettyPrint", "false")
  7282. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}:export")
  7283. urls += "?" + c.urlParams_.Encode()
  7284. req, err := http.NewRequest("POST", urls, body)
  7285. if err != nil {
  7286. return nil, err
  7287. }
  7288. req.Header = reqHeaders
  7289. googleapi.Expand(req.URL, map[string]string{
  7290. "name": c.name,
  7291. })
  7292. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7293. }
  7294. // Do executes the "healthcare.projects.locations.datasets.dicomStores.export" call.
  7295. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7296. // status code is an error. Response headers are in either
  7297. // *Operation.ServerResponse.Header or (if a response was returned at
  7298. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7299. // to check whether the returned error was because
  7300. // http.StatusNotModified was returned.
  7301. func (c *ProjectsLocationsDatasetsDicomStoresExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7302. gensupport.SetOptions(c.urlParams_, opts...)
  7303. res, err := c.doRequest("json")
  7304. if res != nil && res.StatusCode == http.StatusNotModified {
  7305. if res.Body != nil {
  7306. res.Body.Close()
  7307. }
  7308. return nil, &googleapi.Error{
  7309. Code: res.StatusCode,
  7310. Header: res.Header,
  7311. }
  7312. }
  7313. if err != nil {
  7314. return nil, err
  7315. }
  7316. defer googleapi.CloseBody(res)
  7317. if err := googleapi.CheckResponse(res); err != nil {
  7318. return nil, err
  7319. }
  7320. ret := &Operation{
  7321. ServerResponse: googleapi.ServerResponse{
  7322. Header: res.Header,
  7323. HTTPStatusCode: res.StatusCode,
  7324. },
  7325. }
  7326. target := &ret
  7327. if err := gensupport.DecodeResponse(target, res); err != nil {
  7328. return nil, err
  7329. }
  7330. return ret, nil
  7331. // {
  7332. // "description": "Exports data to the specified destination by copying it from the DICOM\nstore.\nThe metadata field type is\nOperationMetadata.",
  7333. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}:export",
  7334. // "httpMethod": "POST",
  7335. // "id": "healthcare.projects.locations.datasets.dicomStores.export",
  7336. // "parameterOrder": [
  7337. // "name"
  7338. // ],
  7339. // "parameters": {
  7340. // "name": {
  7341. // "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}`).",
  7342. // "location": "path",
  7343. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  7344. // "required": true,
  7345. // "type": "string"
  7346. // }
  7347. // },
  7348. // "path": "v1alpha2/{+name}:export",
  7349. // "request": {
  7350. // "$ref": "ExportDicomDataRequest"
  7351. // },
  7352. // "response": {
  7353. // "$ref": "Operation"
  7354. // },
  7355. // "scopes": [
  7356. // "https://www.googleapis.com/auth/cloud-platform"
  7357. // ]
  7358. // }
  7359. }
  7360. // method id "healthcare.projects.locations.datasets.dicomStores.get":
  7361. type ProjectsLocationsDatasetsDicomStoresGetCall struct {
  7362. s *Service
  7363. name string
  7364. urlParams_ gensupport.URLParams
  7365. ifNoneMatch_ string
  7366. ctx_ context.Context
  7367. header_ http.Header
  7368. }
  7369. // Get: Gets the specified DICOM store.
  7370. func (r *ProjectsLocationsDatasetsDicomStoresService) Get(name string) *ProjectsLocationsDatasetsDicomStoresGetCall {
  7371. c := &ProjectsLocationsDatasetsDicomStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7372. c.name = name
  7373. return c
  7374. }
  7375. // Fields allows partial responses to be retrieved. See
  7376. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7377. // for more information.
  7378. func (c *ProjectsLocationsDatasetsDicomStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresGetCall {
  7379. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7380. return c
  7381. }
  7382. // IfNoneMatch sets the optional parameter which makes the operation
  7383. // fail if the object's ETag matches the given value. This is useful for
  7384. // getting updates only after the object has changed since the last
  7385. // request. Use googleapi.IsNotModified to check whether the response
  7386. // error from Do is the result of In-None-Match.
  7387. func (c *ProjectsLocationsDatasetsDicomStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresGetCall {
  7388. c.ifNoneMatch_ = entityTag
  7389. return c
  7390. }
  7391. // Context sets the context to be used in this call's Do method. Any
  7392. // pending HTTP request will be aborted if the provided context is
  7393. // canceled.
  7394. func (c *ProjectsLocationsDatasetsDicomStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresGetCall {
  7395. c.ctx_ = ctx
  7396. return c
  7397. }
  7398. // Header returns an http.Header that can be modified by the caller to
  7399. // add HTTP headers to the request.
  7400. func (c *ProjectsLocationsDatasetsDicomStoresGetCall) Header() http.Header {
  7401. if c.header_ == nil {
  7402. c.header_ = make(http.Header)
  7403. }
  7404. return c.header_
  7405. }
  7406. func (c *ProjectsLocationsDatasetsDicomStoresGetCall) doRequest(alt string) (*http.Response, error) {
  7407. reqHeaders := make(http.Header)
  7408. for k, v := range c.header_ {
  7409. reqHeaders[k] = v
  7410. }
  7411. reqHeaders.Set("User-Agent", c.s.userAgent())
  7412. if c.ifNoneMatch_ != "" {
  7413. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7414. }
  7415. var body io.Reader = nil
  7416. c.urlParams_.Set("alt", alt)
  7417. c.urlParams_.Set("prettyPrint", "false")
  7418. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  7419. urls += "?" + c.urlParams_.Encode()
  7420. req, err := http.NewRequest("GET", urls, body)
  7421. if err != nil {
  7422. return nil, err
  7423. }
  7424. req.Header = reqHeaders
  7425. googleapi.Expand(req.URL, map[string]string{
  7426. "name": c.name,
  7427. })
  7428. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7429. }
  7430. // Do executes the "healthcare.projects.locations.datasets.dicomStores.get" call.
  7431. // Exactly one of *DicomStore or error will be non-nil. Any non-2xx
  7432. // status code is an error. Response headers are in either
  7433. // *DicomStore.ServerResponse.Header or (if a response was returned at
  7434. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7435. // to check whether the returned error was because
  7436. // http.StatusNotModified was returned.
  7437. func (c *ProjectsLocationsDatasetsDicomStoresGetCall) Do(opts ...googleapi.CallOption) (*DicomStore, error) {
  7438. gensupport.SetOptions(c.urlParams_, opts...)
  7439. res, err := c.doRequest("json")
  7440. if res != nil && res.StatusCode == http.StatusNotModified {
  7441. if res.Body != nil {
  7442. res.Body.Close()
  7443. }
  7444. return nil, &googleapi.Error{
  7445. Code: res.StatusCode,
  7446. Header: res.Header,
  7447. }
  7448. }
  7449. if err != nil {
  7450. return nil, err
  7451. }
  7452. defer googleapi.CloseBody(res)
  7453. if err := googleapi.CheckResponse(res); err != nil {
  7454. return nil, err
  7455. }
  7456. ret := &DicomStore{
  7457. ServerResponse: googleapi.ServerResponse{
  7458. Header: res.Header,
  7459. HTTPStatusCode: res.StatusCode,
  7460. },
  7461. }
  7462. target := &ret
  7463. if err := gensupport.DecodeResponse(target, res); err != nil {
  7464. return nil, err
  7465. }
  7466. return ret, nil
  7467. // {
  7468. // "description": "Gets the specified DICOM store.",
  7469. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}",
  7470. // "httpMethod": "GET",
  7471. // "id": "healthcare.projects.locations.datasets.dicomStores.get",
  7472. // "parameterOrder": [
  7473. // "name"
  7474. // ],
  7475. // "parameters": {
  7476. // "name": {
  7477. // "description": "The resource name of the DICOM store to get.",
  7478. // "location": "path",
  7479. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  7480. // "required": true,
  7481. // "type": "string"
  7482. // }
  7483. // },
  7484. // "path": "v1alpha2/{+name}",
  7485. // "response": {
  7486. // "$ref": "DicomStore"
  7487. // },
  7488. // "scopes": [
  7489. // "https://www.googleapis.com/auth/cloud-platform"
  7490. // ]
  7491. // }
  7492. }
  7493. // method id "healthcare.projects.locations.datasets.dicomStores.getIamPolicy":
  7494. type ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall struct {
  7495. s *Service
  7496. resource string
  7497. urlParams_ gensupport.URLParams
  7498. ifNoneMatch_ string
  7499. ctx_ context.Context
  7500. header_ http.Header
  7501. }
  7502. // GetIamPolicy: Gets the access control policy for a resource.
  7503. // Returns an empty policy if the resource exists and does not have a
  7504. // policy
  7505. // set.
  7506. func (r *ProjectsLocationsDatasetsDicomStoresService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall {
  7507. c := &ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7508. c.resource = resource
  7509. return c
  7510. }
  7511. // Fields allows partial responses to be retrieved. See
  7512. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7513. // for more information.
  7514. func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall {
  7515. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7516. return c
  7517. }
  7518. // IfNoneMatch sets the optional parameter which makes the operation
  7519. // fail if the object's ETag matches the given value. This is useful for
  7520. // getting updates only after the object has changed since the last
  7521. // request. Use googleapi.IsNotModified to check whether the response
  7522. // error from Do is the result of In-None-Match.
  7523. func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall {
  7524. c.ifNoneMatch_ = entityTag
  7525. return c
  7526. }
  7527. // Context sets the context to be used in this call's Do method. Any
  7528. // pending HTTP request will be aborted if the provided context is
  7529. // canceled.
  7530. func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall {
  7531. c.ctx_ = ctx
  7532. return c
  7533. }
  7534. // Header returns an http.Header that can be modified by the caller to
  7535. // add HTTP headers to the request.
  7536. func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Header() http.Header {
  7537. if c.header_ == nil {
  7538. c.header_ = make(http.Header)
  7539. }
  7540. return c.header_
  7541. }
  7542. func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  7543. reqHeaders := make(http.Header)
  7544. for k, v := range c.header_ {
  7545. reqHeaders[k] = v
  7546. }
  7547. reqHeaders.Set("User-Agent", c.s.userAgent())
  7548. if c.ifNoneMatch_ != "" {
  7549. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7550. }
  7551. var body io.Reader = nil
  7552. c.urlParams_.Set("alt", alt)
  7553. c.urlParams_.Set("prettyPrint", "false")
  7554. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:getIamPolicy")
  7555. urls += "?" + c.urlParams_.Encode()
  7556. req, err := http.NewRequest("GET", urls, body)
  7557. if err != nil {
  7558. return nil, err
  7559. }
  7560. req.Header = reqHeaders
  7561. googleapi.Expand(req.URL, map[string]string{
  7562. "resource": c.resource,
  7563. })
  7564. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7565. }
  7566. // Do executes the "healthcare.projects.locations.datasets.dicomStores.getIamPolicy" call.
  7567. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  7568. // code is an error. Response headers are in either
  7569. // *Policy.ServerResponse.Header or (if a response was returned at all)
  7570. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7571. // check whether the returned error was because http.StatusNotModified
  7572. // was returned.
  7573. func (c *ProjectsLocationsDatasetsDicomStoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  7574. gensupport.SetOptions(c.urlParams_, opts...)
  7575. res, err := c.doRequest("json")
  7576. if res != nil && res.StatusCode == http.StatusNotModified {
  7577. if res.Body != nil {
  7578. res.Body.Close()
  7579. }
  7580. return nil, &googleapi.Error{
  7581. Code: res.StatusCode,
  7582. Header: res.Header,
  7583. }
  7584. }
  7585. if err != nil {
  7586. return nil, err
  7587. }
  7588. defer googleapi.CloseBody(res)
  7589. if err := googleapi.CheckResponse(res); err != nil {
  7590. return nil, err
  7591. }
  7592. ret := &Policy{
  7593. ServerResponse: googleapi.ServerResponse{
  7594. Header: res.Header,
  7595. HTTPStatusCode: res.StatusCode,
  7596. },
  7597. }
  7598. target := &ret
  7599. if err := gensupport.DecodeResponse(target, res); err != nil {
  7600. return nil, err
  7601. }
  7602. return ret, nil
  7603. // {
  7604. // "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.",
  7605. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}:getIamPolicy",
  7606. // "httpMethod": "GET",
  7607. // "id": "healthcare.projects.locations.datasets.dicomStores.getIamPolicy",
  7608. // "parameterOrder": [
  7609. // "resource"
  7610. // ],
  7611. // "parameters": {
  7612. // "resource": {
  7613. // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
  7614. // "location": "path",
  7615. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  7616. // "required": true,
  7617. // "type": "string"
  7618. // }
  7619. // },
  7620. // "path": "v1alpha2/{+resource}:getIamPolicy",
  7621. // "response": {
  7622. // "$ref": "Policy"
  7623. // },
  7624. // "scopes": [
  7625. // "https://www.googleapis.com/auth/cloud-platform"
  7626. // ]
  7627. // }
  7628. }
  7629. // method id "healthcare.projects.locations.datasets.dicomStores.import":
  7630. type ProjectsLocationsDatasetsDicomStoresImportCall struct {
  7631. s *Service
  7632. name string
  7633. importdicomdatarequest *ImportDicomDataRequest
  7634. urlParams_ gensupport.URLParams
  7635. ctx_ context.Context
  7636. header_ http.Header
  7637. }
  7638. // Import: Imports data into the DICOM store by copying it from the
  7639. // specified source.
  7640. // For errors, the Operation will be populated with error details (in
  7641. // the form
  7642. // of ImportDicomDataErrorDetails in error.details), which will
  7643. // hold
  7644. // finer-grained error information.
  7645. // The metadata field type is
  7646. // OperationMetadata.
  7647. func (r *ProjectsLocationsDatasetsDicomStoresService) Import(name string, importdicomdatarequest *ImportDicomDataRequest) *ProjectsLocationsDatasetsDicomStoresImportCall {
  7648. c := &ProjectsLocationsDatasetsDicomStoresImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7649. c.name = name
  7650. c.importdicomdatarequest = importdicomdatarequest
  7651. return c
  7652. }
  7653. // Fields allows partial responses to be retrieved. See
  7654. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7655. // for more information.
  7656. func (c *ProjectsLocationsDatasetsDicomStoresImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresImportCall {
  7657. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7658. return c
  7659. }
  7660. // Context sets the context to be used in this call's Do method. Any
  7661. // pending HTTP request will be aborted if the provided context is
  7662. // canceled.
  7663. func (c *ProjectsLocationsDatasetsDicomStoresImportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresImportCall {
  7664. c.ctx_ = ctx
  7665. return c
  7666. }
  7667. // Header returns an http.Header that can be modified by the caller to
  7668. // add HTTP headers to the request.
  7669. func (c *ProjectsLocationsDatasetsDicomStoresImportCall) Header() http.Header {
  7670. if c.header_ == nil {
  7671. c.header_ = make(http.Header)
  7672. }
  7673. return c.header_
  7674. }
  7675. func (c *ProjectsLocationsDatasetsDicomStoresImportCall) doRequest(alt string) (*http.Response, error) {
  7676. reqHeaders := make(http.Header)
  7677. for k, v := range c.header_ {
  7678. reqHeaders[k] = v
  7679. }
  7680. reqHeaders.Set("User-Agent", c.s.userAgent())
  7681. var body io.Reader = nil
  7682. body, err := googleapi.WithoutDataWrapper.JSONReader(c.importdicomdatarequest)
  7683. if err != nil {
  7684. return nil, err
  7685. }
  7686. reqHeaders.Set("Content-Type", "application/json")
  7687. c.urlParams_.Set("alt", alt)
  7688. c.urlParams_.Set("prettyPrint", "false")
  7689. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}:import")
  7690. urls += "?" + c.urlParams_.Encode()
  7691. req, err := http.NewRequest("POST", urls, body)
  7692. if err != nil {
  7693. return nil, err
  7694. }
  7695. req.Header = reqHeaders
  7696. googleapi.Expand(req.URL, map[string]string{
  7697. "name": c.name,
  7698. })
  7699. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7700. }
  7701. // Do executes the "healthcare.projects.locations.datasets.dicomStores.import" call.
  7702. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7703. // status code is an error. Response headers are in either
  7704. // *Operation.ServerResponse.Header or (if a response was returned at
  7705. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7706. // to check whether the returned error was because
  7707. // http.StatusNotModified was returned.
  7708. func (c *ProjectsLocationsDatasetsDicomStoresImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7709. gensupport.SetOptions(c.urlParams_, opts...)
  7710. res, err := c.doRequest("json")
  7711. if res != nil && res.StatusCode == http.StatusNotModified {
  7712. if res.Body != nil {
  7713. res.Body.Close()
  7714. }
  7715. return nil, &googleapi.Error{
  7716. Code: res.StatusCode,
  7717. Header: res.Header,
  7718. }
  7719. }
  7720. if err != nil {
  7721. return nil, err
  7722. }
  7723. defer googleapi.CloseBody(res)
  7724. if err := googleapi.CheckResponse(res); err != nil {
  7725. return nil, err
  7726. }
  7727. ret := &Operation{
  7728. ServerResponse: googleapi.ServerResponse{
  7729. Header: res.Header,
  7730. HTTPStatusCode: res.StatusCode,
  7731. },
  7732. }
  7733. target := &ret
  7734. if err := gensupport.DecodeResponse(target, res); err != nil {
  7735. return nil, err
  7736. }
  7737. return ret, nil
  7738. // {
  7739. // "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.",
  7740. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}:import",
  7741. // "httpMethod": "POST",
  7742. // "id": "healthcare.projects.locations.datasets.dicomStores.import",
  7743. // "parameterOrder": [
  7744. // "name"
  7745. // ],
  7746. // "parameters": {
  7747. // "name": {
  7748. // "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}`).",
  7749. // "location": "path",
  7750. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  7751. // "required": true,
  7752. // "type": "string"
  7753. // }
  7754. // },
  7755. // "path": "v1alpha2/{+name}:import",
  7756. // "request": {
  7757. // "$ref": "ImportDicomDataRequest"
  7758. // },
  7759. // "response": {
  7760. // "$ref": "Operation"
  7761. // },
  7762. // "scopes": [
  7763. // "https://www.googleapis.com/auth/cloud-platform"
  7764. // ]
  7765. // }
  7766. }
  7767. // method id "healthcare.projects.locations.datasets.dicomStores.list":
  7768. type ProjectsLocationsDatasetsDicomStoresListCall struct {
  7769. s *Service
  7770. parent string
  7771. urlParams_ gensupport.URLParams
  7772. ifNoneMatch_ string
  7773. ctx_ context.Context
  7774. header_ http.Header
  7775. }
  7776. // List: Lists the DICOM stores in the given dataset.
  7777. func (r *ProjectsLocationsDatasetsDicomStoresService) List(parent string) *ProjectsLocationsDatasetsDicomStoresListCall {
  7778. c := &ProjectsLocationsDatasetsDicomStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7779. c.parent = parent
  7780. return c
  7781. }
  7782. // Filter sets the optional parameter "filter": Restricts stores
  7783. // returned to those matching a filter.
  7784. // Syntax:
  7785. // https://cloud.google.com/appengine/docs/standard/python/search
  7786. // /query_strings
  7787. // Only filtering on labels is supported, for example
  7788. // `labels.key=value`.
  7789. func (c *ProjectsLocationsDatasetsDicomStoresListCall) Filter(filter string) *ProjectsLocationsDatasetsDicomStoresListCall {
  7790. c.urlParams_.Set("filter", filter)
  7791. return c
  7792. }
  7793. // PageSize sets the optional parameter "pageSize": Limit on the number
  7794. // of DICOM stores to return in a single response.
  7795. // If zero the default page size of 100 is used.
  7796. func (c *ProjectsLocationsDatasetsDicomStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsDicomStoresListCall {
  7797. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7798. return c
  7799. }
  7800. // PageToken sets the optional parameter "pageToken": The
  7801. // next_page_token value returned from the previous List request, if
  7802. // any.
  7803. func (c *ProjectsLocationsDatasetsDicomStoresListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsDicomStoresListCall {
  7804. c.urlParams_.Set("pageToken", pageToken)
  7805. return c
  7806. }
  7807. // Fields allows partial responses to be retrieved. See
  7808. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7809. // for more information.
  7810. func (c *ProjectsLocationsDatasetsDicomStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresListCall {
  7811. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7812. return c
  7813. }
  7814. // IfNoneMatch sets the optional parameter which makes the operation
  7815. // fail if the object's ETag matches the given value. This is useful for
  7816. // getting updates only after the object has changed since the last
  7817. // request. Use googleapi.IsNotModified to check whether the response
  7818. // error from Do is the result of In-None-Match.
  7819. func (c *ProjectsLocationsDatasetsDicomStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresListCall {
  7820. c.ifNoneMatch_ = entityTag
  7821. return c
  7822. }
  7823. // Context sets the context to be used in this call's Do method. Any
  7824. // pending HTTP request will be aborted if the provided context is
  7825. // canceled.
  7826. func (c *ProjectsLocationsDatasetsDicomStoresListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresListCall {
  7827. c.ctx_ = ctx
  7828. return c
  7829. }
  7830. // Header returns an http.Header that can be modified by the caller to
  7831. // add HTTP headers to the request.
  7832. func (c *ProjectsLocationsDatasetsDicomStoresListCall) Header() http.Header {
  7833. if c.header_ == nil {
  7834. c.header_ = make(http.Header)
  7835. }
  7836. return c.header_
  7837. }
  7838. func (c *ProjectsLocationsDatasetsDicomStoresListCall) doRequest(alt string) (*http.Response, error) {
  7839. reqHeaders := make(http.Header)
  7840. for k, v := range c.header_ {
  7841. reqHeaders[k] = v
  7842. }
  7843. reqHeaders.Set("User-Agent", c.s.userAgent())
  7844. if c.ifNoneMatch_ != "" {
  7845. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7846. }
  7847. var body io.Reader = nil
  7848. c.urlParams_.Set("alt", alt)
  7849. c.urlParams_.Set("prettyPrint", "false")
  7850. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomStores")
  7851. urls += "?" + c.urlParams_.Encode()
  7852. req, err := http.NewRequest("GET", urls, body)
  7853. if err != nil {
  7854. return nil, err
  7855. }
  7856. req.Header = reqHeaders
  7857. googleapi.Expand(req.URL, map[string]string{
  7858. "parent": c.parent,
  7859. })
  7860. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7861. }
  7862. // Do executes the "healthcare.projects.locations.datasets.dicomStores.list" call.
  7863. // Exactly one of *ListDicomStoresResponse or error will be non-nil. Any
  7864. // non-2xx status code is an error. Response headers are in either
  7865. // *ListDicomStoresResponse.ServerResponse.Header or (if a response was
  7866. // returned at all) in error.(*googleapi.Error).Header. Use
  7867. // googleapi.IsNotModified to check whether the returned error was
  7868. // because http.StatusNotModified was returned.
  7869. func (c *ProjectsLocationsDatasetsDicomStoresListCall) Do(opts ...googleapi.CallOption) (*ListDicomStoresResponse, error) {
  7870. gensupport.SetOptions(c.urlParams_, opts...)
  7871. res, err := c.doRequest("json")
  7872. if res != nil && res.StatusCode == http.StatusNotModified {
  7873. if res.Body != nil {
  7874. res.Body.Close()
  7875. }
  7876. return nil, &googleapi.Error{
  7877. Code: res.StatusCode,
  7878. Header: res.Header,
  7879. }
  7880. }
  7881. if err != nil {
  7882. return nil, err
  7883. }
  7884. defer googleapi.CloseBody(res)
  7885. if err := googleapi.CheckResponse(res); err != nil {
  7886. return nil, err
  7887. }
  7888. ret := &ListDicomStoresResponse{
  7889. ServerResponse: googleapi.ServerResponse{
  7890. Header: res.Header,
  7891. HTTPStatusCode: res.StatusCode,
  7892. },
  7893. }
  7894. target := &ret
  7895. if err := gensupport.DecodeResponse(target, res); err != nil {
  7896. return nil, err
  7897. }
  7898. return ret, nil
  7899. // {
  7900. // "description": "Lists the DICOM stores in the given dataset.",
  7901. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores",
  7902. // "httpMethod": "GET",
  7903. // "id": "healthcare.projects.locations.datasets.dicomStores.list",
  7904. // "parameterOrder": [
  7905. // "parent"
  7906. // ],
  7907. // "parameters": {
  7908. // "filter": {
  7909. // "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`.",
  7910. // "location": "query",
  7911. // "type": "string"
  7912. // },
  7913. // "pageSize": {
  7914. // "description": "Limit on the number of DICOM stores to return in a single response.\nIf zero the default page size of 100 is used.",
  7915. // "format": "int32",
  7916. // "location": "query",
  7917. // "type": "integer"
  7918. // },
  7919. // "pageToken": {
  7920. // "description": "The next_page_token value returned from the previous List request, if any.",
  7921. // "location": "query",
  7922. // "type": "string"
  7923. // },
  7924. // "parent": {
  7925. // "description": "Name of the dataset.",
  7926. // "location": "path",
  7927. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  7928. // "required": true,
  7929. // "type": "string"
  7930. // }
  7931. // },
  7932. // "path": "v1alpha2/{+parent}/dicomStores",
  7933. // "response": {
  7934. // "$ref": "ListDicomStoresResponse"
  7935. // },
  7936. // "scopes": [
  7937. // "https://www.googleapis.com/auth/cloud-platform"
  7938. // ]
  7939. // }
  7940. }
  7941. // Pages invokes f for each page of results.
  7942. // A non-nil error returned from f will halt the iteration.
  7943. // The provided context supersedes any context provided to the Context method.
  7944. func (c *ProjectsLocationsDatasetsDicomStoresListCall) Pages(ctx context.Context, f func(*ListDicomStoresResponse) error) error {
  7945. c.ctx_ = ctx
  7946. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  7947. for {
  7948. x, err := c.Do()
  7949. if err != nil {
  7950. return err
  7951. }
  7952. if err := f(x); err != nil {
  7953. return err
  7954. }
  7955. if x.NextPageToken == "" {
  7956. return nil
  7957. }
  7958. c.PageToken(x.NextPageToken)
  7959. }
  7960. }
  7961. // method id "healthcare.projects.locations.datasets.dicomStores.patch":
  7962. type ProjectsLocationsDatasetsDicomStoresPatchCall struct {
  7963. s *Service
  7964. name string
  7965. dicomstore *DicomStore
  7966. urlParams_ gensupport.URLParams
  7967. ctx_ context.Context
  7968. header_ http.Header
  7969. }
  7970. // Patch: Updates the specified DICOM store.
  7971. func (r *ProjectsLocationsDatasetsDicomStoresService) Patch(name string, dicomstore *DicomStore) *ProjectsLocationsDatasetsDicomStoresPatchCall {
  7972. c := &ProjectsLocationsDatasetsDicomStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7973. c.name = name
  7974. c.dicomstore = dicomstore
  7975. return c
  7976. }
  7977. // UpdateMask sets the optional parameter "updateMask": The update mask
  7978. // applies to the resource. For the `FieldMask`
  7979. // definition,
  7980. // see
  7981. // https://developers.google.com/protocol-buffers/docs/re
  7982. // ference/google.protobuf#fieldmask
  7983. func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsDicomStoresPatchCall {
  7984. c.urlParams_.Set("updateMask", updateMask)
  7985. return c
  7986. }
  7987. // Fields allows partial responses to be retrieved. See
  7988. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7989. // for more information.
  7990. func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresPatchCall {
  7991. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7992. return c
  7993. }
  7994. // Context sets the context to be used in this call's Do method. Any
  7995. // pending HTTP request will be aborted if the provided context is
  7996. // canceled.
  7997. func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresPatchCall {
  7998. c.ctx_ = ctx
  7999. return c
  8000. }
  8001. // Header returns an http.Header that can be modified by the caller to
  8002. // add HTTP headers to the request.
  8003. func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) Header() http.Header {
  8004. if c.header_ == nil {
  8005. c.header_ = make(http.Header)
  8006. }
  8007. return c.header_
  8008. }
  8009. func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) doRequest(alt string) (*http.Response, error) {
  8010. reqHeaders := make(http.Header)
  8011. for k, v := range c.header_ {
  8012. reqHeaders[k] = v
  8013. }
  8014. reqHeaders.Set("User-Agent", c.s.userAgent())
  8015. var body io.Reader = nil
  8016. body, err := googleapi.WithoutDataWrapper.JSONReader(c.dicomstore)
  8017. if err != nil {
  8018. return nil, err
  8019. }
  8020. reqHeaders.Set("Content-Type", "application/json")
  8021. c.urlParams_.Set("alt", alt)
  8022. c.urlParams_.Set("prettyPrint", "false")
  8023. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  8024. urls += "?" + c.urlParams_.Encode()
  8025. req, err := http.NewRequest("PATCH", urls, body)
  8026. if err != nil {
  8027. return nil, err
  8028. }
  8029. req.Header = reqHeaders
  8030. googleapi.Expand(req.URL, map[string]string{
  8031. "name": c.name,
  8032. })
  8033. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8034. }
  8035. // Do executes the "healthcare.projects.locations.datasets.dicomStores.patch" call.
  8036. // Exactly one of *DicomStore or error will be non-nil. Any non-2xx
  8037. // status code is an error. Response headers are in either
  8038. // *DicomStore.ServerResponse.Header or (if a response was returned at
  8039. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8040. // to check whether the returned error was because
  8041. // http.StatusNotModified was returned.
  8042. func (c *ProjectsLocationsDatasetsDicomStoresPatchCall) Do(opts ...googleapi.CallOption) (*DicomStore, error) {
  8043. gensupport.SetOptions(c.urlParams_, opts...)
  8044. res, err := c.doRequest("json")
  8045. if res != nil && res.StatusCode == http.StatusNotModified {
  8046. if res.Body != nil {
  8047. res.Body.Close()
  8048. }
  8049. return nil, &googleapi.Error{
  8050. Code: res.StatusCode,
  8051. Header: res.Header,
  8052. }
  8053. }
  8054. if err != nil {
  8055. return nil, err
  8056. }
  8057. defer googleapi.CloseBody(res)
  8058. if err := googleapi.CheckResponse(res); err != nil {
  8059. return nil, err
  8060. }
  8061. ret := &DicomStore{
  8062. ServerResponse: googleapi.ServerResponse{
  8063. Header: res.Header,
  8064. HTTPStatusCode: res.StatusCode,
  8065. },
  8066. }
  8067. target := &ret
  8068. if err := gensupport.DecodeResponse(target, res); err != nil {
  8069. return nil, err
  8070. }
  8071. return ret, nil
  8072. // {
  8073. // "description": "Updates the specified DICOM store.",
  8074. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}",
  8075. // "httpMethod": "PATCH",
  8076. // "id": "healthcare.projects.locations.datasets.dicomStores.patch",
  8077. // "parameterOrder": [
  8078. // "name"
  8079. // ],
  8080. // "parameters": {
  8081. // "name": {
  8082. // "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}`.",
  8083. // "location": "path",
  8084. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  8085. // "required": true,
  8086. // "type": "string"
  8087. // },
  8088. // "updateMask": {
  8089. // "description": "The update mask applies to the resource. For the `FieldMask` definition,\nsee\nhttps://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask",
  8090. // "format": "google-fieldmask",
  8091. // "location": "query",
  8092. // "type": "string"
  8093. // }
  8094. // },
  8095. // "path": "v1alpha2/{+name}",
  8096. // "request": {
  8097. // "$ref": "DicomStore"
  8098. // },
  8099. // "response": {
  8100. // "$ref": "DicomStore"
  8101. // },
  8102. // "scopes": [
  8103. // "https://www.googleapis.com/auth/cloud-platform"
  8104. // ]
  8105. // }
  8106. }
  8107. // method id "healthcare.projects.locations.datasets.dicomStores.setIamPolicy":
  8108. type ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall struct {
  8109. s *Service
  8110. resource string
  8111. setiampolicyrequest *SetIamPolicyRequest
  8112. urlParams_ gensupport.URLParams
  8113. ctx_ context.Context
  8114. header_ http.Header
  8115. }
  8116. // SetIamPolicy: Sets the access control policy on the specified
  8117. // resource. Replaces any
  8118. // existing policy.
  8119. func (r *ProjectsLocationsDatasetsDicomStoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall {
  8120. c := &ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8121. c.resource = resource
  8122. c.setiampolicyrequest = setiampolicyrequest
  8123. return c
  8124. }
  8125. // Fields allows partial responses to be retrieved. See
  8126. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8127. // for more information.
  8128. func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall {
  8129. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8130. return c
  8131. }
  8132. // Context sets the context to be used in this call's Do method. Any
  8133. // pending HTTP request will be aborted if the provided context is
  8134. // canceled.
  8135. func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall {
  8136. c.ctx_ = ctx
  8137. return c
  8138. }
  8139. // Header returns an http.Header that can be modified by the caller to
  8140. // add HTTP headers to the request.
  8141. func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Header() http.Header {
  8142. if c.header_ == nil {
  8143. c.header_ = make(http.Header)
  8144. }
  8145. return c.header_
  8146. }
  8147. func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  8148. reqHeaders := make(http.Header)
  8149. for k, v := range c.header_ {
  8150. reqHeaders[k] = v
  8151. }
  8152. reqHeaders.Set("User-Agent", c.s.userAgent())
  8153. var body io.Reader = nil
  8154. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  8155. if err != nil {
  8156. return nil, err
  8157. }
  8158. reqHeaders.Set("Content-Type", "application/json")
  8159. c.urlParams_.Set("alt", alt)
  8160. c.urlParams_.Set("prettyPrint", "false")
  8161. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:setIamPolicy")
  8162. urls += "?" + c.urlParams_.Encode()
  8163. req, err := http.NewRequest("POST", urls, body)
  8164. if err != nil {
  8165. return nil, err
  8166. }
  8167. req.Header = reqHeaders
  8168. googleapi.Expand(req.URL, map[string]string{
  8169. "resource": c.resource,
  8170. })
  8171. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8172. }
  8173. // Do executes the "healthcare.projects.locations.datasets.dicomStores.setIamPolicy" call.
  8174. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  8175. // code is an error. Response headers are in either
  8176. // *Policy.ServerResponse.Header or (if a response was returned at all)
  8177. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8178. // check whether the returned error was because http.StatusNotModified
  8179. // was returned.
  8180. func (c *ProjectsLocationsDatasetsDicomStoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  8181. gensupport.SetOptions(c.urlParams_, opts...)
  8182. res, err := c.doRequest("json")
  8183. if res != nil && res.StatusCode == http.StatusNotModified {
  8184. if res.Body != nil {
  8185. res.Body.Close()
  8186. }
  8187. return nil, &googleapi.Error{
  8188. Code: res.StatusCode,
  8189. Header: res.Header,
  8190. }
  8191. }
  8192. if err != nil {
  8193. return nil, err
  8194. }
  8195. defer googleapi.CloseBody(res)
  8196. if err := googleapi.CheckResponse(res); err != nil {
  8197. return nil, err
  8198. }
  8199. ret := &Policy{
  8200. ServerResponse: googleapi.ServerResponse{
  8201. Header: res.Header,
  8202. HTTPStatusCode: res.StatusCode,
  8203. },
  8204. }
  8205. target := &ret
  8206. if err := gensupport.DecodeResponse(target, res); err != nil {
  8207. return nil, err
  8208. }
  8209. return ret, nil
  8210. // {
  8211. // "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.",
  8212. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}:setIamPolicy",
  8213. // "httpMethod": "POST",
  8214. // "id": "healthcare.projects.locations.datasets.dicomStores.setIamPolicy",
  8215. // "parameterOrder": [
  8216. // "resource"
  8217. // ],
  8218. // "parameters": {
  8219. // "resource": {
  8220. // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
  8221. // "location": "path",
  8222. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  8223. // "required": true,
  8224. // "type": "string"
  8225. // }
  8226. // },
  8227. // "path": "v1alpha2/{+resource}:setIamPolicy",
  8228. // "request": {
  8229. // "$ref": "SetIamPolicyRequest"
  8230. // },
  8231. // "response": {
  8232. // "$ref": "Policy"
  8233. // },
  8234. // "scopes": [
  8235. // "https://www.googleapis.com/auth/cloud-platform"
  8236. // ]
  8237. // }
  8238. }
  8239. // method id "healthcare.projects.locations.datasets.dicomStores.testIamPermissions":
  8240. type ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall struct {
  8241. s *Service
  8242. resource string
  8243. testiampermissionsrequest *TestIamPermissionsRequest
  8244. urlParams_ gensupport.URLParams
  8245. ctx_ context.Context
  8246. header_ http.Header
  8247. }
  8248. // TestIamPermissions: Returns permissions that a caller has on the
  8249. // specified resource.
  8250. // If the resource does not exist, this will return an empty set
  8251. // of
  8252. // permissions, not a NOT_FOUND error.
  8253. //
  8254. // Note: This operation is designed to be used for building
  8255. // permission-aware
  8256. // UIs and command-line tools, not for authorization checking. This
  8257. // operation
  8258. // may "fail open" without warning.
  8259. func (r *ProjectsLocationsDatasetsDicomStoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall {
  8260. c := &ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8261. c.resource = resource
  8262. c.testiampermissionsrequest = testiampermissionsrequest
  8263. return c
  8264. }
  8265. // Fields allows partial responses to be retrieved. See
  8266. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8267. // for more information.
  8268. func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall {
  8269. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8270. return c
  8271. }
  8272. // Context sets the context to be used in this call's Do method. Any
  8273. // pending HTTP request will be aborted if the provided context is
  8274. // canceled.
  8275. func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall {
  8276. c.ctx_ = ctx
  8277. return c
  8278. }
  8279. // Header returns an http.Header that can be modified by the caller to
  8280. // add HTTP headers to the request.
  8281. func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Header() http.Header {
  8282. if c.header_ == nil {
  8283. c.header_ = make(http.Header)
  8284. }
  8285. return c.header_
  8286. }
  8287. func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  8288. reqHeaders := make(http.Header)
  8289. for k, v := range c.header_ {
  8290. reqHeaders[k] = v
  8291. }
  8292. reqHeaders.Set("User-Agent", c.s.userAgent())
  8293. var body io.Reader = nil
  8294. body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  8295. if err != nil {
  8296. return nil, err
  8297. }
  8298. reqHeaders.Set("Content-Type", "application/json")
  8299. c.urlParams_.Set("alt", alt)
  8300. c.urlParams_.Set("prettyPrint", "false")
  8301. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:testIamPermissions")
  8302. urls += "?" + c.urlParams_.Encode()
  8303. req, err := http.NewRequest("POST", urls, body)
  8304. if err != nil {
  8305. return nil, err
  8306. }
  8307. req.Header = reqHeaders
  8308. googleapi.Expand(req.URL, map[string]string{
  8309. "resource": c.resource,
  8310. })
  8311. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8312. }
  8313. // Do executes the "healthcare.projects.locations.datasets.dicomStores.testIamPermissions" call.
  8314. // Exactly one of *TestIamPermissionsResponse or error will be non-nil.
  8315. // Any non-2xx status code is an error. Response headers are in either
  8316. // *TestIamPermissionsResponse.ServerResponse.Header or (if a response
  8317. // was returned at all) in error.(*googleapi.Error).Header. Use
  8318. // googleapi.IsNotModified to check whether the returned error was
  8319. // because http.StatusNotModified was returned.
  8320. func (c *ProjectsLocationsDatasetsDicomStoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  8321. gensupport.SetOptions(c.urlParams_, opts...)
  8322. res, err := c.doRequest("json")
  8323. if res != nil && res.StatusCode == http.StatusNotModified {
  8324. if res.Body != nil {
  8325. res.Body.Close()
  8326. }
  8327. return nil, &googleapi.Error{
  8328. Code: res.StatusCode,
  8329. Header: res.Header,
  8330. }
  8331. }
  8332. if err != nil {
  8333. return nil, err
  8334. }
  8335. defer googleapi.CloseBody(res)
  8336. if err := googleapi.CheckResponse(res); err != nil {
  8337. return nil, err
  8338. }
  8339. ret := &TestIamPermissionsResponse{
  8340. ServerResponse: googleapi.ServerResponse{
  8341. Header: res.Header,
  8342. HTTPStatusCode: res.StatusCode,
  8343. },
  8344. }
  8345. target := &ret
  8346. if err := gensupport.DecodeResponse(target, res); err != nil {
  8347. return nil, err
  8348. }
  8349. return ret, nil
  8350. // {
  8351. // "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.",
  8352. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}:testIamPermissions",
  8353. // "httpMethod": "POST",
  8354. // "id": "healthcare.projects.locations.datasets.dicomStores.testIamPermissions",
  8355. // "parameterOrder": [
  8356. // "resource"
  8357. // ],
  8358. // "parameters": {
  8359. // "resource": {
  8360. // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
  8361. // "location": "path",
  8362. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  8363. // "required": true,
  8364. // "type": "string"
  8365. // }
  8366. // },
  8367. // "path": "v1alpha2/{+resource}:testIamPermissions",
  8368. // "request": {
  8369. // "$ref": "TestIamPermissionsRequest"
  8370. // },
  8371. // "response": {
  8372. // "$ref": "TestIamPermissionsResponse"
  8373. // },
  8374. // "scopes": [
  8375. // "https://www.googleapis.com/auth/cloud-platform"
  8376. // ]
  8377. // }
  8378. }
  8379. // method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.searchForInstances":
  8380. type ProjectsLocationsDatasetsDicomStoresDicomWebSearchForInstancesCall struct {
  8381. s *Service
  8382. parent string
  8383. dicomWebPath string
  8384. urlParams_ gensupport.URLParams
  8385. ifNoneMatch_ string
  8386. ctx_ context.Context
  8387. header_ http.Header
  8388. }
  8389. // SearchForInstances: SearchForInstances returns a list of matching
  8390. // instances.
  8391. // See
  8392. // http://dicom.nema.org/medical/dicom/current/output/html/part18.htm
  8393. // l#sect_6.7
  8394. func (r *ProjectsLocationsDatasetsDicomStoresDicomWebService) SearchForInstances(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForInstancesCall {
  8395. c := &ProjectsLocationsDatasetsDicomStoresDicomWebSearchForInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8396. c.parent = parent
  8397. c.dicomWebPath = dicomWebPath
  8398. return c
  8399. }
  8400. // Fields allows partial responses to be retrieved. See
  8401. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8402. // for more information.
  8403. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForInstancesCall {
  8404. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8405. return c
  8406. }
  8407. // IfNoneMatch sets the optional parameter which makes the operation
  8408. // fail if the object's ETag matches the given value. This is useful for
  8409. // getting updates only after the object has changed since the last
  8410. // request. Use googleapi.IsNotModified to check whether the response
  8411. // error from Do is the result of In-None-Match.
  8412. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForInstancesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForInstancesCall {
  8413. c.ifNoneMatch_ = entityTag
  8414. return c
  8415. }
  8416. // Context sets the context to be used in this call's Do method. Any
  8417. // pending HTTP request will be aborted if the provided context is
  8418. // canceled.
  8419. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForInstancesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForInstancesCall {
  8420. c.ctx_ = ctx
  8421. return c
  8422. }
  8423. // Header returns an http.Header that can be modified by the caller to
  8424. // add HTTP headers to the request.
  8425. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForInstancesCall) Header() http.Header {
  8426. if c.header_ == nil {
  8427. c.header_ = make(http.Header)
  8428. }
  8429. return c.header_
  8430. }
  8431. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForInstancesCall) doRequest(alt string) (*http.Response, error) {
  8432. reqHeaders := make(http.Header)
  8433. for k, v := range c.header_ {
  8434. reqHeaders[k] = v
  8435. }
  8436. reqHeaders.Set("User-Agent", c.s.userAgent())
  8437. if c.ifNoneMatch_ != "" {
  8438. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8439. }
  8440. var body io.Reader = nil
  8441. c.urlParams_.Set("alt", alt)
  8442. c.urlParams_.Set("prettyPrint", "false")
  8443. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}")
  8444. urls += "?" + c.urlParams_.Encode()
  8445. req, err := http.NewRequest("GET", urls, body)
  8446. if err != nil {
  8447. return nil, err
  8448. }
  8449. req.Header = reqHeaders
  8450. googleapi.Expand(req.URL, map[string]string{
  8451. "parent": c.parent,
  8452. "dicomWebPath": c.dicomWebPath,
  8453. })
  8454. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8455. }
  8456. // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.searchForInstances" call.
  8457. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  8458. // code is an error. Response headers are in either
  8459. // *HttpBody.ServerResponse.Header or (if a response was returned at
  8460. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8461. // to check whether the returned error was because
  8462. // http.StatusNotModified was returned.
  8463. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForInstancesCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  8464. gensupport.SetOptions(c.urlParams_, opts...)
  8465. res, err := c.doRequest("json")
  8466. if res != nil && res.StatusCode == http.StatusNotModified {
  8467. if res.Body != nil {
  8468. res.Body.Close()
  8469. }
  8470. return nil, &googleapi.Error{
  8471. Code: res.StatusCode,
  8472. Header: res.Header,
  8473. }
  8474. }
  8475. if err != nil {
  8476. return nil, err
  8477. }
  8478. defer googleapi.CloseBody(res)
  8479. if err := googleapi.CheckResponse(res); err != nil {
  8480. return nil, err
  8481. }
  8482. ret := &HttpBody{
  8483. ServerResponse: googleapi.ServerResponse{
  8484. Header: res.Header,
  8485. HTTPStatusCode: res.StatusCode,
  8486. },
  8487. }
  8488. target := &ret
  8489. if err := gensupport.DecodeResponse(target, res); err != nil {
  8490. return nil, err
  8491. }
  8492. return ret, nil
  8493. // {
  8494. // "description": "SearchForInstances returns a list of matching instances. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_6.7",
  8495. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/instances",
  8496. // "httpMethod": "GET",
  8497. // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.searchForInstances",
  8498. // "parameterOrder": [
  8499. // "parent",
  8500. // "dicomWebPath"
  8501. // ],
  8502. // "parameters": {
  8503. // "dicomWebPath": {
  8504. // "description": "The path of the DICOMweb request, as specified in the STOW-RS, WADO-RS, or\nQIDO-RS standard (e.g.,\n`instances`).",
  8505. // "location": "path",
  8506. // "pattern": "^instances$",
  8507. // "required": true,
  8508. // "type": "string"
  8509. // },
  8510. // "parent": {
  8511. // "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}`).",
  8512. // "location": "path",
  8513. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  8514. // "required": true,
  8515. // "type": "string"
  8516. // }
  8517. // },
  8518. // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}",
  8519. // "response": {
  8520. // "$ref": "HttpBody"
  8521. // },
  8522. // "scopes": [
  8523. // "https://www.googleapis.com/auth/cloud-platform"
  8524. // ]
  8525. // }
  8526. }
  8527. // method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.searchForSeries":
  8528. type ProjectsLocationsDatasetsDicomStoresDicomWebSearchForSeriesCall struct {
  8529. s *Service
  8530. parent string
  8531. dicomWebPath string
  8532. urlParams_ gensupport.URLParams
  8533. ifNoneMatch_ string
  8534. ctx_ context.Context
  8535. header_ http.Header
  8536. }
  8537. // SearchForSeries: SearchForSeries returns a list of matching series.
  8538. // See
  8539. // http://dicom.nema.org/medical/dicom/current/output/html/part18.htm
  8540. // l#sect_6.7
  8541. func (r *ProjectsLocationsDatasetsDicomStoresDicomWebService) SearchForSeries(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForSeriesCall {
  8542. c := &ProjectsLocationsDatasetsDicomStoresDicomWebSearchForSeriesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8543. c.parent = parent
  8544. c.dicomWebPath = dicomWebPath
  8545. return c
  8546. }
  8547. // Fields allows partial responses to be retrieved. See
  8548. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8549. // for more information.
  8550. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForSeriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForSeriesCall {
  8551. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8552. return c
  8553. }
  8554. // IfNoneMatch sets the optional parameter which makes the operation
  8555. // fail if the object's ETag matches the given value. This is useful for
  8556. // getting updates only after the object has changed since the last
  8557. // request. Use googleapi.IsNotModified to check whether the response
  8558. // error from Do is the result of In-None-Match.
  8559. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForSeriesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForSeriesCall {
  8560. c.ifNoneMatch_ = entityTag
  8561. return c
  8562. }
  8563. // Context sets the context to be used in this call's Do method. Any
  8564. // pending HTTP request will be aborted if the provided context is
  8565. // canceled.
  8566. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForSeriesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForSeriesCall {
  8567. c.ctx_ = ctx
  8568. return c
  8569. }
  8570. // Header returns an http.Header that can be modified by the caller to
  8571. // add HTTP headers to the request.
  8572. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForSeriesCall) Header() http.Header {
  8573. if c.header_ == nil {
  8574. c.header_ = make(http.Header)
  8575. }
  8576. return c.header_
  8577. }
  8578. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForSeriesCall) doRequest(alt string) (*http.Response, error) {
  8579. reqHeaders := make(http.Header)
  8580. for k, v := range c.header_ {
  8581. reqHeaders[k] = v
  8582. }
  8583. reqHeaders.Set("User-Agent", c.s.userAgent())
  8584. if c.ifNoneMatch_ != "" {
  8585. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8586. }
  8587. var body io.Reader = nil
  8588. c.urlParams_.Set("alt", alt)
  8589. c.urlParams_.Set("prettyPrint", "false")
  8590. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}")
  8591. urls += "?" + c.urlParams_.Encode()
  8592. req, err := http.NewRequest("GET", urls, body)
  8593. if err != nil {
  8594. return nil, err
  8595. }
  8596. req.Header = reqHeaders
  8597. googleapi.Expand(req.URL, map[string]string{
  8598. "parent": c.parent,
  8599. "dicomWebPath": c.dicomWebPath,
  8600. })
  8601. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8602. }
  8603. // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.searchForSeries" call.
  8604. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  8605. // code is an error. Response headers are in either
  8606. // *HttpBody.ServerResponse.Header or (if a response was returned at
  8607. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8608. // to check whether the returned error was because
  8609. // http.StatusNotModified was returned.
  8610. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForSeriesCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  8611. gensupport.SetOptions(c.urlParams_, opts...)
  8612. res, err := c.doRequest("json")
  8613. if res != nil && res.StatusCode == http.StatusNotModified {
  8614. if res.Body != nil {
  8615. res.Body.Close()
  8616. }
  8617. return nil, &googleapi.Error{
  8618. Code: res.StatusCode,
  8619. Header: res.Header,
  8620. }
  8621. }
  8622. if err != nil {
  8623. return nil, err
  8624. }
  8625. defer googleapi.CloseBody(res)
  8626. if err := googleapi.CheckResponse(res); err != nil {
  8627. return nil, err
  8628. }
  8629. ret := &HttpBody{
  8630. ServerResponse: googleapi.ServerResponse{
  8631. Header: res.Header,
  8632. HTTPStatusCode: res.StatusCode,
  8633. },
  8634. }
  8635. target := &ret
  8636. if err := gensupport.DecodeResponse(target, res); err != nil {
  8637. return nil, err
  8638. }
  8639. return ret, nil
  8640. // {
  8641. // "description": "SearchForSeries returns a list of matching series. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_6.7",
  8642. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/series",
  8643. // "httpMethod": "GET",
  8644. // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.searchForSeries",
  8645. // "parameterOrder": [
  8646. // "parent",
  8647. // "dicomWebPath"
  8648. // ],
  8649. // "parameters": {
  8650. // "dicomWebPath": {
  8651. // "description": "The path of the DICOMweb request, as specified in the STOW-RS, WADO-RS, or\nQIDO-RS standard (e.g.,\n`series`).",
  8652. // "location": "path",
  8653. // "pattern": "^series$",
  8654. // "required": true,
  8655. // "type": "string"
  8656. // },
  8657. // "parent": {
  8658. // "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}`).",
  8659. // "location": "path",
  8660. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  8661. // "required": true,
  8662. // "type": "string"
  8663. // }
  8664. // },
  8665. // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}",
  8666. // "response": {
  8667. // "$ref": "HttpBody"
  8668. // },
  8669. // "scopes": [
  8670. // "https://www.googleapis.com/auth/cloud-platform"
  8671. // ]
  8672. // }
  8673. }
  8674. // method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.searchForStudies":
  8675. type ProjectsLocationsDatasetsDicomStoresDicomWebSearchForStudiesCall struct {
  8676. s *Service
  8677. parent string
  8678. dicomWebPath string
  8679. urlParams_ gensupport.URLParams
  8680. ifNoneMatch_ string
  8681. ctx_ context.Context
  8682. header_ http.Header
  8683. }
  8684. // SearchForStudies: SearchForStudies returns a list of matching
  8685. // studies.
  8686. // See
  8687. // http://dicom.nema.org/medical/dicom/current/output/html/part18.htm
  8688. // l#sect_6.7
  8689. func (r *ProjectsLocationsDatasetsDicomStoresDicomWebService) SearchForStudies(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForStudiesCall {
  8690. c := &ProjectsLocationsDatasetsDicomStoresDicomWebSearchForStudiesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8691. c.parent = parent
  8692. c.dicomWebPath = dicomWebPath
  8693. return c
  8694. }
  8695. // Fields allows partial responses to be retrieved. See
  8696. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8697. // for more information.
  8698. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForStudiesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForStudiesCall {
  8699. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8700. return c
  8701. }
  8702. // IfNoneMatch sets the optional parameter which makes the operation
  8703. // fail if the object's ETag matches the given value. This is useful for
  8704. // getting updates only after the object has changed since the last
  8705. // request. Use googleapi.IsNotModified to check whether the response
  8706. // error from Do is the result of In-None-Match.
  8707. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForStudiesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForStudiesCall {
  8708. c.ifNoneMatch_ = entityTag
  8709. return c
  8710. }
  8711. // Context sets the context to be used in this call's Do method. Any
  8712. // pending HTTP request will be aborted if the provided context is
  8713. // canceled.
  8714. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForStudiesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForStudiesCall {
  8715. c.ctx_ = ctx
  8716. return c
  8717. }
  8718. // Header returns an http.Header that can be modified by the caller to
  8719. // add HTTP headers to the request.
  8720. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForStudiesCall) Header() http.Header {
  8721. if c.header_ == nil {
  8722. c.header_ = make(http.Header)
  8723. }
  8724. return c.header_
  8725. }
  8726. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForStudiesCall) doRequest(alt string) (*http.Response, error) {
  8727. reqHeaders := make(http.Header)
  8728. for k, v := range c.header_ {
  8729. reqHeaders[k] = v
  8730. }
  8731. reqHeaders.Set("User-Agent", c.s.userAgent())
  8732. if c.ifNoneMatch_ != "" {
  8733. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8734. }
  8735. var body io.Reader = nil
  8736. c.urlParams_.Set("alt", alt)
  8737. c.urlParams_.Set("prettyPrint", "false")
  8738. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}")
  8739. urls += "?" + c.urlParams_.Encode()
  8740. req, err := http.NewRequest("GET", urls, body)
  8741. if err != nil {
  8742. return nil, err
  8743. }
  8744. req.Header = reqHeaders
  8745. googleapi.Expand(req.URL, map[string]string{
  8746. "parent": c.parent,
  8747. "dicomWebPath": c.dicomWebPath,
  8748. })
  8749. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8750. }
  8751. // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.searchForStudies" call.
  8752. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  8753. // code is an error. Response headers are in either
  8754. // *HttpBody.ServerResponse.Header or (if a response was returned at
  8755. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8756. // to check whether the returned error was because
  8757. // http.StatusNotModified was returned.
  8758. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebSearchForStudiesCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  8759. gensupport.SetOptions(c.urlParams_, opts...)
  8760. res, err := c.doRequest("json")
  8761. if res != nil && res.StatusCode == http.StatusNotModified {
  8762. if res.Body != nil {
  8763. res.Body.Close()
  8764. }
  8765. return nil, &googleapi.Error{
  8766. Code: res.StatusCode,
  8767. Header: res.Header,
  8768. }
  8769. }
  8770. if err != nil {
  8771. return nil, err
  8772. }
  8773. defer googleapi.CloseBody(res)
  8774. if err := googleapi.CheckResponse(res); err != nil {
  8775. return nil, err
  8776. }
  8777. ret := &HttpBody{
  8778. ServerResponse: googleapi.ServerResponse{
  8779. Header: res.Header,
  8780. HTTPStatusCode: res.StatusCode,
  8781. },
  8782. }
  8783. target := &ret
  8784. if err := gensupport.DecodeResponse(target, res); err != nil {
  8785. return nil, err
  8786. }
  8787. return ret, nil
  8788. // {
  8789. // "description": "SearchForStudies returns a list of matching studies. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_6.7",
  8790. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies",
  8791. // "httpMethod": "GET",
  8792. // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.searchForStudies",
  8793. // "parameterOrder": [
  8794. // "parent",
  8795. // "dicomWebPath"
  8796. // ],
  8797. // "parameters": {
  8798. // "dicomWebPath": {
  8799. // "description": "The path of the DICOMweb request, as specified in the STOW-RS, WADO-RS, or\nQIDO-RS standard (e.g.,\n`studies`).",
  8800. // "location": "path",
  8801. // "pattern": "^studies$",
  8802. // "required": true,
  8803. // "type": "string"
  8804. // },
  8805. // "parent": {
  8806. // "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}`).",
  8807. // "location": "path",
  8808. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  8809. // "required": true,
  8810. // "type": "string"
  8811. // }
  8812. // },
  8813. // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}",
  8814. // "response": {
  8815. // "$ref": "HttpBody"
  8816. // },
  8817. // "scopes": [
  8818. // "https://www.googleapis.com/auth/cloud-platform"
  8819. // ]
  8820. // }
  8821. }
  8822. // method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.storeInstances":
  8823. type ProjectsLocationsDatasetsDicomStoresDicomWebStoreInstancesCall struct {
  8824. s *Service
  8825. parent string
  8826. dicomWebPath string
  8827. httpbody *HttpBody
  8828. urlParams_ gensupport.URLParams
  8829. ctx_ context.Context
  8830. header_ http.Header
  8831. }
  8832. // StoreInstances: StoreInstances stores DICOM instances associated with
  8833. // study instance unique
  8834. // identifiers (SUID).
  8835. // See
  8836. // http://dicom.nema.org/medical/dicom/current/output/html/part18.htm
  8837. // l#sect_6.6.1.
  8838. func (r *ProjectsLocationsDatasetsDicomStoresDicomWebService) StoreInstances(parent string, dicomWebPath string, httpbody *HttpBody) *ProjectsLocationsDatasetsDicomStoresDicomWebStoreInstancesCall {
  8839. c := &ProjectsLocationsDatasetsDicomStoresDicomWebStoreInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8840. c.parent = parent
  8841. c.dicomWebPath = dicomWebPath
  8842. c.httpbody = httpbody
  8843. return c
  8844. }
  8845. // Fields allows partial responses to be retrieved. See
  8846. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8847. // for more information.
  8848. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStoreInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStoreInstancesCall {
  8849. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8850. return c
  8851. }
  8852. // Context sets the context to be used in this call's Do method. Any
  8853. // pending HTTP request will be aborted if the provided context is
  8854. // canceled.
  8855. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStoreInstancesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStoreInstancesCall {
  8856. c.ctx_ = ctx
  8857. return c
  8858. }
  8859. // Header returns an http.Header that can be modified by the caller to
  8860. // add HTTP headers to the request.
  8861. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStoreInstancesCall) Header() http.Header {
  8862. if c.header_ == nil {
  8863. c.header_ = make(http.Header)
  8864. }
  8865. return c.header_
  8866. }
  8867. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStoreInstancesCall) doRequest(alt string) (*http.Response, error) {
  8868. reqHeaders := make(http.Header)
  8869. for k, v := range c.header_ {
  8870. reqHeaders[k] = v
  8871. }
  8872. reqHeaders.Set("User-Agent", c.s.userAgent())
  8873. var body io.Reader = nil
  8874. body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpbody)
  8875. if err != nil {
  8876. return nil, err
  8877. }
  8878. reqHeaders.Set("Content-Type", "application/json")
  8879. c.urlParams_.Set("alt", alt)
  8880. c.urlParams_.Set("prettyPrint", "false")
  8881. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}")
  8882. urls += "?" + c.urlParams_.Encode()
  8883. req, err := http.NewRequest("POST", urls, body)
  8884. if err != nil {
  8885. return nil, err
  8886. }
  8887. req.Header = reqHeaders
  8888. googleapi.Expand(req.URL, map[string]string{
  8889. "parent": c.parent,
  8890. "dicomWebPath": c.dicomWebPath,
  8891. })
  8892. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8893. }
  8894. // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.storeInstances" call.
  8895. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  8896. // code is an error. Response headers are in either
  8897. // *HttpBody.ServerResponse.Header or (if a response was returned at
  8898. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8899. // to check whether the returned error was because
  8900. // http.StatusNotModified was returned.
  8901. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStoreInstancesCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  8902. gensupport.SetOptions(c.urlParams_, opts...)
  8903. res, err := c.doRequest("json")
  8904. if res != nil && res.StatusCode == http.StatusNotModified {
  8905. if res.Body != nil {
  8906. res.Body.Close()
  8907. }
  8908. return nil, &googleapi.Error{
  8909. Code: res.StatusCode,
  8910. Header: res.Header,
  8911. }
  8912. }
  8913. if err != nil {
  8914. return nil, err
  8915. }
  8916. defer googleapi.CloseBody(res)
  8917. if err := googleapi.CheckResponse(res); err != nil {
  8918. return nil, err
  8919. }
  8920. ret := &HttpBody{
  8921. ServerResponse: googleapi.ServerResponse{
  8922. Header: res.Header,
  8923. HTTPStatusCode: res.StatusCode,
  8924. },
  8925. }
  8926. target := &ret
  8927. if err := gensupport.DecodeResponse(target, res); err != nil {
  8928. return nil, err
  8929. }
  8930. return ret, nil
  8931. // {
  8932. // "description": "StoreInstances stores DICOM instances associated with study instance unique\nidentifiers (SUID). See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_6.6.1.",
  8933. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies",
  8934. // "httpMethod": "POST",
  8935. // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.storeInstances",
  8936. // "parameterOrder": [
  8937. // "parent",
  8938. // "dicomWebPath"
  8939. // ],
  8940. // "parameters": {
  8941. // "dicomWebPath": {
  8942. // "description": "The path of the DICOMweb request, as specified in the STOW-RS, WADO-RS, or\nQIDO-RS standard (e.g., `studies/{study_id}`).",
  8943. // "location": "path",
  8944. // "pattern": "^studies$",
  8945. // "required": true,
  8946. // "type": "string"
  8947. // },
  8948. // "parent": {
  8949. // "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}`).",
  8950. // "location": "path",
  8951. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  8952. // "required": true,
  8953. // "type": "string"
  8954. // }
  8955. // },
  8956. // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}",
  8957. // "request": {
  8958. // "$ref": "HttpBody"
  8959. // },
  8960. // "response": {
  8961. // "$ref": "HttpBody"
  8962. // },
  8963. // "scopes": [
  8964. // "https://www.googleapis.com/auth/cloud-platform"
  8965. // ]
  8966. // }
  8967. }
  8968. // method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.delete":
  8969. type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesDeleteCall struct {
  8970. s *Service
  8971. parent string
  8972. dicomWebPath string
  8973. urlParams_ gensupport.URLParams
  8974. ctx_ context.Context
  8975. header_ http.Header
  8976. }
  8977. // Delete: DeleteStudy deletes all instances within the given study.
  8978. // Delete requests
  8979. // are equivalent to the GET requests specified in the WADO-RS standard.
  8980. func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService) Delete(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesDeleteCall {
  8981. c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8982. c.parent = parent
  8983. c.dicomWebPath = dicomWebPath
  8984. return c
  8985. }
  8986. // Fields allows partial responses to be retrieved. See
  8987. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8988. // for more information.
  8989. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesDeleteCall {
  8990. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8991. return c
  8992. }
  8993. // Context sets the context to be used in this call's Do method. Any
  8994. // pending HTTP request will be aborted if the provided context is
  8995. // canceled.
  8996. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesDeleteCall {
  8997. c.ctx_ = ctx
  8998. return c
  8999. }
  9000. // Header returns an http.Header that can be modified by the caller to
  9001. // add HTTP headers to the request.
  9002. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesDeleteCall) Header() http.Header {
  9003. if c.header_ == nil {
  9004. c.header_ = make(http.Header)
  9005. }
  9006. return c.header_
  9007. }
  9008. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesDeleteCall) doRequest(alt string) (*http.Response, error) {
  9009. reqHeaders := make(http.Header)
  9010. for k, v := range c.header_ {
  9011. reqHeaders[k] = v
  9012. }
  9013. reqHeaders.Set("User-Agent", c.s.userAgent())
  9014. var body io.Reader = nil
  9015. c.urlParams_.Set("alt", alt)
  9016. c.urlParams_.Set("prettyPrint", "false")
  9017. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}")
  9018. urls += "?" + c.urlParams_.Encode()
  9019. req, err := http.NewRequest("DELETE", urls, body)
  9020. if err != nil {
  9021. return nil, err
  9022. }
  9023. req.Header = reqHeaders
  9024. googleapi.Expand(req.URL, map[string]string{
  9025. "parent": c.parent,
  9026. "dicomWebPath": c.dicomWebPath,
  9027. })
  9028. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9029. }
  9030. // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.delete" call.
  9031. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  9032. // code is an error. Response headers are in either
  9033. // *Empty.ServerResponse.Header or (if a response was returned at all)
  9034. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9035. // check whether the returned error was because http.StatusNotModified
  9036. // was returned.
  9037. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  9038. gensupport.SetOptions(c.urlParams_, opts...)
  9039. res, err := c.doRequest("json")
  9040. if res != nil && res.StatusCode == http.StatusNotModified {
  9041. if res.Body != nil {
  9042. res.Body.Close()
  9043. }
  9044. return nil, &googleapi.Error{
  9045. Code: res.StatusCode,
  9046. Header: res.Header,
  9047. }
  9048. }
  9049. if err != nil {
  9050. return nil, err
  9051. }
  9052. defer googleapi.CloseBody(res)
  9053. if err := googleapi.CheckResponse(res); err != nil {
  9054. return nil, err
  9055. }
  9056. ret := &Empty{
  9057. ServerResponse: googleapi.ServerResponse{
  9058. Header: res.Header,
  9059. HTTPStatusCode: res.StatusCode,
  9060. },
  9061. }
  9062. target := &ret
  9063. if err := gensupport.DecodeResponse(target, res); err != nil {
  9064. return nil, err
  9065. }
  9066. return ret, nil
  9067. // {
  9068. // "description": "DeleteStudy deletes all instances within the given study. Delete requests\nare equivalent to the GET requests specified in the WADO-RS standard.",
  9069. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}",
  9070. // "httpMethod": "DELETE",
  9071. // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.delete",
  9072. // "parameterOrder": [
  9073. // "parent",
  9074. // "dicomWebPath"
  9075. // ],
  9076. // "parameters": {
  9077. // "dicomWebPath": {
  9078. // "description": "The path of the DICOMweb request, as specified in the STOW-RS, WADO-RS, or\nQIDO-RS standard (e.g., `studies/{study_id}`).",
  9079. // "location": "path",
  9080. // "pattern": "^studies/[^/]+$",
  9081. // "required": true,
  9082. // "type": "string"
  9083. // },
  9084. // "parent": {
  9085. // "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}`).",
  9086. // "location": "path",
  9087. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  9088. // "required": true,
  9089. // "type": "string"
  9090. // }
  9091. // },
  9092. // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}",
  9093. // "response": {
  9094. // "$ref": "Empty"
  9095. // },
  9096. // "scopes": [
  9097. // "https://www.googleapis.com/auth/cloud-platform"
  9098. // ]
  9099. // }
  9100. }
  9101. // method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.metadata":
  9102. type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesMetadataCall struct {
  9103. s *Service
  9104. parent string
  9105. dicomWebPath string
  9106. urlParams_ gensupport.URLParams
  9107. ifNoneMatch_ string
  9108. ctx_ context.Context
  9109. header_ http.Header
  9110. }
  9111. // Metadata: RetrieveStudyMetadata returns instance associated with the
  9112. // given study
  9113. // presented as metadata with the bulk data removed.
  9114. // See
  9115. // http://dicom.nema.org/medical/dicom/current/output/html/part18.htm
  9116. // l#sect_6.5.6.
  9117. func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService) Metadata(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesMetadataCall {
  9118. c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9119. c.parent = parent
  9120. c.dicomWebPath = dicomWebPath
  9121. return c
  9122. }
  9123. // Fields allows partial responses to be retrieved. See
  9124. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9125. // for more information.
  9126. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesMetadataCall {
  9127. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9128. return c
  9129. }
  9130. // IfNoneMatch sets the optional parameter which makes the operation
  9131. // fail if the object's ETag matches the given value. This is useful for
  9132. // getting updates only after the object has changed since the last
  9133. // request. Use googleapi.IsNotModified to check whether the response
  9134. // error from Do is the result of In-None-Match.
  9135. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesMetadataCall {
  9136. c.ifNoneMatch_ = entityTag
  9137. return c
  9138. }
  9139. // Context sets the context to be used in this call's Do method. Any
  9140. // pending HTTP request will be aborted if the provided context is
  9141. // canceled.
  9142. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesMetadataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesMetadataCall {
  9143. c.ctx_ = ctx
  9144. return c
  9145. }
  9146. // Header returns an http.Header that can be modified by the caller to
  9147. // add HTTP headers to the request.
  9148. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesMetadataCall) Header() http.Header {
  9149. if c.header_ == nil {
  9150. c.header_ = make(http.Header)
  9151. }
  9152. return c.header_
  9153. }
  9154. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesMetadataCall) doRequest(alt string) (*http.Response, error) {
  9155. reqHeaders := make(http.Header)
  9156. for k, v := range c.header_ {
  9157. reqHeaders[k] = v
  9158. }
  9159. reqHeaders.Set("User-Agent", c.s.userAgent())
  9160. if c.ifNoneMatch_ != "" {
  9161. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9162. }
  9163. var body io.Reader = nil
  9164. c.urlParams_.Set("alt", alt)
  9165. c.urlParams_.Set("prettyPrint", "false")
  9166. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}")
  9167. urls += "?" + c.urlParams_.Encode()
  9168. req, err := http.NewRequest("GET", urls, body)
  9169. if err != nil {
  9170. return nil, err
  9171. }
  9172. req.Header = reqHeaders
  9173. googleapi.Expand(req.URL, map[string]string{
  9174. "parent": c.parent,
  9175. "dicomWebPath": c.dicomWebPath,
  9176. })
  9177. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9178. }
  9179. // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.metadata" call.
  9180. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  9181. // code is an error. Response headers are in either
  9182. // *HttpBody.ServerResponse.Header or (if a response was returned at
  9183. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  9184. // to check whether the returned error was because
  9185. // http.StatusNotModified was returned.
  9186. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesMetadataCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  9187. gensupport.SetOptions(c.urlParams_, opts...)
  9188. res, err := c.doRequest("json")
  9189. if res != nil && res.StatusCode == http.StatusNotModified {
  9190. if res.Body != nil {
  9191. res.Body.Close()
  9192. }
  9193. return nil, &googleapi.Error{
  9194. Code: res.StatusCode,
  9195. Header: res.Header,
  9196. }
  9197. }
  9198. if err != nil {
  9199. return nil, err
  9200. }
  9201. defer googleapi.CloseBody(res)
  9202. if err := googleapi.CheckResponse(res); err != nil {
  9203. return nil, err
  9204. }
  9205. ret := &HttpBody{
  9206. ServerResponse: googleapi.ServerResponse{
  9207. Header: res.Header,
  9208. HTTPStatusCode: res.StatusCode,
  9209. },
  9210. }
  9211. target := &ret
  9212. if err := gensupport.DecodeResponse(target, res); err != nil {
  9213. return nil, err
  9214. }
  9215. return ret, nil
  9216. // {
  9217. // "description": "RetrieveStudyMetadata returns instance associated with the given study\npresented as metadata with the bulk data removed. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_6.5.6.",
  9218. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/metadata",
  9219. // "httpMethod": "GET",
  9220. // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.metadata",
  9221. // "parameterOrder": [
  9222. // "parent",
  9223. // "dicomWebPath"
  9224. // ],
  9225. // "parameters": {
  9226. // "dicomWebPath": {
  9227. // "description": "The path of the DICOMweb request, as specified in the STOW-RS, WADO-RS, or\nQIDO-RS standard (e.g., `studies/{study_id}/metadata`.",
  9228. // "location": "path",
  9229. // "pattern": "^studies/[^/]+/metadata$",
  9230. // "required": true,
  9231. // "type": "string"
  9232. // },
  9233. // "parent": {
  9234. // "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}`).",
  9235. // "location": "path",
  9236. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  9237. // "required": true,
  9238. // "type": "string"
  9239. // }
  9240. // },
  9241. // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}",
  9242. // "response": {
  9243. // "$ref": "HttpBody"
  9244. // },
  9245. // "scopes": [
  9246. // "https://www.googleapis.com/auth/cloud-platform"
  9247. // ]
  9248. // }
  9249. }
  9250. // method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.retrieveStudy":
  9251. type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesRetrieveStudyCall struct {
  9252. s *Service
  9253. parent string
  9254. dicomWebPath string
  9255. urlParams_ gensupport.URLParams
  9256. ifNoneMatch_ string
  9257. ctx_ context.Context
  9258. header_ http.Header
  9259. }
  9260. // RetrieveStudy: RetrieveStudy returns all instances within the given
  9261. // study.
  9262. // See
  9263. // http://dicom.nema.org/medical/dicom/current/output/html/part18.htm
  9264. // l#sect_6.5.1.
  9265. func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService) RetrieveStudy(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesRetrieveStudyCall {
  9266. c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesRetrieveStudyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9267. c.parent = parent
  9268. c.dicomWebPath = dicomWebPath
  9269. return c
  9270. }
  9271. // Fields allows partial responses to be retrieved. See
  9272. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9273. // for more information.
  9274. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesRetrieveStudyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesRetrieveStudyCall {
  9275. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9276. return c
  9277. }
  9278. // IfNoneMatch sets the optional parameter which makes the operation
  9279. // fail if the object's ETag matches the given value. This is useful for
  9280. // getting updates only after the object has changed since the last
  9281. // request. Use googleapi.IsNotModified to check whether the response
  9282. // error from Do is the result of In-None-Match.
  9283. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesRetrieveStudyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesRetrieveStudyCall {
  9284. c.ifNoneMatch_ = entityTag
  9285. return c
  9286. }
  9287. // Context sets the context to be used in this call's Do method. Any
  9288. // pending HTTP request will be aborted if the provided context is
  9289. // canceled.
  9290. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesRetrieveStudyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesRetrieveStudyCall {
  9291. c.ctx_ = ctx
  9292. return c
  9293. }
  9294. // Header returns an http.Header that can be modified by the caller to
  9295. // add HTTP headers to the request.
  9296. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesRetrieveStudyCall) Header() http.Header {
  9297. if c.header_ == nil {
  9298. c.header_ = make(http.Header)
  9299. }
  9300. return c.header_
  9301. }
  9302. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesRetrieveStudyCall) doRequest(alt string) (*http.Response, error) {
  9303. reqHeaders := make(http.Header)
  9304. for k, v := range c.header_ {
  9305. reqHeaders[k] = v
  9306. }
  9307. reqHeaders.Set("User-Agent", c.s.userAgent())
  9308. if c.ifNoneMatch_ != "" {
  9309. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9310. }
  9311. var body io.Reader = nil
  9312. c.urlParams_.Set("alt", alt)
  9313. c.urlParams_.Set("prettyPrint", "false")
  9314. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}")
  9315. urls += "?" + c.urlParams_.Encode()
  9316. req, err := http.NewRequest("GET", urls, body)
  9317. if err != nil {
  9318. return nil, err
  9319. }
  9320. req.Header = reqHeaders
  9321. googleapi.Expand(req.URL, map[string]string{
  9322. "parent": c.parent,
  9323. "dicomWebPath": c.dicomWebPath,
  9324. })
  9325. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9326. }
  9327. // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.retrieveStudy" call.
  9328. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  9329. // code is an error. Response headers are in either
  9330. // *HttpBody.ServerResponse.Header or (if a response was returned at
  9331. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  9332. // to check whether the returned error was because
  9333. // http.StatusNotModified was returned.
  9334. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesRetrieveStudyCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  9335. gensupport.SetOptions(c.urlParams_, opts...)
  9336. res, err := c.doRequest("json")
  9337. if res != nil && res.StatusCode == http.StatusNotModified {
  9338. if res.Body != nil {
  9339. res.Body.Close()
  9340. }
  9341. return nil, &googleapi.Error{
  9342. Code: res.StatusCode,
  9343. Header: res.Header,
  9344. }
  9345. }
  9346. if err != nil {
  9347. return nil, err
  9348. }
  9349. defer googleapi.CloseBody(res)
  9350. if err := googleapi.CheckResponse(res); err != nil {
  9351. return nil, err
  9352. }
  9353. ret := &HttpBody{
  9354. ServerResponse: googleapi.ServerResponse{
  9355. Header: res.Header,
  9356. HTTPStatusCode: res.StatusCode,
  9357. },
  9358. }
  9359. target := &ret
  9360. if err := gensupport.DecodeResponse(target, res); err != nil {
  9361. return nil, err
  9362. }
  9363. return ret, nil
  9364. // {
  9365. // "description": "RetrieveStudy returns all instances within the given study. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_6.5.1.",
  9366. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}",
  9367. // "httpMethod": "GET",
  9368. // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.retrieveStudy",
  9369. // "parameterOrder": [
  9370. // "parent",
  9371. // "dicomWebPath"
  9372. // ],
  9373. // "parameters": {
  9374. // "dicomWebPath": {
  9375. // "description": "The path of the DICOMweb request, as specified in the STOW-RS, WADO-RS, or\nQIDO-RS standard (e.g., `studies/{study_id}`).",
  9376. // "location": "path",
  9377. // "pattern": "^studies/[^/]+$",
  9378. // "required": true,
  9379. // "type": "string"
  9380. // },
  9381. // "parent": {
  9382. // "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}`).",
  9383. // "location": "path",
  9384. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  9385. // "required": true,
  9386. // "type": "string"
  9387. // }
  9388. // },
  9389. // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}",
  9390. // "response": {
  9391. // "$ref": "HttpBody"
  9392. // },
  9393. // "scopes": [
  9394. // "https://www.googleapis.com/auth/cloud-platform"
  9395. // ]
  9396. // }
  9397. }
  9398. // method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.searchForInstances":
  9399. type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForInstancesCall struct {
  9400. s *Service
  9401. parent string
  9402. dicomWebPath string
  9403. urlParams_ gensupport.URLParams
  9404. ifNoneMatch_ string
  9405. ctx_ context.Context
  9406. header_ http.Header
  9407. }
  9408. // SearchForInstances: SearchForInstances returns a list of matching
  9409. // instances.
  9410. // See
  9411. // http://dicom.nema.org/medical/dicom/current/output/html/part18.htm
  9412. // l#sect_6.7
  9413. func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService) SearchForInstances(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForInstancesCall {
  9414. c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9415. c.parent = parent
  9416. c.dicomWebPath = dicomWebPath
  9417. return c
  9418. }
  9419. // Fields allows partial responses to be retrieved. See
  9420. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9421. // for more information.
  9422. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForInstancesCall {
  9423. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9424. return c
  9425. }
  9426. // IfNoneMatch sets the optional parameter which makes the operation
  9427. // fail if the object's ETag matches the given value. This is useful for
  9428. // getting updates only after the object has changed since the last
  9429. // request. Use googleapi.IsNotModified to check whether the response
  9430. // error from Do is the result of In-None-Match.
  9431. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForInstancesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForInstancesCall {
  9432. c.ifNoneMatch_ = entityTag
  9433. return c
  9434. }
  9435. // Context sets the context to be used in this call's Do method. Any
  9436. // pending HTTP request will be aborted if the provided context is
  9437. // canceled.
  9438. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForInstancesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForInstancesCall {
  9439. c.ctx_ = ctx
  9440. return c
  9441. }
  9442. // Header returns an http.Header that can be modified by the caller to
  9443. // add HTTP headers to the request.
  9444. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForInstancesCall) Header() http.Header {
  9445. if c.header_ == nil {
  9446. c.header_ = make(http.Header)
  9447. }
  9448. return c.header_
  9449. }
  9450. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForInstancesCall) doRequest(alt string) (*http.Response, error) {
  9451. reqHeaders := make(http.Header)
  9452. for k, v := range c.header_ {
  9453. reqHeaders[k] = v
  9454. }
  9455. reqHeaders.Set("User-Agent", c.s.userAgent())
  9456. if c.ifNoneMatch_ != "" {
  9457. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9458. }
  9459. var body io.Reader = nil
  9460. c.urlParams_.Set("alt", alt)
  9461. c.urlParams_.Set("prettyPrint", "false")
  9462. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}")
  9463. urls += "?" + c.urlParams_.Encode()
  9464. req, err := http.NewRequest("GET", urls, body)
  9465. if err != nil {
  9466. return nil, err
  9467. }
  9468. req.Header = reqHeaders
  9469. googleapi.Expand(req.URL, map[string]string{
  9470. "parent": c.parent,
  9471. "dicomWebPath": c.dicomWebPath,
  9472. })
  9473. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9474. }
  9475. // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.searchForInstances" call.
  9476. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  9477. // code is an error. Response headers are in either
  9478. // *HttpBody.ServerResponse.Header or (if a response was returned at
  9479. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  9480. // to check whether the returned error was because
  9481. // http.StatusNotModified was returned.
  9482. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForInstancesCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  9483. gensupport.SetOptions(c.urlParams_, opts...)
  9484. res, err := c.doRequest("json")
  9485. if res != nil && res.StatusCode == http.StatusNotModified {
  9486. if res.Body != nil {
  9487. res.Body.Close()
  9488. }
  9489. return nil, &googleapi.Error{
  9490. Code: res.StatusCode,
  9491. Header: res.Header,
  9492. }
  9493. }
  9494. if err != nil {
  9495. return nil, err
  9496. }
  9497. defer googleapi.CloseBody(res)
  9498. if err := googleapi.CheckResponse(res); err != nil {
  9499. return nil, err
  9500. }
  9501. ret := &HttpBody{
  9502. ServerResponse: googleapi.ServerResponse{
  9503. Header: res.Header,
  9504. HTTPStatusCode: res.StatusCode,
  9505. },
  9506. }
  9507. target := &ret
  9508. if err := gensupport.DecodeResponse(target, res); err != nil {
  9509. return nil, err
  9510. }
  9511. return ret, nil
  9512. // {
  9513. // "description": "SearchForInstances returns a list of matching instances. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_6.7",
  9514. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/instances",
  9515. // "httpMethod": "GET",
  9516. // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.searchForInstances",
  9517. // "parameterOrder": [
  9518. // "parent",
  9519. // "dicomWebPath"
  9520. // ],
  9521. // "parameters": {
  9522. // "dicomWebPath": {
  9523. // "description": "The path of the DICOMweb request, as specified in the STOW-RS, WADO-RS, or\nQIDO-RS standard (e.g.,\n`instances`).",
  9524. // "location": "path",
  9525. // "pattern": "^studies/[^/]+/instances$",
  9526. // "required": true,
  9527. // "type": "string"
  9528. // },
  9529. // "parent": {
  9530. // "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}`).",
  9531. // "location": "path",
  9532. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  9533. // "required": true,
  9534. // "type": "string"
  9535. // }
  9536. // },
  9537. // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}",
  9538. // "response": {
  9539. // "$ref": "HttpBody"
  9540. // },
  9541. // "scopes": [
  9542. // "https://www.googleapis.com/auth/cloud-platform"
  9543. // ]
  9544. // }
  9545. }
  9546. // method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.searchForSeries":
  9547. type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForSeriesCall struct {
  9548. s *Service
  9549. parent string
  9550. dicomWebPath string
  9551. urlParams_ gensupport.URLParams
  9552. ifNoneMatch_ string
  9553. ctx_ context.Context
  9554. header_ http.Header
  9555. }
  9556. // SearchForSeries: SearchForSeries returns a list of matching series.
  9557. // See
  9558. // http://dicom.nema.org/medical/dicom/current/output/html/part18.htm
  9559. // l#sect_6.7
  9560. func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService) SearchForSeries(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForSeriesCall {
  9561. c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForSeriesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9562. c.parent = parent
  9563. c.dicomWebPath = dicomWebPath
  9564. return c
  9565. }
  9566. // Fields allows partial responses to be retrieved. See
  9567. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9568. // for more information.
  9569. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForSeriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForSeriesCall {
  9570. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9571. return c
  9572. }
  9573. // IfNoneMatch sets the optional parameter which makes the operation
  9574. // fail if the object's ETag matches the given value. This is useful for
  9575. // getting updates only after the object has changed since the last
  9576. // request. Use googleapi.IsNotModified to check whether the response
  9577. // error from Do is the result of In-None-Match.
  9578. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForSeriesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForSeriesCall {
  9579. c.ifNoneMatch_ = entityTag
  9580. return c
  9581. }
  9582. // Context sets the context to be used in this call's Do method. Any
  9583. // pending HTTP request will be aborted if the provided context is
  9584. // canceled.
  9585. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForSeriesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForSeriesCall {
  9586. c.ctx_ = ctx
  9587. return c
  9588. }
  9589. // Header returns an http.Header that can be modified by the caller to
  9590. // add HTTP headers to the request.
  9591. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForSeriesCall) Header() http.Header {
  9592. if c.header_ == nil {
  9593. c.header_ = make(http.Header)
  9594. }
  9595. return c.header_
  9596. }
  9597. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForSeriesCall) doRequest(alt string) (*http.Response, error) {
  9598. reqHeaders := make(http.Header)
  9599. for k, v := range c.header_ {
  9600. reqHeaders[k] = v
  9601. }
  9602. reqHeaders.Set("User-Agent", c.s.userAgent())
  9603. if c.ifNoneMatch_ != "" {
  9604. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9605. }
  9606. var body io.Reader = nil
  9607. c.urlParams_.Set("alt", alt)
  9608. c.urlParams_.Set("prettyPrint", "false")
  9609. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}")
  9610. urls += "?" + c.urlParams_.Encode()
  9611. req, err := http.NewRequest("GET", urls, body)
  9612. if err != nil {
  9613. return nil, err
  9614. }
  9615. req.Header = reqHeaders
  9616. googleapi.Expand(req.URL, map[string]string{
  9617. "parent": c.parent,
  9618. "dicomWebPath": c.dicomWebPath,
  9619. })
  9620. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9621. }
  9622. // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.searchForSeries" call.
  9623. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  9624. // code is an error. Response headers are in either
  9625. // *HttpBody.ServerResponse.Header or (if a response was returned at
  9626. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  9627. // to check whether the returned error was because
  9628. // http.StatusNotModified was returned.
  9629. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSearchForSeriesCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  9630. gensupport.SetOptions(c.urlParams_, opts...)
  9631. res, err := c.doRequest("json")
  9632. if res != nil && res.StatusCode == http.StatusNotModified {
  9633. if res.Body != nil {
  9634. res.Body.Close()
  9635. }
  9636. return nil, &googleapi.Error{
  9637. Code: res.StatusCode,
  9638. Header: res.Header,
  9639. }
  9640. }
  9641. if err != nil {
  9642. return nil, err
  9643. }
  9644. defer googleapi.CloseBody(res)
  9645. if err := googleapi.CheckResponse(res); err != nil {
  9646. return nil, err
  9647. }
  9648. ret := &HttpBody{
  9649. ServerResponse: googleapi.ServerResponse{
  9650. Header: res.Header,
  9651. HTTPStatusCode: res.StatusCode,
  9652. },
  9653. }
  9654. target := &ret
  9655. if err := gensupport.DecodeResponse(target, res); err != nil {
  9656. return nil, err
  9657. }
  9658. return ret, nil
  9659. // {
  9660. // "description": "SearchForSeries returns a list of matching series. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_6.7",
  9661. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series",
  9662. // "httpMethod": "GET",
  9663. // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.searchForSeries",
  9664. // "parameterOrder": [
  9665. // "parent",
  9666. // "dicomWebPath"
  9667. // ],
  9668. // "parameters": {
  9669. // "dicomWebPath": {
  9670. // "description": "The path of the DICOMweb request, as specified in the STOW-RS, WADO-RS, or\nQIDO-RS standard (e.g.,\n`series`).",
  9671. // "location": "path",
  9672. // "pattern": "^studies/[^/]+/series$",
  9673. // "required": true,
  9674. // "type": "string"
  9675. // },
  9676. // "parent": {
  9677. // "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}`).",
  9678. // "location": "path",
  9679. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  9680. // "required": true,
  9681. // "type": "string"
  9682. // }
  9683. // },
  9684. // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}",
  9685. // "response": {
  9686. // "$ref": "HttpBody"
  9687. // },
  9688. // "scopes": [
  9689. // "https://www.googleapis.com/auth/cloud-platform"
  9690. // ]
  9691. // }
  9692. }
  9693. // method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.storeInstances":
  9694. type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesStoreInstancesCall struct {
  9695. s *Service
  9696. parent string
  9697. dicomWebPath string
  9698. httpbody *HttpBody
  9699. urlParams_ gensupport.URLParams
  9700. ctx_ context.Context
  9701. header_ http.Header
  9702. }
  9703. // StoreInstances: StoreInstances stores DICOM instances associated with
  9704. // study instance unique
  9705. // identifiers (SUID).
  9706. // See
  9707. // http://dicom.nema.org/medical/dicom/current/output/html/part18.htm
  9708. // l#sect_6.6.1.
  9709. func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesService) StoreInstances(parent string, dicomWebPath string, httpbody *HttpBody) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesStoreInstancesCall {
  9710. c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesStoreInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9711. c.parent = parent
  9712. c.dicomWebPath = dicomWebPath
  9713. c.httpbody = httpbody
  9714. return c
  9715. }
  9716. // Fields allows partial responses to be retrieved. See
  9717. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9718. // for more information.
  9719. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesStoreInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesStoreInstancesCall {
  9720. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9721. return c
  9722. }
  9723. // Context sets the context to be used in this call's Do method. Any
  9724. // pending HTTP request will be aborted if the provided context is
  9725. // canceled.
  9726. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesStoreInstancesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesStoreInstancesCall {
  9727. c.ctx_ = ctx
  9728. return c
  9729. }
  9730. // Header returns an http.Header that can be modified by the caller to
  9731. // add HTTP headers to the request.
  9732. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesStoreInstancesCall) Header() http.Header {
  9733. if c.header_ == nil {
  9734. c.header_ = make(http.Header)
  9735. }
  9736. return c.header_
  9737. }
  9738. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesStoreInstancesCall) doRequest(alt string) (*http.Response, error) {
  9739. reqHeaders := make(http.Header)
  9740. for k, v := range c.header_ {
  9741. reqHeaders[k] = v
  9742. }
  9743. reqHeaders.Set("User-Agent", c.s.userAgent())
  9744. var body io.Reader = nil
  9745. body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpbody)
  9746. if err != nil {
  9747. return nil, err
  9748. }
  9749. reqHeaders.Set("Content-Type", "application/json")
  9750. c.urlParams_.Set("alt", alt)
  9751. c.urlParams_.Set("prettyPrint", "false")
  9752. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}")
  9753. urls += "?" + c.urlParams_.Encode()
  9754. req, err := http.NewRequest("POST", urls, body)
  9755. if err != nil {
  9756. return nil, err
  9757. }
  9758. req.Header = reqHeaders
  9759. googleapi.Expand(req.URL, map[string]string{
  9760. "parent": c.parent,
  9761. "dicomWebPath": c.dicomWebPath,
  9762. })
  9763. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9764. }
  9765. // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.storeInstances" call.
  9766. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  9767. // code is an error. Response headers are in either
  9768. // *HttpBody.ServerResponse.Header or (if a response was returned at
  9769. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  9770. // to check whether the returned error was because
  9771. // http.StatusNotModified was returned.
  9772. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesStoreInstancesCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  9773. gensupport.SetOptions(c.urlParams_, opts...)
  9774. res, err := c.doRequest("json")
  9775. if res != nil && res.StatusCode == http.StatusNotModified {
  9776. if res.Body != nil {
  9777. res.Body.Close()
  9778. }
  9779. return nil, &googleapi.Error{
  9780. Code: res.StatusCode,
  9781. Header: res.Header,
  9782. }
  9783. }
  9784. if err != nil {
  9785. return nil, err
  9786. }
  9787. defer googleapi.CloseBody(res)
  9788. if err := googleapi.CheckResponse(res); err != nil {
  9789. return nil, err
  9790. }
  9791. ret := &HttpBody{
  9792. ServerResponse: googleapi.ServerResponse{
  9793. Header: res.Header,
  9794. HTTPStatusCode: res.StatusCode,
  9795. },
  9796. }
  9797. target := &ret
  9798. if err := gensupport.DecodeResponse(target, res); err != nil {
  9799. return nil, err
  9800. }
  9801. return ret, nil
  9802. // {
  9803. // "description": "StoreInstances stores DICOM instances associated with study instance unique\nidentifiers (SUID). See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_6.6.1.",
  9804. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}",
  9805. // "httpMethod": "POST",
  9806. // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.storeInstances",
  9807. // "parameterOrder": [
  9808. // "parent",
  9809. // "dicomWebPath"
  9810. // ],
  9811. // "parameters": {
  9812. // "dicomWebPath": {
  9813. // "description": "The path of the DICOMweb request, as specified in the STOW-RS, WADO-RS, or\nQIDO-RS standard (e.g., `studies/{study_id}`).",
  9814. // "location": "path",
  9815. // "pattern": "^studies/[^/]+$",
  9816. // "required": true,
  9817. // "type": "string"
  9818. // },
  9819. // "parent": {
  9820. // "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}`).",
  9821. // "location": "path",
  9822. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  9823. // "required": true,
  9824. // "type": "string"
  9825. // }
  9826. // },
  9827. // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}",
  9828. // "request": {
  9829. // "$ref": "HttpBody"
  9830. // },
  9831. // "response": {
  9832. // "$ref": "HttpBody"
  9833. // },
  9834. // "scopes": [
  9835. // "https://www.googleapis.com/auth/cloud-platform"
  9836. // ]
  9837. // }
  9838. }
  9839. // method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.delete":
  9840. type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesDeleteCall struct {
  9841. s *Service
  9842. parent string
  9843. dicomWebPath string
  9844. urlParams_ gensupport.URLParams
  9845. ctx_ context.Context
  9846. header_ http.Header
  9847. }
  9848. // Delete: DeleteSeries deletes all instances within the given study and
  9849. // series.
  9850. // Delete requests are equivalent to the GET requests specified in the
  9851. // WADO-RS
  9852. // standard.
  9853. func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService) Delete(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesDeleteCall {
  9854. c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9855. c.parent = parent
  9856. c.dicomWebPath = dicomWebPath
  9857. return c
  9858. }
  9859. // Fields allows partial responses to be retrieved. See
  9860. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9861. // for more information.
  9862. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesDeleteCall {
  9863. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9864. return c
  9865. }
  9866. // Context sets the context to be used in this call's Do method. Any
  9867. // pending HTTP request will be aborted if the provided context is
  9868. // canceled.
  9869. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesDeleteCall {
  9870. c.ctx_ = ctx
  9871. return c
  9872. }
  9873. // Header returns an http.Header that can be modified by the caller to
  9874. // add HTTP headers to the request.
  9875. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesDeleteCall) Header() http.Header {
  9876. if c.header_ == nil {
  9877. c.header_ = make(http.Header)
  9878. }
  9879. return c.header_
  9880. }
  9881. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesDeleteCall) doRequest(alt string) (*http.Response, error) {
  9882. reqHeaders := make(http.Header)
  9883. for k, v := range c.header_ {
  9884. reqHeaders[k] = v
  9885. }
  9886. reqHeaders.Set("User-Agent", c.s.userAgent())
  9887. var body io.Reader = nil
  9888. c.urlParams_.Set("alt", alt)
  9889. c.urlParams_.Set("prettyPrint", "false")
  9890. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}")
  9891. urls += "?" + c.urlParams_.Encode()
  9892. req, err := http.NewRequest("DELETE", urls, body)
  9893. if err != nil {
  9894. return nil, err
  9895. }
  9896. req.Header = reqHeaders
  9897. googleapi.Expand(req.URL, map[string]string{
  9898. "parent": c.parent,
  9899. "dicomWebPath": c.dicomWebPath,
  9900. })
  9901. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9902. }
  9903. // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.delete" call.
  9904. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  9905. // code is an error. Response headers are in either
  9906. // *Empty.ServerResponse.Header or (if a response was returned at all)
  9907. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9908. // check whether the returned error was because http.StatusNotModified
  9909. // was returned.
  9910. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  9911. gensupport.SetOptions(c.urlParams_, opts...)
  9912. res, err := c.doRequest("json")
  9913. if res != nil && res.StatusCode == http.StatusNotModified {
  9914. if res.Body != nil {
  9915. res.Body.Close()
  9916. }
  9917. return nil, &googleapi.Error{
  9918. Code: res.StatusCode,
  9919. Header: res.Header,
  9920. }
  9921. }
  9922. if err != nil {
  9923. return nil, err
  9924. }
  9925. defer googleapi.CloseBody(res)
  9926. if err := googleapi.CheckResponse(res); err != nil {
  9927. return nil, err
  9928. }
  9929. ret := &Empty{
  9930. ServerResponse: googleapi.ServerResponse{
  9931. Header: res.Header,
  9932. HTTPStatusCode: res.StatusCode,
  9933. },
  9934. }
  9935. target := &ret
  9936. if err := gensupport.DecodeResponse(target, res); err != nil {
  9937. return nil, err
  9938. }
  9939. return ret, nil
  9940. // {
  9941. // "description": "DeleteSeries deletes all instances within the given study and series.\nDelete requests are equivalent to the GET requests specified in the WADO-RS\nstandard.",
  9942. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}",
  9943. // "httpMethod": "DELETE",
  9944. // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.delete",
  9945. // "parameterOrder": [
  9946. // "parent",
  9947. // "dicomWebPath"
  9948. // ],
  9949. // "parameters": {
  9950. // "dicomWebPath": {
  9951. // "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/{series_id}`).",
  9952. // "location": "path",
  9953. // "pattern": "^studies/[^/]+/series/[^/]+$",
  9954. // "required": true,
  9955. // "type": "string"
  9956. // },
  9957. // "parent": {
  9958. // "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}`).",
  9959. // "location": "path",
  9960. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  9961. // "required": true,
  9962. // "type": "string"
  9963. // }
  9964. // },
  9965. // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}",
  9966. // "response": {
  9967. // "$ref": "Empty"
  9968. // },
  9969. // "scopes": [
  9970. // "https://www.googleapis.com/auth/cloud-platform"
  9971. // ]
  9972. // }
  9973. }
  9974. // method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.metadata":
  9975. type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesMetadataCall struct {
  9976. s *Service
  9977. parent string
  9978. dicomWebPath string
  9979. urlParams_ gensupport.URLParams
  9980. ifNoneMatch_ string
  9981. ctx_ context.Context
  9982. header_ http.Header
  9983. }
  9984. // Metadata: RetrieveSeriesMetadata returns instance associated with the
  9985. // given study and
  9986. // series, presented as metadata with the bulk data removed.
  9987. // See
  9988. // http://dicom.nema.org/medical/dicom/current/output/html/part18.htm
  9989. // l#sect_6.5.6.
  9990. func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService) Metadata(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesMetadataCall {
  9991. c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9992. c.parent = parent
  9993. c.dicomWebPath = dicomWebPath
  9994. return c
  9995. }
  9996. // Fields allows partial responses to be retrieved. See
  9997. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9998. // for more information.
  9999. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesMetadataCall {
  10000. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10001. return c
  10002. }
  10003. // IfNoneMatch sets the optional parameter which makes the operation
  10004. // fail if the object's ETag matches the given value. This is useful for
  10005. // getting updates only after the object has changed since the last
  10006. // request. Use googleapi.IsNotModified to check whether the response
  10007. // error from Do is the result of In-None-Match.
  10008. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesMetadataCall {
  10009. c.ifNoneMatch_ = entityTag
  10010. return c
  10011. }
  10012. // Context sets the context to be used in this call's Do method. Any
  10013. // pending HTTP request will be aborted if the provided context is
  10014. // canceled.
  10015. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesMetadataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesMetadataCall {
  10016. c.ctx_ = ctx
  10017. return c
  10018. }
  10019. // Header returns an http.Header that can be modified by the caller to
  10020. // add HTTP headers to the request.
  10021. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesMetadataCall) Header() http.Header {
  10022. if c.header_ == nil {
  10023. c.header_ = make(http.Header)
  10024. }
  10025. return c.header_
  10026. }
  10027. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesMetadataCall) doRequest(alt string) (*http.Response, error) {
  10028. reqHeaders := make(http.Header)
  10029. for k, v := range c.header_ {
  10030. reqHeaders[k] = v
  10031. }
  10032. reqHeaders.Set("User-Agent", c.s.userAgent())
  10033. if c.ifNoneMatch_ != "" {
  10034. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10035. }
  10036. var body io.Reader = nil
  10037. c.urlParams_.Set("alt", alt)
  10038. c.urlParams_.Set("prettyPrint", "false")
  10039. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}")
  10040. urls += "?" + c.urlParams_.Encode()
  10041. req, err := http.NewRequest("GET", urls, body)
  10042. if err != nil {
  10043. return nil, err
  10044. }
  10045. req.Header = reqHeaders
  10046. googleapi.Expand(req.URL, map[string]string{
  10047. "parent": c.parent,
  10048. "dicomWebPath": c.dicomWebPath,
  10049. })
  10050. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10051. }
  10052. // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.metadata" call.
  10053. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  10054. // code is an error. Response headers are in either
  10055. // *HttpBody.ServerResponse.Header or (if a response was returned at
  10056. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  10057. // to check whether the returned error was because
  10058. // http.StatusNotModified was returned.
  10059. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesMetadataCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  10060. gensupport.SetOptions(c.urlParams_, opts...)
  10061. res, err := c.doRequest("json")
  10062. if res != nil && res.StatusCode == http.StatusNotModified {
  10063. if res.Body != nil {
  10064. res.Body.Close()
  10065. }
  10066. return nil, &googleapi.Error{
  10067. Code: res.StatusCode,
  10068. Header: res.Header,
  10069. }
  10070. }
  10071. if err != nil {
  10072. return nil, err
  10073. }
  10074. defer googleapi.CloseBody(res)
  10075. if err := googleapi.CheckResponse(res); err != nil {
  10076. return nil, err
  10077. }
  10078. ret := &HttpBody{
  10079. ServerResponse: googleapi.ServerResponse{
  10080. Header: res.Header,
  10081. HTTPStatusCode: res.StatusCode,
  10082. },
  10083. }
  10084. target := &ret
  10085. if err := gensupport.DecodeResponse(target, res); err != nil {
  10086. return nil, err
  10087. }
  10088. return ret, nil
  10089. // {
  10090. // "description": "RetrieveSeriesMetadata returns instance associated with the given study and\nseries, presented as metadata with the bulk data removed. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_6.5.6.",
  10091. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/metadata",
  10092. // "httpMethod": "GET",
  10093. // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.metadata",
  10094. // "parameterOrder": [
  10095. // "parent",
  10096. // "dicomWebPath"
  10097. // ],
  10098. // "parameters": {
  10099. // "dicomWebPath": {
  10100. // "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/{series_id}/metadata`.",
  10101. // "location": "path",
  10102. // "pattern": "^studies/[^/]+/series/[^/]+/metadata$",
  10103. // "required": true,
  10104. // "type": "string"
  10105. // },
  10106. // "parent": {
  10107. // "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}`).",
  10108. // "location": "path",
  10109. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  10110. // "required": true,
  10111. // "type": "string"
  10112. // }
  10113. // },
  10114. // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}",
  10115. // "response": {
  10116. // "$ref": "HttpBody"
  10117. // },
  10118. // "scopes": [
  10119. // "https://www.googleapis.com/auth/cloud-platform"
  10120. // ]
  10121. // }
  10122. }
  10123. // method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.retrieveSeries":
  10124. type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesRetrieveSeriesCall struct {
  10125. s *Service
  10126. parent string
  10127. dicomWebPath string
  10128. urlParams_ gensupport.URLParams
  10129. ifNoneMatch_ string
  10130. ctx_ context.Context
  10131. header_ http.Header
  10132. }
  10133. // RetrieveSeries: RetrieveSeries returns all instances within the given
  10134. // study and series.
  10135. // See
  10136. // http://dicom.nema.org/medical/dicom/current/output/html/part18.htm
  10137. // l#sect_6.5.2.
  10138. func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService) RetrieveSeries(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesRetrieveSeriesCall {
  10139. c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesRetrieveSeriesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10140. c.parent = parent
  10141. c.dicomWebPath = dicomWebPath
  10142. return c
  10143. }
  10144. // Fields allows partial responses to be retrieved. See
  10145. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10146. // for more information.
  10147. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesRetrieveSeriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesRetrieveSeriesCall {
  10148. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10149. return c
  10150. }
  10151. // IfNoneMatch sets the optional parameter which makes the operation
  10152. // fail if the object's ETag matches the given value. This is useful for
  10153. // getting updates only after the object has changed since the last
  10154. // request. Use googleapi.IsNotModified to check whether the response
  10155. // error from Do is the result of In-None-Match.
  10156. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesRetrieveSeriesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesRetrieveSeriesCall {
  10157. c.ifNoneMatch_ = entityTag
  10158. return c
  10159. }
  10160. // Context sets the context to be used in this call's Do method. Any
  10161. // pending HTTP request will be aborted if the provided context is
  10162. // canceled.
  10163. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesRetrieveSeriesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesRetrieveSeriesCall {
  10164. c.ctx_ = ctx
  10165. return c
  10166. }
  10167. // Header returns an http.Header that can be modified by the caller to
  10168. // add HTTP headers to the request.
  10169. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesRetrieveSeriesCall) Header() http.Header {
  10170. if c.header_ == nil {
  10171. c.header_ = make(http.Header)
  10172. }
  10173. return c.header_
  10174. }
  10175. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesRetrieveSeriesCall) doRequest(alt string) (*http.Response, error) {
  10176. reqHeaders := make(http.Header)
  10177. for k, v := range c.header_ {
  10178. reqHeaders[k] = v
  10179. }
  10180. reqHeaders.Set("User-Agent", c.s.userAgent())
  10181. if c.ifNoneMatch_ != "" {
  10182. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10183. }
  10184. var body io.Reader = nil
  10185. c.urlParams_.Set("alt", alt)
  10186. c.urlParams_.Set("prettyPrint", "false")
  10187. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}")
  10188. urls += "?" + c.urlParams_.Encode()
  10189. req, err := http.NewRequest("GET", urls, body)
  10190. if err != nil {
  10191. return nil, err
  10192. }
  10193. req.Header = reqHeaders
  10194. googleapi.Expand(req.URL, map[string]string{
  10195. "parent": c.parent,
  10196. "dicomWebPath": c.dicomWebPath,
  10197. })
  10198. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10199. }
  10200. // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.retrieveSeries" call.
  10201. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  10202. // code is an error. Response headers are in either
  10203. // *HttpBody.ServerResponse.Header or (if a response was returned at
  10204. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  10205. // to check whether the returned error was because
  10206. // http.StatusNotModified was returned.
  10207. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesRetrieveSeriesCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  10208. gensupport.SetOptions(c.urlParams_, opts...)
  10209. res, err := c.doRequest("json")
  10210. if res != nil && res.StatusCode == http.StatusNotModified {
  10211. if res.Body != nil {
  10212. res.Body.Close()
  10213. }
  10214. return nil, &googleapi.Error{
  10215. Code: res.StatusCode,
  10216. Header: res.Header,
  10217. }
  10218. }
  10219. if err != nil {
  10220. return nil, err
  10221. }
  10222. defer googleapi.CloseBody(res)
  10223. if err := googleapi.CheckResponse(res); err != nil {
  10224. return nil, err
  10225. }
  10226. ret := &HttpBody{
  10227. ServerResponse: googleapi.ServerResponse{
  10228. Header: res.Header,
  10229. HTTPStatusCode: res.StatusCode,
  10230. },
  10231. }
  10232. target := &ret
  10233. if err := gensupport.DecodeResponse(target, res); err != nil {
  10234. return nil, err
  10235. }
  10236. return ret, nil
  10237. // {
  10238. // "description": "RetrieveSeries returns all instances within the given study and series. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_6.5.2.",
  10239. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}",
  10240. // "httpMethod": "GET",
  10241. // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.retrieveSeries",
  10242. // "parameterOrder": [
  10243. // "parent",
  10244. // "dicomWebPath"
  10245. // ],
  10246. // "parameters": {
  10247. // "dicomWebPath": {
  10248. // "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/{series_id}`).",
  10249. // "location": "path",
  10250. // "pattern": "^studies/[^/]+/series/[^/]+$",
  10251. // "required": true,
  10252. // "type": "string"
  10253. // },
  10254. // "parent": {
  10255. // "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}`).",
  10256. // "location": "path",
  10257. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  10258. // "required": true,
  10259. // "type": "string"
  10260. // }
  10261. // },
  10262. // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}",
  10263. // "response": {
  10264. // "$ref": "HttpBody"
  10265. // },
  10266. // "scopes": [
  10267. // "https://www.googleapis.com/auth/cloud-platform"
  10268. // ]
  10269. // }
  10270. }
  10271. // method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.searchForInstances":
  10272. type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesSearchForInstancesCall struct {
  10273. s *Service
  10274. parent string
  10275. dicomWebPath string
  10276. urlParams_ gensupport.URLParams
  10277. ifNoneMatch_ string
  10278. ctx_ context.Context
  10279. header_ http.Header
  10280. }
  10281. // SearchForInstances: SearchForInstances returns a list of matching
  10282. // instances.
  10283. // See
  10284. // http://dicom.nema.org/medical/dicom/current/output/html/part18.htm
  10285. // l#sect_6.7
  10286. func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesService) SearchForInstances(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesSearchForInstancesCall {
  10287. c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesSearchForInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10288. c.parent = parent
  10289. c.dicomWebPath = dicomWebPath
  10290. return c
  10291. }
  10292. // Fields allows partial responses to be retrieved. See
  10293. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10294. // for more information.
  10295. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesSearchForInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesSearchForInstancesCall {
  10296. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10297. return c
  10298. }
  10299. // IfNoneMatch sets the optional parameter which makes the operation
  10300. // fail if the object's ETag matches the given value. This is useful for
  10301. // getting updates only after the object has changed since the last
  10302. // request. Use googleapi.IsNotModified to check whether the response
  10303. // error from Do is the result of In-None-Match.
  10304. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesSearchForInstancesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesSearchForInstancesCall {
  10305. c.ifNoneMatch_ = entityTag
  10306. return c
  10307. }
  10308. // Context sets the context to be used in this call's Do method. Any
  10309. // pending HTTP request will be aborted if the provided context is
  10310. // canceled.
  10311. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesSearchForInstancesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesSearchForInstancesCall {
  10312. c.ctx_ = ctx
  10313. return c
  10314. }
  10315. // Header returns an http.Header that can be modified by the caller to
  10316. // add HTTP headers to the request.
  10317. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesSearchForInstancesCall) Header() http.Header {
  10318. if c.header_ == nil {
  10319. c.header_ = make(http.Header)
  10320. }
  10321. return c.header_
  10322. }
  10323. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesSearchForInstancesCall) doRequest(alt string) (*http.Response, error) {
  10324. reqHeaders := make(http.Header)
  10325. for k, v := range c.header_ {
  10326. reqHeaders[k] = v
  10327. }
  10328. reqHeaders.Set("User-Agent", c.s.userAgent())
  10329. if c.ifNoneMatch_ != "" {
  10330. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10331. }
  10332. var body io.Reader = nil
  10333. c.urlParams_.Set("alt", alt)
  10334. c.urlParams_.Set("prettyPrint", "false")
  10335. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}")
  10336. urls += "?" + c.urlParams_.Encode()
  10337. req, err := http.NewRequest("GET", urls, body)
  10338. if err != nil {
  10339. return nil, err
  10340. }
  10341. req.Header = reqHeaders
  10342. googleapi.Expand(req.URL, map[string]string{
  10343. "parent": c.parent,
  10344. "dicomWebPath": c.dicomWebPath,
  10345. })
  10346. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10347. }
  10348. // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.searchForInstances" call.
  10349. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  10350. // code is an error. Response headers are in either
  10351. // *HttpBody.ServerResponse.Header or (if a response was returned at
  10352. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  10353. // to check whether the returned error was because
  10354. // http.StatusNotModified was returned.
  10355. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesSearchForInstancesCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  10356. gensupport.SetOptions(c.urlParams_, opts...)
  10357. res, err := c.doRequest("json")
  10358. if res != nil && res.StatusCode == http.StatusNotModified {
  10359. if res.Body != nil {
  10360. res.Body.Close()
  10361. }
  10362. return nil, &googleapi.Error{
  10363. Code: res.StatusCode,
  10364. Header: res.Header,
  10365. }
  10366. }
  10367. if err != nil {
  10368. return nil, err
  10369. }
  10370. defer googleapi.CloseBody(res)
  10371. if err := googleapi.CheckResponse(res); err != nil {
  10372. return nil, err
  10373. }
  10374. ret := &HttpBody{
  10375. ServerResponse: googleapi.ServerResponse{
  10376. Header: res.Header,
  10377. HTTPStatusCode: res.StatusCode,
  10378. },
  10379. }
  10380. target := &ret
  10381. if err := gensupport.DecodeResponse(target, res); err != nil {
  10382. return nil, err
  10383. }
  10384. return ret, nil
  10385. // {
  10386. // "description": "SearchForInstances returns a list of matching instances. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_6.7",
  10387. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/instances",
  10388. // "httpMethod": "GET",
  10389. // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.searchForInstances",
  10390. // "parameterOrder": [
  10391. // "parent",
  10392. // "dicomWebPath"
  10393. // ],
  10394. // "parameters": {
  10395. // "dicomWebPath": {
  10396. // "description": "The path of the DICOMweb request, as specified in the STOW-RS, WADO-RS, or\nQIDO-RS standard (e.g.,\n`instances`).",
  10397. // "location": "path",
  10398. // "pattern": "^studies/[^/]+/series/[^/]+/instances$",
  10399. // "required": true,
  10400. // "type": "string"
  10401. // },
  10402. // "parent": {
  10403. // "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}`).",
  10404. // "location": "path",
  10405. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  10406. // "required": true,
  10407. // "type": "string"
  10408. // }
  10409. // },
  10410. // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}",
  10411. // "response": {
  10412. // "$ref": "HttpBody"
  10413. // },
  10414. // "scopes": [
  10415. // "https://www.googleapis.com/auth/cloud-platform"
  10416. // ]
  10417. // }
  10418. }
  10419. // method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.delete":
  10420. type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesDeleteCall struct {
  10421. s *Service
  10422. parent string
  10423. dicomWebPath string
  10424. urlParams_ gensupport.URLParams
  10425. ctx_ context.Context
  10426. header_ http.Header
  10427. }
  10428. // Delete: DeleteInstance deletes an instance associated with the given
  10429. // study, series,
  10430. // and SOP Instance UID. Delete requests are equivalent to the GET
  10431. // requests
  10432. // specified in the WADO-RS standard.
  10433. func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService) Delete(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesDeleteCall {
  10434. c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10435. c.parent = parent
  10436. c.dicomWebPath = dicomWebPath
  10437. return c
  10438. }
  10439. // Fields allows partial responses to be retrieved. See
  10440. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10441. // for more information.
  10442. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesDeleteCall {
  10443. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10444. return c
  10445. }
  10446. // Context sets the context to be used in this call's Do method. Any
  10447. // pending HTTP request will be aborted if the provided context is
  10448. // canceled.
  10449. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesDeleteCall {
  10450. c.ctx_ = ctx
  10451. return c
  10452. }
  10453. // Header returns an http.Header that can be modified by the caller to
  10454. // add HTTP headers to the request.
  10455. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesDeleteCall) Header() http.Header {
  10456. if c.header_ == nil {
  10457. c.header_ = make(http.Header)
  10458. }
  10459. return c.header_
  10460. }
  10461. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
  10462. reqHeaders := make(http.Header)
  10463. for k, v := range c.header_ {
  10464. reqHeaders[k] = v
  10465. }
  10466. reqHeaders.Set("User-Agent", c.s.userAgent())
  10467. var body io.Reader = nil
  10468. c.urlParams_.Set("alt", alt)
  10469. c.urlParams_.Set("prettyPrint", "false")
  10470. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}")
  10471. urls += "?" + c.urlParams_.Encode()
  10472. req, err := http.NewRequest("DELETE", urls, body)
  10473. if err != nil {
  10474. return nil, err
  10475. }
  10476. req.Header = reqHeaders
  10477. googleapi.Expand(req.URL, map[string]string{
  10478. "parent": c.parent,
  10479. "dicomWebPath": c.dicomWebPath,
  10480. })
  10481. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10482. }
  10483. // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.delete" call.
  10484. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  10485. // code is an error. Response headers are in either
  10486. // *Empty.ServerResponse.Header or (if a response was returned at all)
  10487. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  10488. // check whether the returned error was because http.StatusNotModified
  10489. // was returned.
  10490. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  10491. gensupport.SetOptions(c.urlParams_, opts...)
  10492. res, err := c.doRequest("json")
  10493. if res != nil && res.StatusCode == http.StatusNotModified {
  10494. if res.Body != nil {
  10495. res.Body.Close()
  10496. }
  10497. return nil, &googleapi.Error{
  10498. Code: res.StatusCode,
  10499. Header: res.Header,
  10500. }
  10501. }
  10502. if err != nil {
  10503. return nil, err
  10504. }
  10505. defer googleapi.CloseBody(res)
  10506. if err := googleapi.CheckResponse(res); err != nil {
  10507. return nil, err
  10508. }
  10509. ret := &Empty{
  10510. ServerResponse: googleapi.ServerResponse{
  10511. Header: res.Header,
  10512. HTTPStatusCode: res.StatusCode,
  10513. },
  10514. }
  10515. target := &ret
  10516. if err := gensupport.DecodeResponse(target, res); err != nil {
  10517. return nil, err
  10518. }
  10519. return ret, nil
  10520. // {
  10521. // "description": "DeleteInstance deletes an instance associated with the given study, series,\nand SOP Instance UID. Delete requests are equivalent to the GET requests\nspecified in the WADO-RS standard.",
  10522. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/instances/{instancesId}",
  10523. // "httpMethod": "DELETE",
  10524. // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.delete",
  10525. // "parameterOrder": [
  10526. // "parent",
  10527. // "dicomWebPath"
  10528. // ],
  10529. // "parameters": {
  10530. // "dicomWebPath": {
  10531. // "description": "The path of the DICOMweb request, as specified in the STOW-RS, WADO-RS, or\nQIDO-RS standard (e.g.,\n`studies/{study_id}/series/{series_id}/instances/{instance_id}`).",
  10532. // "location": "path",
  10533. // "pattern": "^studies/[^/]+/series/[^/]+/instances/[^/]+$",
  10534. // "required": true,
  10535. // "type": "string"
  10536. // },
  10537. // "parent": {
  10538. // "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}`).",
  10539. // "location": "path",
  10540. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  10541. // "required": true,
  10542. // "type": "string"
  10543. // }
  10544. // },
  10545. // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}",
  10546. // "response": {
  10547. // "$ref": "Empty"
  10548. // },
  10549. // "scopes": [
  10550. // "https://www.googleapis.com/auth/cloud-platform"
  10551. // ]
  10552. // }
  10553. }
  10554. // method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.metadata":
  10555. type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesMetadataCall struct {
  10556. s *Service
  10557. parent string
  10558. dicomWebPath string
  10559. urlParams_ gensupport.URLParams
  10560. ifNoneMatch_ string
  10561. ctx_ context.Context
  10562. header_ http.Header
  10563. }
  10564. // Metadata: RetrieveInstanceMetadata returns instance associated with
  10565. // the given study,
  10566. // series, and SOP Instance UID presented as metadata with the bulk
  10567. // data
  10568. // removed.
  10569. // See
  10570. // http://dicom.nema.org/medical/dicom/current/output/html/part18.htm
  10571. // l#sect_6.5.6.
  10572. func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService) Metadata(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesMetadataCall {
  10573. c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10574. c.parent = parent
  10575. c.dicomWebPath = dicomWebPath
  10576. return c
  10577. }
  10578. // Fields allows partial responses to be retrieved. See
  10579. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10580. // for more information.
  10581. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesMetadataCall {
  10582. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10583. return c
  10584. }
  10585. // IfNoneMatch sets the optional parameter which makes the operation
  10586. // fail if the object's ETag matches the given value. This is useful for
  10587. // getting updates only after the object has changed since the last
  10588. // request. Use googleapi.IsNotModified to check whether the response
  10589. // error from Do is the result of In-None-Match.
  10590. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesMetadataCall {
  10591. c.ifNoneMatch_ = entityTag
  10592. return c
  10593. }
  10594. // Context sets the context to be used in this call's Do method. Any
  10595. // pending HTTP request will be aborted if the provided context is
  10596. // canceled.
  10597. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesMetadataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesMetadataCall {
  10598. c.ctx_ = ctx
  10599. return c
  10600. }
  10601. // Header returns an http.Header that can be modified by the caller to
  10602. // add HTTP headers to the request.
  10603. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesMetadataCall) Header() http.Header {
  10604. if c.header_ == nil {
  10605. c.header_ = make(http.Header)
  10606. }
  10607. return c.header_
  10608. }
  10609. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesMetadataCall) doRequest(alt string) (*http.Response, error) {
  10610. reqHeaders := make(http.Header)
  10611. for k, v := range c.header_ {
  10612. reqHeaders[k] = v
  10613. }
  10614. reqHeaders.Set("User-Agent", c.s.userAgent())
  10615. if c.ifNoneMatch_ != "" {
  10616. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10617. }
  10618. var body io.Reader = nil
  10619. c.urlParams_.Set("alt", alt)
  10620. c.urlParams_.Set("prettyPrint", "false")
  10621. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}")
  10622. urls += "?" + c.urlParams_.Encode()
  10623. req, err := http.NewRequest("GET", urls, body)
  10624. if err != nil {
  10625. return nil, err
  10626. }
  10627. req.Header = reqHeaders
  10628. googleapi.Expand(req.URL, map[string]string{
  10629. "parent": c.parent,
  10630. "dicomWebPath": c.dicomWebPath,
  10631. })
  10632. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10633. }
  10634. // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.metadata" call.
  10635. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  10636. // code is an error. Response headers are in either
  10637. // *HttpBody.ServerResponse.Header or (if a response was returned at
  10638. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  10639. // to check whether the returned error was because
  10640. // http.StatusNotModified was returned.
  10641. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesMetadataCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  10642. gensupport.SetOptions(c.urlParams_, opts...)
  10643. res, err := c.doRequest("json")
  10644. if res != nil && res.StatusCode == http.StatusNotModified {
  10645. if res.Body != nil {
  10646. res.Body.Close()
  10647. }
  10648. return nil, &googleapi.Error{
  10649. Code: res.StatusCode,
  10650. Header: res.Header,
  10651. }
  10652. }
  10653. if err != nil {
  10654. return nil, err
  10655. }
  10656. defer googleapi.CloseBody(res)
  10657. if err := googleapi.CheckResponse(res); err != nil {
  10658. return nil, err
  10659. }
  10660. ret := &HttpBody{
  10661. ServerResponse: googleapi.ServerResponse{
  10662. Header: res.Header,
  10663. HTTPStatusCode: res.StatusCode,
  10664. },
  10665. }
  10666. target := &ret
  10667. if err := gensupport.DecodeResponse(target, res); err != nil {
  10668. return nil, err
  10669. }
  10670. return ret, nil
  10671. // {
  10672. // "description": "RetrieveInstanceMetadata returns instance associated with the given study,\nseries, and SOP Instance UID presented as metadata with the bulk data\nremoved. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_6.5.6.",
  10673. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/instances/{instancesId}/metadata",
  10674. // "httpMethod": "GET",
  10675. // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.metadata",
  10676. // "parameterOrder": [
  10677. // "parent",
  10678. // "dicomWebPath"
  10679. // ],
  10680. // "parameters": {
  10681. // "dicomWebPath": {
  10682. // "description": "The path of the DICOMweb request, as specified in the STOW-RS, WADO-RS, or\nQIDO-RS standard (e.g.,\n`studies/{study_id}/series/{series_id}/instances/{instance_id}/metadata`).",
  10683. // "location": "path",
  10684. // "pattern": "^studies/[^/]+/series/[^/]+/instances/[^/]+/metadata$",
  10685. // "required": true,
  10686. // "type": "string"
  10687. // },
  10688. // "parent": {
  10689. // "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}`).",
  10690. // "location": "path",
  10691. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  10692. // "required": true,
  10693. // "type": "string"
  10694. // }
  10695. // },
  10696. // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}",
  10697. // "response": {
  10698. // "$ref": "HttpBody"
  10699. // },
  10700. // "scopes": [
  10701. // "https://www.googleapis.com/auth/cloud-platform"
  10702. // ]
  10703. // }
  10704. }
  10705. // method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.rendered":
  10706. type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRenderedCall struct {
  10707. s *Service
  10708. parent string
  10709. dicomWebPath string
  10710. urlParams_ gensupport.URLParams
  10711. ifNoneMatch_ string
  10712. ctx_ context.Context
  10713. header_ http.Header
  10714. }
  10715. // Rendered: RetrieveRenderedInstance returns instance associated with
  10716. // the given study,
  10717. // series, and SOP Instance UID in an acceptable Rendered Media Type.
  10718. // See
  10719. // http://dicom.nema.org/medical/dicom/current/output/html/part18.htm
  10720. // l#sect_6.5.8.
  10721. func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService) Rendered(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRenderedCall {
  10722. c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRenderedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10723. c.parent = parent
  10724. c.dicomWebPath = dicomWebPath
  10725. return c
  10726. }
  10727. // Fields allows partial responses to be retrieved. See
  10728. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10729. // for more information.
  10730. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRenderedCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRenderedCall {
  10731. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10732. return c
  10733. }
  10734. // IfNoneMatch sets the optional parameter which makes the operation
  10735. // fail if the object's ETag matches the given value. This is useful for
  10736. // getting updates only after the object has changed since the last
  10737. // request. Use googleapi.IsNotModified to check whether the response
  10738. // error from Do is the result of In-None-Match.
  10739. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRenderedCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRenderedCall {
  10740. c.ifNoneMatch_ = entityTag
  10741. return c
  10742. }
  10743. // Context sets the context to be used in this call's Do method. Any
  10744. // pending HTTP request will be aborted if the provided context is
  10745. // canceled.
  10746. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRenderedCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRenderedCall {
  10747. c.ctx_ = ctx
  10748. return c
  10749. }
  10750. // Header returns an http.Header that can be modified by the caller to
  10751. // add HTTP headers to the request.
  10752. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRenderedCall) Header() http.Header {
  10753. if c.header_ == nil {
  10754. c.header_ = make(http.Header)
  10755. }
  10756. return c.header_
  10757. }
  10758. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRenderedCall) doRequest(alt string) (*http.Response, error) {
  10759. reqHeaders := make(http.Header)
  10760. for k, v := range c.header_ {
  10761. reqHeaders[k] = v
  10762. }
  10763. reqHeaders.Set("User-Agent", c.s.userAgent())
  10764. if c.ifNoneMatch_ != "" {
  10765. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10766. }
  10767. var body io.Reader = nil
  10768. c.urlParams_.Set("alt", alt)
  10769. c.urlParams_.Set("prettyPrint", "false")
  10770. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}")
  10771. urls += "?" + c.urlParams_.Encode()
  10772. req, err := http.NewRequest("GET", urls, body)
  10773. if err != nil {
  10774. return nil, err
  10775. }
  10776. req.Header = reqHeaders
  10777. googleapi.Expand(req.URL, map[string]string{
  10778. "parent": c.parent,
  10779. "dicomWebPath": c.dicomWebPath,
  10780. })
  10781. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10782. }
  10783. // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.rendered" call.
  10784. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  10785. // code is an error. Response headers are in either
  10786. // *HttpBody.ServerResponse.Header or (if a response was returned at
  10787. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  10788. // to check whether the returned error was because
  10789. // http.StatusNotModified was returned.
  10790. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRenderedCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  10791. gensupport.SetOptions(c.urlParams_, opts...)
  10792. res, err := c.doRequest("json")
  10793. if res != nil && res.StatusCode == http.StatusNotModified {
  10794. if res.Body != nil {
  10795. res.Body.Close()
  10796. }
  10797. return nil, &googleapi.Error{
  10798. Code: res.StatusCode,
  10799. Header: res.Header,
  10800. }
  10801. }
  10802. if err != nil {
  10803. return nil, err
  10804. }
  10805. defer googleapi.CloseBody(res)
  10806. if err := googleapi.CheckResponse(res); err != nil {
  10807. return nil, err
  10808. }
  10809. ret := &HttpBody{
  10810. ServerResponse: googleapi.ServerResponse{
  10811. Header: res.Header,
  10812. HTTPStatusCode: res.StatusCode,
  10813. },
  10814. }
  10815. target := &ret
  10816. if err := gensupport.DecodeResponse(target, res); err != nil {
  10817. return nil, err
  10818. }
  10819. return ret, nil
  10820. // {
  10821. // "description": "RetrieveRenderedInstance returns instance associated with the given study,\nseries, and SOP Instance UID in an acceptable Rendered Media Type. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_6.5.8.",
  10822. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/instances/{instancesId}/rendered",
  10823. // "httpMethod": "GET",
  10824. // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.rendered",
  10825. // "parameterOrder": [
  10826. // "parent",
  10827. // "dicomWebPath"
  10828. // ],
  10829. // "parameters": {
  10830. // "dicomWebPath": {
  10831. // "description": "The path of the DICOMweb request, as specified in the STOW-RS, WADO-RS, or\nQIDO-RS standard (e.g.,\n`studies/{study_id}/series/{series_id}/instance/{instance_id}/rendered`).",
  10832. // "location": "path",
  10833. // "pattern": "^studies/[^/]+/series/[^/]+/instances/[^/]+/rendered$",
  10834. // "required": true,
  10835. // "type": "string"
  10836. // },
  10837. // "parent": {
  10838. // "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}`).",
  10839. // "location": "path",
  10840. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  10841. // "required": true,
  10842. // "type": "string"
  10843. // }
  10844. // },
  10845. // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}",
  10846. // "response": {
  10847. // "$ref": "HttpBody"
  10848. // },
  10849. // "scopes": [
  10850. // "https://www.googleapis.com/auth/cloud-platform"
  10851. // ]
  10852. // }
  10853. }
  10854. // method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.retrieveInstance":
  10855. type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRetrieveInstanceCall struct {
  10856. s *Service
  10857. parent string
  10858. dicomWebPath string
  10859. urlParams_ gensupport.URLParams
  10860. ifNoneMatch_ string
  10861. ctx_ context.Context
  10862. header_ http.Header
  10863. }
  10864. // RetrieveInstance: RetrieveInstance returns instance associated with
  10865. // the given study, series,
  10866. // and SOP Instance UID.
  10867. // See
  10868. // http://dicom.nema.org/medical/dicom/current/output/html/part18.htm
  10869. // l#sect_6.5.3.
  10870. func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesService) RetrieveInstance(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRetrieveInstanceCall {
  10871. c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRetrieveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10872. c.parent = parent
  10873. c.dicomWebPath = dicomWebPath
  10874. return c
  10875. }
  10876. // Fields allows partial responses to be retrieved. See
  10877. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10878. // for more information.
  10879. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRetrieveInstanceCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRetrieveInstanceCall {
  10880. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10881. return c
  10882. }
  10883. // IfNoneMatch sets the optional parameter which makes the operation
  10884. // fail if the object's ETag matches the given value. This is useful for
  10885. // getting updates only after the object has changed since the last
  10886. // request. Use googleapi.IsNotModified to check whether the response
  10887. // error from Do is the result of In-None-Match.
  10888. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRetrieveInstanceCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRetrieveInstanceCall {
  10889. c.ifNoneMatch_ = entityTag
  10890. return c
  10891. }
  10892. // Context sets the context to be used in this call's Do method. Any
  10893. // pending HTTP request will be aborted if the provided context is
  10894. // canceled.
  10895. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRetrieveInstanceCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRetrieveInstanceCall {
  10896. c.ctx_ = ctx
  10897. return c
  10898. }
  10899. // Header returns an http.Header that can be modified by the caller to
  10900. // add HTTP headers to the request.
  10901. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRetrieveInstanceCall) Header() http.Header {
  10902. if c.header_ == nil {
  10903. c.header_ = make(http.Header)
  10904. }
  10905. return c.header_
  10906. }
  10907. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRetrieveInstanceCall) doRequest(alt string) (*http.Response, error) {
  10908. reqHeaders := make(http.Header)
  10909. for k, v := range c.header_ {
  10910. reqHeaders[k] = v
  10911. }
  10912. reqHeaders.Set("User-Agent", c.s.userAgent())
  10913. if c.ifNoneMatch_ != "" {
  10914. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10915. }
  10916. var body io.Reader = nil
  10917. c.urlParams_.Set("alt", alt)
  10918. c.urlParams_.Set("prettyPrint", "false")
  10919. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}")
  10920. urls += "?" + c.urlParams_.Encode()
  10921. req, err := http.NewRequest("GET", urls, body)
  10922. if err != nil {
  10923. return nil, err
  10924. }
  10925. req.Header = reqHeaders
  10926. googleapi.Expand(req.URL, map[string]string{
  10927. "parent": c.parent,
  10928. "dicomWebPath": c.dicomWebPath,
  10929. })
  10930. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10931. }
  10932. // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.retrieveInstance" call.
  10933. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  10934. // code is an error. Response headers are in either
  10935. // *HttpBody.ServerResponse.Header or (if a response was returned at
  10936. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  10937. // to check whether the returned error was because
  10938. // http.StatusNotModified was returned.
  10939. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesRetrieveInstanceCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  10940. gensupport.SetOptions(c.urlParams_, opts...)
  10941. res, err := c.doRequest("json")
  10942. if res != nil && res.StatusCode == http.StatusNotModified {
  10943. if res.Body != nil {
  10944. res.Body.Close()
  10945. }
  10946. return nil, &googleapi.Error{
  10947. Code: res.StatusCode,
  10948. Header: res.Header,
  10949. }
  10950. }
  10951. if err != nil {
  10952. return nil, err
  10953. }
  10954. defer googleapi.CloseBody(res)
  10955. if err := googleapi.CheckResponse(res); err != nil {
  10956. return nil, err
  10957. }
  10958. ret := &HttpBody{
  10959. ServerResponse: googleapi.ServerResponse{
  10960. Header: res.Header,
  10961. HTTPStatusCode: res.StatusCode,
  10962. },
  10963. }
  10964. target := &ret
  10965. if err := gensupport.DecodeResponse(target, res); err != nil {
  10966. return nil, err
  10967. }
  10968. return ret, nil
  10969. // {
  10970. // "description": "RetrieveInstance returns instance associated with the given study, series,\nand SOP Instance UID. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_6.5.3.",
  10971. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/instances/{instancesId}",
  10972. // "httpMethod": "GET",
  10973. // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.retrieveInstance",
  10974. // "parameterOrder": [
  10975. // "parent",
  10976. // "dicomWebPath"
  10977. // ],
  10978. // "parameters": {
  10979. // "dicomWebPath": {
  10980. // "description": "The path of the DICOMweb request, as specified in the STOW-RS, WADO-RS, or\nQIDO-RS standard (e.g.,\n`studies/{study_id}/series/{series_id}/instance/{instance_id}`).",
  10981. // "location": "path",
  10982. // "pattern": "^studies/[^/]+/series/[^/]+/instances/[^/]+$",
  10983. // "required": true,
  10984. // "type": "string"
  10985. // },
  10986. // "parent": {
  10987. // "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}`).",
  10988. // "location": "path",
  10989. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  10990. // "required": true,
  10991. // "type": "string"
  10992. // }
  10993. // },
  10994. // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}",
  10995. // "response": {
  10996. // "$ref": "HttpBody"
  10997. // },
  10998. // "scopes": [
  10999. // "https://www.googleapis.com/auth/cloud-platform"
  11000. // ]
  11001. // }
  11002. }
  11003. // method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.frames.rendered":
  11004. type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRenderedCall struct {
  11005. s *Service
  11006. parent string
  11007. dicomWebPath string
  11008. urlParams_ gensupport.URLParams
  11009. ifNoneMatch_ string
  11010. ctx_ context.Context
  11011. header_ http.Header
  11012. }
  11013. // Rendered: RetrieveRenderedFrames returns instances associated with
  11014. // the given study,
  11015. // series, SOP Instance UID and frame numbers in an acceptable Rendered
  11016. // Media
  11017. // Type.
  11018. // See
  11019. // http://dicom.nema.org/medical/dicom/current/output/html/part18.htm
  11020. // l#sect_6.5.8.
  11021. func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesService) Rendered(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRenderedCall {
  11022. c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRenderedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11023. c.parent = parent
  11024. c.dicomWebPath = dicomWebPath
  11025. return c
  11026. }
  11027. // Fields allows partial responses to be retrieved. See
  11028. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11029. // for more information.
  11030. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRenderedCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRenderedCall {
  11031. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11032. return c
  11033. }
  11034. // IfNoneMatch sets the optional parameter which makes the operation
  11035. // fail if the object's ETag matches the given value. This is useful for
  11036. // getting updates only after the object has changed since the last
  11037. // request. Use googleapi.IsNotModified to check whether the response
  11038. // error from Do is the result of In-None-Match.
  11039. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRenderedCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRenderedCall {
  11040. c.ifNoneMatch_ = entityTag
  11041. return c
  11042. }
  11043. // Context sets the context to be used in this call's Do method. Any
  11044. // pending HTTP request will be aborted if the provided context is
  11045. // canceled.
  11046. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRenderedCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRenderedCall {
  11047. c.ctx_ = ctx
  11048. return c
  11049. }
  11050. // Header returns an http.Header that can be modified by the caller to
  11051. // add HTTP headers to the request.
  11052. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRenderedCall) Header() http.Header {
  11053. if c.header_ == nil {
  11054. c.header_ = make(http.Header)
  11055. }
  11056. return c.header_
  11057. }
  11058. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRenderedCall) doRequest(alt string) (*http.Response, error) {
  11059. reqHeaders := make(http.Header)
  11060. for k, v := range c.header_ {
  11061. reqHeaders[k] = v
  11062. }
  11063. reqHeaders.Set("User-Agent", c.s.userAgent())
  11064. if c.ifNoneMatch_ != "" {
  11065. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  11066. }
  11067. var body io.Reader = nil
  11068. c.urlParams_.Set("alt", alt)
  11069. c.urlParams_.Set("prettyPrint", "false")
  11070. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}")
  11071. urls += "?" + c.urlParams_.Encode()
  11072. req, err := http.NewRequest("GET", urls, body)
  11073. if err != nil {
  11074. return nil, err
  11075. }
  11076. req.Header = reqHeaders
  11077. googleapi.Expand(req.URL, map[string]string{
  11078. "parent": c.parent,
  11079. "dicomWebPath": c.dicomWebPath,
  11080. })
  11081. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11082. }
  11083. // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.frames.rendered" call.
  11084. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  11085. // code is an error. Response headers are in either
  11086. // *HttpBody.ServerResponse.Header or (if a response was returned at
  11087. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  11088. // to check whether the returned error was because
  11089. // http.StatusNotModified was returned.
  11090. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRenderedCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  11091. gensupport.SetOptions(c.urlParams_, opts...)
  11092. res, err := c.doRequest("json")
  11093. if res != nil && res.StatusCode == http.StatusNotModified {
  11094. if res.Body != nil {
  11095. res.Body.Close()
  11096. }
  11097. return nil, &googleapi.Error{
  11098. Code: res.StatusCode,
  11099. Header: res.Header,
  11100. }
  11101. }
  11102. if err != nil {
  11103. return nil, err
  11104. }
  11105. defer googleapi.CloseBody(res)
  11106. if err := googleapi.CheckResponse(res); err != nil {
  11107. return nil, err
  11108. }
  11109. ret := &HttpBody{
  11110. ServerResponse: googleapi.ServerResponse{
  11111. Header: res.Header,
  11112. HTTPStatusCode: res.StatusCode,
  11113. },
  11114. }
  11115. target := &ret
  11116. if err := gensupport.DecodeResponse(target, res); err != nil {
  11117. return nil, err
  11118. }
  11119. return ret, nil
  11120. // {
  11121. // "description": "RetrieveRenderedFrames returns instances associated with the given study,\nseries, SOP Instance UID and frame numbers in an acceptable Rendered Media\nType. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_6.5.8.",
  11122. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/instances/{instancesId}/frames/{framesId}/rendered",
  11123. // "httpMethod": "GET",
  11124. // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.frames.rendered",
  11125. // "parameterOrder": [
  11126. // "parent",
  11127. // "dicomWebPath"
  11128. // ],
  11129. // "parameters": {
  11130. // "dicomWebPath": {
  11131. // "description": "The path of the DICOMweb request, as specified in the STOW-RS, WADO-RS, or\nQIDO-RS standard (e.g.,\n`studies/{study_id}/series/{series_id}/instance/{instance_id}/frames/{frame_list}/rendered`).",
  11132. // "location": "path",
  11133. // "pattern": "^studies/[^/]+/series/[^/]+/instances/[^/]+/frames/[^/]+/rendered$",
  11134. // "required": true,
  11135. // "type": "string"
  11136. // },
  11137. // "parent": {
  11138. // "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}`).",
  11139. // "location": "path",
  11140. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  11141. // "required": true,
  11142. // "type": "string"
  11143. // }
  11144. // },
  11145. // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}",
  11146. // "response": {
  11147. // "$ref": "HttpBody"
  11148. // },
  11149. // "scopes": [
  11150. // "https://www.googleapis.com/auth/cloud-platform"
  11151. // ]
  11152. // }
  11153. }
  11154. // method id "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.frames.retrieveFrames":
  11155. type ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRetrieveFramesCall struct {
  11156. s *Service
  11157. parent string
  11158. dicomWebPath string
  11159. urlParams_ gensupport.URLParams
  11160. ifNoneMatch_ string
  11161. ctx_ context.Context
  11162. header_ http.Header
  11163. }
  11164. // RetrieveFrames: RetrieveFrames returns instances associated with the
  11165. // given study, series,
  11166. // SOP Instance UID and frame numbers.
  11167. // See
  11168. // http://dicom.nema.org/medical/dicom/current/output/html/part18.htm
  11169. // l#sect_6.5.4.
  11170. func (r *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesService) RetrieveFrames(parent string, dicomWebPath string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRetrieveFramesCall {
  11171. c := &ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRetrieveFramesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11172. c.parent = parent
  11173. c.dicomWebPath = dicomWebPath
  11174. return c
  11175. }
  11176. // Fields allows partial responses to be retrieved. See
  11177. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11178. // for more information.
  11179. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRetrieveFramesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRetrieveFramesCall {
  11180. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11181. return c
  11182. }
  11183. // IfNoneMatch sets the optional parameter which makes the operation
  11184. // fail if the object's ETag matches the given value. This is useful for
  11185. // getting updates only after the object has changed since the last
  11186. // request. Use googleapi.IsNotModified to check whether the response
  11187. // error from Do is the result of In-None-Match.
  11188. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRetrieveFramesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRetrieveFramesCall {
  11189. c.ifNoneMatch_ = entityTag
  11190. return c
  11191. }
  11192. // Context sets the context to be used in this call's Do method. Any
  11193. // pending HTTP request will be aborted if the provided context is
  11194. // canceled.
  11195. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRetrieveFramesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRetrieveFramesCall {
  11196. c.ctx_ = ctx
  11197. return c
  11198. }
  11199. // Header returns an http.Header that can be modified by the caller to
  11200. // add HTTP headers to the request.
  11201. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRetrieveFramesCall) Header() http.Header {
  11202. if c.header_ == nil {
  11203. c.header_ = make(http.Header)
  11204. }
  11205. return c.header_
  11206. }
  11207. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRetrieveFramesCall) doRequest(alt string) (*http.Response, error) {
  11208. reqHeaders := make(http.Header)
  11209. for k, v := range c.header_ {
  11210. reqHeaders[k] = v
  11211. }
  11212. reqHeaders.Set("User-Agent", c.s.userAgent())
  11213. if c.ifNoneMatch_ != "" {
  11214. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  11215. }
  11216. var body io.Reader = nil
  11217. c.urlParams_.Set("alt", alt)
  11218. c.urlParams_.Set("prettyPrint", "false")
  11219. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}")
  11220. urls += "?" + c.urlParams_.Encode()
  11221. req, err := http.NewRequest("GET", urls, body)
  11222. if err != nil {
  11223. return nil, err
  11224. }
  11225. req.Header = reqHeaders
  11226. googleapi.Expand(req.URL, map[string]string{
  11227. "parent": c.parent,
  11228. "dicomWebPath": c.dicomWebPath,
  11229. })
  11230. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11231. }
  11232. // Do executes the "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.frames.retrieveFrames" call.
  11233. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  11234. // code is an error. Response headers are in either
  11235. // *HttpBody.ServerResponse.Header or (if a response was returned at
  11236. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  11237. // to check whether the returned error was because
  11238. // http.StatusNotModified was returned.
  11239. func (c *ProjectsLocationsDatasetsDicomStoresDicomWebStudiesSeriesInstancesFramesRetrieveFramesCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  11240. gensupport.SetOptions(c.urlParams_, opts...)
  11241. res, err := c.doRequest("json")
  11242. if res != nil && res.StatusCode == http.StatusNotModified {
  11243. if res.Body != nil {
  11244. res.Body.Close()
  11245. }
  11246. return nil, &googleapi.Error{
  11247. Code: res.StatusCode,
  11248. Header: res.Header,
  11249. }
  11250. }
  11251. if err != nil {
  11252. return nil, err
  11253. }
  11254. defer googleapi.CloseBody(res)
  11255. if err := googleapi.CheckResponse(res); err != nil {
  11256. return nil, err
  11257. }
  11258. ret := &HttpBody{
  11259. ServerResponse: googleapi.ServerResponse{
  11260. Header: res.Header,
  11261. HTTPStatusCode: res.StatusCode,
  11262. },
  11263. }
  11264. target := &ret
  11265. if err := gensupport.DecodeResponse(target, res); err != nil {
  11266. return nil, err
  11267. }
  11268. return ret, nil
  11269. // {
  11270. // "description": "RetrieveFrames returns instances associated with the given study, series,\nSOP Instance UID and frame numbers. See\nhttp://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_6.5.4.",
  11271. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/dicomStores/{dicomStoresId}/dicomWeb/studies/{studiesId}/series/{seriesId}/instances/{instancesId}/frames/{framesId}",
  11272. // "httpMethod": "GET",
  11273. // "id": "healthcare.projects.locations.datasets.dicomStores.dicomWeb.studies.series.instances.frames.retrieveFrames",
  11274. // "parameterOrder": [
  11275. // "parent",
  11276. // "dicomWebPath"
  11277. // ],
  11278. // "parameters": {
  11279. // "dicomWebPath": {
  11280. // "description": "The path of the DICOMweb request, as specified in the STOW-RS, WADO-RS, or\nQIDO-RS standard (e.g.,\n`studies/{study_id}/series/{series_id}/instance/{instance_id}/frames/{frame_list}`).",
  11281. // "location": "path",
  11282. // "pattern": "^studies/[^/]+/series/[^/]+/instances/[^/]+/frames/[^/]+$",
  11283. // "required": true,
  11284. // "type": "string"
  11285. // },
  11286. // "parent": {
  11287. // "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}`).",
  11288. // "location": "path",
  11289. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/dicomStores/[^/]+$",
  11290. // "required": true,
  11291. // "type": "string"
  11292. // }
  11293. // },
  11294. // "path": "v1alpha2/{+parent}/dicomWeb/{+dicomWebPath}",
  11295. // "response": {
  11296. // "$ref": "HttpBody"
  11297. // },
  11298. // "scopes": [
  11299. // "https://www.googleapis.com/auth/cloud-platform"
  11300. // ]
  11301. // }
  11302. }
  11303. // method id "healthcare.projects.locations.datasets.fhirStores.create":
  11304. type ProjectsLocationsDatasetsFhirStoresCreateCall struct {
  11305. s *Service
  11306. parent string
  11307. fhirstore *FhirStore
  11308. urlParams_ gensupport.URLParams
  11309. ctx_ context.Context
  11310. header_ http.Header
  11311. }
  11312. // Create: Creates a new FHIR store within the parent dataset.
  11313. func (r *ProjectsLocationsDatasetsFhirStoresService) Create(parent string, fhirstore *FhirStore) *ProjectsLocationsDatasetsFhirStoresCreateCall {
  11314. c := &ProjectsLocationsDatasetsFhirStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11315. c.parent = parent
  11316. c.fhirstore = fhirstore
  11317. return c
  11318. }
  11319. // FhirStoreId sets the optional parameter "fhirStoreId": The ID of the
  11320. // FHIR store that is being created.
  11321. // The string must match the following regex:
  11322. // `[\p{L}\p{N}_\-\.]{1,256}`.
  11323. func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) FhirStoreId(fhirStoreId string) *ProjectsLocationsDatasetsFhirStoresCreateCall {
  11324. c.urlParams_.Set("fhirStoreId", fhirStoreId)
  11325. return c
  11326. }
  11327. // Fields allows partial responses to be retrieved. See
  11328. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11329. // for more information.
  11330. func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresCreateCall {
  11331. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11332. return c
  11333. }
  11334. // Context sets the context to be used in this call's Do method. Any
  11335. // pending HTTP request will be aborted if the provided context is
  11336. // canceled.
  11337. func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresCreateCall {
  11338. c.ctx_ = ctx
  11339. return c
  11340. }
  11341. // Header returns an http.Header that can be modified by the caller to
  11342. // add HTTP headers to the request.
  11343. func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) Header() http.Header {
  11344. if c.header_ == nil {
  11345. c.header_ = make(http.Header)
  11346. }
  11347. return c.header_
  11348. }
  11349. func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) doRequest(alt string) (*http.Response, error) {
  11350. reqHeaders := make(http.Header)
  11351. for k, v := range c.header_ {
  11352. reqHeaders[k] = v
  11353. }
  11354. reqHeaders.Set("User-Agent", c.s.userAgent())
  11355. var body io.Reader = nil
  11356. body, err := googleapi.WithoutDataWrapper.JSONReader(c.fhirstore)
  11357. if err != nil {
  11358. return nil, err
  11359. }
  11360. reqHeaders.Set("Content-Type", "application/json")
  11361. c.urlParams_.Set("alt", alt)
  11362. c.urlParams_.Set("prettyPrint", "false")
  11363. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/fhirStores")
  11364. urls += "?" + c.urlParams_.Encode()
  11365. req, err := http.NewRequest("POST", urls, body)
  11366. if err != nil {
  11367. return nil, err
  11368. }
  11369. req.Header = reqHeaders
  11370. googleapi.Expand(req.URL, map[string]string{
  11371. "parent": c.parent,
  11372. })
  11373. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11374. }
  11375. // Do executes the "healthcare.projects.locations.datasets.fhirStores.create" call.
  11376. // Exactly one of *FhirStore or error will be non-nil. Any non-2xx
  11377. // status code is an error. Response headers are in either
  11378. // *FhirStore.ServerResponse.Header or (if a response was returned at
  11379. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  11380. // to check whether the returned error was because
  11381. // http.StatusNotModified was returned.
  11382. func (c *ProjectsLocationsDatasetsFhirStoresCreateCall) Do(opts ...googleapi.CallOption) (*FhirStore, error) {
  11383. gensupport.SetOptions(c.urlParams_, opts...)
  11384. res, err := c.doRequest("json")
  11385. if res != nil && res.StatusCode == http.StatusNotModified {
  11386. if res.Body != nil {
  11387. res.Body.Close()
  11388. }
  11389. return nil, &googleapi.Error{
  11390. Code: res.StatusCode,
  11391. Header: res.Header,
  11392. }
  11393. }
  11394. if err != nil {
  11395. return nil, err
  11396. }
  11397. defer googleapi.CloseBody(res)
  11398. if err := googleapi.CheckResponse(res); err != nil {
  11399. return nil, err
  11400. }
  11401. ret := &FhirStore{
  11402. ServerResponse: googleapi.ServerResponse{
  11403. Header: res.Header,
  11404. HTTPStatusCode: res.StatusCode,
  11405. },
  11406. }
  11407. target := &ret
  11408. if err := gensupport.DecodeResponse(target, res); err != nil {
  11409. return nil, err
  11410. }
  11411. return ret, nil
  11412. // {
  11413. // "description": "Creates a new FHIR store within the parent dataset.",
  11414. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores",
  11415. // "httpMethod": "POST",
  11416. // "id": "healthcare.projects.locations.datasets.fhirStores.create",
  11417. // "parameterOrder": [
  11418. // "parent"
  11419. // ],
  11420. // "parameters": {
  11421. // "fhirStoreId": {
  11422. // "description": "The ID of the FHIR store that is being created.\nThe string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.",
  11423. // "location": "query",
  11424. // "type": "string"
  11425. // },
  11426. // "parent": {
  11427. // "description": "The name of the dataset this FHIR store belongs to.",
  11428. // "location": "path",
  11429. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  11430. // "required": true,
  11431. // "type": "string"
  11432. // }
  11433. // },
  11434. // "path": "v1alpha2/{+parent}/fhirStores",
  11435. // "request": {
  11436. // "$ref": "FhirStore"
  11437. // },
  11438. // "response": {
  11439. // "$ref": "FhirStore"
  11440. // },
  11441. // "scopes": [
  11442. // "https://www.googleapis.com/auth/cloud-platform"
  11443. // ]
  11444. // }
  11445. }
  11446. // method id "healthcare.projects.locations.datasets.fhirStores.delete":
  11447. type ProjectsLocationsDatasetsFhirStoresDeleteCall struct {
  11448. s *Service
  11449. name string
  11450. urlParams_ gensupport.URLParams
  11451. ctx_ context.Context
  11452. header_ http.Header
  11453. }
  11454. // Delete: Deletes the specified FHIR store and removes all resources
  11455. // within it.
  11456. func (r *ProjectsLocationsDatasetsFhirStoresService) Delete(name string) *ProjectsLocationsDatasetsFhirStoresDeleteCall {
  11457. c := &ProjectsLocationsDatasetsFhirStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11458. c.name = name
  11459. return c
  11460. }
  11461. // Fields allows partial responses to be retrieved. See
  11462. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11463. // for more information.
  11464. func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresDeleteCall {
  11465. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11466. return c
  11467. }
  11468. // Context sets the context to be used in this call's Do method. Any
  11469. // pending HTTP request will be aborted if the provided context is
  11470. // canceled.
  11471. func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresDeleteCall {
  11472. c.ctx_ = ctx
  11473. return c
  11474. }
  11475. // Header returns an http.Header that can be modified by the caller to
  11476. // add HTTP headers to the request.
  11477. func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) Header() http.Header {
  11478. if c.header_ == nil {
  11479. c.header_ = make(http.Header)
  11480. }
  11481. return c.header_
  11482. }
  11483. func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) doRequest(alt string) (*http.Response, error) {
  11484. reqHeaders := make(http.Header)
  11485. for k, v := range c.header_ {
  11486. reqHeaders[k] = v
  11487. }
  11488. reqHeaders.Set("User-Agent", c.s.userAgent())
  11489. var body io.Reader = nil
  11490. c.urlParams_.Set("alt", alt)
  11491. c.urlParams_.Set("prettyPrint", "false")
  11492. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  11493. urls += "?" + c.urlParams_.Encode()
  11494. req, err := http.NewRequest("DELETE", urls, body)
  11495. if err != nil {
  11496. return nil, err
  11497. }
  11498. req.Header = reqHeaders
  11499. googleapi.Expand(req.URL, map[string]string{
  11500. "name": c.name,
  11501. })
  11502. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11503. }
  11504. // Do executes the "healthcare.projects.locations.datasets.fhirStores.delete" call.
  11505. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  11506. // code is an error. Response headers are in either
  11507. // *Empty.ServerResponse.Header or (if a response was returned at all)
  11508. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  11509. // check whether the returned error was because http.StatusNotModified
  11510. // was returned.
  11511. func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  11512. gensupport.SetOptions(c.urlParams_, opts...)
  11513. res, err := c.doRequest("json")
  11514. if res != nil && res.StatusCode == http.StatusNotModified {
  11515. if res.Body != nil {
  11516. res.Body.Close()
  11517. }
  11518. return nil, &googleapi.Error{
  11519. Code: res.StatusCode,
  11520. Header: res.Header,
  11521. }
  11522. }
  11523. if err != nil {
  11524. return nil, err
  11525. }
  11526. defer googleapi.CloseBody(res)
  11527. if err := googleapi.CheckResponse(res); err != nil {
  11528. return nil, err
  11529. }
  11530. ret := &Empty{
  11531. ServerResponse: googleapi.ServerResponse{
  11532. Header: res.Header,
  11533. HTTPStatusCode: res.StatusCode,
  11534. },
  11535. }
  11536. target := &ret
  11537. if err := gensupport.DecodeResponse(target, res); err != nil {
  11538. return nil, err
  11539. }
  11540. return ret, nil
  11541. // {
  11542. // "description": "Deletes the specified FHIR store and removes all resources within it.",
  11543. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}",
  11544. // "httpMethod": "DELETE",
  11545. // "id": "healthcare.projects.locations.datasets.fhirStores.delete",
  11546. // "parameterOrder": [
  11547. // "name"
  11548. // ],
  11549. // "parameters": {
  11550. // "name": {
  11551. // "description": "The resource name of the FHIR store to delete.",
  11552. // "location": "path",
  11553. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  11554. // "required": true,
  11555. // "type": "string"
  11556. // }
  11557. // },
  11558. // "path": "v1alpha2/{+name}",
  11559. // "response": {
  11560. // "$ref": "Empty"
  11561. // },
  11562. // "scopes": [
  11563. // "https://www.googleapis.com/auth/cloud-platform"
  11564. // ]
  11565. // }
  11566. }
  11567. // method id "healthcare.projects.locations.datasets.fhirStores.executeBundle":
  11568. type ProjectsLocationsDatasetsFhirStoresExecuteBundleCall struct {
  11569. s *Service
  11570. parent string
  11571. httpbody *HttpBody
  11572. urlParams_ gensupport.URLParams
  11573. ctx_ context.Context
  11574. header_ http.Header
  11575. }
  11576. // ExecuteBundle: Executes all the requests in the given Bundle.
  11577. func (r *ProjectsLocationsDatasetsFhirStoresService) ExecuteBundle(parent string, httpbody *HttpBody) *ProjectsLocationsDatasetsFhirStoresExecuteBundleCall {
  11578. c := &ProjectsLocationsDatasetsFhirStoresExecuteBundleCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11579. c.parent = parent
  11580. c.httpbody = httpbody
  11581. return c
  11582. }
  11583. // Fields allows partial responses to be retrieved. See
  11584. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11585. // for more information.
  11586. func (c *ProjectsLocationsDatasetsFhirStoresExecuteBundleCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresExecuteBundleCall {
  11587. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11588. return c
  11589. }
  11590. // Context sets the context to be used in this call's Do method. Any
  11591. // pending HTTP request will be aborted if the provided context is
  11592. // canceled.
  11593. func (c *ProjectsLocationsDatasetsFhirStoresExecuteBundleCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresExecuteBundleCall {
  11594. c.ctx_ = ctx
  11595. return c
  11596. }
  11597. // Header returns an http.Header that can be modified by the caller to
  11598. // add HTTP headers to the request.
  11599. func (c *ProjectsLocationsDatasetsFhirStoresExecuteBundleCall) Header() http.Header {
  11600. if c.header_ == nil {
  11601. c.header_ = make(http.Header)
  11602. }
  11603. return c.header_
  11604. }
  11605. func (c *ProjectsLocationsDatasetsFhirStoresExecuteBundleCall) doRequest(alt string) (*http.Response, error) {
  11606. reqHeaders := make(http.Header)
  11607. for k, v := range c.header_ {
  11608. reqHeaders[k] = v
  11609. }
  11610. reqHeaders.Set("User-Agent", c.s.userAgent())
  11611. var body io.Reader = nil
  11612. body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpbody)
  11613. if err != nil {
  11614. return nil, err
  11615. }
  11616. reqHeaders.Set("Content-Type", "application/json")
  11617. c.urlParams_.Set("alt", alt)
  11618. c.urlParams_.Set("prettyPrint", "false")
  11619. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/fhir")
  11620. urls += "?" + c.urlParams_.Encode()
  11621. req, err := http.NewRequest("POST", urls, body)
  11622. if err != nil {
  11623. return nil, err
  11624. }
  11625. req.Header = reqHeaders
  11626. googleapi.Expand(req.URL, map[string]string{
  11627. "parent": c.parent,
  11628. })
  11629. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11630. }
  11631. // Do executes the "healthcare.projects.locations.datasets.fhirStores.executeBundle" call.
  11632. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  11633. // code is an error. Response headers are in either
  11634. // *HttpBody.ServerResponse.Header or (if a response was returned at
  11635. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  11636. // to check whether the returned error was because
  11637. // http.StatusNotModified was returned.
  11638. func (c *ProjectsLocationsDatasetsFhirStoresExecuteBundleCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  11639. gensupport.SetOptions(c.urlParams_, opts...)
  11640. res, err := c.doRequest("json")
  11641. if res != nil && res.StatusCode == http.StatusNotModified {
  11642. if res.Body != nil {
  11643. res.Body.Close()
  11644. }
  11645. return nil, &googleapi.Error{
  11646. Code: res.StatusCode,
  11647. Header: res.Header,
  11648. }
  11649. }
  11650. if err != nil {
  11651. return nil, err
  11652. }
  11653. defer googleapi.CloseBody(res)
  11654. if err := googleapi.CheckResponse(res); err != nil {
  11655. return nil, err
  11656. }
  11657. ret := &HttpBody{
  11658. ServerResponse: googleapi.ServerResponse{
  11659. Header: res.Header,
  11660. HTTPStatusCode: res.StatusCode,
  11661. },
  11662. }
  11663. target := &ret
  11664. if err := gensupport.DecodeResponse(target, res); err != nil {
  11665. return nil, err
  11666. }
  11667. return ret, nil
  11668. // {
  11669. // "description": "Executes all the requests in the given Bundle.",
  11670. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir",
  11671. // "httpMethod": "POST",
  11672. // "id": "healthcare.projects.locations.datasets.fhirStores.executeBundle",
  11673. // "parameterOrder": [
  11674. // "parent"
  11675. // ],
  11676. // "parameters": {
  11677. // "parent": {
  11678. // "description": "Name of the FHIR store in which this bundle will be executed.",
  11679. // "location": "path",
  11680. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  11681. // "required": true,
  11682. // "type": "string"
  11683. // }
  11684. // },
  11685. // "path": "v1alpha2/{+parent}/fhir",
  11686. // "request": {
  11687. // "$ref": "HttpBody"
  11688. // },
  11689. // "response": {
  11690. // "$ref": "HttpBody"
  11691. // },
  11692. // "scopes": [
  11693. // "https://www.googleapis.com/auth/cloud-platform"
  11694. // ]
  11695. // }
  11696. }
  11697. // method id "healthcare.projects.locations.datasets.fhirStores.export":
  11698. type ProjectsLocationsDatasetsFhirStoresExportCall struct {
  11699. s *Service
  11700. name string
  11701. exportresourcesrequest *ExportResourcesRequest
  11702. urlParams_ gensupport.URLParams
  11703. ctx_ context.Context
  11704. header_ http.Header
  11705. }
  11706. // Export: Export resources from the FHIR store to the specified
  11707. // destination.
  11708. //
  11709. // This method returns an Operation that can
  11710. // be used to track the status of the export by
  11711. // calling
  11712. // GetOperation.
  11713. //
  11714. // Immediate fatal errors appear in the
  11715. // error field.
  11716. // Otherwise, when the operation finishes, a detailed response of
  11717. // type
  11718. // ExportResourcesResponse is returned in the
  11719. // response field.
  11720. // The metadata field type for this
  11721. // operation is OperationMetadata.
  11722. func (r *ProjectsLocationsDatasetsFhirStoresService) Export(name string, exportresourcesrequest *ExportResourcesRequest) *ProjectsLocationsDatasetsFhirStoresExportCall {
  11723. c := &ProjectsLocationsDatasetsFhirStoresExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11724. c.name = name
  11725. c.exportresourcesrequest = exportresourcesrequest
  11726. return c
  11727. }
  11728. // Fields allows partial responses to be retrieved. See
  11729. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11730. // for more information.
  11731. func (c *ProjectsLocationsDatasetsFhirStoresExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresExportCall {
  11732. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11733. return c
  11734. }
  11735. // Context sets the context to be used in this call's Do method. Any
  11736. // pending HTTP request will be aborted if the provided context is
  11737. // canceled.
  11738. func (c *ProjectsLocationsDatasetsFhirStoresExportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresExportCall {
  11739. c.ctx_ = ctx
  11740. return c
  11741. }
  11742. // Header returns an http.Header that can be modified by the caller to
  11743. // add HTTP headers to the request.
  11744. func (c *ProjectsLocationsDatasetsFhirStoresExportCall) Header() http.Header {
  11745. if c.header_ == nil {
  11746. c.header_ = make(http.Header)
  11747. }
  11748. return c.header_
  11749. }
  11750. func (c *ProjectsLocationsDatasetsFhirStoresExportCall) doRequest(alt string) (*http.Response, error) {
  11751. reqHeaders := make(http.Header)
  11752. for k, v := range c.header_ {
  11753. reqHeaders[k] = v
  11754. }
  11755. reqHeaders.Set("User-Agent", c.s.userAgent())
  11756. var body io.Reader = nil
  11757. body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportresourcesrequest)
  11758. if err != nil {
  11759. return nil, err
  11760. }
  11761. reqHeaders.Set("Content-Type", "application/json")
  11762. c.urlParams_.Set("alt", alt)
  11763. c.urlParams_.Set("prettyPrint", "false")
  11764. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}:export")
  11765. urls += "?" + c.urlParams_.Encode()
  11766. req, err := http.NewRequest("POST", urls, body)
  11767. if err != nil {
  11768. return nil, err
  11769. }
  11770. req.Header = reqHeaders
  11771. googleapi.Expand(req.URL, map[string]string{
  11772. "name": c.name,
  11773. })
  11774. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11775. }
  11776. // Do executes the "healthcare.projects.locations.datasets.fhirStores.export" call.
  11777. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  11778. // status code is an error. Response headers are in either
  11779. // *Operation.ServerResponse.Header or (if a response was returned at
  11780. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  11781. // to check whether the returned error was because
  11782. // http.StatusNotModified was returned.
  11783. func (c *ProjectsLocationsDatasetsFhirStoresExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  11784. gensupport.SetOptions(c.urlParams_, opts...)
  11785. res, err := c.doRequest("json")
  11786. if res != nil && res.StatusCode == http.StatusNotModified {
  11787. if res.Body != nil {
  11788. res.Body.Close()
  11789. }
  11790. return nil, &googleapi.Error{
  11791. Code: res.StatusCode,
  11792. Header: res.Header,
  11793. }
  11794. }
  11795. if err != nil {
  11796. return nil, err
  11797. }
  11798. defer googleapi.CloseBody(res)
  11799. if err := googleapi.CheckResponse(res); err != nil {
  11800. return nil, err
  11801. }
  11802. ret := &Operation{
  11803. ServerResponse: googleapi.ServerResponse{
  11804. Header: res.Header,
  11805. HTTPStatusCode: res.StatusCode,
  11806. },
  11807. }
  11808. target := &ret
  11809. if err := gensupport.DecodeResponse(target, res); err != nil {
  11810. return nil, err
  11811. }
  11812. return ret, nil
  11813. // {
  11814. // "description": "Export resources from the FHIR store to the specified destination.\n\nThis method returns an Operation that can\nbe used to track the status of the export by calling\nGetOperation.\n\nImmediate fatal errors appear in the\nerror field.\nOtherwise, when the operation finishes, a detailed response of type\nExportResourcesResponse is returned in the\nresponse field.\nThe metadata field type for this\noperation is OperationMetadata.",
  11815. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:export",
  11816. // "httpMethod": "POST",
  11817. // "id": "healthcare.projects.locations.datasets.fhirStores.export",
  11818. // "parameterOrder": [
  11819. // "name"
  11820. // ],
  11821. // "parameters": {
  11822. // "name": {
  11823. // "description": "The name of the FHIR store to export resource from. The name should be in\nthe format of\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}`.",
  11824. // "location": "path",
  11825. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  11826. // "required": true,
  11827. // "type": "string"
  11828. // }
  11829. // },
  11830. // "path": "v1alpha2/{+name}:export",
  11831. // "request": {
  11832. // "$ref": "ExportResourcesRequest"
  11833. // },
  11834. // "response": {
  11835. // "$ref": "Operation"
  11836. // },
  11837. // "scopes": [
  11838. // "https://www.googleapis.com/auth/cloud-platform"
  11839. // ]
  11840. // }
  11841. }
  11842. // method id "healthcare.projects.locations.datasets.fhirStores.get":
  11843. type ProjectsLocationsDatasetsFhirStoresGetCall struct {
  11844. s *Service
  11845. name string
  11846. urlParams_ gensupport.URLParams
  11847. ifNoneMatch_ string
  11848. ctx_ context.Context
  11849. header_ http.Header
  11850. }
  11851. // Get: Gets the configuration of the specified FHIR store.
  11852. func (r *ProjectsLocationsDatasetsFhirStoresService) Get(name string) *ProjectsLocationsDatasetsFhirStoresGetCall {
  11853. c := &ProjectsLocationsDatasetsFhirStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11854. c.name = name
  11855. return c
  11856. }
  11857. // Fields allows partial responses to be retrieved. See
  11858. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11859. // for more information.
  11860. func (c *ProjectsLocationsDatasetsFhirStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresGetCall {
  11861. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11862. return c
  11863. }
  11864. // IfNoneMatch sets the optional parameter which makes the operation
  11865. // fail if the object's ETag matches the given value. This is useful for
  11866. // getting updates only after the object has changed since the last
  11867. // request. Use googleapi.IsNotModified to check whether the response
  11868. // error from Do is the result of In-None-Match.
  11869. func (c *ProjectsLocationsDatasetsFhirStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresGetCall {
  11870. c.ifNoneMatch_ = entityTag
  11871. return c
  11872. }
  11873. // Context sets the context to be used in this call's Do method. Any
  11874. // pending HTTP request will be aborted if the provided context is
  11875. // canceled.
  11876. func (c *ProjectsLocationsDatasetsFhirStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresGetCall {
  11877. c.ctx_ = ctx
  11878. return c
  11879. }
  11880. // Header returns an http.Header that can be modified by the caller to
  11881. // add HTTP headers to the request.
  11882. func (c *ProjectsLocationsDatasetsFhirStoresGetCall) Header() http.Header {
  11883. if c.header_ == nil {
  11884. c.header_ = make(http.Header)
  11885. }
  11886. return c.header_
  11887. }
  11888. func (c *ProjectsLocationsDatasetsFhirStoresGetCall) doRequest(alt string) (*http.Response, error) {
  11889. reqHeaders := make(http.Header)
  11890. for k, v := range c.header_ {
  11891. reqHeaders[k] = v
  11892. }
  11893. reqHeaders.Set("User-Agent", c.s.userAgent())
  11894. if c.ifNoneMatch_ != "" {
  11895. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  11896. }
  11897. var body io.Reader = nil
  11898. c.urlParams_.Set("alt", alt)
  11899. c.urlParams_.Set("prettyPrint", "false")
  11900. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  11901. urls += "?" + c.urlParams_.Encode()
  11902. req, err := http.NewRequest("GET", urls, body)
  11903. if err != nil {
  11904. return nil, err
  11905. }
  11906. req.Header = reqHeaders
  11907. googleapi.Expand(req.URL, map[string]string{
  11908. "name": c.name,
  11909. })
  11910. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11911. }
  11912. // Do executes the "healthcare.projects.locations.datasets.fhirStores.get" call.
  11913. // Exactly one of *FhirStore or error will be non-nil. Any non-2xx
  11914. // status code is an error. Response headers are in either
  11915. // *FhirStore.ServerResponse.Header or (if a response was returned at
  11916. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  11917. // to check whether the returned error was because
  11918. // http.StatusNotModified was returned.
  11919. func (c *ProjectsLocationsDatasetsFhirStoresGetCall) Do(opts ...googleapi.CallOption) (*FhirStore, error) {
  11920. gensupport.SetOptions(c.urlParams_, opts...)
  11921. res, err := c.doRequest("json")
  11922. if res != nil && res.StatusCode == http.StatusNotModified {
  11923. if res.Body != nil {
  11924. res.Body.Close()
  11925. }
  11926. return nil, &googleapi.Error{
  11927. Code: res.StatusCode,
  11928. Header: res.Header,
  11929. }
  11930. }
  11931. if err != nil {
  11932. return nil, err
  11933. }
  11934. defer googleapi.CloseBody(res)
  11935. if err := googleapi.CheckResponse(res); err != nil {
  11936. return nil, err
  11937. }
  11938. ret := &FhirStore{
  11939. ServerResponse: googleapi.ServerResponse{
  11940. Header: res.Header,
  11941. HTTPStatusCode: res.StatusCode,
  11942. },
  11943. }
  11944. target := &ret
  11945. if err := gensupport.DecodeResponse(target, res); err != nil {
  11946. return nil, err
  11947. }
  11948. return ret, nil
  11949. // {
  11950. // "description": "Gets the configuration of the specified FHIR store.",
  11951. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}",
  11952. // "httpMethod": "GET",
  11953. // "id": "healthcare.projects.locations.datasets.fhirStores.get",
  11954. // "parameterOrder": [
  11955. // "name"
  11956. // ],
  11957. // "parameters": {
  11958. // "name": {
  11959. // "description": "The resource name of the FHIR store to get.",
  11960. // "location": "path",
  11961. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  11962. // "required": true,
  11963. // "type": "string"
  11964. // }
  11965. // },
  11966. // "path": "v1alpha2/{+name}",
  11967. // "response": {
  11968. // "$ref": "FhirStore"
  11969. // },
  11970. // "scopes": [
  11971. // "https://www.googleapis.com/auth/cloud-platform"
  11972. // ]
  11973. // }
  11974. }
  11975. // method id "healthcare.projects.locations.datasets.fhirStores.getIamPolicy":
  11976. type ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall struct {
  11977. s *Service
  11978. resource string
  11979. urlParams_ gensupport.URLParams
  11980. ifNoneMatch_ string
  11981. ctx_ context.Context
  11982. header_ http.Header
  11983. }
  11984. // GetIamPolicy: Gets the access control policy for a FHIR store or
  11985. // security label within a
  11986. // FHIR store. Returns NOT_FOUND error if the resource does not exist.
  11987. // Returns
  11988. // an empty policy if the resource exists but does not have a policy
  11989. // set.
  11990. //
  11991. // Authorization requires the Google IAM
  11992. // permission
  11993. // 'healthcare.fhirStores.getIamPolicy' for a FHIR store
  11994. // or
  11995. // 'healthcare.securityLabels.getIamPolicy' for a security label
  11996. func (r *ProjectsLocationsDatasetsFhirStoresService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall {
  11997. c := &ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11998. c.resource = resource
  11999. return c
  12000. }
  12001. // Fields allows partial responses to be retrieved. See
  12002. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  12003. // for more information.
  12004. func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall {
  12005. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  12006. return c
  12007. }
  12008. // IfNoneMatch sets the optional parameter which makes the operation
  12009. // fail if the object's ETag matches the given value. This is useful for
  12010. // getting updates only after the object has changed since the last
  12011. // request. Use googleapi.IsNotModified to check whether the response
  12012. // error from Do is the result of In-None-Match.
  12013. func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall {
  12014. c.ifNoneMatch_ = entityTag
  12015. return c
  12016. }
  12017. // Context sets the context to be used in this call's Do method. Any
  12018. // pending HTTP request will be aborted if the provided context is
  12019. // canceled.
  12020. func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall {
  12021. c.ctx_ = ctx
  12022. return c
  12023. }
  12024. // Header returns an http.Header that can be modified by the caller to
  12025. // add HTTP headers to the request.
  12026. func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) Header() http.Header {
  12027. if c.header_ == nil {
  12028. c.header_ = make(http.Header)
  12029. }
  12030. return c.header_
  12031. }
  12032. func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  12033. reqHeaders := make(http.Header)
  12034. for k, v := range c.header_ {
  12035. reqHeaders[k] = v
  12036. }
  12037. reqHeaders.Set("User-Agent", c.s.userAgent())
  12038. if c.ifNoneMatch_ != "" {
  12039. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  12040. }
  12041. var body io.Reader = nil
  12042. c.urlParams_.Set("alt", alt)
  12043. c.urlParams_.Set("prettyPrint", "false")
  12044. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:getIamPolicy")
  12045. urls += "?" + c.urlParams_.Encode()
  12046. req, err := http.NewRequest("GET", urls, body)
  12047. if err != nil {
  12048. return nil, err
  12049. }
  12050. req.Header = reqHeaders
  12051. googleapi.Expand(req.URL, map[string]string{
  12052. "resource": c.resource,
  12053. })
  12054. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  12055. }
  12056. // Do executes the "healthcare.projects.locations.datasets.fhirStores.getIamPolicy" call.
  12057. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  12058. // code is an error. Response headers are in either
  12059. // *Policy.ServerResponse.Header or (if a response was returned at all)
  12060. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  12061. // check whether the returned error was because http.StatusNotModified
  12062. // was returned.
  12063. func (c *ProjectsLocationsDatasetsFhirStoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  12064. gensupport.SetOptions(c.urlParams_, opts...)
  12065. res, err := c.doRequest("json")
  12066. if res != nil && res.StatusCode == http.StatusNotModified {
  12067. if res.Body != nil {
  12068. res.Body.Close()
  12069. }
  12070. return nil, &googleapi.Error{
  12071. Code: res.StatusCode,
  12072. Header: res.Header,
  12073. }
  12074. }
  12075. if err != nil {
  12076. return nil, err
  12077. }
  12078. defer googleapi.CloseBody(res)
  12079. if err := googleapi.CheckResponse(res); err != nil {
  12080. return nil, err
  12081. }
  12082. ret := &Policy{
  12083. ServerResponse: googleapi.ServerResponse{
  12084. Header: res.Header,
  12085. HTTPStatusCode: res.StatusCode,
  12086. },
  12087. }
  12088. target := &ret
  12089. if err := gensupport.DecodeResponse(target, res); err != nil {
  12090. return nil, err
  12091. }
  12092. return ret, nil
  12093. // {
  12094. // "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",
  12095. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:getIamPolicy",
  12096. // "httpMethod": "GET",
  12097. // "id": "healthcare.projects.locations.datasets.fhirStores.getIamPolicy",
  12098. // "parameterOrder": [
  12099. // "resource"
  12100. // ],
  12101. // "parameters": {
  12102. // "resource": {
  12103. // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
  12104. // "location": "path",
  12105. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  12106. // "required": true,
  12107. // "type": "string"
  12108. // }
  12109. // },
  12110. // "path": "v1alpha2/{+resource}:getIamPolicy",
  12111. // "response": {
  12112. // "$ref": "Policy"
  12113. // },
  12114. // "scopes": [
  12115. // "https://www.googleapis.com/auth/cloud-platform"
  12116. // ]
  12117. // }
  12118. }
  12119. // method id "healthcare.projects.locations.datasets.fhirStores.getMetadata":
  12120. type ProjectsLocationsDatasetsFhirStoresGetMetadataCall struct {
  12121. s *Service
  12122. name string
  12123. urlParams_ gensupport.URLParams
  12124. ifNoneMatch_ string
  12125. ctx_ context.Context
  12126. header_ http.Header
  12127. }
  12128. // GetMetadata: Gets the FHIR capability statement for the store, which
  12129. // contains a
  12130. // description of functionality supported by the server.
  12131. //
  12132. func (r *ProjectsLocationsDatasetsFhirStoresService) GetMetadata(name string) *ProjectsLocationsDatasetsFhirStoresGetMetadataCall {
  12133. c := &ProjectsLocationsDatasetsFhirStoresGetMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  12134. c.name = name
  12135. return c
  12136. }
  12137. // Fields allows partial responses to be retrieved. See
  12138. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  12139. // for more information.
  12140. func (c *ProjectsLocationsDatasetsFhirStoresGetMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresGetMetadataCall {
  12141. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  12142. return c
  12143. }
  12144. // IfNoneMatch sets the optional parameter which makes the operation
  12145. // fail if the object's ETag matches the given value. This is useful for
  12146. // getting updates only after the object has changed since the last
  12147. // request. Use googleapi.IsNotModified to check whether the response
  12148. // error from Do is the result of In-None-Match.
  12149. func (c *ProjectsLocationsDatasetsFhirStoresGetMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresGetMetadataCall {
  12150. c.ifNoneMatch_ = entityTag
  12151. return c
  12152. }
  12153. // Context sets the context to be used in this call's Do method. Any
  12154. // pending HTTP request will be aborted if the provided context is
  12155. // canceled.
  12156. func (c *ProjectsLocationsDatasetsFhirStoresGetMetadataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresGetMetadataCall {
  12157. c.ctx_ = ctx
  12158. return c
  12159. }
  12160. // Header returns an http.Header that can be modified by the caller to
  12161. // add HTTP headers to the request.
  12162. func (c *ProjectsLocationsDatasetsFhirStoresGetMetadataCall) Header() http.Header {
  12163. if c.header_ == nil {
  12164. c.header_ = make(http.Header)
  12165. }
  12166. return c.header_
  12167. }
  12168. func (c *ProjectsLocationsDatasetsFhirStoresGetMetadataCall) doRequest(alt string) (*http.Response, error) {
  12169. reqHeaders := make(http.Header)
  12170. for k, v := range c.header_ {
  12171. reqHeaders[k] = v
  12172. }
  12173. reqHeaders.Set("User-Agent", c.s.userAgent())
  12174. if c.ifNoneMatch_ != "" {
  12175. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  12176. }
  12177. var body io.Reader = nil
  12178. c.urlParams_.Set("alt", alt)
  12179. c.urlParams_.Set("prettyPrint", "false")
  12180. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}/metadata")
  12181. urls += "?" + c.urlParams_.Encode()
  12182. req, err := http.NewRequest("GET", urls, body)
  12183. if err != nil {
  12184. return nil, err
  12185. }
  12186. req.Header = reqHeaders
  12187. googleapi.Expand(req.URL, map[string]string{
  12188. "name": c.name,
  12189. })
  12190. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  12191. }
  12192. // Do executes the "healthcare.projects.locations.datasets.fhirStores.getMetadata" call.
  12193. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  12194. // code is an error. Response headers are in either
  12195. // *HttpBody.ServerResponse.Header or (if a response was returned at
  12196. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  12197. // to check whether the returned error was because
  12198. // http.StatusNotModified was returned.
  12199. func (c *ProjectsLocationsDatasetsFhirStoresGetMetadataCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  12200. gensupport.SetOptions(c.urlParams_, opts...)
  12201. res, err := c.doRequest("json")
  12202. if res != nil && res.StatusCode == http.StatusNotModified {
  12203. if res.Body != nil {
  12204. res.Body.Close()
  12205. }
  12206. return nil, &googleapi.Error{
  12207. Code: res.StatusCode,
  12208. Header: res.Header,
  12209. }
  12210. }
  12211. if err != nil {
  12212. return nil, err
  12213. }
  12214. defer googleapi.CloseBody(res)
  12215. if err := googleapi.CheckResponse(res); err != nil {
  12216. return nil, err
  12217. }
  12218. ret := &HttpBody{
  12219. ServerResponse: googleapi.ServerResponse{
  12220. Header: res.Header,
  12221. HTTPStatusCode: res.StatusCode,
  12222. },
  12223. }
  12224. target := &ret
  12225. if err := gensupport.DecodeResponse(target, res); err != nil {
  12226. return nil, err
  12227. }
  12228. return ret, nil
  12229. // {
  12230. // "description": "Gets the FHIR capability statement for the store, which contains a\ndescription of functionality supported by the server.\n",
  12231. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/metadata",
  12232. // "httpMethod": "GET",
  12233. // "id": "healthcare.projects.locations.datasets.fhirStores.getMetadata",
  12234. // "parameterOrder": [
  12235. // "name"
  12236. // ],
  12237. // "parameters": {
  12238. // "name": {
  12239. // "description": "Name of the FHIR store to retrieve the capabilities for.",
  12240. // "location": "path",
  12241. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  12242. // "required": true,
  12243. // "type": "string"
  12244. // }
  12245. // },
  12246. // "path": "v1alpha2/{+name}/metadata",
  12247. // "response": {
  12248. // "$ref": "HttpBody"
  12249. // },
  12250. // "scopes": [
  12251. // "https://www.googleapis.com/auth/cloud-platform"
  12252. // ]
  12253. // }
  12254. }
  12255. // method id "healthcare.projects.locations.datasets.fhirStores.import":
  12256. type ProjectsLocationsDatasetsFhirStoresImportCall struct {
  12257. s *Service
  12258. name string
  12259. importresourcesrequest *ImportResourcesRequest
  12260. urlParams_ gensupport.URLParams
  12261. ctx_ context.Context
  12262. header_ http.Header
  12263. }
  12264. // Import: Import resources to the FHIR store by loading data from the
  12265. // specified
  12266. // sources.
  12267. //
  12268. // This method returns an Operation that can
  12269. // be used to track the status of the import by
  12270. // calling
  12271. // GetOperation.
  12272. //
  12273. // Immediate fatal errors appear in the
  12274. // error field.
  12275. // Otherwise, when the operation finishes, a detailed response of
  12276. // type
  12277. // ImportResourcesResponse is returned in the
  12278. // response field.
  12279. // The metadata field type for this
  12280. // operation is OperationMetadata.
  12281. func (r *ProjectsLocationsDatasetsFhirStoresService) Import(name string, importresourcesrequest *ImportResourcesRequest) *ProjectsLocationsDatasetsFhirStoresImportCall {
  12282. c := &ProjectsLocationsDatasetsFhirStoresImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  12283. c.name = name
  12284. c.importresourcesrequest = importresourcesrequest
  12285. return c
  12286. }
  12287. // Fields allows partial responses to be retrieved. See
  12288. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  12289. // for more information.
  12290. func (c *ProjectsLocationsDatasetsFhirStoresImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresImportCall {
  12291. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  12292. return c
  12293. }
  12294. // Context sets the context to be used in this call's Do method. Any
  12295. // pending HTTP request will be aborted if the provided context is
  12296. // canceled.
  12297. func (c *ProjectsLocationsDatasetsFhirStoresImportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresImportCall {
  12298. c.ctx_ = ctx
  12299. return c
  12300. }
  12301. // Header returns an http.Header that can be modified by the caller to
  12302. // add HTTP headers to the request.
  12303. func (c *ProjectsLocationsDatasetsFhirStoresImportCall) Header() http.Header {
  12304. if c.header_ == nil {
  12305. c.header_ = make(http.Header)
  12306. }
  12307. return c.header_
  12308. }
  12309. func (c *ProjectsLocationsDatasetsFhirStoresImportCall) doRequest(alt string) (*http.Response, error) {
  12310. reqHeaders := make(http.Header)
  12311. for k, v := range c.header_ {
  12312. reqHeaders[k] = v
  12313. }
  12314. reqHeaders.Set("User-Agent", c.s.userAgent())
  12315. var body io.Reader = nil
  12316. body, err := googleapi.WithoutDataWrapper.JSONReader(c.importresourcesrequest)
  12317. if err != nil {
  12318. return nil, err
  12319. }
  12320. reqHeaders.Set("Content-Type", "application/json")
  12321. c.urlParams_.Set("alt", alt)
  12322. c.urlParams_.Set("prettyPrint", "false")
  12323. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}:import")
  12324. urls += "?" + c.urlParams_.Encode()
  12325. req, err := http.NewRequest("POST", urls, body)
  12326. if err != nil {
  12327. return nil, err
  12328. }
  12329. req.Header = reqHeaders
  12330. googleapi.Expand(req.URL, map[string]string{
  12331. "name": c.name,
  12332. })
  12333. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  12334. }
  12335. // Do executes the "healthcare.projects.locations.datasets.fhirStores.import" call.
  12336. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  12337. // status code is an error. Response headers are in either
  12338. // *Operation.ServerResponse.Header or (if a response was returned at
  12339. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  12340. // to check whether the returned error was because
  12341. // http.StatusNotModified was returned.
  12342. func (c *ProjectsLocationsDatasetsFhirStoresImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  12343. gensupport.SetOptions(c.urlParams_, opts...)
  12344. res, err := c.doRequest("json")
  12345. if res != nil && res.StatusCode == http.StatusNotModified {
  12346. if res.Body != nil {
  12347. res.Body.Close()
  12348. }
  12349. return nil, &googleapi.Error{
  12350. Code: res.StatusCode,
  12351. Header: res.Header,
  12352. }
  12353. }
  12354. if err != nil {
  12355. return nil, err
  12356. }
  12357. defer googleapi.CloseBody(res)
  12358. if err := googleapi.CheckResponse(res); err != nil {
  12359. return nil, err
  12360. }
  12361. ret := &Operation{
  12362. ServerResponse: googleapi.ServerResponse{
  12363. Header: res.Header,
  12364. HTTPStatusCode: res.StatusCode,
  12365. },
  12366. }
  12367. target := &ret
  12368. if err := gensupport.DecodeResponse(target, res); err != nil {
  12369. return nil, err
  12370. }
  12371. return ret, nil
  12372. // {
  12373. // "description": "Import resources to the FHIR store by loading data from the specified\nsources.\n\nThis method returns an Operation that can\nbe used to track the status of the import by calling\nGetOperation.\n\nImmediate fatal errors appear in the\nerror field.\nOtherwise, when the operation finishes, a detailed response of type\nImportResourcesResponse is returned in the\nresponse field.\nThe metadata field type for this\noperation is OperationMetadata.",
  12374. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:import",
  12375. // "httpMethod": "POST",
  12376. // "id": "healthcare.projects.locations.datasets.fhirStores.import",
  12377. // "parameterOrder": [
  12378. // "name"
  12379. // ],
  12380. // "parameters": {
  12381. // "name": {
  12382. // "description": "The name of the FHIR store to import FHIR resources to. The name should be\nin the format of\n`projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}`.",
  12383. // "location": "path",
  12384. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  12385. // "required": true,
  12386. // "type": "string"
  12387. // }
  12388. // },
  12389. // "path": "v1alpha2/{+name}:import",
  12390. // "request": {
  12391. // "$ref": "ImportResourcesRequest"
  12392. // },
  12393. // "response": {
  12394. // "$ref": "Operation"
  12395. // },
  12396. // "scopes": [
  12397. // "https://www.googleapis.com/auth/cloud-platform"
  12398. // ]
  12399. // }
  12400. }
  12401. // method id "healthcare.projects.locations.datasets.fhirStores.list":
  12402. type ProjectsLocationsDatasetsFhirStoresListCall struct {
  12403. s *Service
  12404. parent string
  12405. urlParams_ gensupport.URLParams
  12406. ifNoneMatch_ string
  12407. ctx_ context.Context
  12408. header_ http.Header
  12409. }
  12410. // List: Lists the FHIR stores in the given dataset.
  12411. func (r *ProjectsLocationsDatasetsFhirStoresService) List(parent string) *ProjectsLocationsDatasetsFhirStoresListCall {
  12412. c := &ProjectsLocationsDatasetsFhirStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  12413. c.parent = parent
  12414. return c
  12415. }
  12416. // Filter sets the optional parameter "filter": Restricts stores
  12417. // returned to those matching a filter.
  12418. // Syntax:
  12419. // https://cloud.google.com/appengine/docs/standard/python/search
  12420. // /query_strings
  12421. // Only filtering on labels is supported, for example
  12422. // `labels.key=value`.
  12423. func (c *ProjectsLocationsDatasetsFhirStoresListCall) Filter(filter string) *ProjectsLocationsDatasetsFhirStoresListCall {
  12424. c.urlParams_.Set("filter", filter)
  12425. return c
  12426. }
  12427. // PageSize sets the optional parameter "pageSize": Limit on the number
  12428. // of FHIR stores to return in a single response. If zero
  12429. // the default page size of 100 is used.
  12430. func (c *ProjectsLocationsDatasetsFhirStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsFhirStoresListCall {
  12431. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  12432. return c
  12433. }
  12434. // PageToken sets the optional parameter "pageToken": The
  12435. // next_page_token value returned from the previous List request, if
  12436. // any.
  12437. func (c *ProjectsLocationsDatasetsFhirStoresListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsFhirStoresListCall {
  12438. c.urlParams_.Set("pageToken", pageToken)
  12439. return c
  12440. }
  12441. // Fields allows partial responses to be retrieved. See
  12442. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  12443. // for more information.
  12444. func (c *ProjectsLocationsDatasetsFhirStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresListCall {
  12445. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  12446. return c
  12447. }
  12448. // IfNoneMatch sets the optional parameter which makes the operation
  12449. // fail if the object's ETag matches the given value. This is useful for
  12450. // getting updates only after the object has changed since the last
  12451. // request. Use googleapi.IsNotModified to check whether the response
  12452. // error from Do is the result of In-None-Match.
  12453. func (c *ProjectsLocationsDatasetsFhirStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresListCall {
  12454. c.ifNoneMatch_ = entityTag
  12455. return c
  12456. }
  12457. // Context sets the context to be used in this call's Do method. Any
  12458. // pending HTTP request will be aborted if the provided context is
  12459. // canceled.
  12460. func (c *ProjectsLocationsDatasetsFhirStoresListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresListCall {
  12461. c.ctx_ = ctx
  12462. return c
  12463. }
  12464. // Header returns an http.Header that can be modified by the caller to
  12465. // add HTTP headers to the request.
  12466. func (c *ProjectsLocationsDatasetsFhirStoresListCall) Header() http.Header {
  12467. if c.header_ == nil {
  12468. c.header_ = make(http.Header)
  12469. }
  12470. return c.header_
  12471. }
  12472. func (c *ProjectsLocationsDatasetsFhirStoresListCall) doRequest(alt string) (*http.Response, error) {
  12473. reqHeaders := make(http.Header)
  12474. for k, v := range c.header_ {
  12475. reqHeaders[k] = v
  12476. }
  12477. reqHeaders.Set("User-Agent", c.s.userAgent())
  12478. if c.ifNoneMatch_ != "" {
  12479. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  12480. }
  12481. var body io.Reader = nil
  12482. c.urlParams_.Set("alt", alt)
  12483. c.urlParams_.Set("prettyPrint", "false")
  12484. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/fhirStores")
  12485. urls += "?" + c.urlParams_.Encode()
  12486. req, err := http.NewRequest("GET", urls, body)
  12487. if err != nil {
  12488. return nil, err
  12489. }
  12490. req.Header = reqHeaders
  12491. googleapi.Expand(req.URL, map[string]string{
  12492. "parent": c.parent,
  12493. })
  12494. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  12495. }
  12496. // Do executes the "healthcare.projects.locations.datasets.fhirStores.list" call.
  12497. // Exactly one of *ListFhirStoresResponse or error will be non-nil. Any
  12498. // non-2xx status code is an error. Response headers are in either
  12499. // *ListFhirStoresResponse.ServerResponse.Header or (if a response was
  12500. // returned at all) in error.(*googleapi.Error).Header. Use
  12501. // googleapi.IsNotModified to check whether the returned error was
  12502. // because http.StatusNotModified was returned.
  12503. func (c *ProjectsLocationsDatasetsFhirStoresListCall) Do(opts ...googleapi.CallOption) (*ListFhirStoresResponse, error) {
  12504. gensupport.SetOptions(c.urlParams_, opts...)
  12505. res, err := c.doRequest("json")
  12506. if res != nil && res.StatusCode == http.StatusNotModified {
  12507. if res.Body != nil {
  12508. res.Body.Close()
  12509. }
  12510. return nil, &googleapi.Error{
  12511. Code: res.StatusCode,
  12512. Header: res.Header,
  12513. }
  12514. }
  12515. if err != nil {
  12516. return nil, err
  12517. }
  12518. defer googleapi.CloseBody(res)
  12519. if err := googleapi.CheckResponse(res); err != nil {
  12520. return nil, err
  12521. }
  12522. ret := &ListFhirStoresResponse{
  12523. ServerResponse: googleapi.ServerResponse{
  12524. Header: res.Header,
  12525. HTTPStatusCode: res.StatusCode,
  12526. },
  12527. }
  12528. target := &ret
  12529. if err := gensupport.DecodeResponse(target, res); err != nil {
  12530. return nil, err
  12531. }
  12532. return ret, nil
  12533. // {
  12534. // "description": "Lists the FHIR stores in the given dataset.",
  12535. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores",
  12536. // "httpMethod": "GET",
  12537. // "id": "healthcare.projects.locations.datasets.fhirStores.list",
  12538. // "parameterOrder": [
  12539. // "parent"
  12540. // ],
  12541. // "parameters": {
  12542. // "filter": {
  12543. // "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`.",
  12544. // "location": "query",
  12545. // "type": "string"
  12546. // },
  12547. // "pageSize": {
  12548. // "description": "Limit on the number of FHIR stores to return in a single response. If zero\nthe default page size of 100 is used.",
  12549. // "format": "int32",
  12550. // "location": "query",
  12551. // "type": "integer"
  12552. // },
  12553. // "pageToken": {
  12554. // "description": "The next_page_token value returned from the previous List request, if any.",
  12555. // "location": "query",
  12556. // "type": "string"
  12557. // },
  12558. // "parent": {
  12559. // "description": "Name of the dataset.",
  12560. // "location": "path",
  12561. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  12562. // "required": true,
  12563. // "type": "string"
  12564. // }
  12565. // },
  12566. // "path": "v1alpha2/{+parent}/fhirStores",
  12567. // "response": {
  12568. // "$ref": "ListFhirStoresResponse"
  12569. // },
  12570. // "scopes": [
  12571. // "https://www.googleapis.com/auth/cloud-platform"
  12572. // ]
  12573. // }
  12574. }
  12575. // Pages invokes f for each page of results.
  12576. // A non-nil error returned from f will halt the iteration.
  12577. // The provided context supersedes any context provided to the Context method.
  12578. func (c *ProjectsLocationsDatasetsFhirStoresListCall) Pages(ctx context.Context, f func(*ListFhirStoresResponse) error) error {
  12579. c.ctx_ = ctx
  12580. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  12581. for {
  12582. x, err := c.Do()
  12583. if err != nil {
  12584. return err
  12585. }
  12586. if err := f(x); err != nil {
  12587. return err
  12588. }
  12589. if x.NextPageToken == "" {
  12590. return nil
  12591. }
  12592. c.PageToken(x.NextPageToken)
  12593. }
  12594. }
  12595. // method id "healthcare.projects.locations.datasets.fhirStores.patch":
  12596. type ProjectsLocationsDatasetsFhirStoresPatchCall struct {
  12597. s *Service
  12598. name string
  12599. fhirstore *FhirStore
  12600. urlParams_ gensupport.URLParams
  12601. ctx_ context.Context
  12602. header_ http.Header
  12603. }
  12604. // Patch: Updates the configuration of the specified FHIR store.
  12605. func (r *ProjectsLocationsDatasetsFhirStoresService) Patch(name string, fhirstore *FhirStore) *ProjectsLocationsDatasetsFhirStoresPatchCall {
  12606. c := &ProjectsLocationsDatasetsFhirStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  12607. c.name = name
  12608. c.fhirstore = fhirstore
  12609. return c
  12610. }
  12611. // UpdateMask sets the optional parameter "updateMask": The update mask
  12612. // applies to the resource. For the `FieldMask`
  12613. // definition,
  12614. // see
  12615. // https://developers.google.com/protocol-buffers/docs/re
  12616. // ference/google.protobuf#fieldmask
  12617. func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsFhirStoresPatchCall {
  12618. c.urlParams_.Set("updateMask", updateMask)
  12619. return c
  12620. }
  12621. // Fields allows partial responses to be retrieved. See
  12622. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  12623. // for more information.
  12624. func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresPatchCall {
  12625. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  12626. return c
  12627. }
  12628. // Context sets the context to be used in this call's Do method. Any
  12629. // pending HTTP request will be aborted if the provided context is
  12630. // canceled.
  12631. func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresPatchCall {
  12632. c.ctx_ = ctx
  12633. return c
  12634. }
  12635. // Header returns an http.Header that can be modified by the caller to
  12636. // add HTTP headers to the request.
  12637. func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) Header() http.Header {
  12638. if c.header_ == nil {
  12639. c.header_ = make(http.Header)
  12640. }
  12641. return c.header_
  12642. }
  12643. func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) doRequest(alt string) (*http.Response, error) {
  12644. reqHeaders := make(http.Header)
  12645. for k, v := range c.header_ {
  12646. reqHeaders[k] = v
  12647. }
  12648. reqHeaders.Set("User-Agent", c.s.userAgent())
  12649. var body io.Reader = nil
  12650. body, err := googleapi.WithoutDataWrapper.JSONReader(c.fhirstore)
  12651. if err != nil {
  12652. return nil, err
  12653. }
  12654. reqHeaders.Set("Content-Type", "application/json")
  12655. c.urlParams_.Set("alt", alt)
  12656. c.urlParams_.Set("prettyPrint", "false")
  12657. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  12658. urls += "?" + c.urlParams_.Encode()
  12659. req, err := http.NewRequest("PATCH", urls, body)
  12660. if err != nil {
  12661. return nil, err
  12662. }
  12663. req.Header = reqHeaders
  12664. googleapi.Expand(req.URL, map[string]string{
  12665. "name": c.name,
  12666. })
  12667. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  12668. }
  12669. // Do executes the "healthcare.projects.locations.datasets.fhirStores.patch" call.
  12670. // Exactly one of *FhirStore or error will be non-nil. Any non-2xx
  12671. // status code is an error. Response headers are in either
  12672. // *FhirStore.ServerResponse.Header or (if a response was returned at
  12673. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  12674. // to check whether the returned error was because
  12675. // http.StatusNotModified was returned.
  12676. func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) Do(opts ...googleapi.CallOption) (*FhirStore, error) {
  12677. gensupport.SetOptions(c.urlParams_, opts...)
  12678. res, err := c.doRequest("json")
  12679. if res != nil && res.StatusCode == http.StatusNotModified {
  12680. if res.Body != nil {
  12681. res.Body.Close()
  12682. }
  12683. return nil, &googleapi.Error{
  12684. Code: res.StatusCode,
  12685. Header: res.Header,
  12686. }
  12687. }
  12688. if err != nil {
  12689. return nil, err
  12690. }
  12691. defer googleapi.CloseBody(res)
  12692. if err := googleapi.CheckResponse(res); err != nil {
  12693. return nil, err
  12694. }
  12695. ret := &FhirStore{
  12696. ServerResponse: googleapi.ServerResponse{
  12697. Header: res.Header,
  12698. HTTPStatusCode: res.StatusCode,
  12699. },
  12700. }
  12701. target := &ret
  12702. if err := gensupport.DecodeResponse(target, res); err != nil {
  12703. return nil, err
  12704. }
  12705. return ret, nil
  12706. // {
  12707. // "description": "Updates the configuration of the specified FHIR store.",
  12708. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}",
  12709. // "httpMethod": "PATCH",
  12710. // "id": "healthcare.projects.locations.datasets.fhirStores.patch",
  12711. // "parameterOrder": [
  12712. // "name"
  12713. // ],
  12714. // "parameters": {
  12715. // "name": {
  12716. // "description": "Output only. Resource name of the FHIR store, of the form\n`projects/{project_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}`.",
  12717. // "location": "path",
  12718. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  12719. // "required": true,
  12720. // "type": "string"
  12721. // },
  12722. // "updateMask": {
  12723. // "description": "The update mask applies to the resource. For the `FieldMask` definition,\nsee\nhttps://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask",
  12724. // "format": "google-fieldmask",
  12725. // "location": "query",
  12726. // "type": "string"
  12727. // }
  12728. // },
  12729. // "path": "v1alpha2/{+name}",
  12730. // "request": {
  12731. // "$ref": "FhirStore"
  12732. // },
  12733. // "response": {
  12734. // "$ref": "FhirStore"
  12735. // },
  12736. // "scopes": [
  12737. // "https://www.googleapis.com/auth/cloud-platform"
  12738. // ]
  12739. // }
  12740. }
  12741. // method id "healthcare.projects.locations.datasets.fhirStores.setIamPolicy":
  12742. type ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall struct {
  12743. s *Service
  12744. resource string
  12745. setiampolicyrequest *SetIamPolicyRequest
  12746. urlParams_ gensupport.URLParams
  12747. ctx_ context.Context
  12748. header_ http.Header
  12749. }
  12750. // SetIamPolicy: Sets the access control policy for a FHIR store or
  12751. // security label within a
  12752. // FHIR store. Replaces any existing policy.
  12753. //
  12754. // Authorization requires the Google IAM
  12755. // permission
  12756. // 'healthcare.fhirStores.setIamPolicy' for a FHIR store
  12757. // or
  12758. // 'healthcare.securityLabels.setIamPolicy' for a security label
  12759. func (r *ProjectsLocationsDatasetsFhirStoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall {
  12760. c := &ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  12761. c.resource = resource
  12762. c.setiampolicyrequest = setiampolicyrequest
  12763. return c
  12764. }
  12765. // Fields allows partial responses to be retrieved. See
  12766. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  12767. // for more information.
  12768. func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall {
  12769. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  12770. return c
  12771. }
  12772. // Context sets the context to be used in this call's Do method. Any
  12773. // pending HTTP request will be aborted if the provided context is
  12774. // canceled.
  12775. func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall {
  12776. c.ctx_ = ctx
  12777. return c
  12778. }
  12779. // Header returns an http.Header that can be modified by the caller to
  12780. // add HTTP headers to the request.
  12781. func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) Header() http.Header {
  12782. if c.header_ == nil {
  12783. c.header_ = make(http.Header)
  12784. }
  12785. return c.header_
  12786. }
  12787. func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  12788. reqHeaders := make(http.Header)
  12789. for k, v := range c.header_ {
  12790. reqHeaders[k] = v
  12791. }
  12792. reqHeaders.Set("User-Agent", c.s.userAgent())
  12793. var body io.Reader = nil
  12794. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  12795. if err != nil {
  12796. return nil, err
  12797. }
  12798. reqHeaders.Set("Content-Type", "application/json")
  12799. c.urlParams_.Set("alt", alt)
  12800. c.urlParams_.Set("prettyPrint", "false")
  12801. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:setIamPolicy")
  12802. urls += "?" + c.urlParams_.Encode()
  12803. req, err := http.NewRequest("POST", urls, body)
  12804. if err != nil {
  12805. return nil, err
  12806. }
  12807. req.Header = reqHeaders
  12808. googleapi.Expand(req.URL, map[string]string{
  12809. "resource": c.resource,
  12810. })
  12811. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  12812. }
  12813. // Do executes the "healthcare.projects.locations.datasets.fhirStores.setIamPolicy" call.
  12814. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  12815. // code is an error. Response headers are in either
  12816. // *Policy.ServerResponse.Header or (if a response was returned at all)
  12817. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  12818. // check whether the returned error was because http.StatusNotModified
  12819. // was returned.
  12820. func (c *ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  12821. gensupport.SetOptions(c.urlParams_, opts...)
  12822. res, err := c.doRequest("json")
  12823. if res != nil && res.StatusCode == http.StatusNotModified {
  12824. if res.Body != nil {
  12825. res.Body.Close()
  12826. }
  12827. return nil, &googleapi.Error{
  12828. Code: res.StatusCode,
  12829. Header: res.Header,
  12830. }
  12831. }
  12832. if err != nil {
  12833. return nil, err
  12834. }
  12835. defer googleapi.CloseBody(res)
  12836. if err := googleapi.CheckResponse(res); err != nil {
  12837. return nil, err
  12838. }
  12839. ret := &Policy{
  12840. ServerResponse: googleapi.ServerResponse{
  12841. Header: res.Header,
  12842. HTTPStatusCode: res.StatusCode,
  12843. },
  12844. }
  12845. target := &ret
  12846. if err := gensupport.DecodeResponse(target, res); err != nil {
  12847. return nil, err
  12848. }
  12849. return ret, nil
  12850. // {
  12851. // "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",
  12852. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:setIamPolicy",
  12853. // "httpMethod": "POST",
  12854. // "id": "healthcare.projects.locations.datasets.fhirStores.setIamPolicy",
  12855. // "parameterOrder": [
  12856. // "resource"
  12857. // ],
  12858. // "parameters": {
  12859. // "resource": {
  12860. // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
  12861. // "location": "path",
  12862. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  12863. // "required": true,
  12864. // "type": "string"
  12865. // }
  12866. // },
  12867. // "path": "v1alpha2/{+resource}:setIamPolicy",
  12868. // "request": {
  12869. // "$ref": "SetIamPolicyRequest"
  12870. // },
  12871. // "response": {
  12872. // "$ref": "Policy"
  12873. // },
  12874. // "scopes": [
  12875. // "https://www.googleapis.com/auth/cloud-platform"
  12876. // ]
  12877. // }
  12878. }
  12879. // method id "healthcare.projects.locations.datasets.fhirStores.testIamPermissions":
  12880. type ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall struct {
  12881. s *Service
  12882. resource string
  12883. testiampermissionsrequest *TestIamPermissionsRequest
  12884. urlParams_ gensupport.URLParams
  12885. ctx_ context.Context
  12886. header_ http.Header
  12887. }
  12888. // TestIamPermissions: Returns permissions that a caller has on the
  12889. // specified resource. If the
  12890. // resource does not exist, this will return an empty set of
  12891. // permissions, not
  12892. // a NOT_FOUND error.
  12893. //
  12894. // There is no permission required to make this API call.
  12895. func (r *ProjectsLocationsDatasetsFhirStoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall {
  12896. c := &ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  12897. c.resource = resource
  12898. c.testiampermissionsrequest = testiampermissionsrequest
  12899. return c
  12900. }
  12901. // Fields allows partial responses to be retrieved. See
  12902. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  12903. // for more information.
  12904. func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall {
  12905. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  12906. return c
  12907. }
  12908. // Context sets the context to be used in this call's Do method. Any
  12909. // pending HTTP request will be aborted if the provided context is
  12910. // canceled.
  12911. func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall {
  12912. c.ctx_ = ctx
  12913. return c
  12914. }
  12915. // Header returns an http.Header that can be modified by the caller to
  12916. // add HTTP headers to the request.
  12917. func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) Header() http.Header {
  12918. if c.header_ == nil {
  12919. c.header_ = make(http.Header)
  12920. }
  12921. return c.header_
  12922. }
  12923. func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  12924. reqHeaders := make(http.Header)
  12925. for k, v := range c.header_ {
  12926. reqHeaders[k] = v
  12927. }
  12928. reqHeaders.Set("User-Agent", c.s.userAgent())
  12929. var body io.Reader = nil
  12930. body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  12931. if err != nil {
  12932. return nil, err
  12933. }
  12934. reqHeaders.Set("Content-Type", "application/json")
  12935. c.urlParams_.Set("alt", alt)
  12936. c.urlParams_.Set("prettyPrint", "false")
  12937. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:testIamPermissions")
  12938. urls += "?" + c.urlParams_.Encode()
  12939. req, err := http.NewRequest("POST", urls, body)
  12940. if err != nil {
  12941. return nil, err
  12942. }
  12943. req.Header = reqHeaders
  12944. googleapi.Expand(req.URL, map[string]string{
  12945. "resource": c.resource,
  12946. })
  12947. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  12948. }
  12949. // Do executes the "healthcare.projects.locations.datasets.fhirStores.testIamPermissions" call.
  12950. // Exactly one of *TestIamPermissionsResponse or error will be non-nil.
  12951. // Any non-2xx status code is an error. Response headers are in either
  12952. // *TestIamPermissionsResponse.ServerResponse.Header or (if a response
  12953. // was returned at all) in error.(*googleapi.Error).Header. Use
  12954. // googleapi.IsNotModified to check whether the returned error was
  12955. // because http.StatusNotModified was returned.
  12956. func (c *ProjectsLocationsDatasetsFhirStoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  12957. gensupport.SetOptions(c.urlParams_, opts...)
  12958. res, err := c.doRequest("json")
  12959. if res != nil && res.StatusCode == http.StatusNotModified {
  12960. if res.Body != nil {
  12961. res.Body.Close()
  12962. }
  12963. return nil, &googleapi.Error{
  12964. Code: res.StatusCode,
  12965. Header: res.Header,
  12966. }
  12967. }
  12968. if err != nil {
  12969. return nil, err
  12970. }
  12971. defer googleapi.CloseBody(res)
  12972. if err := googleapi.CheckResponse(res); err != nil {
  12973. return nil, err
  12974. }
  12975. ret := &TestIamPermissionsResponse{
  12976. ServerResponse: googleapi.ServerResponse{
  12977. Header: res.Header,
  12978. HTTPStatusCode: res.StatusCode,
  12979. },
  12980. }
  12981. target := &ret
  12982. if err := gensupport.DecodeResponse(target, res); err != nil {
  12983. return nil, err
  12984. }
  12985. return ret, nil
  12986. // {
  12987. // "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.",
  12988. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:testIamPermissions",
  12989. // "httpMethod": "POST",
  12990. // "id": "healthcare.projects.locations.datasets.fhirStores.testIamPermissions",
  12991. // "parameterOrder": [
  12992. // "resource"
  12993. // ],
  12994. // "parameters": {
  12995. // "resource": {
  12996. // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
  12997. // "location": "path",
  12998. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/.+$",
  12999. // "required": true,
  13000. // "type": "string"
  13001. // }
  13002. // },
  13003. // "path": "v1alpha2/{+resource}:testIamPermissions",
  13004. // "request": {
  13005. // "$ref": "TestIamPermissionsRequest"
  13006. // },
  13007. // "response": {
  13008. // "$ref": "TestIamPermissionsResponse"
  13009. // },
  13010. // "scopes": [
  13011. // "https://www.googleapis.com/auth/cloud-platform"
  13012. // ]
  13013. // }
  13014. }
  13015. // method id "healthcare.projects.locations.datasets.fhirStores.fhir._search":
  13016. type ProjectsLocationsDatasetsFhirStoresFhirSearchCall struct {
  13017. s *Service
  13018. parent string
  13019. searchresourcesrequest *SearchResourcesRequest
  13020. urlParams_ gensupport.URLParams
  13021. ctx_ context.Context
  13022. header_ http.Header
  13023. }
  13024. // Search: Searches resources in the given FHIR store.
  13025. func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Search(parent string, searchresourcesrequest *SearchResourcesRequest) *ProjectsLocationsDatasetsFhirStoresFhirSearchCall {
  13026. c := &ProjectsLocationsDatasetsFhirStoresFhirSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  13027. c.parent = parent
  13028. c.searchresourcesrequest = searchresourcesrequest
  13029. return c
  13030. }
  13031. // Fields allows partial responses to be retrieved. See
  13032. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  13033. // for more information.
  13034. func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirSearchCall {
  13035. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  13036. return c
  13037. }
  13038. // Context sets the context to be used in this call's Do method. Any
  13039. // pending HTTP request will be aborted if the provided context is
  13040. // canceled.
  13041. func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirSearchCall {
  13042. c.ctx_ = ctx
  13043. return c
  13044. }
  13045. // Header returns an http.Header that can be modified by the caller to
  13046. // add HTTP headers to the request.
  13047. func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) Header() http.Header {
  13048. if c.header_ == nil {
  13049. c.header_ = make(http.Header)
  13050. }
  13051. return c.header_
  13052. }
  13053. func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) doRequest(alt string) (*http.Response, error) {
  13054. reqHeaders := make(http.Header)
  13055. for k, v := range c.header_ {
  13056. reqHeaders[k] = v
  13057. }
  13058. reqHeaders.Set("User-Agent", c.s.userAgent())
  13059. var body io.Reader = nil
  13060. body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchresourcesrequest)
  13061. if err != nil {
  13062. return nil, err
  13063. }
  13064. reqHeaders.Set("Content-Type", "application/json")
  13065. c.urlParams_.Set("alt", alt)
  13066. c.urlParams_.Set("prettyPrint", "false")
  13067. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/fhir/_search")
  13068. urls += "?" + c.urlParams_.Encode()
  13069. req, err := http.NewRequest("POST", urls, body)
  13070. if err != nil {
  13071. return nil, err
  13072. }
  13073. req.Header = reqHeaders
  13074. googleapi.Expand(req.URL, map[string]string{
  13075. "parent": c.parent,
  13076. })
  13077. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  13078. }
  13079. // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir._search" call.
  13080. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  13081. // code is an error. Response headers are in either
  13082. // *HttpBody.ServerResponse.Header or (if a response was returned at
  13083. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  13084. // to check whether the returned error was because
  13085. // http.StatusNotModified was returned.
  13086. func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  13087. gensupport.SetOptions(c.urlParams_, opts...)
  13088. res, err := c.doRequest("json")
  13089. if res != nil && res.StatusCode == http.StatusNotModified {
  13090. if res.Body != nil {
  13091. res.Body.Close()
  13092. }
  13093. return nil, &googleapi.Error{
  13094. Code: res.StatusCode,
  13095. Header: res.Header,
  13096. }
  13097. }
  13098. if err != nil {
  13099. return nil, err
  13100. }
  13101. defer googleapi.CloseBody(res)
  13102. if err := googleapi.CheckResponse(res); err != nil {
  13103. return nil, err
  13104. }
  13105. ret := &HttpBody{
  13106. ServerResponse: googleapi.ServerResponse{
  13107. Header: res.Header,
  13108. HTTPStatusCode: res.StatusCode,
  13109. },
  13110. }
  13111. target := &ret
  13112. if err := gensupport.DecodeResponse(target, res); err != nil {
  13113. return nil, err
  13114. }
  13115. return ret, nil
  13116. // {
  13117. // "description": "Searches resources in the given FHIR store.",
  13118. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/_search",
  13119. // "httpMethod": "POST",
  13120. // "id": "healthcare.projects.locations.datasets.fhirStores.fhir._search",
  13121. // "parameterOrder": [
  13122. // "parent"
  13123. // ],
  13124. // "parameters": {
  13125. // "parent": {
  13126. // "description": "Name of the FHIR store to retrieve resources from.",
  13127. // "location": "path",
  13128. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  13129. // "required": true,
  13130. // "type": "string"
  13131. // }
  13132. // },
  13133. // "path": "v1alpha2/{+parent}/fhir/_search",
  13134. // "request": {
  13135. // "$ref": "SearchResourcesRequest"
  13136. // },
  13137. // "response": {
  13138. // "$ref": "HttpBody"
  13139. // },
  13140. // "scopes": [
  13141. // "https://www.googleapis.com/auth/cloud-platform"
  13142. // ]
  13143. // }
  13144. }
  13145. // method id "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalDeleteResource":
  13146. type ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteResourceCall struct {
  13147. s *Service
  13148. parent string
  13149. type_ string
  13150. urlParams_ gensupport.URLParams
  13151. ctx_ context.Context
  13152. header_ http.Header
  13153. }
  13154. // ConditionalDeleteResource: Deletes FHIR resources matching a search
  13155. // query.
  13156. //
  13157. // Note: unless resource versioning is disabled by setting
  13158. // the
  13159. // disable_resource_versioning flag
  13160. // on the FHIR store, the deleted resources will be moved to a
  13161. // history
  13162. // repository that can still be retrieved through GetResourceVersion
  13163. // and
  13164. // related methods, unless they are removed by the
  13165. // DeleteResourceVersions
  13166. // method.
  13167. func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ConditionalDeleteResource(parent string, type_ string) *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteResourceCall {
  13168. c := &ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  13169. c.parent = parent
  13170. c.type_ = type_
  13171. return c
  13172. }
  13173. // Fields allows partial responses to be retrieved. See
  13174. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  13175. // for more information.
  13176. func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteResourceCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteResourceCall {
  13177. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  13178. return c
  13179. }
  13180. // Context sets the context to be used in this call's Do method. Any
  13181. // pending HTTP request will be aborted if the provided context is
  13182. // canceled.
  13183. func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteResourceCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteResourceCall {
  13184. c.ctx_ = ctx
  13185. return c
  13186. }
  13187. // Header returns an http.Header that can be modified by the caller to
  13188. // add HTTP headers to the request.
  13189. func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteResourceCall) Header() http.Header {
  13190. if c.header_ == nil {
  13191. c.header_ = make(http.Header)
  13192. }
  13193. return c.header_
  13194. }
  13195. func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteResourceCall) doRequest(alt string) (*http.Response, error) {
  13196. reqHeaders := make(http.Header)
  13197. for k, v := range c.header_ {
  13198. reqHeaders[k] = v
  13199. }
  13200. reqHeaders.Set("User-Agent", c.s.userAgent())
  13201. var body io.Reader = nil
  13202. c.urlParams_.Set("alt", alt)
  13203. c.urlParams_.Set("prettyPrint", "false")
  13204. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/fhir/{+type}")
  13205. urls += "?" + c.urlParams_.Encode()
  13206. req, err := http.NewRequest("DELETE", urls, body)
  13207. if err != nil {
  13208. return nil, err
  13209. }
  13210. req.Header = reqHeaders
  13211. googleapi.Expand(req.URL, map[string]string{
  13212. "parent": c.parent,
  13213. "type": c.type_,
  13214. })
  13215. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  13216. }
  13217. // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalDeleteResource" call.
  13218. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  13219. // code is an error. Response headers are in either
  13220. // *Empty.ServerResponse.Header or (if a response was returned at all)
  13221. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  13222. // check whether the returned error was because http.StatusNotModified
  13223. // was returned.
  13224. func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalDeleteResourceCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  13225. gensupport.SetOptions(c.urlParams_, opts...)
  13226. res, err := c.doRequest("json")
  13227. if res != nil && res.StatusCode == http.StatusNotModified {
  13228. if res.Body != nil {
  13229. res.Body.Close()
  13230. }
  13231. return nil, &googleapi.Error{
  13232. Code: res.StatusCode,
  13233. Header: res.Header,
  13234. }
  13235. }
  13236. if err != nil {
  13237. return nil, err
  13238. }
  13239. defer googleapi.CloseBody(res)
  13240. if err := googleapi.CheckResponse(res); err != nil {
  13241. return nil, err
  13242. }
  13243. ret := &Empty{
  13244. ServerResponse: googleapi.ServerResponse{
  13245. Header: res.Header,
  13246. HTTPStatusCode: res.StatusCode,
  13247. },
  13248. }
  13249. target := &ret
  13250. if err := gensupport.DecodeResponse(target, res); err != nil {
  13251. return nil, err
  13252. }
  13253. return ret, nil
  13254. // {
  13255. // "description": "Deletes FHIR resources matching a search query.\n\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.",
  13256. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}",
  13257. // "httpMethod": "DELETE",
  13258. // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalDeleteResource",
  13259. // "parameterOrder": [
  13260. // "parent",
  13261. // "type"
  13262. // ],
  13263. // "parameters": {
  13264. // "parent": {
  13265. // "description": "The name of the FHIR store this resource belongs to.",
  13266. // "location": "path",
  13267. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  13268. // "required": true,
  13269. // "type": "string"
  13270. // },
  13271. // "type": {
  13272. // "description": "The type of the resource to update.",
  13273. // "location": "path",
  13274. // "pattern": "^[^/]+$",
  13275. // "required": true,
  13276. // "type": "string"
  13277. // }
  13278. // },
  13279. // "path": "v1alpha2/{+parent}/fhir/{+type}",
  13280. // "response": {
  13281. // "$ref": "Empty"
  13282. // },
  13283. // "scopes": [
  13284. // "https://www.googleapis.com/auth/cloud-platform"
  13285. // ]
  13286. // }
  13287. }
  13288. // method id "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalPatchResource":
  13289. type ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchResourceCall struct {
  13290. s *Service
  13291. parent string
  13292. type_ string
  13293. httpbody *HttpBody
  13294. urlParams_ gensupport.URLParams
  13295. ctx_ context.Context
  13296. header_ http.Header
  13297. }
  13298. // ConditionalPatchResource: Updates parts of a resource if the resource
  13299. // exists based on the
  13300. // search criteria specified via query parameters.
  13301. func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ConditionalPatchResource(parent string, type_ string, httpbody *HttpBody) *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchResourceCall {
  13302. c := &ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  13303. c.parent = parent
  13304. c.type_ = type_
  13305. c.httpbody = httpbody
  13306. return c
  13307. }
  13308. // Fields allows partial responses to be retrieved. See
  13309. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  13310. // for more information.
  13311. func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchResourceCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchResourceCall {
  13312. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  13313. return c
  13314. }
  13315. // Context sets the context to be used in this call's Do method. Any
  13316. // pending HTTP request will be aborted if the provided context is
  13317. // canceled.
  13318. func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchResourceCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchResourceCall {
  13319. c.ctx_ = ctx
  13320. return c
  13321. }
  13322. // Header returns an http.Header that can be modified by the caller to
  13323. // add HTTP headers to the request.
  13324. func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchResourceCall) Header() http.Header {
  13325. if c.header_ == nil {
  13326. c.header_ = make(http.Header)
  13327. }
  13328. return c.header_
  13329. }
  13330. func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchResourceCall) doRequest(alt string) (*http.Response, error) {
  13331. reqHeaders := make(http.Header)
  13332. for k, v := range c.header_ {
  13333. reqHeaders[k] = v
  13334. }
  13335. reqHeaders.Set("User-Agent", c.s.userAgent())
  13336. var body io.Reader = nil
  13337. body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpbody)
  13338. if err != nil {
  13339. return nil, err
  13340. }
  13341. reqHeaders.Set("Content-Type", "application/json")
  13342. c.urlParams_.Set("alt", alt)
  13343. c.urlParams_.Set("prettyPrint", "false")
  13344. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/fhir/{+type}")
  13345. urls += "?" + c.urlParams_.Encode()
  13346. req, err := http.NewRequest("PATCH", urls, body)
  13347. if err != nil {
  13348. return nil, err
  13349. }
  13350. req.Header = reqHeaders
  13351. googleapi.Expand(req.URL, map[string]string{
  13352. "parent": c.parent,
  13353. "type": c.type_,
  13354. })
  13355. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  13356. }
  13357. // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalPatchResource" call.
  13358. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  13359. // code is an error. Response headers are in either
  13360. // *HttpBody.ServerResponse.Header or (if a response was returned at
  13361. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  13362. // to check whether the returned error was because
  13363. // http.StatusNotModified was returned.
  13364. func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalPatchResourceCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  13365. gensupport.SetOptions(c.urlParams_, opts...)
  13366. res, err := c.doRequest("json")
  13367. if res != nil && res.StatusCode == http.StatusNotModified {
  13368. if res.Body != nil {
  13369. res.Body.Close()
  13370. }
  13371. return nil, &googleapi.Error{
  13372. Code: res.StatusCode,
  13373. Header: res.Header,
  13374. }
  13375. }
  13376. if err != nil {
  13377. return nil, err
  13378. }
  13379. defer googleapi.CloseBody(res)
  13380. if err := googleapi.CheckResponse(res); err != nil {
  13381. return nil, err
  13382. }
  13383. ret := &HttpBody{
  13384. ServerResponse: googleapi.ServerResponse{
  13385. Header: res.Header,
  13386. HTTPStatusCode: res.StatusCode,
  13387. },
  13388. }
  13389. target := &ret
  13390. if err := gensupport.DecodeResponse(target, res); err != nil {
  13391. return nil, err
  13392. }
  13393. return ret, nil
  13394. // {
  13395. // "description": "Updates parts of a resource if the resource exists based on the\nsearch criteria specified via query parameters.",
  13396. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}",
  13397. // "httpMethod": "PATCH",
  13398. // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalPatchResource",
  13399. // "parameterOrder": [
  13400. // "parent",
  13401. // "type"
  13402. // ],
  13403. // "parameters": {
  13404. // "parent": {
  13405. // "description": "The name of the FHIR store this resource belongs to.",
  13406. // "location": "path",
  13407. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  13408. // "required": true,
  13409. // "type": "string"
  13410. // },
  13411. // "type": {
  13412. // "description": "The type of the resource to update.",
  13413. // "location": "path",
  13414. // "pattern": "^[^/]+$",
  13415. // "required": true,
  13416. // "type": "string"
  13417. // }
  13418. // },
  13419. // "path": "v1alpha2/{+parent}/fhir/{+type}",
  13420. // "request": {
  13421. // "$ref": "HttpBody"
  13422. // },
  13423. // "response": {
  13424. // "$ref": "HttpBody"
  13425. // },
  13426. // "scopes": [
  13427. // "https://www.googleapis.com/auth/cloud-platform"
  13428. // ]
  13429. // }
  13430. }
  13431. // method id "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalUpdateResource":
  13432. type ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateResourceCall struct {
  13433. s *Service
  13434. parent string
  13435. type_ string
  13436. httpbody *HttpBody
  13437. urlParams_ gensupport.URLParams
  13438. ctx_ context.Context
  13439. header_ http.Header
  13440. }
  13441. // ConditionalUpdateResource: Updates the entire resource if the
  13442. // resource exists based on the
  13443. // search criteria specified via query parameters.
  13444. //
  13445. func (r *ProjectsLocationsDatasetsFhirStoresFhirService) ConditionalUpdateResource(parent string, type_ string, httpbody *HttpBody) *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateResourceCall {
  13446. c := &ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  13447. c.parent = parent
  13448. c.type_ = type_
  13449. c.httpbody = httpbody
  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 *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateResourceCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateResourceCall {
  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 *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateResourceCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateResourceCall {
  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 *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateResourceCall) Header() http.Header {
  13469. if c.header_ == nil {
  13470. c.header_ = make(http.Header)
  13471. }
  13472. return c.header_
  13473. }
  13474. func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateResourceCall) 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.httpbody)
  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, "v1alpha2/{+parent}/fhir/{+type}")
  13489. urls += "?" + c.urlParams_.Encode()
  13490. req, err := http.NewRequest("PUT", urls, body)
  13491. if err != nil {
  13492. return nil, err
  13493. }
  13494. req.Header = reqHeaders
  13495. googleapi.Expand(req.URL, map[string]string{
  13496. "parent": c.parent,
  13497. "type": c.type_,
  13498. })
  13499. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  13500. }
  13501. // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalUpdateResource" call.
  13502. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  13503. // code is an error. Response headers are in either
  13504. // *HttpBody.ServerResponse.Header or (if a response was returned at
  13505. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  13506. // to check whether the returned error was because
  13507. // http.StatusNotModified was returned.
  13508. func (c *ProjectsLocationsDatasetsFhirStoresFhirConditionalUpdateResourceCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  13509. gensupport.SetOptions(c.urlParams_, opts...)
  13510. res, err := c.doRequest("json")
  13511. if res != nil && res.StatusCode == http.StatusNotModified {
  13512. if res.Body != nil {
  13513. res.Body.Close()
  13514. }
  13515. return nil, &googleapi.Error{
  13516. Code: res.StatusCode,
  13517. Header: res.Header,
  13518. }
  13519. }
  13520. if err != nil {
  13521. return nil, err
  13522. }
  13523. defer googleapi.CloseBody(res)
  13524. if err := googleapi.CheckResponse(res); err != nil {
  13525. return nil, err
  13526. }
  13527. ret := &HttpBody{
  13528. ServerResponse: googleapi.ServerResponse{
  13529. Header: res.Header,
  13530. HTTPStatusCode: res.StatusCode,
  13531. },
  13532. }
  13533. target := &ret
  13534. if err := gensupport.DecodeResponse(target, res); err != nil {
  13535. return nil, err
  13536. }
  13537. return ret, nil
  13538. // {
  13539. // "description": "Updates the entire resource if the resource exists based on the\nsearch criteria specified via query parameters.\n",
  13540. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}",
  13541. // "httpMethod": "PUT",
  13542. // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.conditionalUpdateResource",
  13543. // "parameterOrder": [
  13544. // "parent",
  13545. // "type"
  13546. // ],
  13547. // "parameters": {
  13548. // "parent": {
  13549. // "description": "The name of the FHIR store this resource belongs to.",
  13550. // "location": "path",
  13551. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  13552. // "required": true,
  13553. // "type": "string"
  13554. // },
  13555. // "type": {
  13556. // "description": "The type of the resource to update.",
  13557. // "location": "path",
  13558. // "pattern": "^[^/]+$",
  13559. // "required": true,
  13560. // "type": "string"
  13561. // }
  13562. // },
  13563. // "path": "v1alpha2/{+parent}/fhir/{+type}",
  13564. // "request": {
  13565. // "$ref": "HttpBody"
  13566. // },
  13567. // "response": {
  13568. // "$ref": "HttpBody"
  13569. // },
  13570. // "scopes": [
  13571. // "https://www.googleapis.com/auth/cloud-platform"
  13572. // ]
  13573. // }
  13574. }
  13575. // method id "healthcare.projects.locations.datasets.fhirStores.fhir.createResource":
  13576. type ProjectsLocationsDatasetsFhirStoresFhirCreateResourceCall struct {
  13577. s *Service
  13578. parent string
  13579. type_ string
  13580. httpbody *HttpBody
  13581. urlParams_ gensupport.URLParams
  13582. ctx_ context.Context
  13583. header_ http.Header
  13584. }
  13585. // CreateResource: Creates a FHIR resource.
  13586. //
  13587. func (r *ProjectsLocationsDatasetsFhirStoresFhirService) CreateResource(parent string, type_ string, httpbody *HttpBody) *ProjectsLocationsDatasetsFhirStoresFhirCreateResourceCall {
  13588. c := &ProjectsLocationsDatasetsFhirStoresFhirCreateResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  13589. c.parent = parent
  13590. c.type_ = type_
  13591. c.httpbody = httpbody
  13592. return c
  13593. }
  13594. // Fields allows partial responses to be retrieved. See
  13595. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  13596. // for more information.
  13597. func (c *ProjectsLocationsDatasetsFhirStoresFhirCreateResourceCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirCreateResourceCall {
  13598. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  13599. return c
  13600. }
  13601. // Context sets the context to be used in this call's Do method. Any
  13602. // pending HTTP request will be aborted if the provided context is
  13603. // canceled.
  13604. func (c *ProjectsLocationsDatasetsFhirStoresFhirCreateResourceCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirCreateResourceCall {
  13605. c.ctx_ = ctx
  13606. return c
  13607. }
  13608. // Header returns an http.Header that can be modified by the caller to
  13609. // add HTTP headers to the request.
  13610. func (c *ProjectsLocationsDatasetsFhirStoresFhirCreateResourceCall) Header() http.Header {
  13611. if c.header_ == nil {
  13612. c.header_ = make(http.Header)
  13613. }
  13614. return c.header_
  13615. }
  13616. func (c *ProjectsLocationsDatasetsFhirStoresFhirCreateResourceCall) doRequest(alt string) (*http.Response, error) {
  13617. reqHeaders := make(http.Header)
  13618. for k, v := range c.header_ {
  13619. reqHeaders[k] = v
  13620. }
  13621. reqHeaders.Set("User-Agent", c.s.userAgent())
  13622. var body io.Reader = nil
  13623. body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpbody)
  13624. if err != nil {
  13625. return nil, err
  13626. }
  13627. reqHeaders.Set("Content-Type", "application/json")
  13628. c.urlParams_.Set("alt", alt)
  13629. c.urlParams_.Set("prettyPrint", "false")
  13630. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/fhir/{+type}")
  13631. urls += "?" + c.urlParams_.Encode()
  13632. req, err := http.NewRequest("POST", urls, body)
  13633. if err != nil {
  13634. return nil, err
  13635. }
  13636. req.Header = reqHeaders
  13637. googleapi.Expand(req.URL, map[string]string{
  13638. "parent": c.parent,
  13639. "type": c.type_,
  13640. })
  13641. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  13642. }
  13643. // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.createResource" call.
  13644. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  13645. // code is an error. Response headers are in either
  13646. // *HttpBody.ServerResponse.Header or (if a response was returned at
  13647. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  13648. // to check whether the returned error was because
  13649. // http.StatusNotModified was returned.
  13650. func (c *ProjectsLocationsDatasetsFhirStoresFhirCreateResourceCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  13651. gensupport.SetOptions(c.urlParams_, opts...)
  13652. res, err := c.doRequest("json")
  13653. if res != nil && res.StatusCode == http.StatusNotModified {
  13654. if res.Body != nil {
  13655. res.Body.Close()
  13656. }
  13657. return nil, &googleapi.Error{
  13658. Code: res.StatusCode,
  13659. Header: res.Header,
  13660. }
  13661. }
  13662. if err != nil {
  13663. return nil, err
  13664. }
  13665. defer googleapi.CloseBody(res)
  13666. if err := googleapi.CheckResponse(res); err != nil {
  13667. return nil, err
  13668. }
  13669. ret := &HttpBody{
  13670. ServerResponse: googleapi.ServerResponse{
  13671. Header: res.Header,
  13672. HTTPStatusCode: res.StatusCode,
  13673. },
  13674. }
  13675. target := &ret
  13676. if err := gensupport.DecodeResponse(target, res); err != nil {
  13677. return nil, err
  13678. }
  13679. return ret, nil
  13680. // {
  13681. // "description": "Creates a FHIR resource.\n",
  13682. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}",
  13683. // "httpMethod": "POST",
  13684. // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.createResource",
  13685. // "parameterOrder": [
  13686. // "parent",
  13687. // "type"
  13688. // ],
  13689. // "parameters": {
  13690. // "parent": {
  13691. // "description": "The name of the FHIR store this resource belongs to.",
  13692. // "location": "path",
  13693. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  13694. // "required": true,
  13695. // "type": "string"
  13696. // },
  13697. // "type": {
  13698. // "description": "The type of the resource to create.",
  13699. // "location": "path",
  13700. // "pattern": "^[^/]+$",
  13701. // "required": true,
  13702. // "type": "string"
  13703. // }
  13704. // },
  13705. // "path": "v1alpha2/{+parent}/fhir/{+type}",
  13706. // "request": {
  13707. // "$ref": "HttpBody"
  13708. // },
  13709. // "response": {
  13710. // "$ref": "HttpBody"
  13711. // },
  13712. // "scopes": [
  13713. // "https://www.googleapis.com/auth/cloud-platform"
  13714. // ]
  13715. // }
  13716. }
  13717. // method id "healthcare.projects.locations.datasets.fhirStores.fhir.delete":
  13718. type ProjectsLocationsDatasetsFhirStoresFhirDeleteCall struct {
  13719. s *Service
  13720. name string
  13721. urlParams_ gensupport.URLParams
  13722. ctx_ context.Context
  13723. header_ http.Header
  13724. }
  13725. // Delete: Deletes a FHIR resource.
  13726. //
  13727. // Note: unless resource versioning is disabled by setting
  13728. // the
  13729. // disable_resource_versioning flag
  13730. // on the FHIR store, the deleted resources will be moved to a
  13731. // history
  13732. // repository that can still be retrieved through GetResourceVersion
  13733. // and
  13734. // related methods, unless they are removed by the
  13735. // DeleteResourceVersions
  13736. // method.
  13737. func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Delete(name string) *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall {
  13738. c := &ProjectsLocationsDatasetsFhirStoresFhirDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  13739. c.name = name
  13740. return c
  13741. }
  13742. // Fields allows partial responses to be retrieved. See
  13743. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  13744. // for more information.
  13745. func (c *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall {
  13746. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  13747. return c
  13748. }
  13749. // Context sets the context to be used in this call's Do method. Any
  13750. // pending HTTP request will be aborted if the provided context is
  13751. // canceled.
  13752. func (c *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall {
  13753. c.ctx_ = ctx
  13754. return c
  13755. }
  13756. // Header returns an http.Header that can be modified by the caller to
  13757. // add HTTP headers to the request.
  13758. func (c *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall) Header() http.Header {
  13759. if c.header_ == nil {
  13760. c.header_ = make(http.Header)
  13761. }
  13762. return c.header_
  13763. }
  13764. func (c *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall) doRequest(alt string) (*http.Response, error) {
  13765. reqHeaders := make(http.Header)
  13766. for k, v := range c.header_ {
  13767. reqHeaders[k] = v
  13768. }
  13769. reqHeaders.Set("User-Agent", c.s.userAgent())
  13770. var body io.Reader = nil
  13771. c.urlParams_.Set("alt", alt)
  13772. c.urlParams_.Set("prettyPrint", "false")
  13773. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  13774. urls += "?" + c.urlParams_.Encode()
  13775. req, err := http.NewRequest("DELETE", urls, body)
  13776. if err != nil {
  13777. return nil, err
  13778. }
  13779. req.Header = reqHeaders
  13780. googleapi.Expand(req.URL, map[string]string{
  13781. "name": c.name,
  13782. })
  13783. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  13784. }
  13785. // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.delete" call.
  13786. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  13787. // code is an error. Response headers are in either
  13788. // *HttpBody.ServerResponse.Header or (if a response was returned at
  13789. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  13790. // to check whether the returned error was because
  13791. // http.StatusNotModified was returned.
  13792. func (c *ProjectsLocationsDatasetsFhirStoresFhirDeleteCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  13793. gensupport.SetOptions(c.urlParams_, opts...)
  13794. res, err := c.doRequest("json")
  13795. if res != nil && res.StatusCode == http.StatusNotModified {
  13796. if res.Body != nil {
  13797. res.Body.Close()
  13798. }
  13799. return nil, &googleapi.Error{
  13800. Code: res.StatusCode,
  13801. Header: res.Header,
  13802. }
  13803. }
  13804. if err != nil {
  13805. return nil, err
  13806. }
  13807. defer googleapi.CloseBody(res)
  13808. if err := googleapi.CheckResponse(res); err != nil {
  13809. return nil, err
  13810. }
  13811. ret := &HttpBody{
  13812. ServerResponse: googleapi.ServerResponse{
  13813. Header: res.Header,
  13814. HTTPStatusCode: res.StatusCode,
  13815. },
  13816. }
  13817. target := &ret
  13818. if err := gensupport.DecodeResponse(target, res); err != nil {
  13819. return nil, err
  13820. }
  13821. return ret, nil
  13822. // {
  13823. // "description": "Deletes a FHIR resource.\n\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.",
  13824. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}/{fhirId1}",
  13825. // "httpMethod": "DELETE",
  13826. // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.delete",
  13827. // "parameterOrder": [
  13828. // "name"
  13829. // ],
  13830. // "parameters": {
  13831. // "name": {
  13832. // "description": "The name of the resource to delete.",
  13833. // "location": "path",
  13834. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/fhir/[^/]+/[^/]+$",
  13835. // "required": true,
  13836. // "type": "string"
  13837. // }
  13838. // },
  13839. // "path": "v1alpha2/{+name}",
  13840. // "response": {
  13841. // "$ref": "HttpBody"
  13842. // },
  13843. // "scopes": [
  13844. // "https://www.googleapis.com/auth/cloud-platform"
  13845. // ]
  13846. // }
  13847. }
  13848. // method id "healthcare.projects.locations.datasets.fhirStores.fhir.delete$purge":
  13849. type ProjectsLocationsDatasetsFhirStoresFhirDeletePurgeCall struct {
  13850. s *Service
  13851. name string
  13852. urlParams_ gensupport.URLParams
  13853. ctx_ context.Context
  13854. header_ http.Header
  13855. }
  13856. // DeletePurge: Deletes all the historical versions of a resource
  13857. // (excluding current
  13858. // version) from the FHIR store. To remove all versions of a resource,
  13859. // first
  13860. // delete the current version and call this method.
  13861. func (r *ProjectsLocationsDatasetsFhirStoresFhirService) DeletePurge(name string) *ProjectsLocationsDatasetsFhirStoresFhirDeletePurgeCall {
  13862. c := &ProjectsLocationsDatasetsFhirStoresFhirDeletePurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  13863. c.name = name
  13864. return c
  13865. }
  13866. // Fields allows partial responses to be retrieved. See
  13867. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  13868. // for more information.
  13869. func (c *ProjectsLocationsDatasetsFhirStoresFhirDeletePurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirDeletePurgeCall {
  13870. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  13871. return c
  13872. }
  13873. // Context sets the context to be used in this call's Do method. Any
  13874. // pending HTTP request will be aborted if the provided context is
  13875. // canceled.
  13876. func (c *ProjectsLocationsDatasetsFhirStoresFhirDeletePurgeCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirDeletePurgeCall {
  13877. c.ctx_ = ctx
  13878. return c
  13879. }
  13880. // Header returns an http.Header that can be modified by the caller to
  13881. // add HTTP headers to the request.
  13882. func (c *ProjectsLocationsDatasetsFhirStoresFhirDeletePurgeCall) Header() http.Header {
  13883. if c.header_ == nil {
  13884. c.header_ = make(http.Header)
  13885. }
  13886. return c.header_
  13887. }
  13888. func (c *ProjectsLocationsDatasetsFhirStoresFhirDeletePurgeCall) doRequest(alt string) (*http.Response, error) {
  13889. reqHeaders := make(http.Header)
  13890. for k, v := range c.header_ {
  13891. reqHeaders[k] = v
  13892. }
  13893. reqHeaders.Set("User-Agent", c.s.userAgent())
  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, "v1alpha2/{+name}/$purge")
  13898. urls += "?" + c.urlParams_.Encode()
  13899. req, err := http.NewRequest("DELETE", 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.fhirStores.fhir.delete$purge" call.
  13910. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  13911. // code is an error. Response headers are in either
  13912. // *Empty.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 *ProjectsLocationsDatasetsFhirStoresFhirDeletePurgeCall) Do(opts ...googleapi.CallOption) (*Empty, 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 := &Empty{
  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": "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 method.",
  13948. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}/{fhirId1}/$purge",
  13949. // "httpMethod": "DELETE",
  13950. // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.delete$purge",
  13951. // "parameterOrder": [
  13952. // "name"
  13953. // ],
  13954. // "parameters": {
  13955. // "name": {
  13956. // "description": "The name of the resource to purge.",
  13957. // "location": "path",
  13958. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/fhir/[^/]+/[^/]+$",
  13959. // "required": true,
  13960. // "type": "string"
  13961. // }
  13962. // },
  13963. // "path": "v1alpha2/{+name}/$purge",
  13964. // "response": {
  13965. // "$ref": "Empty"
  13966. // },
  13967. // "scopes": [
  13968. // "https://www.googleapis.com/auth/cloud-platform"
  13969. // ]
  13970. // }
  13971. }
  13972. // method id "healthcare.projects.locations.datasets.fhirStores.fhir.get":
  13973. type ProjectsLocationsDatasetsFhirStoresFhirGetCall struct {
  13974. s *Service
  13975. name string
  13976. urlParams_ gensupport.URLParams
  13977. ifNoneMatch_ string
  13978. ctx_ context.Context
  13979. header_ http.Header
  13980. }
  13981. // Get: Gets a FHIR resource.
  13982. //
  13983. func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Get(name string) *ProjectsLocationsDatasetsFhirStoresFhirGetCall {
  13984. c := &ProjectsLocationsDatasetsFhirStoresFhirGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  13985. c.name = name
  13986. return c
  13987. }
  13988. // Fields allows partial responses to be retrieved. See
  13989. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  13990. // for more information.
  13991. func (c *ProjectsLocationsDatasetsFhirStoresFhirGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirGetCall {
  13992. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  13993. return c
  13994. }
  13995. // IfNoneMatch sets the optional parameter which makes the operation
  13996. // fail if the object's ETag matches the given value. This is useful for
  13997. // getting updates only after the object has changed since the last
  13998. // request. Use googleapi.IsNotModified to check whether the response
  13999. // error from Do is the result of In-None-Match.
  14000. func (c *ProjectsLocationsDatasetsFhirStoresFhirGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirGetCall {
  14001. c.ifNoneMatch_ = entityTag
  14002. return c
  14003. }
  14004. // Context sets the context to be used in this call's Do method. Any
  14005. // pending HTTP request will be aborted if the provided context is
  14006. // canceled.
  14007. func (c *ProjectsLocationsDatasetsFhirStoresFhirGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirGetCall {
  14008. c.ctx_ = ctx
  14009. return c
  14010. }
  14011. // Header returns an http.Header that can be modified by the caller to
  14012. // add HTTP headers to the request.
  14013. func (c *ProjectsLocationsDatasetsFhirStoresFhirGetCall) Header() http.Header {
  14014. if c.header_ == nil {
  14015. c.header_ = make(http.Header)
  14016. }
  14017. return c.header_
  14018. }
  14019. func (c *ProjectsLocationsDatasetsFhirStoresFhirGetCall) doRequest(alt string) (*http.Response, error) {
  14020. reqHeaders := make(http.Header)
  14021. for k, v := range c.header_ {
  14022. reqHeaders[k] = v
  14023. }
  14024. reqHeaders.Set("User-Agent", c.s.userAgent())
  14025. if c.ifNoneMatch_ != "" {
  14026. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  14027. }
  14028. var body io.Reader = nil
  14029. c.urlParams_.Set("alt", alt)
  14030. c.urlParams_.Set("prettyPrint", "false")
  14031. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  14032. urls += "?" + c.urlParams_.Encode()
  14033. req, err := http.NewRequest("GET", urls, body)
  14034. if err != nil {
  14035. return nil, err
  14036. }
  14037. req.Header = reqHeaders
  14038. googleapi.Expand(req.URL, map[string]string{
  14039. "name": c.name,
  14040. })
  14041. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  14042. }
  14043. // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.get" call.
  14044. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  14045. // code is an error. Response headers are in either
  14046. // *HttpBody.ServerResponse.Header or (if a response was returned at
  14047. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  14048. // to check whether the returned error was because
  14049. // http.StatusNotModified was returned.
  14050. func (c *ProjectsLocationsDatasetsFhirStoresFhirGetCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  14051. gensupport.SetOptions(c.urlParams_, opts...)
  14052. res, err := c.doRequest("json")
  14053. if res != nil && res.StatusCode == http.StatusNotModified {
  14054. if res.Body != nil {
  14055. res.Body.Close()
  14056. }
  14057. return nil, &googleapi.Error{
  14058. Code: res.StatusCode,
  14059. Header: res.Header,
  14060. }
  14061. }
  14062. if err != nil {
  14063. return nil, err
  14064. }
  14065. defer googleapi.CloseBody(res)
  14066. if err := googleapi.CheckResponse(res); err != nil {
  14067. return nil, err
  14068. }
  14069. ret := &HttpBody{
  14070. ServerResponse: googleapi.ServerResponse{
  14071. Header: res.Header,
  14072. HTTPStatusCode: res.StatusCode,
  14073. },
  14074. }
  14075. target := &ret
  14076. if err := gensupport.DecodeResponse(target, res); err != nil {
  14077. return nil, err
  14078. }
  14079. return ret, nil
  14080. // {
  14081. // "description": "Gets a FHIR resource.\n",
  14082. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}/{fhirId1}",
  14083. // "httpMethod": "GET",
  14084. // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.get",
  14085. // "parameterOrder": [
  14086. // "name"
  14087. // ],
  14088. // "parameters": {
  14089. // "name": {
  14090. // "description": "The name of the resource to retrieve.",
  14091. // "location": "path",
  14092. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/fhir/[^/]+/[^/]+$",
  14093. // "required": true,
  14094. // "type": "string"
  14095. // }
  14096. // },
  14097. // "path": "v1alpha2/{+name}",
  14098. // "response": {
  14099. // "$ref": "HttpBody"
  14100. // },
  14101. // "scopes": [
  14102. // "https://www.googleapis.com/auth/cloud-platform"
  14103. // ]
  14104. // }
  14105. }
  14106. // method id "healthcare.projects.locations.datasets.fhirStores.fhir.getMetadata":
  14107. type ProjectsLocationsDatasetsFhirStoresFhirGetMetadataCall struct {
  14108. s *Service
  14109. name string
  14110. urlParams_ gensupport.URLParams
  14111. ifNoneMatch_ string
  14112. ctx_ context.Context
  14113. header_ http.Header
  14114. }
  14115. // GetMetadata: Gets the FHIR capability statement for the store, which
  14116. // contains a
  14117. // description of functionality supported by the server.
  14118. //
  14119. func (r *ProjectsLocationsDatasetsFhirStoresFhirService) GetMetadata(name string) *ProjectsLocationsDatasetsFhirStoresFhirGetMetadataCall {
  14120. c := &ProjectsLocationsDatasetsFhirStoresFhirGetMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  14121. c.name = name
  14122. return c
  14123. }
  14124. // Fields allows partial responses to be retrieved. See
  14125. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  14126. // for more information.
  14127. func (c *ProjectsLocationsDatasetsFhirStoresFhirGetMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirGetMetadataCall {
  14128. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  14129. return c
  14130. }
  14131. // IfNoneMatch sets the optional parameter which makes the operation
  14132. // fail if the object's ETag matches the given value. This is useful for
  14133. // getting updates only after the object has changed since the last
  14134. // request. Use googleapi.IsNotModified to check whether the response
  14135. // error from Do is the result of In-None-Match.
  14136. func (c *ProjectsLocationsDatasetsFhirStoresFhirGetMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirGetMetadataCall {
  14137. c.ifNoneMatch_ = entityTag
  14138. return c
  14139. }
  14140. // Context sets the context to be used in this call's Do method. Any
  14141. // pending HTTP request will be aborted if the provided context is
  14142. // canceled.
  14143. func (c *ProjectsLocationsDatasetsFhirStoresFhirGetMetadataCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirGetMetadataCall {
  14144. c.ctx_ = ctx
  14145. return c
  14146. }
  14147. // Header returns an http.Header that can be modified by the caller to
  14148. // add HTTP headers to the request.
  14149. func (c *ProjectsLocationsDatasetsFhirStoresFhirGetMetadataCall) Header() http.Header {
  14150. if c.header_ == nil {
  14151. c.header_ = make(http.Header)
  14152. }
  14153. return c.header_
  14154. }
  14155. func (c *ProjectsLocationsDatasetsFhirStoresFhirGetMetadataCall) doRequest(alt string) (*http.Response, error) {
  14156. reqHeaders := make(http.Header)
  14157. for k, v := range c.header_ {
  14158. reqHeaders[k] = v
  14159. }
  14160. reqHeaders.Set("User-Agent", c.s.userAgent())
  14161. if c.ifNoneMatch_ != "" {
  14162. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  14163. }
  14164. var body io.Reader = nil
  14165. c.urlParams_.Set("alt", alt)
  14166. c.urlParams_.Set("prettyPrint", "false")
  14167. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}/fhir/metadata")
  14168. urls += "?" + c.urlParams_.Encode()
  14169. req, err := http.NewRequest("GET", urls, body)
  14170. if err != nil {
  14171. return nil, err
  14172. }
  14173. req.Header = reqHeaders
  14174. googleapi.Expand(req.URL, map[string]string{
  14175. "name": c.name,
  14176. })
  14177. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  14178. }
  14179. // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.getMetadata" call.
  14180. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  14181. // code is an error. Response headers are in either
  14182. // *HttpBody.ServerResponse.Header or (if a response was returned at
  14183. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  14184. // to check whether the returned error was because
  14185. // http.StatusNotModified was returned.
  14186. func (c *ProjectsLocationsDatasetsFhirStoresFhirGetMetadataCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  14187. gensupport.SetOptions(c.urlParams_, opts...)
  14188. res, err := c.doRequest("json")
  14189. if res != nil && res.StatusCode == http.StatusNotModified {
  14190. if res.Body != nil {
  14191. res.Body.Close()
  14192. }
  14193. return nil, &googleapi.Error{
  14194. Code: res.StatusCode,
  14195. Header: res.Header,
  14196. }
  14197. }
  14198. if err != nil {
  14199. return nil, err
  14200. }
  14201. defer googleapi.CloseBody(res)
  14202. if err := googleapi.CheckResponse(res); err != nil {
  14203. return nil, err
  14204. }
  14205. ret := &HttpBody{
  14206. ServerResponse: googleapi.ServerResponse{
  14207. Header: res.Header,
  14208. HTTPStatusCode: res.StatusCode,
  14209. },
  14210. }
  14211. target := &ret
  14212. if err := gensupport.DecodeResponse(target, res); err != nil {
  14213. return nil, err
  14214. }
  14215. return ret, nil
  14216. // {
  14217. // "description": "Gets the FHIR capability statement for the store, which contains a\ndescription of functionality supported by the server.\n",
  14218. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/metadata",
  14219. // "httpMethod": "GET",
  14220. // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.getMetadata",
  14221. // "parameterOrder": [
  14222. // "name"
  14223. // ],
  14224. // "parameters": {
  14225. // "name": {
  14226. // "description": "Name of the FHIR store to retrieve the capabilities for.",
  14227. // "location": "path",
  14228. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  14229. // "required": true,
  14230. // "type": "string"
  14231. // }
  14232. // },
  14233. // "path": "v1alpha2/{+name}/fhir/metadata",
  14234. // "response": {
  14235. // "$ref": "HttpBody"
  14236. // },
  14237. // "scopes": [
  14238. // "https://www.googleapis.com/auth/cloud-platform"
  14239. // ]
  14240. // }
  14241. }
  14242. // method id "healthcare.projects.locations.datasets.fhirStores.fhir.patch":
  14243. type ProjectsLocationsDatasetsFhirStoresFhirPatchCall struct {
  14244. s *Service
  14245. name string
  14246. httpbody *HttpBody
  14247. urlParams_ gensupport.URLParams
  14248. ctx_ context.Context
  14249. header_ http.Header
  14250. }
  14251. // Patch: Updates part of an existing resource.
  14252. //
  14253. func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Patch(name string, httpbody *HttpBody) *ProjectsLocationsDatasetsFhirStoresFhirPatchCall {
  14254. c := &ProjectsLocationsDatasetsFhirStoresFhirPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  14255. c.name = name
  14256. c.httpbody = httpbody
  14257. return c
  14258. }
  14259. // Fields allows partial responses to be retrieved. See
  14260. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  14261. // for more information.
  14262. func (c *ProjectsLocationsDatasetsFhirStoresFhirPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirPatchCall {
  14263. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  14264. return c
  14265. }
  14266. // Context sets the context to be used in this call's Do method. Any
  14267. // pending HTTP request will be aborted if the provided context is
  14268. // canceled.
  14269. func (c *ProjectsLocationsDatasetsFhirStoresFhirPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirPatchCall {
  14270. c.ctx_ = ctx
  14271. return c
  14272. }
  14273. // Header returns an http.Header that can be modified by the caller to
  14274. // add HTTP headers to the request.
  14275. func (c *ProjectsLocationsDatasetsFhirStoresFhirPatchCall) Header() http.Header {
  14276. if c.header_ == nil {
  14277. c.header_ = make(http.Header)
  14278. }
  14279. return c.header_
  14280. }
  14281. func (c *ProjectsLocationsDatasetsFhirStoresFhirPatchCall) doRequest(alt string) (*http.Response, error) {
  14282. reqHeaders := make(http.Header)
  14283. for k, v := range c.header_ {
  14284. reqHeaders[k] = v
  14285. }
  14286. reqHeaders.Set("User-Agent", c.s.userAgent())
  14287. var body io.Reader = nil
  14288. body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpbody)
  14289. if err != nil {
  14290. return nil, err
  14291. }
  14292. reqHeaders.Set("Content-Type", "application/json")
  14293. c.urlParams_.Set("alt", alt)
  14294. c.urlParams_.Set("prettyPrint", "false")
  14295. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  14296. urls += "?" + c.urlParams_.Encode()
  14297. req, err := http.NewRequest("PATCH", urls, body)
  14298. if err != nil {
  14299. return nil, err
  14300. }
  14301. req.Header = reqHeaders
  14302. googleapi.Expand(req.URL, map[string]string{
  14303. "name": c.name,
  14304. })
  14305. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  14306. }
  14307. // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.patch" call.
  14308. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  14309. // code is an error. Response headers are in either
  14310. // *HttpBody.ServerResponse.Header or (if a response was returned at
  14311. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  14312. // to check whether the returned error was because
  14313. // http.StatusNotModified was returned.
  14314. func (c *ProjectsLocationsDatasetsFhirStoresFhirPatchCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  14315. gensupport.SetOptions(c.urlParams_, opts...)
  14316. res, err := c.doRequest("json")
  14317. if res != nil && res.StatusCode == http.StatusNotModified {
  14318. if res.Body != nil {
  14319. res.Body.Close()
  14320. }
  14321. return nil, &googleapi.Error{
  14322. Code: res.StatusCode,
  14323. Header: res.Header,
  14324. }
  14325. }
  14326. if err != nil {
  14327. return nil, err
  14328. }
  14329. defer googleapi.CloseBody(res)
  14330. if err := googleapi.CheckResponse(res); err != nil {
  14331. return nil, err
  14332. }
  14333. ret := &HttpBody{
  14334. ServerResponse: googleapi.ServerResponse{
  14335. Header: res.Header,
  14336. HTTPStatusCode: res.StatusCode,
  14337. },
  14338. }
  14339. target := &ret
  14340. if err := gensupport.DecodeResponse(target, res); err != nil {
  14341. return nil, err
  14342. }
  14343. return ret, nil
  14344. // {
  14345. // "description": "Updates part of an existing resource.\n",
  14346. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}/{fhirId1}",
  14347. // "httpMethod": "PATCH",
  14348. // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.patch",
  14349. // "parameterOrder": [
  14350. // "name"
  14351. // ],
  14352. // "parameters": {
  14353. // "name": {
  14354. // "description": "The name of the resource to update.",
  14355. // "location": "path",
  14356. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/fhir/[^/]+/[^/]+$",
  14357. // "required": true,
  14358. // "type": "string"
  14359. // }
  14360. // },
  14361. // "path": "v1alpha2/{+name}",
  14362. // "request": {
  14363. // "$ref": "HttpBody"
  14364. // },
  14365. // "response": {
  14366. // "$ref": "HttpBody"
  14367. // },
  14368. // "scopes": [
  14369. // "https://www.googleapis.com/auth/cloud-platform"
  14370. // ]
  14371. // }
  14372. }
  14373. // method id "healthcare.projects.locations.datasets.fhirStores.fhir.searchResources":
  14374. type ProjectsLocationsDatasetsFhirStoresFhirSearchResourcesCall struct {
  14375. s *Service
  14376. parent string
  14377. resourceType string
  14378. urlParams_ gensupport.URLParams
  14379. ifNoneMatch_ string
  14380. ctx_ context.Context
  14381. header_ http.Header
  14382. }
  14383. // SearchResources: Searches resources in the given FHIR store.
  14384. func (r *ProjectsLocationsDatasetsFhirStoresFhirService) SearchResources(parent string, resourceType string) *ProjectsLocationsDatasetsFhirStoresFhirSearchResourcesCall {
  14385. c := &ProjectsLocationsDatasetsFhirStoresFhirSearchResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  14386. c.parent = parent
  14387. c.resourceType = resourceType
  14388. return c
  14389. }
  14390. // Fields allows partial responses to be retrieved. See
  14391. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  14392. // for more information.
  14393. func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchResourcesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirSearchResourcesCall {
  14394. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  14395. return c
  14396. }
  14397. // IfNoneMatch sets the optional parameter which makes the operation
  14398. // fail if the object's ETag matches the given value. This is useful for
  14399. // getting updates only after the object has changed since the last
  14400. // request. Use googleapi.IsNotModified to check whether the response
  14401. // error from Do is the result of In-None-Match.
  14402. func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchResourcesCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirSearchResourcesCall {
  14403. c.ifNoneMatch_ = entityTag
  14404. return c
  14405. }
  14406. // Context sets the context to be used in this call's Do method. Any
  14407. // pending HTTP request will be aborted if the provided context is
  14408. // canceled.
  14409. func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchResourcesCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirSearchResourcesCall {
  14410. c.ctx_ = ctx
  14411. return c
  14412. }
  14413. // Header returns an http.Header that can be modified by the caller to
  14414. // add HTTP headers to the request.
  14415. func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchResourcesCall) Header() http.Header {
  14416. if c.header_ == nil {
  14417. c.header_ = make(http.Header)
  14418. }
  14419. return c.header_
  14420. }
  14421. func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchResourcesCall) doRequest(alt string) (*http.Response, error) {
  14422. reqHeaders := make(http.Header)
  14423. for k, v := range c.header_ {
  14424. reqHeaders[k] = v
  14425. }
  14426. reqHeaders.Set("User-Agent", c.s.userAgent())
  14427. if c.ifNoneMatch_ != "" {
  14428. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  14429. }
  14430. var body io.Reader = nil
  14431. c.urlParams_.Set("alt", alt)
  14432. c.urlParams_.Set("prettyPrint", "false")
  14433. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/fhir/{+resourceType}")
  14434. urls += "?" + c.urlParams_.Encode()
  14435. req, err := http.NewRequest("GET", urls, body)
  14436. if err != nil {
  14437. return nil, err
  14438. }
  14439. req.Header = reqHeaders
  14440. googleapi.Expand(req.URL, map[string]string{
  14441. "parent": c.parent,
  14442. "resourceType": c.resourceType,
  14443. })
  14444. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  14445. }
  14446. // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.searchResources" call.
  14447. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  14448. // code is an error. Response headers are in either
  14449. // *HttpBody.ServerResponse.Header or (if a response was returned at
  14450. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  14451. // to check whether the returned error was because
  14452. // http.StatusNotModified was returned.
  14453. func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchResourcesCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  14454. gensupport.SetOptions(c.urlParams_, opts...)
  14455. res, err := c.doRequest("json")
  14456. if res != nil && res.StatusCode == http.StatusNotModified {
  14457. if res.Body != nil {
  14458. res.Body.Close()
  14459. }
  14460. return nil, &googleapi.Error{
  14461. Code: res.StatusCode,
  14462. Header: res.Header,
  14463. }
  14464. }
  14465. if err != nil {
  14466. return nil, err
  14467. }
  14468. defer googleapi.CloseBody(res)
  14469. if err := googleapi.CheckResponse(res); err != nil {
  14470. return nil, err
  14471. }
  14472. ret := &HttpBody{
  14473. ServerResponse: googleapi.ServerResponse{
  14474. Header: res.Header,
  14475. HTTPStatusCode: res.StatusCode,
  14476. },
  14477. }
  14478. target := &ret
  14479. if err := gensupport.DecodeResponse(target, res); err != nil {
  14480. return nil, err
  14481. }
  14482. return ret, nil
  14483. // {
  14484. // "description": "Searches resources in the given FHIR store.",
  14485. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}",
  14486. // "httpMethod": "GET",
  14487. // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.searchResources",
  14488. // "parameterOrder": [
  14489. // "parent",
  14490. // "resourceType"
  14491. // ],
  14492. // "parameters": {
  14493. // "parent": {
  14494. // "description": "Name of the FHIR store to retrieve resources from.",
  14495. // "location": "path",
  14496. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$",
  14497. // "required": true,
  14498. // "type": "string"
  14499. // },
  14500. // "resourceType": {
  14501. // "description": "The type of the resource to search.",
  14502. // "location": "path",
  14503. // "pattern": "^.+$",
  14504. // "required": true,
  14505. // "type": "string"
  14506. // }
  14507. // },
  14508. // "path": "v1alpha2/{+parent}/fhir/{+resourceType}",
  14509. // "response": {
  14510. // "$ref": "HttpBody"
  14511. // },
  14512. // "scopes": [
  14513. // "https://www.googleapis.com/auth/cloud-platform"
  14514. // ]
  14515. // }
  14516. }
  14517. // method id "healthcare.projects.locations.datasets.fhirStores.fhir.update":
  14518. type ProjectsLocationsDatasetsFhirStoresFhirUpdateCall struct {
  14519. s *Service
  14520. name string
  14521. httpbody *HttpBody
  14522. urlParams_ gensupport.URLParams
  14523. ctx_ context.Context
  14524. header_ http.Header
  14525. }
  14526. // Update: Updates the entire resource or creates a new resource with a
  14527. // client
  14528. // specified ID if the resource does not exist and the FHIR store
  14529. // has
  14530. // enable_update_create set.
  14531. //
  14532. func (r *ProjectsLocationsDatasetsFhirStoresFhirService) Update(name string, httpbody *HttpBody) *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall {
  14533. c := &ProjectsLocationsDatasetsFhirStoresFhirUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  14534. c.name = name
  14535. c.httpbody = httpbody
  14536. return c
  14537. }
  14538. // Fields allows partial responses to be retrieved. See
  14539. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  14540. // for more information.
  14541. func (c *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall {
  14542. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  14543. return c
  14544. }
  14545. // Context sets the context to be used in this call's Do method. Any
  14546. // pending HTTP request will be aborted if the provided context is
  14547. // canceled.
  14548. func (c *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall {
  14549. c.ctx_ = ctx
  14550. return c
  14551. }
  14552. // Header returns an http.Header that can be modified by the caller to
  14553. // add HTTP headers to the request.
  14554. func (c *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall) Header() http.Header {
  14555. if c.header_ == nil {
  14556. c.header_ = make(http.Header)
  14557. }
  14558. return c.header_
  14559. }
  14560. func (c *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall) doRequest(alt string) (*http.Response, error) {
  14561. reqHeaders := make(http.Header)
  14562. for k, v := range c.header_ {
  14563. reqHeaders[k] = v
  14564. }
  14565. reqHeaders.Set("User-Agent", c.s.userAgent())
  14566. var body io.Reader = nil
  14567. body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpbody)
  14568. if err != nil {
  14569. return nil, err
  14570. }
  14571. reqHeaders.Set("Content-Type", "application/json")
  14572. c.urlParams_.Set("alt", alt)
  14573. c.urlParams_.Set("prettyPrint", "false")
  14574. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  14575. urls += "?" + c.urlParams_.Encode()
  14576. req, err := http.NewRequest("PUT", urls, body)
  14577. if err != nil {
  14578. return nil, err
  14579. }
  14580. req.Header = reqHeaders
  14581. googleapi.Expand(req.URL, map[string]string{
  14582. "name": c.name,
  14583. })
  14584. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  14585. }
  14586. // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.update" call.
  14587. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  14588. // code is an error. Response headers are in either
  14589. // *HttpBody.ServerResponse.Header or (if a response was returned at
  14590. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  14591. // to check whether the returned error was because
  14592. // http.StatusNotModified was returned.
  14593. func (c *ProjectsLocationsDatasetsFhirStoresFhirUpdateCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  14594. gensupport.SetOptions(c.urlParams_, opts...)
  14595. res, err := c.doRequest("json")
  14596. if res != nil && res.StatusCode == http.StatusNotModified {
  14597. if res.Body != nil {
  14598. res.Body.Close()
  14599. }
  14600. return nil, &googleapi.Error{
  14601. Code: res.StatusCode,
  14602. Header: res.Header,
  14603. }
  14604. }
  14605. if err != nil {
  14606. return nil, err
  14607. }
  14608. defer googleapi.CloseBody(res)
  14609. if err := googleapi.CheckResponse(res); err != nil {
  14610. return nil, err
  14611. }
  14612. ret := &HttpBody{
  14613. ServerResponse: googleapi.ServerResponse{
  14614. Header: res.Header,
  14615. HTTPStatusCode: res.StatusCode,
  14616. },
  14617. }
  14618. target := &ret
  14619. if err := gensupport.DecodeResponse(target, res); err != nil {
  14620. return nil, err
  14621. }
  14622. return ret, nil
  14623. // {
  14624. // "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",
  14625. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}/{fhirId1}",
  14626. // "httpMethod": "PUT",
  14627. // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.update",
  14628. // "parameterOrder": [
  14629. // "name"
  14630. // ],
  14631. // "parameters": {
  14632. // "name": {
  14633. // "description": "The name of the resource to update.",
  14634. // "location": "path",
  14635. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/fhir/[^/]+/[^/]+$",
  14636. // "required": true,
  14637. // "type": "string"
  14638. // }
  14639. // },
  14640. // "path": "v1alpha2/{+name}",
  14641. // "request": {
  14642. // "$ref": "HttpBody"
  14643. // },
  14644. // "response": {
  14645. // "$ref": "HttpBody"
  14646. // },
  14647. // "scopes": [
  14648. // "https://www.googleapis.com/auth/cloud-platform"
  14649. // ]
  14650. // }
  14651. }
  14652. // method id "healthcare.projects.locations.datasets.fhirStores.fhir.Patient.get$everything":
  14653. type ProjectsLocationsDatasetsFhirStoresFhirPatientGetEverythingCall struct {
  14654. s *Service
  14655. name string
  14656. urlParams_ gensupport.URLParams
  14657. ifNoneMatch_ string
  14658. ctx_ context.Context
  14659. header_ http.Header
  14660. }
  14661. // GetEverything: Gets all the resources in the patient compartment.
  14662. //
  14663. func (r *ProjectsLocationsDatasetsFhirStoresFhirPatientService) GetEverything(name string) *ProjectsLocationsDatasetsFhirStoresFhirPatientGetEverythingCall {
  14664. c := &ProjectsLocationsDatasetsFhirStoresFhirPatientGetEverythingCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  14665. c.name = name
  14666. return c
  14667. }
  14668. // End sets the optional parameter "end": The response includes records
  14669. // prior to the end date. If no end date is
  14670. // provided, all records subsequent to the start date are in scope.
  14671. func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientGetEverythingCall) End(end string) *ProjectsLocationsDatasetsFhirStoresFhirPatientGetEverythingCall {
  14672. c.urlParams_.Set("end", end)
  14673. return c
  14674. }
  14675. // Start sets the optional parameter "start": The response includes
  14676. // records subsequent to the start date. If no start
  14677. // date is provided, all records prior to the end date are in scope.
  14678. func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientGetEverythingCall) Start(start string) *ProjectsLocationsDatasetsFhirStoresFhirPatientGetEverythingCall {
  14679. c.urlParams_.Set("start", start)
  14680. return c
  14681. }
  14682. // Fields allows partial responses to be retrieved. See
  14683. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  14684. // for more information.
  14685. func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientGetEverythingCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirPatientGetEverythingCall {
  14686. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  14687. return c
  14688. }
  14689. // IfNoneMatch sets the optional parameter which makes the operation
  14690. // fail if the object's ETag matches the given value. This is useful for
  14691. // getting updates only after the object has changed since the last
  14692. // request. Use googleapi.IsNotModified to check whether the response
  14693. // error from Do is the result of In-None-Match.
  14694. func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientGetEverythingCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirPatientGetEverythingCall {
  14695. c.ifNoneMatch_ = entityTag
  14696. return c
  14697. }
  14698. // Context sets the context to be used in this call's Do method. Any
  14699. // pending HTTP request will be aborted if the provided context is
  14700. // canceled.
  14701. func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientGetEverythingCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirPatientGetEverythingCall {
  14702. c.ctx_ = ctx
  14703. return c
  14704. }
  14705. // Header returns an http.Header that can be modified by the caller to
  14706. // add HTTP headers to the request.
  14707. func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientGetEverythingCall) Header() http.Header {
  14708. if c.header_ == nil {
  14709. c.header_ = make(http.Header)
  14710. }
  14711. return c.header_
  14712. }
  14713. func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientGetEverythingCall) doRequest(alt string) (*http.Response, error) {
  14714. reqHeaders := make(http.Header)
  14715. for k, v := range c.header_ {
  14716. reqHeaders[k] = v
  14717. }
  14718. reqHeaders.Set("User-Agent", c.s.userAgent())
  14719. if c.ifNoneMatch_ != "" {
  14720. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  14721. }
  14722. var body io.Reader = nil
  14723. c.urlParams_.Set("alt", alt)
  14724. c.urlParams_.Set("prettyPrint", "false")
  14725. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}/$everything")
  14726. urls += "?" + c.urlParams_.Encode()
  14727. req, err := http.NewRequest("GET", urls, body)
  14728. if err != nil {
  14729. return nil, err
  14730. }
  14731. req.Header = reqHeaders
  14732. googleapi.Expand(req.URL, map[string]string{
  14733. "name": c.name,
  14734. })
  14735. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  14736. }
  14737. // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Patient.get$everything" call.
  14738. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  14739. // code is an error. Response headers are in either
  14740. // *HttpBody.ServerResponse.Header or (if a response was returned at
  14741. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  14742. // to check whether the returned error was because
  14743. // http.StatusNotModified was returned.
  14744. func (c *ProjectsLocationsDatasetsFhirStoresFhirPatientGetEverythingCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  14745. gensupport.SetOptions(c.urlParams_, opts...)
  14746. res, err := c.doRequest("json")
  14747. if res != nil && res.StatusCode == http.StatusNotModified {
  14748. if res.Body != nil {
  14749. res.Body.Close()
  14750. }
  14751. return nil, &googleapi.Error{
  14752. Code: res.StatusCode,
  14753. Header: res.Header,
  14754. }
  14755. }
  14756. if err != nil {
  14757. return nil, err
  14758. }
  14759. defer googleapi.CloseBody(res)
  14760. if err := googleapi.CheckResponse(res); err != nil {
  14761. return nil, err
  14762. }
  14763. ret := &HttpBody{
  14764. ServerResponse: googleapi.ServerResponse{
  14765. Header: res.Header,
  14766. HTTPStatusCode: res.StatusCode,
  14767. },
  14768. }
  14769. target := &ret
  14770. if err := gensupport.DecodeResponse(target, res); err != nil {
  14771. return nil, err
  14772. }
  14773. return ret, nil
  14774. // {
  14775. // "description": "Gets all the resources in the patient compartment.\n",
  14776. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/Patient/{PatientId}/$everything",
  14777. // "httpMethod": "GET",
  14778. // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.Patient.get$everything",
  14779. // "parameterOrder": [
  14780. // "name"
  14781. // ],
  14782. // "parameters": {
  14783. // "end": {
  14784. // "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.",
  14785. // "location": "query",
  14786. // "type": "string"
  14787. // },
  14788. // "name": {
  14789. // "description": "Name of the patient for which the information is required.",
  14790. // "location": "path",
  14791. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/fhir/Patient/[^/]+$",
  14792. // "required": true,
  14793. // "type": "string"
  14794. // },
  14795. // "start": {
  14796. // "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.",
  14797. // "location": "query",
  14798. // "type": "string"
  14799. // }
  14800. // },
  14801. // "path": "v1alpha2/{+name}/$everything",
  14802. // "response": {
  14803. // "$ref": "HttpBody"
  14804. // },
  14805. // "scopes": [
  14806. // "https://www.googleapis.com/auth/cloud-platform"
  14807. // ]
  14808. // }
  14809. }
  14810. // method id "healthcare.projects.locations.datasets.fhirStores.fhir._history.get":
  14811. type ProjectsLocationsDatasetsFhirStoresFhirHistoryGetCall struct {
  14812. s *Service
  14813. name string
  14814. urlParams_ gensupport.URLParams
  14815. ifNoneMatch_ string
  14816. ctx_ context.Context
  14817. header_ http.Header
  14818. }
  14819. // Get: Gets a version (current or historical) of FHIR resource by
  14820. // version id.
  14821. //
  14822. func (r *ProjectsLocationsDatasetsFhirStoresFhirHistoryService) Get(name string) *ProjectsLocationsDatasetsFhirStoresFhirHistoryGetCall {
  14823. c := &ProjectsLocationsDatasetsFhirStoresFhirHistoryGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  14824. c.name = name
  14825. return c
  14826. }
  14827. // Fields allows partial responses to be retrieved. See
  14828. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  14829. // for more information.
  14830. func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirHistoryGetCall {
  14831. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  14832. return c
  14833. }
  14834. // IfNoneMatch sets the optional parameter which makes the operation
  14835. // fail if the object's ETag matches the given value. This is useful for
  14836. // getting updates only after the object has changed since the last
  14837. // request. Use googleapi.IsNotModified to check whether the response
  14838. // error from Do is the result of In-None-Match.
  14839. func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirHistoryGetCall {
  14840. c.ifNoneMatch_ = entityTag
  14841. return c
  14842. }
  14843. // Context sets the context to be used in this call's Do method. Any
  14844. // pending HTTP request will be aborted if the provided context is
  14845. // canceled.
  14846. func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirHistoryGetCall {
  14847. c.ctx_ = ctx
  14848. return c
  14849. }
  14850. // Header returns an http.Header that can be modified by the caller to
  14851. // add HTTP headers to the request.
  14852. func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryGetCall) Header() http.Header {
  14853. if c.header_ == nil {
  14854. c.header_ = make(http.Header)
  14855. }
  14856. return c.header_
  14857. }
  14858. func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryGetCall) doRequest(alt string) (*http.Response, error) {
  14859. reqHeaders := make(http.Header)
  14860. for k, v := range c.header_ {
  14861. reqHeaders[k] = v
  14862. }
  14863. reqHeaders.Set("User-Agent", c.s.userAgent())
  14864. if c.ifNoneMatch_ != "" {
  14865. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  14866. }
  14867. var body io.Reader = nil
  14868. c.urlParams_.Set("alt", alt)
  14869. c.urlParams_.Set("prettyPrint", "false")
  14870. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  14871. urls += "?" + c.urlParams_.Encode()
  14872. req, err := http.NewRequest("GET", urls, body)
  14873. if err != nil {
  14874. return nil, err
  14875. }
  14876. req.Header = reqHeaders
  14877. googleapi.Expand(req.URL, map[string]string{
  14878. "name": c.name,
  14879. })
  14880. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  14881. }
  14882. // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir._history.get" call.
  14883. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  14884. // code is an error. Response headers are in either
  14885. // *HttpBody.ServerResponse.Header or (if a response was returned at
  14886. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  14887. // to check whether the returned error was because
  14888. // http.StatusNotModified was returned.
  14889. func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryGetCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  14890. gensupport.SetOptions(c.urlParams_, opts...)
  14891. res, err := c.doRequest("json")
  14892. if res != nil && res.StatusCode == http.StatusNotModified {
  14893. if res.Body != nil {
  14894. res.Body.Close()
  14895. }
  14896. return nil, &googleapi.Error{
  14897. Code: res.StatusCode,
  14898. Header: res.Header,
  14899. }
  14900. }
  14901. if err != nil {
  14902. return nil, err
  14903. }
  14904. defer googleapi.CloseBody(res)
  14905. if err := googleapi.CheckResponse(res); err != nil {
  14906. return nil, err
  14907. }
  14908. ret := &HttpBody{
  14909. ServerResponse: googleapi.ServerResponse{
  14910. Header: res.Header,
  14911. HTTPStatusCode: res.StatusCode,
  14912. },
  14913. }
  14914. target := &ret
  14915. if err := gensupport.DecodeResponse(target, res); err != nil {
  14916. return nil, err
  14917. }
  14918. return ret, nil
  14919. // {
  14920. // "description": "Gets a version (current or historical) of FHIR resource by version id.\n",
  14921. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}/{fhirId1}/_history/{_historyId}",
  14922. // "httpMethod": "GET",
  14923. // "id": "healthcare.projects.locations.datasets.fhirStores.fhir._history.get",
  14924. // "parameterOrder": [
  14925. // "name"
  14926. // ],
  14927. // "parameters": {
  14928. // "name": {
  14929. // "description": "The name of the resource version to retrieve.",
  14930. // "location": "path",
  14931. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/fhir/[^/]+/[^/]+/_history/[^/]+$",
  14932. // "required": true,
  14933. // "type": "string"
  14934. // }
  14935. // },
  14936. // "path": "v1alpha2/{+name}",
  14937. // "response": {
  14938. // "$ref": "HttpBody"
  14939. // },
  14940. // "scopes": [
  14941. // "https://www.googleapis.com/auth/cloud-platform"
  14942. // ]
  14943. // }
  14944. }
  14945. // method id "healthcare.projects.locations.datasets.fhirStores.fhir._history.list":
  14946. type ProjectsLocationsDatasetsFhirStoresFhirHistoryListCall struct {
  14947. s *Service
  14948. name string
  14949. urlParams_ gensupport.URLParams
  14950. ifNoneMatch_ string
  14951. ctx_ context.Context
  14952. header_ http.Header
  14953. }
  14954. // List: Lists all the versions of a resource (including the current
  14955. // version and
  14956. // deleted versions) from the FHIR store.
  14957. //
  14958. func (r *ProjectsLocationsDatasetsFhirStoresFhirHistoryService) List(name string) *ProjectsLocationsDatasetsFhirStoresFhirHistoryListCall {
  14959. c := &ProjectsLocationsDatasetsFhirStoresFhirHistoryListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  14960. c.name = name
  14961. return c
  14962. }
  14963. // At sets the optional parameter "at": Only include resource versions
  14964. // that were current at some point during the
  14965. // time period specified in the date time value. The date parameter
  14966. // format is
  14967. // yyyy-mm-ddThh:mm:ss[Z|(+|-)hh:mm]
  14968. // Clients may specify any of the following:
  14969. // An entire year: `_at=2019`
  14970. // An entire month: `_at=2019-01`
  14971. // A specific day: `_at=2019-01-20`
  14972. // A specific second: `_at=2018-12-31T23:59:58Z`
  14973. func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryListCall) At(at string) *ProjectsLocationsDatasetsFhirStoresFhirHistoryListCall {
  14974. c.urlParams_.Set("at", at)
  14975. return c
  14976. }
  14977. // Count sets the optional parameter "count": The maximum number of
  14978. // search results on a page.
  14979. func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryListCall) Count(count int64) *ProjectsLocationsDatasetsFhirStoresFhirHistoryListCall {
  14980. c.urlParams_.Set("count", fmt.Sprint(count))
  14981. return c
  14982. }
  14983. // Page sets the optional parameter "page": Used to retrieve the first,
  14984. // previous, next, or last page of resource
  14985. // versions when using pagination. Value should be set to the value of
  14986. // the
  14987. // `link.url` field returned in the response to the previous request,
  14988. // where
  14989. // `link.relation` is "first", "previous", "next" or "last".
  14990. // Omit `page` if no previous request has been made.
  14991. func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryListCall) Page(page string) *ProjectsLocationsDatasetsFhirStoresFhirHistoryListCall {
  14992. c.urlParams_.Set("page", page)
  14993. return c
  14994. }
  14995. // Since sets the optional parameter "since": Only include resource
  14996. // versions that were created at or after the given
  14997. // instant in time. The instant in time uses the
  14998. // format
  14999. // YYYY-MM-DDThh:mm:ss.sss+zz:zz (for example
  15000. // 2015-02-07T13:28:17.239+02:00 or
  15001. // 2017-01-01T00:00:00Z). The time must be specified to the second
  15002. // and
  15003. // include a time zone.
  15004. func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryListCall) Since(since string) *ProjectsLocationsDatasetsFhirStoresFhirHistoryListCall {
  15005. c.urlParams_.Set("since", since)
  15006. return c
  15007. }
  15008. // Fields allows partial responses to be retrieved. See
  15009. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  15010. // for more information.
  15011. func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirHistoryListCall {
  15012. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  15013. return c
  15014. }
  15015. // IfNoneMatch sets the optional parameter which makes the operation
  15016. // fail if the object's ETag matches the given value. This is useful for
  15017. // getting updates only after the object has changed since the last
  15018. // request. Use googleapi.IsNotModified to check whether the response
  15019. // error from Do is the result of In-None-Match.
  15020. func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirHistoryListCall {
  15021. c.ifNoneMatch_ = entityTag
  15022. return c
  15023. }
  15024. // Context sets the context to be used in this call's Do method. Any
  15025. // pending HTTP request will be aborted if the provided context is
  15026. // canceled.
  15027. func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirHistoryListCall {
  15028. c.ctx_ = ctx
  15029. return c
  15030. }
  15031. // Header returns an http.Header that can be modified by the caller to
  15032. // add HTTP headers to the request.
  15033. func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryListCall) Header() http.Header {
  15034. if c.header_ == nil {
  15035. c.header_ = make(http.Header)
  15036. }
  15037. return c.header_
  15038. }
  15039. func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryListCall) doRequest(alt string) (*http.Response, error) {
  15040. reqHeaders := make(http.Header)
  15041. for k, v := range c.header_ {
  15042. reqHeaders[k] = v
  15043. }
  15044. reqHeaders.Set("User-Agent", c.s.userAgent())
  15045. if c.ifNoneMatch_ != "" {
  15046. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  15047. }
  15048. var body io.Reader = nil
  15049. c.urlParams_.Set("alt", alt)
  15050. c.urlParams_.Set("prettyPrint", "false")
  15051. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}/_history")
  15052. urls += "?" + c.urlParams_.Encode()
  15053. req, err := http.NewRequest("GET", urls, body)
  15054. if err != nil {
  15055. return nil, err
  15056. }
  15057. req.Header = reqHeaders
  15058. googleapi.Expand(req.URL, map[string]string{
  15059. "name": c.name,
  15060. })
  15061. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  15062. }
  15063. // Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir._history.list" call.
  15064. // Exactly one of *HttpBody or error will be non-nil. Any non-2xx status
  15065. // code is an error. Response headers are in either
  15066. // *HttpBody.ServerResponse.Header or (if a response was returned at
  15067. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  15068. // to check whether the returned error was because
  15069. // http.StatusNotModified was returned.
  15070. func (c *ProjectsLocationsDatasetsFhirStoresFhirHistoryListCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  15071. gensupport.SetOptions(c.urlParams_, opts...)
  15072. res, err := c.doRequest("json")
  15073. if res != nil && res.StatusCode == http.StatusNotModified {
  15074. if res.Body != nil {
  15075. res.Body.Close()
  15076. }
  15077. return nil, &googleapi.Error{
  15078. Code: res.StatusCode,
  15079. Header: res.Header,
  15080. }
  15081. }
  15082. if err != nil {
  15083. return nil, err
  15084. }
  15085. defer googleapi.CloseBody(res)
  15086. if err := googleapi.CheckResponse(res); err != nil {
  15087. return nil, err
  15088. }
  15089. ret := &HttpBody{
  15090. ServerResponse: googleapi.ServerResponse{
  15091. Header: res.Header,
  15092. HTTPStatusCode: res.StatusCode,
  15093. },
  15094. }
  15095. target := &ret
  15096. if err := gensupport.DecodeResponse(target, res); err != nil {
  15097. return nil, err
  15098. }
  15099. return ret, nil
  15100. // {
  15101. // "description": "Lists all the versions of a resource (including the current version and\ndeleted versions) from the FHIR store.\n",
  15102. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{fhirId}/{fhirId1}/_history",
  15103. // "httpMethod": "GET",
  15104. // "id": "healthcare.projects.locations.datasets.fhirStores.fhir._history.list",
  15105. // "parameterOrder": [
  15106. // "name"
  15107. // ],
  15108. // "parameters": {
  15109. // "at": {
  15110. // "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`",
  15111. // "location": "query",
  15112. // "type": "string"
  15113. // },
  15114. // "count": {
  15115. // "description": "The maximum number of search results on a page.",
  15116. // "format": "int32",
  15117. // "location": "query",
  15118. // "type": "integer"
  15119. // },
  15120. // "name": {
  15121. // "description": "The name of the resource to retrieve.",
  15122. // "location": "path",
  15123. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/fhir/[^/]+/[^/]+$",
  15124. // "required": true,
  15125. // "type": "string"
  15126. // },
  15127. // "page": {
  15128. // "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.",
  15129. // "location": "query",
  15130. // "type": "string"
  15131. // },
  15132. // "since": {
  15133. // "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.",
  15134. // "location": "query",
  15135. // "type": "string"
  15136. // }
  15137. // },
  15138. // "path": "v1alpha2/{+name}/_history",
  15139. // "response": {
  15140. // "$ref": "HttpBody"
  15141. // },
  15142. // "scopes": [
  15143. // "https://www.googleapis.com/auth/cloud-platform"
  15144. // ]
  15145. // }
  15146. }
  15147. // method id "healthcare.projects.locations.datasets.fhirStores.securityLabels.getIamPolicy":
  15148. type ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall struct {
  15149. s *Service
  15150. resource string
  15151. urlParams_ gensupport.URLParams
  15152. ifNoneMatch_ string
  15153. ctx_ context.Context
  15154. header_ http.Header
  15155. }
  15156. // GetIamPolicy: Gets the access control policy for a FHIR store or
  15157. // security label within a
  15158. // FHIR store. Returns NOT_FOUND error if the resource does not exist.
  15159. // Returns
  15160. // an empty policy if the resource exists but does not have a policy
  15161. // set.
  15162. //
  15163. // Authorization requires the Google IAM
  15164. // permission
  15165. // 'healthcare.fhirStores.getIamPolicy' for a FHIR store
  15166. // or
  15167. // 'healthcare.securityLabels.getIamPolicy' for a security label
  15168. func (r *ProjectsLocationsDatasetsFhirStoresSecurityLabelsService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall {
  15169. c := &ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  15170. c.resource = resource
  15171. return c
  15172. }
  15173. // Fields allows partial responses to be retrieved. See
  15174. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  15175. // for more information.
  15176. func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall {
  15177. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  15178. return c
  15179. }
  15180. // IfNoneMatch sets the optional parameter which makes the operation
  15181. // fail if the object's ETag matches the given value. This is useful for
  15182. // getting updates only after the object has changed since the last
  15183. // request. Use googleapi.IsNotModified to check whether the response
  15184. // error from Do is the result of In-None-Match.
  15185. func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall {
  15186. c.ifNoneMatch_ = entityTag
  15187. return c
  15188. }
  15189. // Context sets the context to be used in this call's Do method. Any
  15190. // pending HTTP request will be aborted if the provided context is
  15191. // canceled.
  15192. func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall {
  15193. c.ctx_ = ctx
  15194. return c
  15195. }
  15196. // Header returns an http.Header that can be modified by the caller to
  15197. // add HTTP headers to the request.
  15198. func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall) Header() http.Header {
  15199. if c.header_ == nil {
  15200. c.header_ = make(http.Header)
  15201. }
  15202. return c.header_
  15203. }
  15204. func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  15205. reqHeaders := make(http.Header)
  15206. for k, v := range c.header_ {
  15207. reqHeaders[k] = v
  15208. }
  15209. reqHeaders.Set("User-Agent", c.s.userAgent())
  15210. if c.ifNoneMatch_ != "" {
  15211. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  15212. }
  15213. var body io.Reader = nil
  15214. c.urlParams_.Set("alt", alt)
  15215. c.urlParams_.Set("prettyPrint", "false")
  15216. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:getIamPolicy")
  15217. urls += "?" + c.urlParams_.Encode()
  15218. req, err := http.NewRequest("GET", urls, body)
  15219. if err != nil {
  15220. return nil, err
  15221. }
  15222. req.Header = reqHeaders
  15223. googleapi.Expand(req.URL, map[string]string{
  15224. "resource": c.resource,
  15225. })
  15226. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  15227. }
  15228. // Do executes the "healthcare.projects.locations.datasets.fhirStores.securityLabels.getIamPolicy" call.
  15229. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  15230. // code is an error. Response headers are in either
  15231. // *Policy.ServerResponse.Header or (if a response was returned at all)
  15232. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  15233. // check whether the returned error was because http.StatusNotModified
  15234. // was returned.
  15235. func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  15236. gensupport.SetOptions(c.urlParams_, opts...)
  15237. res, err := c.doRequest("json")
  15238. if res != nil && res.StatusCode == http.StatusNotModified {
  15239. if res.Body != nil {
  15240. res.Body.Close()
  15241. }
  15242. return nil, &googleapi.Error{
  15243. Code: res.StatusCode,
  15244. Header: res.Header,
  15245. }
  15246. }
  15247. if err != nil {
  15248. return nil, err
  15249. }
  15250. defer googleapi.CloseBody(res)
  15251. if err := googleapi.CheckResponse(res); err != nil {
  15252. return nil, err
  15253. }
  15254. ret := &Policy{
  15255. ServerResponse: googleapi.ServerResponse{
  15256. Header: res.Header,
  15257. HTTPStatusCode: res.StatusCode,
  15258. },
  15259. }
  15260. target := &ret
  15261. if err := gensupport.DecodeResponse(target, res); err != nil {
  15262. return nil, err
  15263. }
  15264. return ret, nil
  15265. // {
  15266. // "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",
  15267. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/securityLabels/{securityLabelsId}:getIamPolicy",
  15268. // "httpMethod": "GET",
  15269. // "id": "healthcare.projects.locations.datasets.fhirStores.securityLabels.getIamPolicy",
  15270. // "parameterOrder": [
  15271. // "resource"
  15272. // ],
  15273. // "parameters": {
  15274. // "resource": {
  15275. // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
  15276. // "location": "path",
  15277. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/securityLabels/[^/]+$",
  15278. // "required": true,
  15279. // "type": "string"
  15280. // }
  15281. // },
  15282. // "path": "v1alpha2/{+resource}:getIamPolicy",
  15283. // "response": {
  15284. // "$ref": "Policy"
  15285. // },
  15286. // "scopes": [
  15287. // "https://www.googleapis.com/auth/cloud-platform"
  15288. // ]
  15289. // }
  15290. }
  15291. // method id "healthcare.projects.locations.datasets.fhirStores.securityLabels.setIamPolicy":
  15292. type ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall struct {
  15293. s *Service
  15294. resource string
  15295. setiampolicyrequest *SetIamPolicyRequest
  15296. urlParams_ gensupport.URLParams
  15297. ctx_ context.Context
  15298. header_ http.Header
  15299. }
  15300. // SetIamPolicy: Sets the access control policy for a FHIR store or
  15301. // security label within a
  15302. // FHIR store. Replaces any existing policy.
  15303. //
  15304. // Authorization requires the Google IAM
  15305. // permission
  15306. // 'healthcare.fhirStores.setIamPolicy' for a FHIR store
  15307. // or
  15308. // 'healthcare.securityLabels.setIamPolicy' for a security label
  15309. func (r *ProjectsLocationsDatasetsFhirStoresSecurityLabelsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall {
  15310. c := &ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  15311. c.resource = resource
  15312. c.setiampolicyrequest = setiampolicyrequest
  15313. return c
  15314. }
  15315. // Fields allows partial responses to be retrieved. See
  15316. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  15317. // for more information.
  15318. func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall {
  15319. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  15320. return c
  15321. }
  15322. // Context sets the context to be used in this call's Do method. Any
  15323. // pending HTTP request will be aborted if the provided context is
  15324. // canceled.
  15325. func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall {
  15326. c.ctx_ = ctx
  15327. return c
  15328. }
  15329. // Header returns an http.Header that can be modified by the caller to
  15330. // add HTTP headers to the request.
  15331. func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall) Header() http.Header {
  15332. if c.header_ == nil {
  15333. c.header_ = make(http.Header)
  15334. }
  15335. return c.header_
  15336. }
  15337. func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  15338. reqHeaders := make(http.Header)
  15339. for k, v := range c.header_ {
  15340. reqHeaders[k] = v
  15341. }
  15342. reqHeaders.Set("User-Agent", c.s.userAgent())
  15343. var body io.Reader = nil
  15344. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  15345. if err != nil {
  15346. return nil, err
  15347. }
  15348. reqHeaders.Set("Content-Type", "application/json")
  15349. c.urlParams_.Set("alt", alt)
  15350. c.urlParams_.Set("prettyPrint", "false")
  15351. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:setIamPolicy")
  15352. urls += "?" + c.urlParams_.Encode()
  15353. req, err := http.NewRequest("POST", urls, body)
  15354. if err != nil {
  15355. return nil, err
  15356. }
  15357. req.Header = reqHeaders
  15358. googleapi.Expand(req.URL, map[string]string{
  15359. "resource": c.resource,
  15360. })
  15361. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  15362. }
  15363. // Do executes the "healthcare.projects.locations.datasets.fhirStores.securityLabels.setIamPolicy" call.
  15364. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  15365. // code is an error. Response headers are in either
  15366. // *Policy.ServerResponse.Header or (if a response was returned at all)
  15367. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  15368. // check whether the returned error was because http.StatusNotModified
  15369. // was returned.
  15370. func (c *ProjectsLocationsDatasetsFhirStoresSecurityLabelsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  15371. gensupport.SetOptions(c.urlParams_, opts...)
  15372. res, err := c.doRequest("json")
  15373. if res != nil && res.StatusCode == http.StatusNotModified {
  15374. if res.Body != nil {
  15375. res.Body.Close()
  15376. }
  15377. return nil, &googleapi.Error{
  15378. Code: res.StatusCode,
  15379. Header: res.Header,
  15380. }
  15381. }
  15382. if err != nil {
  15383. return nil, err
  15384. }
  15385. defer googleapi.CloseBody(res)
  15386. if err := googleapi.CheckResponse(res); err != nil {
  15387. return nil, err
  15388. }
  15389. ret := &Policy{
  15390. ServerResponse: googleapi.ServerResponse{
  15391. Header: res.Header,
  15392. HTTPStatusCode: res.StatusCode,
  15393. },
  15394. }
  15395. target := &ret
  15396. if err := gensupport.DecodeResponse(target, res); err != nil {
  15397. return nil, err
  15398. }
  15399. return ret, nil
  15400. // {
  15401. // "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",
  15402. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/securityLabels/{securityLabelsId}:setIamPolicy",
  15403. // "httpMethod": "POST",
  15404. // "id": "healthcare.projects.locations.datasets.fhirStores.securityLabels.setIamPolicy",
  15405. // "parameterOrder": [
  15406. // "resource"
  15407. // ],
  15408. // "parameters": {
  15409. // "resource": {
  15410. // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
  15411. // "location": "path",
  15412. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/securityLabels/[^/]+$",
  15413. // "required": true,
  15414. // "type": "string"
  15415. // }
  15416. // },
  15417. // "path": "v1alpha2/{+resource}:setIamPolicy",
  15418. // "request": {
  15419. // "$ref": "SetIamPolicyRequest"
  15420. // },
  15421. // "response": {
  15422. // "$ref": "Policy"
  15423. // },
  15424. // "scopes": [
  15425. // "https://www.googleapis.com/auth/cloud-platform"
  15426. // ]
  15427. // }
  15428. }
  15429. // method id "healthcare.projects.locations.datasets.hl7V2Stores.create":
  15430. type ProjectsLocationsDatasetsHl7V2StoresCreateCall struct {
  15431. s *Service
  15432. parent string
  15433. hl7v2store *Hl7V2Store
  15434. urlParams_ gensupport.URLParams
  15435. ctx_ context.Context
  15436. header_ http.Header
  15437. }
  15438. // Create: Creates a new HL7v2 store within the parent dataset.
  15439. func (r *ProjectsLocationsDatasetsHl7V2StoresService) Create(parent string, hl7v2store *Hl7V2Store) *ProjectsLocationsDatasetsHl7V2StoresCreateCall {
  15440. c := &ProjectsLocationsDatasetsHl7V2StoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  15441. c.parent = parent
  15442. c.hl7v2store = hl7v2store
  15443. return c
  15444. }
  15445. // Hl7V2StoreId sets the optional parameter "hl7V2StoreId": The ID of
  15446. // the HL7v2 store that is being created.
  15447. // The string must match the following regex:
  15448. // `[\p{L}\p{N}_\-\.]{1,256}`.
  15449. func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Hl7V2StoreId(hl7V2StoreId string) *ProjectsLocationsDatasetsHl7V2StoresCreateCall {
  15450. c.urlParams_.Set("hl7V2StoreId", hl7V2StoreId)
  15451. return c
  15452. }
  15453. // Fields allows partial responses to be retrieved. See
  15454. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  15455. // for more information.
  15456. func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresCreateCall {
  15457. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  15458. return c
  15459. }
  15460. // Context sets the context to be used in this call's Do method. Any
  15461. // pending HTTP request will be aborted if the provided context is
  15462. // canceled.
  15463. func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresCreateCall {
  15464. c.ctx_ = ctx
  15465. return c
  15466. }
  15467. // Header returns an http.Header that can be modified by the caller to
  15468. // add HTTP headers to the request.
  15469. func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Header() http.Header {
  15470. if c.header_ == nil {
  15471. c.header_ = make(http.Header)
  15472. }
  15473. return c.header_
  15474. }
  15475. func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) doRequest(alt string) (*http.Response, error) {
  15476. reqHeaders := make(http.Header)
  15477. for k, v := range c.header_ {
  15478. reqHeaders[k] = v
  15479. }
  15480. reqHeaders.Set("User-Agent", c.s.userAgent())
  15481. var body io.Reader = nil
  15482. body, err := googleapi.WithoutDataWrapper.JSONReader(c.hl7v2store)
  15483. if err != nil {
  15484. return nil, err
  15485. }
  15486. reqHeaders.Set("Content-Type", "application/json")
  15487. c.urlParams_.Set("alt", alt)
  15488. c.urlParams_.Set("prettyPrint", "false")
  15489. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/hl7V2Stores")
  15490. urls += "?" + c.urlParams_.Encode()
  15491. req, err := http.NewRequest("POST", urls, body)
  15492. if err != nil {
  15493. return nil, err
  15494. }
  15495. req.Header = reqHeaders
  15496. googleapi.Expand(req.URL, map[string]string{
  15497. "parent": c.parent,
  15498. })
  15499. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  15500. }
  15501. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.create" call.
  15502. // Exactly one of *Hl7V2Store or error will be non-nil. Any non-2xx
  15503. // status code is an error. Response headers are in either
  15504. // *Hl7V2Store.ServerResponse.Header or (if a response was returned at
  15505. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  15506. // to check whether the returned error was because
  15507. // http.StatusNotModified was returned.
  15508. func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Do(opts ...googleapi.CallOption) (*Hl7V2Store, error) {
  15509. gensupport.SetOptions(c.urlParams_, opts...)
  15510. res, err := c.doRequest("json")
  15511. if res != nil && res.StatusCode == http.StatusNotModified {
  15512. if res.Body != nil {
  15513. res.Body.Close()
  15514. }
  15515. return nil, &googleapi.Error{
  15516. Code: res.StatusCode,
  15517. Header: res.Header,
  15518. }
  15519. }
  15520. if err != nil {
  15521. return nil, err
  15522. }
  15523. defer googleapi.CloseBody(res)
  15524. if err := googleapi.CheckResponse(res); err != nil {
  15525. return nil, err
  15526. }
  15527. ret := &Hl7V2Store{
  15528. ServerResponse: googleapi.ServerResponse{
  15529. Header: res.Header,
  15530. HTTPStatusCode: res.StatusCode,
  15531. },
  15532. }
  15533. target := &ret
  15534. if err := gensupport.DecodeResponse(target, res); err != nil {
  15535. return nil, err
  15536. }
  15537. return ret, nil
  15538. // {
  15539. // "description": "Creates a new HL7v2 store within the parent dataset.",
  15540. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores",
  15541. // "httpMethod": "POST",
  15542. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.create",
  15543. // "parameterOrder": [
  15544. // "parent"
  15545. // ],
  15546. // "parameters": {
  15547. // "hl7V2StoreId": {
  15548. // "description": "The ID of the HL7v2 store that is being created.\nThe string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.",
  15549. // "location": "query",
  15550. // "type": "string"
  15551. // },
  15552. // "parent": {
  15553. // "description": "The name of the dataset this HL7v2 store belongs to.",
  15554. // "location": "path",
  15555. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  15556. // "required": true,
  15557. // "type": "string"
  15558. // }
  15559. // },
  15560. // "path": "v1alpha2/{+parent}/hl7V2Stores",
  15561. // "request": {
  15562. // "$ref": "Hl7V2Store"
  15563. // },
  15564. // "response": {
  15565. // "$ref": "Hl7V2Store"
  15566. // },
  15567. // "scopes": [
  15568. // "https://www.googleapis.com/auth/cloud-platform"
  15569. // ]
  15570. // }
  15571. }
  15572. // method id "healthcare.projects.locations.datasets.hl7V2Stores.delete":
  15573. type ProjectsLocationsDatasetsHl7V2StoresDeleteCall struct {
  15574. s *Service
  15575. name string
  15576. urlParams_ gensupport.URLParams
  15577. ctx_ context.Context
  15578. header_ http.Header
  15579. }
  15580. // Delete: Deletes the specified HL7v2 store and removes all messages
  15581. // that are
  15582. // contained within it.
  15583. func (r *ProjectsLocationsDatasetsHl7V2StoresService) Delete(name string) *ProjectsLocationsDatasetsHl7V2StoresDeleteCall {
  15584. c := &ProjectsLocationsDatasetsHl7V2StoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  15585. c.name = name
  15586. return c
  15587. }
  15588. // Fields allows partial responses to be retrieved. See
  15589. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  15590. // for more information.
  15591. func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresDeleteCall {
  15592. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  15593. return c
  15594. }
  15595. // Context sets the context to be used in this call's Do method. Any
  15596. // pending HTTP request will be aborted if the provided context is
  15597. // canceled.
  15598. func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresDeleteCall {
  15599. c.ctx_ = ctx
  15600. return c
  15601. }
  15602. // Header returns an http.Header that can be modified by the caller to
  15603. // add HTTP headers to the request.
  15604. func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) Header() http.Header {
  15605. if c.header_ == nil {
  15606. c.header_ = make(http.Header)
  15607. }
  15608. return c.header_
  15609. }
  15610. func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) doRequest(alt string) (*http.Response, error) {
  15611. reqHeaders := make(http.Header)
  15612. for k, v := range c.header_ {
  15613. reqHeaders[k] = v
  15614. }
  15615. reqHeaders.Set("User-Agent", c.s.userAgent())
  15616. var body io.Reader = nil
  15617. c.urlParams_.Set("alt", alt)
  15618. c.urlParams_.Set("prettyPrint", "false")
  15619. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  15620. urls += "?" + c.urlParams_.Encode()
  15621. req, err := http.NewRequest("DELETE", urls, body)
  15622. if err != nil {
  15623. return nil, err
  15624. }
  15625. req.Header = reqHeaders
  15626. googleapi.Expand(req.URL, map[string]string{
  15627. "name": c.name,
  15628. })
  15629. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  15630. }
  15631. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.delete" call.
  15632. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  15633. // code is an error. Response headers are in either
  15634. // *Empty.ServerResponse.Header or (if a response was returned at all)
  15635. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  15636. // check whether the returned error was because http.StatusNotModified
  15637. // was returned.
  15638. func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  15639. gensupport.SetOptions(c.urlParams_, opts...)
  15640. res, err := c.doRequest("json")
  15641. if res != nil && res.StatusCode == http.StatusNotModified {
  15642. if res.Body != nil {
  15643. res.Body.Close()
  15644. }
  15645. return nil, &googleapi.Error{
  15646. Code: res.StatusCode,
  15647. Header: res.Header,
  15648. }
  15649. }
  15650. if err != nil {
  15651. return nil, err
  15652. }
  15653. defer googleapi.CloseBody(res)
  15654. if err := googleapi.CheckResponse(res); err != nil {
  15655. return nil, err
  15656. }
  15657. ret := &Empty{
  15658. ServerResponse: googleapi.ServerResponse{
  15659. Header: res.Header,
  15660. HTTPStatusCode: res.StatusCode,
  15661. },
  15662. }
  15663. target := &ret
  15664. if err := gensupport.DecodeResponse(target, res); err != nil {
  15665. return nil, err
  15666. }
  15667. return ret, nil
  15668. // {
  15669. // "description": "Deletes the specified HL7v2 store and removes all messages that are\ncontained within it.",
  15670. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}",
  15671. // "httpMethod": "DELETE",
  15672. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.delete",
  15673. // "parameterOrder": [
  15674. // "name"
  15675. // ],
  15676. // "parameters": {
  15677. // "name": {
  15678. // "description": "The resource name of the HL7v2 store to delete.",
  15679. // "location": "path",
  15680. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$",
  15681. // "required": true,
  15682. // "type": "string"
  15683. // }
  15684. // },
  15685. // "path": "v1alpha2/{+name}",
  15686. // "response": {
  15687. // "$ref": "Empty"
  15688. // },
  15689. // "scopes": [
  15690. // "https://www.googleapis.com/auth/cloud-platform"
  15691. // ]
  15692. // }
  15693. }
  15694. // method id "healthcare.projects.locations.datasets.hl7V2Stores.get":
  15695. type ProjectsLocationsDatasetsHl7V2StoresGetCall struct {
  15696. s *Service
  15697. name string
  15698. urlParams_ gensupport.URLParams
  15699. ifNoneMatch_ string
  15700. ctx_ context.Context
  15701. header_ http.Header
  15702. }
  15703. // Get: Gets the specified HL7v2 store.
  15704. func (r *ProjectsLocationsDatasetsHl7V2StoresService) Get(name string) *ProjectsLocationsDatasetsHl7V2StoresGetCall {
  15705. c := &ProjectsLocationsDatasetsHl7V2StoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  15706. c.name = name
  15707. return c
  15708. }
  15709. // Fields allows partial responses to be retrieved. See
  15710. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  15711. // for more information.
  15712. func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresGetCall {
  15713. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  15714. return c
  15715. }
  15716. // IfNoneMatch sets the optional parameter which makes the operation
  15717. // fail if the object's ETag matches the given value. This is useful for
  15718. // getting updates only after the object has changed since the last
  15719. // request. Use googleapi.IsNotModified to check whether the response
  15720. // error from Do is the result of In-None-Match.
  15721. func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresGetCall {
  15722. c.ifNoneMatch_ = entityTag
  15723. return c
  15724. }
  15725. // Context sets the context to be used in this call's Do method. Any
  15726. // pending HTTP request will be aborted if the provided context is
  15727. // canceled.
  15728. func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresGetCall {
  15729. c.ctx_ = ctx
  15730. return c
  15731. }
  15732. // Header returns an http.Header that can be modified by the caller to
  15733. // add HTTP headers to the request.
  15734. func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) Header() http.Header {
  15735. if c.header_ == nil {
  15736. c.header_ = make(http.Header)
  15737. }
  15738. return c.header_
  15739. }
  15740. func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) doRequest(alt string) (*http.Response, error) {
  15741. reqHeaders := make(http.Header)
  15742. for k, v := range c.header_ {
  15743. reqHeaders[k] = v
  15744. }
  15745. reqHeaders.Set("User-Agent", c.s.userAgent())
  15746. if c.ifNoneMatch_ != "" {
  15747. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  15748. }
  15749. var body io.Reader = nil
  15750. c.urlParams_.Set("alt", alt)
  15751. c.urlParams_.Set("prettyPrint", "false")
  15752. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  15753. urls += "?" + c.urlParams_.Encode()
  15754. req, err := http.NewRequest("GET", urls, body)
  15755. if err != nil {
  15756. return nil, err
  15757. }
  15758. req.Header = reqHeaders
  15759. googleapi.Expand(req.URL, map[string]string{
  15760. "name": c.name,
  15761. })
  15762. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  15763. }
  15764. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.get" call.
  15765. // Exactly one of *Hl7V2Store or error will be non-nil. Any non-2xx
  15766. // status code is an error. Response headers are in either
  15767. // *Hl7V2Store.ServerResponse.Header or (if a response was returned at
  15768. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  15769. // to check whether the returned error was because
  15770. // http.StatusNotModified was returned.
  15771. func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) Do(opts ...googleapi.CallOption) (*Hl7V2Store, error) {
  15772. gensupport.SetOptions(c.urlParams_, opts...)
  15773. res, err := c.doRequest("json")
  15774. if res != nil && res.StatusCode == http.StatusNotModified {
  15775. if res.Body != nil {
  15776. res.Body.Close()
  15777. }
  15778. return nil, &googleapi.Error{
  15779. Code: res.StatusCode,
  15780. Header: res.Header,
  15781. }
  15782. }
  15783. if err != nil {
  15784. return nil, err
  15785. }
  15786. defer googleapi.CloseBody(res)
  15787. if err := googleapi.CheckResponse(res); err != nil {
  15788. return nil, err
  15789. }
  15790. ret := &Hl7V2Store{
  15791. ServerResponse: googleapi.ServerResponse{
  15792. Header: res.Header,
  15793. HTTPStatusCode: res.StatusCode,
  15794. },
  15795. }
  15796. target := &ret
  15797. if err := gensupport.DecodeResponse(target, res); err != nil {
  15798. return nil, err
  15799. }
  15800. return ret, nil
  15801. // {
  15802. // "description": "Gets the specified HL7v2 store.",
  15803. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}",
  15804. // "httpMethod": "GET",
  15805. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.get",
  15806. // "parameterOrder": [
  15807. // "name"
  15808. // ],
  15809. // "parameters": {
  15810. // "name": {
  15811. // "description": "The resource name of the HL7v2 store to get.",
  15812. // "location": "path",
  15813. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$",
  15814. // "required": true,
  15815. // "type": "string"
  15816. // }
  15817. // },
  15818. // "path": "v1alpha2/{+name}",
  15819. // "response": {
  15820. // "$ref": "Hl7V2Store"
  15821. // },
  15822. // "scopes": [
  15823. // "https://www.googleapis.com/auth/cloud-platform"
  15824. // ]
  15825. // }
  15826. }
  15827. // method id "healthcare.projects.locations.datasets.hl7V2Stores.getIamPolicy":
  15828. type ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall struct {
  15829. s *Service
  15830. resource string
  15831. urlParams_ gensupport.URLParams
  15832. ifNoneMatch_ string
  15833. ctx_ context.Context
  15834. header_ http.Header
  15835. }
  15836. // GetIamPolicy: Gets the access control policy for a resource.
  15837. // Returns an empty policy if the resource exists and does not have a
  15838. // policy
  15839. // set.
  15840. func (r *ProjectsLocationsDatasetsHl7V2StoresService) GetIamPolicy(resource string) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall {
  15841. c := &ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  15842. c.resource = resource
  15843. return c
  15844. }
  15845. // Fields allows partial responses to be retrieved. See
  15846. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  15847. // for more information.
  15848. func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall {
  15849. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  15850. return c
  15851. }
  15852. // IfNoneMatch sets the optional parameter which makes the operation
  15853. // fail if the object's ETag matches the given value. This is useful for
  15854. // getting updates only after the object has changed since the last
  15855. // request. Use googleapi.IsNotModified to check whether the response
  15856. // error from Do is the result of In-None-Match.
  15857. func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall {
  15858. c.ifNoneMatch_ = entityTag
  15859. return c
  15860. }
  15861. // Context sets the context to be used in this call's Do method. Any
  15862. // pending HTTP request will be aborted if the provided context is
  15863. // canceled.
  15864. func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall {
  15865. c.ctx_ = ctx
  15866. return c
  15867. }
  15868. // Header returns an http.Header that can be modified by the caller to
  15869. // add HTTP headers to the request.
  15870. func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Header() http.Header {
  15871. if c.header_ == nil {
  15872. c.header_ = make(http.Header)
  15873. }
  15874. return c.header_
  15875. }
  15876. func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  15877. reqHeaders := make(http.Header)
  15878. for k, v := range c.header_ {
  15879. reqHeaders[k] = v
  15880. }
  15881. reqHeaders.Set("User-Agent", c.s.userAgent())
  15882. if c.ifNoneMatch_ != "" {
  15883. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  15884. }
  15885. var body io.Reader = nil
  15886. c.urlParams_.Set("alt", alt)
  15887. c.urlParams_.Set("prettyPrint", "false")
  15888. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:getIamPolicy")
  15889. urls += "?" + c.urlParams_.Encode()
  15890. req, err := http.NewRequest("GET", urls, body)
  15891. if err != nil {
  15892. return nil, err
  15893. }
  15894. req.Header = reqHeaders
  15895. googleapi.Expand(req.URL, map[string]string{
  15896. "resource": c.resource,
  15897. })
  15898. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  15899. }
  15900. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.getIamPolicy" call.
  15901. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  15902. // code is an error. Response headers are in either
  15903. // *Policy.ServerResponse.Header or (if a response was returned at all)
  15904. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  15905. // check whether the returned error was because http.StatusNotModified
  15906. // was returned.
  15907. func (c *ProjectsLocationsDatasetsHl7V2StoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  15908. gensupport.SetOptions(c.urlParams_, opts...)
  15909. res, err := c.doRequest("json")
  15910. if res != nil && res.StatusCode == http.StatusNotModified {
  15911. if res.Body != nil {
  15912. res.Body.Close()
  15913. }
  15914. return nil, &googleapi.Error{
  15915. Code: res.StatusCode,
  15916. Header: res.Header,
  15917. }
  15918. }
  15919. if err != nil {
  15920. return nil, err
  15921. }
  15922. defer googleapi.CloseBody(res)
  15923. if err := googleapi.CheckResponse(res); err != nil {
  15924. return nil, err
  15925. }
  15926. ret := &Policy{
  15927. ServerResponse: googleapi.ServerResponse{
  15928. Header: res.Header,
  15929. HTTPStatusCode: res.StatusCode,
  15930. },
  15931. }
  15932. target := &ret
  15933. if err := gensupport.DecodeResponse(target, res); err != nil {
  15934. return nil, err
  15935. }
  15936. return ret, nil
  15937. // {
  15938. // "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.",
  15939. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}:getIamPolicy",
  15940. // "httpMethod": "GET",
  15941. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.getIamPolicy",
  15942. // "parameterOrder": [
  15943. // "resource"
  15944. // ],
  15945. // "parameters": {
  15946. // "resource": {
  15947. // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.",
  15948. // "location": "path",
  15949. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$",
  15950. // "required": true,
  15951. // "type": "string"
  15952. // }
  15953. // },
  15954. // "path": "v1alpha2/{+resource}:getIamPolicy",
  15955. // "response": {
  15956. // "$ref": "Policy"
  15957. // },
  15958. // "scopes": [
  15959. // "https://www.googleapis.com/auth/cloud-platform"
  15960. // ]
  15961. // }
  15962. }
  15963. // method id "healthcare.projects.locations.datasets.hl7V2Stores.list":
  15964. type ProjectsLocationsDatasetsHl7V2StoresListCall struct {
  15965. s *Service
  15966. parent string
  15967. urlParams_ gensupport.URLParams
  15968. ifNoneMatch_ string
  15969. ctx_ context.Context
  15970. header_ http.Header
  15971. }
  15972. // List: Lists the HL7v2 stores in the given dataset.
  15973. func (r *ProjectsLocationsDatasetsHl7V2StoresService) List(parent string) *ProjectsLocationsDatasetsHl7V2StoresListCall {
  15974. c := &ProjectsLocationsDatasetsHl7V2StoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  15975. c.parent = parent
  15976. return c
  15977. }
  15978. // Filter sets the optional parameter "filter": Restricts stores
  15979. // returned to those matching a filter.
  15980. // Syntax:
  15981. // https://cloud.google.com/appengine/docs/standard/python/search
  15982. // /query_strings
  15983. // Only filtering on labels is supported, for example
  15984. // `labels.key=value`.
  15985. func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Filter(filter string) *ProjectsLocationsDatasetsHl7V2StoresListCall {
  15986. c.urlParams_.Set("filter", filter)
  15987. return c
  15988. }
  15989. // PageSize sets the optional parameter "pageSize": Limit on the number
  15990. // of HL7v2 stores to return in a single response.
  15991. // If zero the default page size of 100 is used.
  15992. func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsHl7V2StoresListCall {
  15993. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  15994. return c
  15995. }
  15996. // PageToken sets the optional parameter "pageToken": The
  15997. // next_page_token value returned from the previous List request, if
  15998. // any.
  15999. func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsHl7V2StoresListCall {
  16000. c.urlParams_.Set("pageToken", pageToken)
  16001. return c
  16002. }
  16003. // Fields allows partial responses to be retrieved. See
  16004. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  16005. // for more information.
  16006. func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresListCall {
  16007. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  16008. return c
  16009. }
  16010. // IfNoneMatch sets the optional parameter which makes the operation
  16011. // fail if the object's ETag matches the given value. This is useful for
  16012. // getting updates only after the object has changed since the last
  16013. // request. Use googleapi.IsNotModified to check whether the response
  16014. // error from Do is the result of In-None-Match.
  16015. func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresListCall {
  16016. c.ifNoneMatch_ = entityTag
  16017. return c
  16018. }
  16019. // Context sets the context to be used in this call's Do method. Any
  16020. // pending HTTP request will be aborted if the provided context is
  16021. // canceled.
  16022. func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresListCall {
  16023. c.ctx_ = ctx
  16024. return c
  16025. }
  16026. // Header returns an http.Header that can be modified by the caller to
  16027. // add HTTP headers to the request.
  16028. func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Header() http.Header {
  16029. if c.header_ == nil {
  16030. c.header_ = make(http.Header)
  16031. }
  16032. return c.header_
  16033. }
  16034. func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) doRequest(alt string) (*http.Response, error) {
  16035. reqHeaders := make(http.Header)
  16036. for k, v := range c.header_ {
  16037. reqHeaders[k] = v
  16038. }
  16039. reqHeaders.Set("User-Agent", c.s.userAgent())
  16040. if c.ifNoneMatch_ != "" {
  16041. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  16042. }
  16043. var body io.Reader = nil
  16044. c.urlParams_.Set("alt", alt)
  16045. c.urlParams_.Set("prettyPrint", "false")
  16046. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/hl7V2Stores")
  16047. urls += "?" + c.urlParams_.Encode()
  16048. req, err := http.NewRequest("GET", urls, body)
  16049. if err != nil {
  16050. return nil, err
  16051. }
  16052. req.Header = reqHeaders
  16053. googleapi.Expand(req.URL, map[string]string{
  16054. "parent": c.parent,
  16055. })
  16056. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  16057. }
  16058. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.list" call.
  16059. // Exactly one of *ListHl7V2StoresResponse or error will be non-nil. Any
  16060. // non-2xx status code is an error. Response headers are in either
  16061. // *ListHl7V2StoresResponse.ServerResponse.Header or (if a response was
  16062. // returned at all) in error.(*googleapi.Error).Header. Use
  16063. // googleapi.IsNotModified to check whether the returned error was
  16064. // because http.StatusNotModified was returned.
  16065. func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Do(opts ...googleapi.CallOption) (*ListHl7V2StoresResponse, error) {
  16066. gensupport.SetOptions(c.urlParams_, opts...)
  16067. res, err := c.doRequest("json")
  16068. if res != nil && res.StatusCode == http.StatusNotModified {
  16069. if res.Body != nil {
  16070. res.Body.Close()
  16071. }
  16072. return nil, &googleapi.Error{
  16073. Code: res.StatusCode,
  16074. Header: res.Header,
  16075. }
  16076. }
  16077. if err != nil {
  16078. return nil, err
  16079. }
  16080. defer googleapi.CloseBody(res)
  16081. if err := googleapi.CheckResponse(res); err != nil {
  16082. return nil, err
  16083. }
  16084. ret := &ListHl7V2StoresResponse{
  16085. ServerResponse: googleapi.ServerResponse{
  16086. Header: res.Header,
  16087. HTTPStatusCode: res.StatusCode,
  16088. },
  16089. }
  16090. target := &ret
  16091. if err := gensupport.DecodeResponse(target, res); err != nil {
  16092. return nil, err
  16093. }
  16094. return ret, nil
  16095. // {
  16096. // "description": "Lists the HL7v2 stores in the given dataset.",
  16097. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores",
  16098. // "httpMethod": "GET",
  16099. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.list",
  16100. // "parameterOrder": [
  16101. // "parent"
  16102. // ],
  16103. // "parameters": {
  16104. // "filter": {
  16105. // "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`.",
  16106. // "location": "query",
  16107. // "type": "string"
  16108. // },
  16109. // "pageSize": {
  16110. // "description": "Limit on the number of HL7v2 stores to return in a single response.\nIf zero the default page size of 100 is used.",
  16111. // "format": "int32",
  16112. // "location": "query",
  16113. // "type": "integer"
  16114. // },
  16115. // "pageToken": {
  16116. // "description": "The next_page_token value returned from the previous List request, if any.",
  16117. // "location": "query",
  16118. // "type": "string"
  16119. // },
  16120. // "parent": {
  16121. // "description": "Name of the dataset.",
  16122. // "location": "path",
  16123. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  16124. // "required": true,
  16125. // "type": "string"
  16126. // }
  16127. // },
  16128. // "path": "v1alpha2/{+parent}/hl7V2Stores",
  16129. // "response": {
  16130. // "$ref": "ListHl7V2StoresResponse"
  16131. // },
  16132. // "scopes": [
  16133. // "https://www.googleapis.com/auth/cloud-platform"
  16134. // ]
  16135. // }
  16136. }
  16137. // Pages invokes f for each page of results.
  16138. // A non-nil error returned from f will halt the iteration.
  16139. // The provided context supersedes any context provided to the Context method.
  16140. func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Pages(ctx context.Context, f func(*ListHl7V2StoresResponse) error) error {
  16141. c.ctx_ = ctx
  16142. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  16143. for {
  16144. x, err := c.Do()
  16145. if err != nil {
  16146. return err
  16147. }
  16148. if err := f(x); err != nil {
  16149. return err
  16150. }
  16151. if x.NextPageToken == "" {
  16152. return nil
  16153. }
  16154. c.PageToken(x.NextPageToken)
  16155. }
  16156. }
  16157. // method id "healthcare.projects.locations.datasets.hl7V2Stores.patch":
  16158. type ProjectsLocationsDatasetsHl7V2StoresPatchCall struct {
  16159. s *Service
  16160. name string
  16161. hl7v2store *Hl7V2Store
  16162. urlParams_ gensupport.URLParams
  16163. ctx_ context.Context
  16164. header_ http.Header
  16165. }
  16166. // Patch: Updates the HL7v2 store.
  16167. func (r *ProjectsLocationsDatasetsHl7V2StoresService) Patch(name string, hl7v2store *Hl7V2Store) *ProjectsLocationsDatasetsHl7V2StoresPatchCall {
  16168. c := &ProjectsLocationsDatasetsHl7V2StoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  16169. c.name = name
  16170. c.hl7v2store = hl7v2store
  16171. return c
  16172. }
  16173. // UpdateMask sets the optional parameter "updateMask": The update mask
  16174. // applies to the resource. For the `FieldMask`
  16175. // definition,
  16176. // see
  16177. // https://developers.google.com/protocol-buffers/docs/re
  16178. // ference/google.protobuf#fieldmask
  16179. func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsHl7V2StoresPatchCall {
  16180. c.urlParams_.Set("updateMask", updateMask)
  16181. return c
  16182. }
  16183. // Fields allows partial responses to be retrieved. See
  16184. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  16185. // for more information.
  16186. func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresPatchCall {
  16187. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  16188. return c
  16189. }
  16190. // Context sets the context to be used in this call's Do method. Any
  16191. // pending HTTP request will be aborted if the provided context is
  16192. // canceled.
  16193. func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresPatchCall {
  16194. c.ctx_ = ctx
  16195. return c
  16196. }
  16197. // Header returns an http.Header that can be modified by the caller to
  16198. // add HTTP headers to the request.
  16199. func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Header() http.Header {
  16200. if c.header_ == nil {
  16201. c.header_ = make(http.Header)
  16202. }
  16203. return c.header_
  16204. }
  16205. func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) doRequest(alt string) (*http.Response, error) {
  16206. reqHeaders := make(http.Header)
  16207. for k, v := range c.header_ {
  16208. reqHeaders[k] = v
  16209. }
  16210. reqHeaders.Set("User-Agent", c.s.userAgent())
  16211. var body io.Reader = nil
  16212. body, err := googleapi.WithoutDataWrapper.JSONReader(c.hl7v2store)
  16213. if err != nil {
  16214. return nil, err
  16215. }
  16216. reqHeaders.Set("Content-Type", "application/json")
  16217. c.urlParams_.Set("alt", alt)
  16218. c.urlParams_.Set("prettyPrint", "false")
  16219. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  16220. urls += "?" + c.urlParams_.Encode()
  16221. req, err := http.NewRequest("PATCH", urls, body)
  16222. if err != nil {
  16223. return nil, err
  16224. }
  16225. req.Header = reqHeaders
  16226. googleapi.Expand(req.URL, map[string]string{
  16227. "name": c.name,
  16228. })
  16229. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  16230. }
  16231. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.patch" call.
  16232. // Exactly one of *Hl7V2Store or error will be non-nil. Any non-2xx
  16233. // status code is an error. Response headers are in either
  16234. // *Hl7V2Store.ServerResponse.Header or (if a response was returned at
  16235. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  16236. // to check whether the returned error was because
  16237. // http.StatusNotModified was returned.
  16238. func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Do(opts ...googleapi.CallOption) (*Hl7V2Store, error) {
  16239. gensupport.SetOptions(c.urlParams_, opts...)
  16240. res, err := c.doRequest("json")
  16241. if res != nil && res.StatusCode == http.StatusNotModified {
  16242. if res.Body != nil {
  16243. res.Body.Close()
  16244. }
  16245. return nil, &googleapi.Error{
  16246. Code: res.StatusCode,
  16247. Header: res.Header,
  16248. }
  16249. }
  16250. if err != nil {
  16251. return nil, err
  16252. }
  16253. defer googleapi.CloseBody(res)
  16254. if err := googleapi.CheckResponse(res); err != nil {
  16255. return nil, err
  16256. }
  16257. ret := &Hl7V2Store{
  16258. ServerResponse: googleapi.ServerResponse{
  16259. Header: res.Header,
  16260. HTTPStatusCode: res.StatusCode,
  16261. },
  16262. }
  16263. target := &ret
  16264. if err := gensupport.DecodeResponse(target, res); err != nil {
  16265. return nil, err
  16266. }
  16267. return ret, nil
  16268. // {
  16269. // "description": "Updates the HL7v2 store.",
  16270. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}",
  16271. // "httpMethod": "PATCH",
  16272. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.patch",
  16273. // "parameterOrder": [
  16274. // "name"
  16275. // ],
  16276. // "parameters": {
  16277. // "name": {
  16278. // "description": "Output only. Resource name of the HL7v2 store, of the form\n`projects/{project_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.",
  16279. // "location": "path",
  16280. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$",
  16281. // "required": true,
  16282. // "type": "string"
  16283. // },
  16284. // "updateMask": {
  16285. // "description": "The update mask applies to the resource. For the `FieldMask` definition,\nsee\nhttps://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask",
  16286. // "format": "google-fieldmask",
  16287. // "location": "query",
  16288. // "type": "string"
  16289. // }
  16290. // },
  16291. // "path": "v1alpha2/{+name}",
  16292. // "request": {
  16293. // "$ref": "Hl7V2Store"
  16294. // },
  16295. // "response": {
  16296. // "$ref": "Hl7V2Store"
  16297. // },
  16298. // "scopes": [
  16299. // "https://www.googleapis.com/auth/cloud-platform"
  16300. // ]
  16301. // }
  16302. }
  16303. // method id "healthcare.projects.locations.datasets.hl7V2Stores.setIamPolicy":
  16304. type ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall struct {
  16305. s *Service
  16306. resource string
  16307. setiampolicyrequest *SetIamPolicyRequest
  16308. urlParams_ gensupport.URLParams
  16309. ctx_ context.Context
  16310. header_ http.Header
  16311. }
  16312. // SetIamPolicy: Sets the access control policy on the specified
  16313. // resource. Replaces any
  16314. // existing policy.
  16315. func (r *ProjectsLocationsDatasetsHl7V2StoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall {
  16316. c := &ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  16317. c.resource = resource
  16318. c.setiampolicyrequest = setiampolicyrequest
  16319. return c
  16320. }
  16321. // Fields allows partial responses to be retrieved. See
  16322. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  16323. // for more information.
  16324. func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall {
  16325. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  16326. return c
  16327. }
  16328. // Context sets the context to be used in this call's Do method. Any
  16329. // pending HTTP request will be aborted if the provided context is
  16330. // canceled.
  16331. func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall {
  16332. c.ctx_ = ctx
  16333. return c
  16334. }
  16335. // Header returns an http.Header that can be modified by the caller to
  16336. // add HTTP headers to the request.
  16337. func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Header() http.Header {
  16338. if c.header_ == nil {
  16339. c.header_ = make(http.Header)
  16340. }
  16341. return c.header_
  16342. }
  16343. func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  16344. reqHeaders := make(http.Header)
  16345. for k, v := range c.header_ {
  16346. reqHeaders[k] = v
  16347. }
  16348. reqHeaders.Set("User-Agent", c.s.userAgent())
  16349. var body io.Reader = nil
  16350. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  16351. if err != nil {
  16352. return nil, err
  16353. }
  16354. reqHeaders.Set("Content-Type", "application/json")
  16355. c.urlParams_.Set("alt", alt)
  16356. c.urlParams_.Set("prettyPrint", "false")
  16357. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:setIamPolicy")
  16358. urls += "?" + c.urlParams_.Encode()
  16359. req, err := http.NewRequest("POST", urls, body)
  16360. if err != nil {
  16361. return nil, err
  16362. }
  16363. req.Header = reqHeaders
  16364. googleapi.Expand(req.URL, map[string]string{
  16365. "resource": c.resource,
  16366. })
  16367. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  16368. }
  16369. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.setIamPolicy" call.
  16370. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  16371. // code is an error. Response headers are in either
  16372. // *Policy.ServerResponse.Header or (if a response was returned at all)
  16373. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  16374. // check whether the returned error was because http.StatusNotModified
  16375. // was returned.
  16376. func (c *ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  16377. gensupport.SetOptions(c.urlParams_, opts...)
  16378. res, err := c.doRequest("json")
  16379. if res != nil && res.StatusCode == http.StatusNotModified {
  16380. if res.Body != nil {
  16381. res.Body.Close()
  16382. }
  16383. return nil, &googleapi.Error{
  16384. Code: res.StatusCode,
  16385. Header: res.Header,
  16386. }
  16387. }
  16388. if err != nil {
  16389. return nil, err
  16390. }
  16391. defer googleapi.CloseBody(res)
  16392. if err := googleapi.CheckResponse(res); err != nil {
  16393. return nil, err
  16394. }
  16395. ret := &Policy{
  16396. ServerResponse: googleapi.ServerResponse{
  16397. Header: res.Header,
  16398. HTTPStatusCode: res.StatusCode,
  16399. },
  16400. }
  16401. target := &ret
  16402. if err := gensupport.DecodeResponse(target, res); err != nil {
  16403. return nil, err
  16404. }
  16405. return ret, nil
  16406. // {
  16407. // "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.",
  16408. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}:setIamPolicy",
  16409. // "httpMethod": "POST",
  16410. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.setIamPolicy",
  16411. // "parameterOrder": [
  16412. // "resource"
  16413. // ],
  16414. // "parameters": {
  16415. // "resource": {
  16416. // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.",
  16417. // "location": "path",
  16418. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$",
  16419. // "required": true,
  16420. // "type": "string"
  16421. // }
  16422. // },
  16423. // "path": "v1alpha2/{+resource}:setIamPolicy",
  16424. // "request": {
  16425. // "$ref": "SetIamPolicyRequest"
  16426. // },
  16427. // "response": {
  16428. // "$ref": "Policy"
  16429. // },
  16430. // "scopes": [
  16431. // "https://www.googleapis.com/auth/cloud-platform"
  16432. // ]
  16433. // }
  16434. }
  16435. // method id "healthcare.projects.locations.datasets.hl7V2Stores.testIamPermissions":
  16436. type ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall struct {
  16437. s *Service
  16438. resource string
  16439. testiampermissionsrequest *TestIamPermissionsRequest
  16440. urlParams_ gensupport.URLParams
  16441. ctx_ context.Context
  16442. header_ http.Header
  16443. }
  16444. // TestIamPermissions: Returns permissions that a caller has on the
  16445. // specified resource.
  16446. // If the resource does not exist, this will return an empty set
  16447. // of
  16448. // permissions, not a NOT_FOUND error.
  16449. //
  16450. // Note: This operation is designed to be used for building
  16451. // permission-aware
  16452. // UIs and command-line tools, not for authorization checking. This
  16453. // operation
  16454. // may "fail open" without warning.
  16455. func (r *ProjectsLocationsDatasetsHl7V2StoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall {
  16456. c := &ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  16457. c.resource = resource
  16458. c.testiampermissionsrequest = testiampermissionsrequest
  16459. return c
  16460. }
  16461. // Fields allows partial responses to be retrieved. See
  16462. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  16463. // for more information.
  16464. func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall {
  16465. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  16466. return c
  16467. }
  16468. // Context sets the context to be used in this call's Do method. Any
  16469. // pending HTTP request will be aborted if the provided context is
  16470. // canceled.
  16471. func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall {
  16472. c.ctx_ = ctx
  16473. return c
  16474. }
  16475. // Header returns an http.Header that can be modified by the caller to
  16476. // add HTTP headers to the request.
  16477. func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Header() http.Header {
  16478. if c.header_ == nil {
  16479. c.header_ = make(http.Header)
  16480. }
  16481. return c.header_
  16482. }
  16483. func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  16484. reqHeaders := make(http.Header)
  16485. for k, v := range c.header_ {
  16486. reqHeaders[k] = v
  16487. }
  16488. reqHeaders.Set("User-Agent", c.s.userAgent())
  16489. var body io.Reader = nil
  16490. body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  16491. if err != nil {
  16492. return nil, err
  16493. }
  16494. reqHeaders.Set("Content-Type", "application/json")
  16495. c.urlParams_.Set("alt", alt)
  16496. c.urlParams_.Set("prettyPrint", "false")
  16497. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+resource}:testIamPermissions")
  16498. urls += "?" + c.urlParams_.Encode()
  16499. req, err := http.NewRequest("POST", urls, body)
  16500. if err != nil {
  16501. return nil, err
  16502. }
  16503. req.Header = reqHeaders
  16504. googleapi.Expand(req.URL, map[string]string{
  16505. "resource": c.resource,
  16506. })
  16507. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  16508. }
  16509. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.testIamPermissions" call.
  16510. // Exactly one of *TestIamPermissionsResponse or error will be non-nil.
  16511. // Any non-2xx status code is an error. Response headers are in either
  16512. // *TestIamPermissionsResponse.ServerResponse.Header or (if a response
  16513. // was returned at all) in error.(*googleapi.Error).Header. Use
  16514. // googleapi.IsNotModified to check whether the returned error was
  16515. // because http.StatusNotModified was returned.
  16516. func (c *ProjectsLocationsDatasetsHl7V2StoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  16517. gensupport.SetOptions(c.urlParams_, opts...)
  16518. res, err := c.doRequest("json")
  16519. if res != nil && res.StatusCode == http.StatusNotModified {
  16520. if res.Body != nil {
  16521. res.Body.Close()
  16522. }
  16523. return nil, &googleapi.Error{
  16524. Code: res.StatusCode,
  16525. Header: res.Header,
  16526. }
  16527. }
  16528. if err != nil {
  16529. return nil, err
  16530. }
  16531. defer googleapi.CloseBody(res)
  16532. if err := googleapi.CheckResponse(res); err != nil {
  16533. return nil, err
  16534. }
  16535. ret := &TestIamPermissionsResponse{
  16536. ServerResponse: googleapi.ServerResponse{
  16537. Header: res.Header,
  16538. HTTPStatusCode: res.StatusCode,
  16539. },
  16540. }
  16541. target := &ret
  16542. if err := gensupport.DecodeResponse(target, res); err != nil {
  16543. return nil, err
  16544. }
  16545. return ret, nil
  16546. // {
  16547. // "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.",
  16548. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}:testIamPermissions",
  16549. // "httpMethod": "POST",
  16550. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.testIamPermissions",
  16551. // "parameterOrder": [
  16552. // "resource"
  16553. // ],
  16554. // "parameters": {
  16555. // "resource": {
  16556. // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.",
  16557. // "location": "path",
  16558. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$",
  16559. // "required": true,
  16560. // "type": "string"
  16561. // }
  16562. // },
  16563. // "path": "v1alpha2/{+resource}:testIamPermissions",
  16564. // "request": {
  16565. // "$ref": "TestIamPermissionsRequest"
  16566. // },
  16567. // "response": {
  16568. // "$ref": "TestIamPermissionsResponse"
  16569. // },
  16570. // "scopes": [
  16571. // "https://www.googleapis.com/auth/cloud-platform"
  16572. // ]
  16573. // }
  16574. }
  16575. // method id "healthcare.projects.locations.datasets.hl7V2Stores.messages.create":
  16576. type ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall struct {
  16577. s *Service
  16578. parent string
  16579. createmessagerequest *CreateMessageRequest
  16580. urlParams_ gensupport.URLParams
  16581. ctx_ context.Context
  16582. header_ http.Header
  16583. }
  16584. // Create: Creates a message and sends a notification to the Cloud
  16585. // Pub/Sub topic. If
  16586. // configured, the MLLP adapter listens to messages created by this
  16587. // method and
  16588. // sends those back to the hospital. A successful response indicates
  16589. // the
  16590. // message has been persisted to storage and a Cloud Pub/Sub
  16591. // notification has
  16592. // been sent. Sending to the hospital by the MLLP adapter
  16593. // happens
  16594. // asynchronously.
  16595. func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Create(parent string, createmessagerequest *CreateMessageRequest) *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall {
  16596. c := &ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  16597. c.parent = parent
  16598. c.createmessagerequest = createmessagerequest
  16599. return c
  16600. }
  16601. // Fields allows partial responses to be retrieved. See
  16602. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  16603. // for more information.
  16604. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall {
  16605. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  16606. return c
  16607. }
  16608. // Context sets the context to be used in this call's Do method. Any
  16609. // pending HTTP request will be aborted if the provided context is
  16610. // canceled.
  16611. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall {
  16612. c.ctx_ = ctx
  16613. return c
  16614. }
  16615. // Header returns an http.Header that can be modified by the caller to
  16616. // add HTTP headers to the request.
  16617. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) Header() http.Header {
  16618. if c.header_ == nil {
  16619. c.header_ = make(http.Header)
  16620. }
  16621. return c.header_
  16622. }
  16623. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) doRequest(alt string) (*http.Response, error) {
  16624. reqHeaders := make(http.Header)
  16625. for k, v := range c.header_ {
  16626. reqHeaders[k] = v
  16627. }
  16628. reqHeaders.Set("User-Agent", c.s.userAgent())
  16629. var body io.Reader = nil
  16630. body, err := googleapi.WithoutDataWrapper.JSONReader(c.createmessagerequest)
  16631. if err != nil {
  16632. return nil, err
  16633. }
  16634. reqHeaders.Set("Content-Type", "application/json")
  16635. c.urlParams_.Set("alt", alt)
  16636. c.urlParams_.Set("prettyPrint", "false")
  16637. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/messages")
  16638. urls += "?" + c.urlParams_.Encode()
  16639. req, err := http.NewRequest("POST", urls, body)
  16640. if err != nil {
  16641. return nil, err
  16642. }
  16643. req.Header = reqHeaders
  16644. googleapi.Expand(req.URL, map[string]string{
  16645. "parent": c.parent,
  16646. })
  16647. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  16648. }
  16649. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.create" call.
  16650. // Exactly one of *Message or error will be non-nil. Any non-2xx status
  16651. // code is an error. Response headers are in either
  16652. // *Message.ServerResponse.Header or (if a response was returned at all)
  16653. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  16654. // check whether the returned error was because http.StatusNotModified
  16655. // was returned.
  16656. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) Do(opts ...googleapi.CallOption) (*Message, error) {
  16657. gensupport.SetOptions(c.urlParams_, opts...)
  16658. res, err := c.doRequest("json")
  16659. if res != nil && res.StatusCode == http.StatusNotModified {
  16660. if res.Body != nil {
  16661. res.Body.Close()
  16662. }
  16663. return nil, &googleapi.Error{
  16664. Code: res.StatusCode,
  16665. Header: res.Header,
  16666. }
  16667. }
  16668. if err != nil {
  16669. return nil, err
  16670. }
  16671. defer googleapi.CloseBody(res)
  16672. if err := googleapi.CheckResponse(res); err != nil {
  16673. return nil, err
  16674. }
  16675. ret := &Message{
  16676. ServerResponse: googleapi.ServerResponse{
  16677. Header: res.Header,
  16678. HTTPStatusCode: res.StatusCode,
  16679. },
  16680. }
  16681. target := &ret
  16682. if err := gensupport.DecodeResponse(target, res); err != nil {
  16683. return nil, err
  16684. }
  16685. return ret, nil
  16686. // {
  16687. // "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.",
  16688. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}/messages",
  16689. // "httpMethod": "POST",
  16690. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.messages.create",
  16691. // "parameterOrder": [
  16692. // "parent"
  16693. // ],
  16694. // "parameters": {
  16695. // "parent": {
  16696. // "description": "The name of the dataset this message belongs to.",
  16697. // "location": "path",
  16698. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$",
  16699. // "required": true,
  16700. // "type": "string"
  16701. // }
  16702. // },
  16703. // "path": "v1alpha2/{+parent}/messages",
  16704. // "request": {
  16705. // "$ref": "CreateMessageRequest"
  16706. // },
  16707. // "response": {
  16708. // "$ref": "Message"
  16709. // },
  16710. // "scopes": [
  16711. // "https://www.googleapis.com/auth/cloud-platform"
  16712. // ]
  16713. // }
  16714. }
  16715. // method id "healthcare.projects.locations.datasets.hl7V2Stores.messages.delete":
  16716. type ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall struct {
  16717. s *Service
  16718. name string
  16719. urlParams_ gensupport.URLParams
  16720. ctx_ context.Context
  16721. header_ http.Header
  16722. }
  16723. // Delete: Deletes an HL7v2 message.
  16724. func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Delete(name string) *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall {
  16725. c := &ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  16726. c.name = name
  16727. return c
  16728. }
  16729. // Fields allows partial responses to be retrieved. See
  16730. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  16731. // for more information.
  16732. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall {
  16733. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  16734. return c
  16735. }
  16736. // Context sets the context to be used in this call's Do method. Any
  16737. // pending HTTP request will be aborted if the provided context is
  16738. // canceled.
  16739. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall {
  16740. c.ctx_ = ctx
  16741. return c
  16742. }
  16743. // Header returns an http.Header that can be modified by the caller to
  16744. // add HTTP headers to the request.
  16745. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) Header() http.Header {
  16746. if c.header_ == nil {
  16747. c.header_ = make(http.Header)
  16748. }
  16749. return c.header_
  16750. }
  16751. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) doRequest(alt string) (*http.Response, error) {
  16752. reqHeaders := make(http.Header)
  16753. for k, v := range c.header_ {
  16754. reqHeaders[k] = v
  16755. }
  16756. reqHeaders.Set("User-Agent", c.s.userAgent())
  16757. var body io.Reader = nil
  16758. c.urlParams_.Set("alt", alt)
  16759. c.urlParams_.Set("prettyPrint", "false")
  16760. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  16761. urls += "?" + c.urlParams_.Encode()
  16762. req, err := http.NewRequest("DELETE", urls, body)
  16763. if err != nil {
  16764. return nil, err
  16765. }
  16766. req.Header = reqHeaders
  16767. googleapi.Expand(req.URL, map[string]string{
  16768. "name": c.name,
  16769. })
  16770. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  16771. }
  16772. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.delete" call.
  16773. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  16774. // code is an error. Response headers are in either
  16775. // *Empty.ServerResponse.Header or (if a response was returned at all)
  16776. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  16777. // check whether the returned error was because http.StatusNotModified
  16778. // was returned.
  16779. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  16780. gensupport.SetOptions(c.urlParams_, opts...)
  16781. res, err := c.doRequest("json")
  16782. if res != nil && res.StatusCode == http.StatusNotModified {
  16783. if res.Body != nil {
  16784. res.Body.Close()
  16785. }
  16786. return nil, &googleapi.Error{
  16787. Code: res.StatusCode,
  16788. Header: res.Header,
  16789. }
  16790. }
  16791. if err != nil {
  16792. return nil, err
  16793. }
  16794. defer googleapi.CloseBody(res)
  16795. if err := googleapi.CheckResponse(res); err != nil {
  16796. return nil, err
  16797. }
  16798. ret := &Empty{
  16799. ServerResponse: googleapi.ServerResponse{
  16800. Header: res.Header,
  16801. HTTPStatusCode: res.StatusCode,
  16802. },
  16803. }
  16804. target := &ret
  16805. if err := gensupport.DecodeResponse(target, res); err != nil {
  16806. return nil, err
  16807. }
  16808. return ret, nil
  16809. // {
  16810. // "description": "Deletes an HL7v2 message.",
  16811. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}/messages/{messagesId}",
  16812. // "httpMethod": "DELETE",
  16813. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.messages.delete",
  16814. // "parameterOrder": [
  16815. // "name"
  16816. // ],
  16817. // "parameters": {
  16818. // "name": {
  16819. // "description": "The resource name of the HL7v2 message to delete.",
  16820. // "location": "path",
  16821. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+/messages/[^/]+$",
  16822. // "required": true,
  16823. // "type": "string"
  16824. // }
  16825. // },
  16826. // "path": "v1alpha2/{+name}",
  16827. // "response": {
  16828. // "$ref": "Empty"
  16829. // },
  16830. // "scopes": [
  16831. // "https://www.googleapis.com/auth/cloud-platform"
  16832. // ]
  16833. // }
  16834. }
  16835. // method id "healthcare.projects.locations.datasets.hl7V2Stores.messages.get":
  16836. type ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall struct {
  16837. s *Service
  16838. name string
  16839. urlParams_ gensupport.URLParams
  16840. ifNoneMatch_ string
  16841. ctx_ context.Context
  16842. header_ http.Header
  16843. }
  16844. // Get: Gets an HL7v2 message.
  16845. func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Get(name string) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall {
  16846. c := &ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  16847. c.name = name
  16848. return c
  16849. }
  16850. // View sets the optional parameter "view": Specifies which parts of the
  16851. // Message resource should be returned
  16852. // in the response.
  16853. //
  16854. // Possible values:
  16855. // "MESSAGE_VIEW_UNSPECIFIED"
  16856. // "RAW_ONLY"
  16857. // "PARSED_ONLY"
  16858. // "FULL"
  16859. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) View(view string) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall {
  16860. c.urlParams_.Set("view", view)
  16861. return c
  16862. }
  16863. // Fields allows partial responses to be retrieved. See
  16864. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  16865. // for more information.
  16866. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall {
  16867. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  16868. return c
  16869. }
  16870. // IfNoneMatch sets the optional parameter which makes the operation
  16871. // fail if the object's ETag matches the given value. This is useful for
  16872. // getting updates only after the object has changed since the last
  16873. // request. Use googleapi.IsNotModified to check whether the response
  16874. // error from Do is the result of In-None-Match.
  16875. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall {
  16876. c.ifNoneMatch_ = entityTag
  16877. return c
  16878. }
  16879. // Context sets the context to be used in this call's Do method. Any
  16880. // pending HTTP request will be aborted if the provided context is
  16881. // canceled.
  16882. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall {
  16883. c.ctx_ = ctx
  16884. return c
  16885. }
  16886. // Header returns an http.Header that can be modified by the caller to
  16887. // add HTTP headers to the request.
  16888. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) Header() http.Header {
  16889. if c.header_ == nil {
  16890. c.header_ = make(http.Header)
  16891. }
  16892. return c.header_
  16893. }
  16894. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) doRequest(alt string) (*http.Response, error) {
  16895. reqHeaders := make(http.Header)
  16896. for k, v := range c.header_ {
  16897. reqHeaders[k] = v
  16898. }
  16899. reqHeaders.Set("User-Agent", c.s.userAgent())
  16900. if c.ifNoneMatch_ != "" {
  16901. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  16902. }
  16903. var body io.Reader = nil
  16904. c.urlParams_.Set("alt", alt)
  16905. c.urlParams_.Set("prettyPrint", "false")
  16906. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  16907. urls += "?" + c.urlParams_.Encode()
  16908. req, err := http.NewRequest("GET", urls, body)
  16909. if err != nil {
  16910. return nil, err
  16911. }
  16912. req.Header = reqHeaders
  16913. googleapi.Expand(req.URL, map[string]string{
  16914. "name": c.name,
  16915. })
  16916. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  16917. }
  16918. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.get" call.
  16919. // Exactly one of *Message or error will be non-nil. Any non-2xx status
  16920. // code is an error. Response headers are in either
  16921. // *Message.ServerResponse.Header or (if a response was returned at all)
  16922. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  16923. // check whether the returned error was because http.StatusNotModified
  16924. // was returned.
  16925. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) Do(opts ...googleapi.CallOption) (*Message, error) {
  16926. gensupport.SetOptions(c.urlParams_, opts...)
  16927. res, err := c.doRequest("json")
  16928. if res != nil && res.StatusCode == http.StatusNotModified {
  16929. if res.Body != nil {
  16930. res.Body.Close()
  16931. }
  16932. return nil, &googleapi.Error{
  16933. Code: res.StatusCode,
  16934. Header: res.Header,
  16935. }
  16936. }
  16937. if err != nil {
  16938. return nil, err
  16939. }
  16940. defer googleapi.CloseBody(res)
  16941. if err := googleapi.CheckResponse(res); err != nil {
  16942. return nil, err
  16943. }
  16944. ret := &Message{
  16945. ServerResponse: googleapi.ServerResponse{
  16946. Header: res.Header,
  16947. HTTPStatusCode: res.StatusCode,
  16948. },
  16949. }
  16950. target := &ret
  16951. if err := gensupport.DecodeResponse(target, res); err != nil {
  16952. return nil, err
  16953. }
  16954. return ret, nil
  16955. // {
  16956. // "description": "Gets an HL7v2 message.",
  16957. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}/messages/{messagesId}",
  16958. // "httpMethod": "GET",
  16959. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.messages.get",
  16960. // "parameterOrder": [
  16961. // "name"
  16962. // ],
  16963. // "parameters": {
  16964. // "name": {
  16965. // "description": "The resource name of the HL7v2 message to retrieve.",
  16966. // "location": "path",
  16967. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+/messages/[^/]+$",
  16968. // "required": true,
  16969. // "type": "string"
  16970. // },
  16971. // "view": {
  16972. // "description": "Specifies which parts of the Message resource should be returned\nin the response.",
  16973. // "enum": [
  16974. // "MESSAGE_VIEW_UNSPECIFIED",
  16975. // "RAW_ONLY",
  16976. // "PARSED_ONLY",
  16977. // "FULL"
  16978. // ],
  16979. // "location": "query",
  16980. // "type": "string"
  16981. // }
  16982. // },
  16983. // "path": "v1alpha2/{+name}",
  16984. // "response": {
  16985. // "$ref": "Message"
  16986. // },
  16987. // "scopes": [
  16988. // "https://www.googleapis.com/auth/cloud-platform"
  16989. // ]
  16990. // }
  16991. }
  16992. // method id "healthcare.projects.locations.datasets.hl7V2Stores.messages.ingest":
  16993. type ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall struct {
  16994. s *Service
  16995. parent string
  16996. ingestmessagerequest *IngestMessageRequest
  16997. urlParams_ gensupport.URLParams
  16998. ctx_ context.Context
  16999. header_ http.Header
  17000. }
  17001. // Ingest: Ingests a new HL7v2 message from the hospital and sends a
  17002. // notification to
  17003. // the Cloud Pub/Sub topic. Return is an HL7v2 ACK message if the
  17004. // message was
  17005. // successfully stored. Otherwise an error is returned. If an
  17006. // identical
  17007. // HL7v2 message is created twice only one resource is created on the
  17008. // server
  17009. // and no error is reported.
  17010. func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Ingest(parent string, ingestmessagerequest *IngestMessageRequest) *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall {
  17011. c := &ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  17012. c.parent = parent
  17013. c.ingestmessagerequest = ingestmessagerequest
  17014. return c
  17015. }
  17016. // Fields allows partial responses to be retrieved. See
  17017. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  17018. // for more information.
  17019. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall {
  17020. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  17021. return c
  17022. }
  17023. // Context sets the context to be used in this call's Do method. Any
  17024. // pending HTTP request will be aborted if the provided context is
  17025. // canceled.
  17026. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall {
  17027. c.ctx_ = ctx
  17028. return c
  17029. }
  17030. // Header returns an http.Header that can be modified by the caller to
  17031. // add HTTP headers to the request.
  17032. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) Header() http.Header {
  17033. if c.header_ == nil {
  17034. c.header_ = make(http.Header)
  17035. }
  17036. return c.header_
  17037. }
  17038. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) doRequest(alt string) (*http.Response, error) {
  17039. reqHeaders := make(http.Header)
  17040. for k, v := range c.header_ {
  17041. reqHeaders[k] = v
  17042. }
  17043. reqHeaders.Set("User-Agent", c.s.userAgent())
  17044. var body io.Reader = nil
  17045. body, err := googleapi.WithoutDataWrapper.JSONReader(c.ingestmessagerequest)
  17046. if err != nil {
  17047. return nil, err
  17048. }
  17049. reqHeaders.Set("Content-Type", "application/json")
  17050. c.urlParams_.Set("alt", alt)
  17051. c.urlParams_.Set("prettyPrint", "false")
  17052. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/messages:ingest")
  17053. urls += "?" + c.urlParams_.Encode()
  17054. req, err := http.NewRequest("POST", urls, body)
  17055. if err != nil {
  17056. return nil, err
  17057. }
  17058. req.Header = reqHeaders
  17059. googleapi.Expand(req.URL, map[string]string{
  17060. "parent": c.parent,
  17061. })
  17062. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  17063. }
  17064. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.ingest" call.
  17065. // Exactly one of *IngestMessageResponse or error will be non-nil. Any
  17066. // non-2xx status code is an error. Response headers are in either
  17067. // *IngestMessageResponse.ServerResponse.Header or (if a response was
  17068. // returned at all) in error.(*googleapi.Error).Header. Use
  17069. // googleapi.IsNotModified to check whether the returned error was
  17070. // because http.StatusNotModified was returned.
  17071. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) Do(opts ...googleapi.CallOption) (*IngestMessageResponse, error) {
  17072. gensupport.SetOptions(c.urlParams_, opts...)
  17073. res, err := c.doRequest("json")
  17074. if res != nil && res.StatusCode == http.StatusNotModified {
  17075. if res.Body != nil {
  17076. res.Body.Close()
  17077. }
  17078. return nil, &googleapi.Error{
  17079. Code: res.StatusCode,
  17080. Header: res.Header,
  17081. }
  17082. }
  17083. if err != nil {
  17084. return nil, err
  17085. }
  17086. defer googleapi.CloseBody(res)
  17087. if err := googleapi.CheckResponse(res); err != nil {
  17088. return nil, err
  17089. }
  17090. ret := &IngestMessageResponse{
  17091. ServerResponse: googleapi.ServerResponse{
  17092. Header: res.Header,
  17093. HTTPStatusCode: res.StatusCode,
  17094. },
  17095. }
  17096. target := &ret
  17097. if err := gensupport.DecodeResponse(target, res); err != nil {
  17098. return nil, err
  17099. }
  17100. return ret, nil
  17101. // {
  17102. // "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.",
  17103. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}/messages:ingest",
  17104. // "httpMethod": "POST",
  17105. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.messages.ingest",
  17106. // "parameterOrder": [
  17107. // "parent"
  17108. // ],
  17109. // "parameters": {
  17110. // "parent": {
  17111. // "description": "The name of the HL7v2 store this message belongs to.",
  17112. // "location": "path",
  17113. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$",
  17114. // "required": true,
  17115. // "type": "string"
  17116. // }
  17117. // },
  17118. // "path": "v1alpha2/{+parent}/messages:ingest",
  17119. // "request": {
  17120. // "$ref": "IngestMessageRequest"
  17121. // },
  17122. // "response": {
  17123. // "$ref": "IngestMessageResponse"
  17124. // },
  17125. // "scopes": [
  17126. // "https://www.googleapis.com/auth/cloud-platform"
  17127. // ]
  17128. // }
  17129. }
  17130. // method id "healthcare.projects.locations.datasets.hl7V2Stores.messages.list":
  17131. type ProjectsLocationsDatasetsHl7V2StoresMessagesListCall struct {
  17132. s *Service
  17133. parent string
  17134. urlParams_ gensupport.URLParams
  17135. ifNoneMatch_ string
  17136. ctx_ context.Context
  17137. header_ http.Header
  17138. }
  17139. // List: Lists all the messages in the given HL7v2 store with support
  17140. // for filtering.
  17141. func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) List(parent string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
  17142. c := &ProjectsLocationsDatasetsHl7V2StoresMessagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  17143. c.parent = parent
  17144. return c
  17145. }
  17146. // Filter sets the optional parameter "filter": Restricts messages
  17147. // returned to those matching a filter.
  17148. // Syntax:
  17149. // https://cloud.google.com/appengine/docs/standard/python/search
  17150. // /query_strings
  17151. // Fields/functions available for filtering are:
  17152. // - message_type, from the MSH-9 segment, e.g. 'NOT message_type =
  17153. // "ADT"'
  17154. // - send_date or sendDate, the YYYY-MM-DD date the message was sent in
  17155. // the
  17156. // dataset's time_zone, from the MSH-7 segment; e.g.
  17157. // 'send_date < "2017-01-02"'
  17158. // - send_time, the timestamp of when the message was sent, using the
  17159. // RFC3339
  17160. // time format for comparisons, from the MSH-7 segment; e.g.
  17161. // 'send_time <
  17162. // "2017-01-02T00:00:00-05:00"'
  17163. // - send_facility, the hospital/trust that the message came from, from
  17164. // the
  17165. // MSH-4 segment, e.g. 'send_facility = "RAL"'
  17166. // - HL7RegExp(expr), which does regular expression matching of expr
  17167. // against
  17168. // the HL7 message payload using re2 (http://code.google.com/p/re2/)
  17169. // syntax; e.g. 'HL7RegExp("^.*\|.*\|CERNER")'
  17170. // - PatientId(value, type), which matches if the message lists a
  17171. // patient
  17172. // having an ID of the given value and type in the PID-2, PID-3, or
  17173. // PID-4
  17174. // segments; e.g. 'PatientId("123456", "MRN")'
  17175. // - labels.x, a string value of the label with key x as set using the
  17176. // labels
  17177. // map in Message, e.g. 'labels."priority"="high"'. ":*" can be used
  17178. // to
  17179. // assert the existence of a label, e.g.
  17180. // 'labels."priority":*'.
  17181. // Negation on the patient ID function or the labels field is not
  17182. // supported,
  17183. // e.g. invalid queries: 'NOT PatientId("123456", "MRN")',
  17184. // 'NOT labels."tag1":*', 'NOT labels."tag2"="val2"'.
  17185. // Conjunction of multiple patient ID functions is not supported, e.g.
  17186. // an
  17187. // invalid query: 'PatientId("123456", "MRN") AND PatientId("456789",
  17188. // "MRN")'.
  17189. // Conjunction of multiple labels fields is also not supported, e.g.
  17190. // an
  17191. // invalid query: 'labels."tag1":* AND
  17192. // labels."tag2"="val2"'.
  17193. // Conjunction of one patient ID function, one labels field and other
  17194. // fields
  17195. // is supported, e.g. a valid query:
  17196. // 'PatientId("123456", "MRN") AND labels."tag1":* AND message_type =
  17197. // "ADT"'.
  17198. // HasLabel(x) and Label(x) are deprecated.
  17199. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Filter(filter string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
  17200. c.urlParams_.Set("filter", filter)
  17201. return c
  17202. }
  17203. // OrderBy sets the optional parameter "orderBy": Orders messages
  17204. // returned by the specified order_by clause.
  17205. // Syntax:
  17206. // https://cloud.google.com/apis/design/design_patterns#sorting_order
  17207. // Fie
  17208. // lds available for ordering are:
  17209. // - send_time
  17210. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
  17211. c.urlParams_.Set("orderBy", orderBy)
  17212. return c
  17213. }
  17214. // PageSize sets the optional parameter "pageSize": Limit on the number
  17215. // of messages to return in a single response.
  17216. // If zero the default page size of 100 is used.
  17217. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
  17218. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  17219. return c
  17220. }
  17221. // PageToken sets the optional parameter "pageToken": The
  17222. // next_page_token value returned from the previous List request, if
  17223. // any.
  17224. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
  17225. c.urlParams_.Set("pageToken", pageToken)
  17226. return c
  17227. }
  17228. // Fields allows partial responses to be retrieved. See
  17229. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  17230. // for more information.
  17231. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
  17232. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  17233. return c
  17234. }
  17235. // IfNoneMatch sets the optional parameter which makes the operation
  17236. // fail if the object's ETag matches the given value. This is useful for
  17237. // getting updates only after the object has changed since the last
  17238. // request. Use googleapi.IsNotModified to check whether the response
  17239. // error from Do is the result of In-None-Match.
  17240. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
  17241. c.ifNoneMatch_ = entityTag
  17242. return c
  17243. }
  17244. // Context sets the context to be used in this call's Do method. Any
  17245. // pending HTTP request will be aborted if the provided context is
  17246. // canceled.
  17247. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall {
  17248. c.ctx_ = ctx
  17249. return c
  17250. }
  17251. // Header returns an http.Header that can be modified by the caller to
  17252. // add HTTP headers to the request.
  17253. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Header() http.Header {
  17254. if c.header_ == nil {
  17255. c.header_ = make(http.Header)
  17256. }
  17257. return c.header_
  17258. }
  17259. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) doRequest(alt string) (*http.Response, error) {
  17260. reqHeaders := make(http.Header)
  17261. for k, v := range c.header_ {
  17262. reqHeaders[k] = v
  17263. }
  17264. reqHeaders.Set("User-Agent", c.s.userAgent())
  17265. if c.ifNoneMatch_ != "" {
  17266. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  17267. }
  17268. var body io.Reader = nil
  17269. c.urlParams_.Set("alt", alt)
  17270. c.urlParams_.Set("prettyPrint", "false")
  17271. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/messages")
  17272. urls += "?" + c.urlParams_.Encode()
  17273. req, err := http.NewRequest("GET", urls, body)
  17274. if err != nil {
  17275. return nil, err
  17276. }
  17277. req.Header = reqHeaders
  17278. googleapi.Expand(req.URL, map[string]string{
  17279. "parent": c.parent,
  17280. })
  17281. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  17282. }
  17283. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.list" call.
  17284. // Exactly one of *ListMessagesResponse or error will be non-nil. Any
  17285. // non-2xx status code is an error. Response headers are in either
  17286. // *ListMessagesResponse.ServerResponse.Header or (if a response was
  17287. // returned at all) in error.(*googleapi.Error).Header. Use
  17288. // googleapi.IsNotModified to check whether the returned error was
  17289. // because http.StatusNotModified was returned.
  17290. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Do(opts ...googleapi.CallOption) (*ListMessagesResponse, error) {
  17291. gensupport.SetOptions(c.urlParams_, opts...)
  17292. res, err := c.doRequest("json")
  17293. if res != nil && res.StatusCode == http.StatusNotModified {
  17294. if res.Body != nil {
  17295. res.Body.Close()
  17296. }
  17297. return nil, &googleapi.Error{
  17298. Code: res.StatusCode,
  17299. Header: res.Header,
  17300. }
  17301. }
  17302. if err != nil {
  17303. return nil, err
  17304. }
  17305. defer googleapi.CloseBody(res)
  17306. if err := googleapi.CheckResponse(res); err != nil {
  17307. return nil, err
  17308. }
  17309. ret := &ListMessagesResponse{
  17310. ServerResponse: googleapi.ServerResponse{
  17311. Header: res.Header,
  17312. HTTPStatusCode: res.StatusCode,
  17313. },
  17314. }
  17315. target := &ret
  17316. if err := gensupport.DecodeResponse(target, res); err != nil {
  17317. return nil, err
  17318. }
  17319. return ret, nil
  17320. // {
  17321. // "description": "Lists all the messages in the given HL7v2 store with support for filtering.",
  17322. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}/messages",
  17323. // "httpMethod": "GET",
  17324. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.messages.list",
  17325. // "parameterOrder": [
  17326. // "parent"
  17327. // ],
  17328. // "parameters": {
  17329. // "filter": {
  17330. // "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- labels.x, a string value of the label with key x as set using the labels\n map in Message, e.g. 'labels.\"priority\"=\"high\"'. \":*\" can be used to\n assert the existence of a label, e.g. 'labels.\"priority\":*'.\nNegation on the patient ID function or the labels field is not supported,\ne.g. invalid queries: 'NOT PatientId(\"123456\", \"MRN\")',\n'NOT labels.\"tag1\":*', 'NOT labels.\"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 labels fields is also not supported, e.g. an\ninvalid query: 'labels.\"tag1\":* AND labels.\"tag2\"=\"val2\"'.\nConjunction of one patient ID function, one labels field and other fields\nis supported, e.g. a valid query:\n'PatientId(\"123456\", \"MRN\") AND labels.\"tag1\":* AND message_type = \"ADT\"'.\nHasLabel(x) and Label(x) are deprecated.",
  17331. // "location": "query",
  17332. // "type": "string"
  17333. // },
  17334. // "orderBy": {
  17335. // "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",
  17336. // "location": "query",
  17337. // "type": "string"
  17338. // },
  17339. // "pageSize": {
  17340. // "description": "Limit on the number of messages to return in a single response.\nIf zero the default page size of 100 is used.",
  17341. // "format": "int32",
  17342. // "location": "query",
  17343. // "type": "integer"
  17344. // },
  17345. // "pageToken": {
  17346. // "description": "The next_page_token value returned from the previous List request, if any.",
  17347. // "location": "query",
  17348. // "type": "string"
  17349. // },
  17350. // "parent": {
  17351. // "description": "Name of the HL7v2 store to retrieve messages from.",
  17352. // "location": "path",
  17353. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$",
  17354. // "required": true,
  17355. // "type": "string"
  17356. // }
  17357. // },
  17358. // "path": "v1alpha2/{+parent}/messages",
  17359. // "response": {
  17360. // "$ref": "ListMessagesResponse"
  17361. // },
  17362. // "scopes": [
  17363. // "https://www.googleapis.com/auth/cloud-platform"
  17364. // ]
  17365. // }
  17366. }
  17367. // Pages invokes f for each page of results.
  17368. // A non-nil error returned from f will halt the iteration.
  17369. // The provided context supersedes any context provided to the Context method.
  17370. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Pages(ctx context.Context, f func(*ListMessagesResponse) error) error {
  17371. c.ctx_ = ctx
  17372. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  17373. for {
  17374. x, err := c.Do()
  17375. if err != nil {
  17376. return err
  17377. }
  17378. if err := f(x); err != nil {
  17379. return err
  17380. }
  17381. if x.NextPageToken == "" {
  17382. return nil
  17383. }
  17384. c.PageToken(x.NextPageToken)
  17385. }
  17386. }
  17387. // method id "healthcare.projects.locations.datasets.hl7V2Stores.messages.patch":
  17388. type ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall struct {
  17389. s *Service
  17390. name string
  17391. message *Message
  17392. urlParams_ gensupport.URLParams
  17393. ctx_ context.Context
  17394. header_ http.Header
  17395. }
  17396. // Patch: Update the message.
  17397. func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Patch(name string, message *Message) *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall {
  17398. c := &ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  17399. c.name = name
  17400. c.message = message
  17401. return c
  17402. }
  17403. // UpdateMask sets the optional parameter "updateMask": The update mask
  17404. // applies to the resource. For the `FieldMask`
  17405. // definition,
  17406. // see
  17407. // https://developers.google.com/protocol-buffers/docs/re
  17408. // ference/google.protobuf#fieldmask
  17409. // Only the `labels` field is allowed to be updated.
  17410. // The labels in the request will be merged with the existing set of
  17411. // labels.
  17412. // Existing labels with the same keys will be updated.
  17413. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall {
  17414. c.urlParams_.Set("updateMask", updateMask)
  17415. return c
  17416. }
  17417. // Fields allows partial responses to be retrieved. See
  17418. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  17419. // for more information.
  17420. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall {
  17421. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  17422. return c
  17423. }
  17424. // Context sets the context to be used in this call's Do method. Any
  17425. // pending HTTP request will be aborted if the provided context is
  17426. // canceled.
  17427. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall {
  17428. c.ctx_ = ctx
  17429. return c
  17430. }
  17431. // Header returns an http.Header that can be modified by the caller to
  17432. // add HTTP headers to the request.
  17433. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) Header() http.Header {
  17434. if c.header_ == nil {
  17435. c.header_ = make(http.Header)
  17436. }
  17437. return c.header_
  17438. }
  17439. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) doRequest(alt string) (*http.Response, error) {
  17440. reqHeaders := make(http.Header)
  17441. for k, v := range c.header_ {
  17442. reqHeaders[k] = v
  17443. }
  17444. reqHeaders.Set("User-Agent", c.s.userAgent())
  17445. var body io.Reader = nil
  17446. body, err := googleapi.WithoutDataWrapper.JSONReader(c.message)
  17447. if err != nil {
  17448. return nil, err
  17449. }
  17450. reqHeaders.Set("Content-Type", "application/json")
  17451. c.urlParams_.Set("alt", alt)
  17452. c.urlParams_.Set("prettyPrint", "false")
  17453. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  17454. urls += "?" + c.urlParams_.Encode()
  17455. req, err := http.NewRequest("PATCH", urls, body)
  17456. if err != nil {
  17457. return nil, err
  17458. }
  17459. req.Header = reqHeaders
  17460. googleapi.Expand(req.URL, map[string]string{
  17461. "name": c.name,
  17462. })
  17463. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  17464. }
  17465. // Do executes the "healthcare.projects.locations.datasets.hl7V2Stores.messages.patch" call.
  17466. // Exactly one of *Message or error will be non-nil. Any non-2xx status
  17467. // code is an error. Response headers are in either
  17468. // *Message.ServerResponse.Header or (if a response was returned at all)
  17469. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  17470. // check whether the returned error was because http.StatusNotModified
  17471. // was returned.
  17472. func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) Do(opts ...googleapi.CallOption) (*Message, error) {
  17473. gensupport.SetOptions(c.urlParams_, opts...)
  17474. res, err := c.doRequest("json")
  17475. if res != nil && res.StatusCode == http.StatusNotModified {
  17476. if res.Body != nil {
  17477. res.Body.Close()
  17478. }
  17479. return nil, &googleapi.Error{
  17480. Code: res.StatusCode,
  17481. Header: res.Header,
  17482. }
  17483. }
  17484. if err != nil {
  17485. return nil, err
  17486. }
  17487. defer googleapi.CloseBody(res)
  17488. if err := googleapi.CheckResponse(res); err != nil {
  17489. return nil, err
  17490. }
  17491. ret := &Message{
  17492. ServerResponse: googleapi.ServerResponse{
  17493. Header: res.Header,
  17494. HTTPStatusCode: res.StatusCode,
  17495. },
  17496. }
  17497. target := &ret
  17498. if err := gensupport.DecodeResponse(target, res); err != nil {
  17499. return nil, err
  17500. }
  17501. return ret, nil
  17502. // {
  17503. // "description": "Update the message.",
  17504. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}/messages/{messagesId}",
  17505. // "httpMethod": "PATCH",
  17506. // "id": "healthcare.projects.locations.datasets.hl7V2Stores.messages.patch",
  17507. // "parameterOrder": [
  17508. // "name"
  17509. // ],
  17510. // "parameters": {
  17511. // "name": {
  17512. // "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.",
  17513. // "location": "path",
  17514. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+/messages/[^/]+$",
  17515. // "required": true,
  17516. // "type": "string"
  17517. // },
  17518. // "updateMask": {
  17519. // "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.",
  17520. // "format": "google-fieldmask",
  17521. // "location": "query",
  17522. // "type": "string"
  17523. // }
  17524. // },
  17525. // "path": "v1alpha2/{+name}",
  17526. // "request": {
  17527. // "$ref": "Message"
  17528. // },
  17529. // "response": {
  17530. // "$ref": "Message"
  17531. // },
  17532. // "scopes": [
  17533. // "https://www.googleapis.com/auth/cloud-platform"
  17534. // ]
  17535. // }
  17536. }
  17537. // method id "healthcare.projects.locations.datasets.operations.get":
  17538. type ProjectsLocationsDatasetsOperationsGetCall struct {
  17539. s *Service
  17540. name string
  17541. urlParams_ gensupport.URLParams
  17542. ifNoneMatch_ string
  17543. ctx_ context.Context
  17544. header_ http.Header
  17545. }
  17546. // Get: Gets the latest state of a long-running operation. Clients can
  17547. // use this
  17548. // method to poll the operation result at intervals as recommended by
  17549. // the API
  17550. // service.
  17551. func (r *ProjectsLocationsDatasetsOperationsService) Get(name string) *ProjectsLocationsDatasetsOperationsGetCall {
  17552. c := &ProjectsLocationsDatasetsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  17553. c.name = name
  17554. return c
  17555. }
  17556. // Fields allows partial responses to be retrieved. See
  17557. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  17558. // for more information.
  17559. func (c *ProjectsLocationsDatasetsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsGetCall {
  17560. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  17561. return c
  17562. }
  17563. // IfNoneMatch sets the optional parameter which makes the operation
  17564. // fail if the object's ETag matches the given value. This is useful for
  17565. // getting updates only after the object has changed since the last
  17566. // request. Use googleapi.IsNotModified to check whether the response
  17567. // error from Do is the result of In-None-Match.
  17568. func (c *ProjectsLocationsDatasetsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsOperationsGetCall {
  17569. c.ifNoneMatch_ = entityTag
  17570. return c
  17571. }
  17572. // Context sets the context to be used in this call's Do method. Any
  17573. // pending HTTP request will be aborted if the provided context is
  17574. // canceled.
  17575. func (c *ProjectsLocationsDatasetsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsGetCall {
  17576. c.ctx_ = ctx
  17577. return c
  17578. }
  17579. // Header returns an http.Header that can be modified by the caller to
  17580. // add HTTP headers to the request.
  17581. func (c *ProjectsLocationsDatasetsOperationsGetCall) Header() http.Header {
  17582. if c.header_ == nil {
  17583. c.header_ = make(http.Header)
  17584. }
  17585. return c.header_
  17586. }
  17587. func (c *ProjectsLocationsDatasetsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  17588. reqHeaders := make(http.Header)
  17589. for k, v := range c.header_ {
  17590. reqHeaders[k] = v
  17591. }
  17592. reqHeaders.Set("User-Agent", c.s.userAgent())
  17593. if c.ifNoneMatch_ != "" {
  17594. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  17595. }
  17596. var body io.Reader = nil
  17597. c.urlParams_.Set("alt", alt)
  17598. c.urlParams_.Set("prettyPrint", "false")
  17599. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  17600. urls += "?" + c.urlParams_.Encode()
  17601. req, err := http.NewRequest("GET", urls, body)
  17602. if err != nil {
  17603. return nil, err
  17604. }
  17605. req.Header = reqHeaders
  17606. googleapi.Expand(req.URL, map[string]string{
  17607. "name": c.name,
  17608. })
  17609. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  17610. }
  17611. // Do executes the "healthcare.projects.locations.datasets.operations.get" call.
  17612. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  17613. // status code is an error. Response headers are in either
  17614. // *Operation.ServerResponse.Header or (if a response was returned at
  17615. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  17616. // to check whether the returned error was because
  17617. // http.StatusNotModified was returned.
  17618. func (c *ProjectsLocationsDatasetsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  17619. gensupport.SetOptions(c.urlParams_, opts...)
  17620. res, err := c.doRequest("json")
  17621. if res != nil && res.StatusCode == http.StatusNotModified {
  17622. if res.Body != nil {
  17623. res.Body.Close()
  17624. }
  17625. return nil, &googleapi.Error{
  17626. Code: res.StatusCode,
  17627. Header: res.Header,
  17628. }
  17629. }
  17630. if err != nil {
  17631. return nil, err
  17632. }
  17633. defer googleapi.CloseBody(res)
  17634. if err := googleapi.CheckResponse(res); err != nil {
  17635. return nil, err
  17636. }
  17637. ret := &Operation{
  17638. ServerResponse: googleapi.ServerResponse{
  17639. Header: res.Header,
  17640. HTTPStatusCode: res.StatusCode,
  17641. },
  17642. }
  17643. target := &ret
  17644. if err := gensupport.DecodeResponse(target, res); err != nil {
  17645. return nil, err
  17646. }
  17647. return ret, nil
  17648. // {
  17649. // "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.",
  17650. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/operations/{operationsId}",
  17651. // "httpMethod": "GET",
  17652. // "id": "healthcare.projects.locations.datasets.operations.get",
  17653. // "parameterOrder": [
  17654. // "name"
  17655. // ],
  17656. // "parameters": {
  17657. // "name": {
  17658. // "description": "The name of the operation resource.",
  17659. // "location": "path",
  17660. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/operations/[^/]+$",
  17661. // "required": true,
  17662. // "type": "string"
  17663. // }
  17664. // },
  17665. // "path": "v1alpha2/{+name}",
  17666. // "response": {
  17667. // "$ref": "Operation"
  17668. // },
  17669. // "scopes": [
  17670. // "https://www.googleapis.com/auth/cloud-platform"
  17671. // ]
  17672. // }
  17673. }
  17674. // method id "healthcare.projects.locations.datasets.operations.list":
  17675. type ProjectsLocationsDatasetsOperationsListCall struct {
  17676. s *Service
  17677. name string
  17678. urlParams_ gensupport.URLParams
  17679. ifNoneMatch_ string
  17680. ctx_ context.Context
  17681. header_ http.Header
  17682. }
  17683. // List: Lists operations that match the specified filter in the
  17684. // request. If the
  17685. // server doesn't support this method, it returns
  17686. // `UNIMPLEMENTED`.
  17687. //
  17688. // NOTE: the `name` binding allows API services to override the
  17689. // binding
  17690. // to use different resource name schemes, such as `users/*/operations`.
  17691. // To
  17692. // override the binding, API services can add a binding such
  17693. // as
  17694. // "/v1/{name=users/*}/operations" to their service configuration.
  17695. // For backwards compatibility, the default name includes the
  17696. // operations
  17697. // collection id, however overriding users must ensure the name
  17698. // binding
  17699. // is the parent resource, without the operations collection id.
  17700. func (r *ProjectsLocationsDatasetsOperationsService) List(name string) *ProjectsLocationsDatasetsOperationsListCall {
  17701. c := &ProjectsLocationsDatasetsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  17702. c.name = name
  17703. return c
  17704. }
  17705. // Filter sets the optional parameter "filter": The standard list
  17706. // filter.
  17707. func (c *ProjectsLocationsDatasetsOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsOperationsListCall {
  17708. c.urlParams_.Set("filter", filter)
  17709. return c
  17710. }
  17711. // PageSize sets the optional parameter "pageSize": The standard list
  17712. // page size.
  17713. func (c *ProjectsLocationsDatasetsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsOperationsListCall {
  17714. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  17715. return c
  17716. }
  17717. // PageToken sets the optional parameter "pageToken": The standard list
  17718. // page token.
  17719. func (c *ProjectsLocationsDatasetsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsOperationsListCall {
  17720. c.urlParams_.Set("pageToken", pageToken)
  17721. return c
  17722. }
  17723. // Fields allows partial responses to be retrieved. See
  17724. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  17725. // for more information.
  17726. func (c *ProjectsLocationsDatasetsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsListCall {
  17727. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  17728. return c
  17729. }
  17730. // IfNoneMatch sets the optional parameter which makes the operation
  17731. // fail if the object's ETag matches the given value. This is useful for
  17732. // getting updates only after the object has changed since the last
  17733. // request. Use googleapi.IsNotModified to check whether the response
  17734. // error from Do is the result of In-None-Match.
  17735. func (c *ProjectsLocationsDatasetsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsOperationsListCall {
  17736. c.ifNoneMatch_ = entityTag
  17737. return c
  17738. }
  17739. // Context sets the context to be used in this call's Do method. Any
  17740. // pending HTTP request will be aborted if the provided context is
  17741. // canceled.
  17742. func (c *ProjectsLocationsDatasetsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsListCall {
  17743. c.ctx_ = ctx
  17744. return c
  17745. }
  17746. // Header returns an http.Header that can be modified by the caller to
  17747. // add HTTP headers to the request.
  17748. func (c *ProjectsLocationsDatasetsOperationsListCall) Header() http.Header {
  17749. if c.header_ == nil {
  17750. c.header_ = make(http.Header)
  17751. }
  17752. return c.header_
  17753. }
  17754. func (c *ProjectsLocationsDatasetsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  17755. reqHeaders := make(http.Header)
  17756. for k, v := range c.header_ {
  17757. reqHeaders[k] = v
  17758. }
  17759. reqHeaders.Set("User-Agent", c.s.userAgent())
  17760. if c.ifNoneMatch_ != "" {
  17761. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  17762. }
  17763. var body io.Reader = nil
  17764. c.urlParams_.Set("alt", alt)
  17765. c.urlParams_.Set("prettyPrint", "false")
  17766. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}/operations")
  17767. urls += "?" + c.urlParams_.Encode()
  17768. req, err := http.NewRequest("GET", urls, body)
  17769. if err != nil {
  17770. return nil, err
  17771. }
  17772. req.Header = reqHeaders
  17773. googleapi.Expand(req.URL, map[string]string{
  17774. "name": c.name,
  17775. })
  17776. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  17777. }
  17778. // Do executes the "healthcare.projects.locations.datasets.operations.list" call.
  17779. // Exactly one of *ListOperationsResponse or error will be non-nil. Any
  17780. // non-2xx status code is an error. Response headers are in either
  17781. // *ListOperationsResponse.ServerResponse.Header or (if a response was
  17782. // returned at all) in error.(*googleapi.Error).Header. Use
  17783. // googleapi.IsNotModified to check whether the returned error was
  17784. // because http.StatusNotModified was returned.
  17785. func (c *ProjectsLocationsDatasetsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  17786. gensupport.SetOptions(c.urlParams_, opts...)
  17787. res, err := c.doRequest("json")
  17788. if res != nil && res.StatusCode == http.StatusNotModified {
  17789. if res.Body != nil {
  17790. res.Body.Close()
  17791. }
  17792. return nil, &googleapi.Error{
  17793. Code: res.StatusCode,
  17794. Header: res.Header,
  17795. }
  17796. }
  17797. if err != nil {
  17798. return nil, err
  17799. }
  17800. defer googleapi.CloseBody(res)
  17801. if err := googleapi.CheckResponse(res); err != nil {
  17802. return nil, err
  17803. }
  17804. ret := &ListOperationsResponse{
  17805. ServerResponse: googleapi.ServerResponse{
  17806. Header: res.Header,
  17807. HTTPStatusCode: res.StatusCode,
  17808. },
  17809. }
  17810. target := &ret
  17811. if err := gensupport.DecodeResponse(target, res); err != nil {
  17812. return nil, err
  17813. }
  17814. return ret, nil
  17815. // {
  17816. // "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.",
  17817. // "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/operations",
  17818. // "httpMethod": "GET",
  17819. // "id": "healthcare.projects.locations.datasets.operations.list",
  17820. // "parameterOrder": [
  17821. // "name"
  17822. // ],
  17823. // "parameters": {
  17824. // "filter": {
  17825. // "description": "The standard list filter.",
  17826. // "location": "query",
  17827. // "type": "string"
  17828. // },
  17829. // "name": {
  17830. // "description": "The name of the operation's parent resource.",
  17831. // "location": "path",
  17832. // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$",
  17833. // "required": true,
  17834. // "type": "string"
  17835. // },
  17836. // "pageSize": {
  17837. // "description": "The standard list page size.",
  17838. // "format": "int32",
  17839. // "location": "query",
  17840. // "type": "integer"
  17841. // },
  17842. // "pageToken": {
  17843. // "description": "The standard list page token.",
  17844. // "location": "query",
  17845. // "type": "string"
  17846. // }
  17847. // },
  17848. // "path": "v1alpha2/{+name}/operations",
  17849. // "response": {
  17850. // "$ref": "ListOperationsResponse"
  17851. // },
  17852. // "scopes": [
  17853. // "https://www.googleapis.com/auth/cloud-platform"
  17854. // ]
  17855. // }
  17856. }
  17857. // Pages invokes f for each page of results.
  17858. // A non-nil error returned from f will halt the iteration.
  17859. // The provided context supersedes any context provided to the Context method.
  17860. func (c *ProjectsLocationsDatasetsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  17861. c.ctx_ = ctx
  17862. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  17863. for {
  17864. x, err := c.Do()
  17865. if err != nil {
  17866. return err
  17867. }
  17868. if err := f(x); err != nil {
  17869. return err
  17870. }
  17871. if x.NextPageToken == "" {
  17872. return nil
  17873. }
  17874. c.PageToken(x.NextPageToken)
  17875. }
  17876. }