{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fno-warn-duplicate-exports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.Resource.Healthcare.Projects.Locations.DataSets.FhirStores.Fhir.Search -- Copyright : (c) 2015-2016 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- -- Searches for resources in the given FHIR store according to criteria -- specified as query parameters. Implements the FHIR standard [search -- interaction](http:\/\/hl7.org\/implement\/standards\/fhir\/STU3\/http.html#search) -- using the search semantics described in the [FHIR Search -- specification](http:\/\/hl7.org\/implement\/standards\/fhir\/STU3\/search.html). -- Supports three methods of search defined by the specification: * \`GET -- [base]?[parameters]\` to search across all resources. * \`GET -- [base]\/[type]?[parameters]\` to search resources of a specified type. * -- \`POST [base]\/[type]\/_search?[parameters]\` as an alternate form -- having the same semantics as the \`GET\` method. The \`GET\` methods do -- not support compartment searches. The \`POST\` method does not support -- \`application\/x-www-form-urlencoded\` search parameters. On success, -- the response body will contain a JSON-encoded representation of a -- \`Bundle\` resource of type \`searchset\`, containing the results of the -- search. Errors generated by the FHIR store will contain a JSON-encoded -- \`OperationOutcome\` resource describing the reason for the error. If -- the request cannot be mapped to a valid API method on a FHIR store, a -- generic GCP error might be returned instead. # Search Parameters The -- server\'s capability statement, retrieved through capabilities, -- indicates what search parameters are supported on each FHIR resource. A -- list of all search parameters defined by the specification can be found -- in the [FHIR Search Parameter -- Registry](http:\/\/hl7.org\/implement\/standards\/fhir\/STU3\/searchparameter-registry.html). -- # Search Modifiers Modifier | Supported ----------- | --------- -- \`:missing\` | Yes \`:exact\` | Yes \`:contains\` | Yes \`:text\` | Yes -- \`:in\` | Yes \`:not-in\` | Yes \`:above\` | Yes \`:below\` | Yes -- \`:[type]\` | Yes \`:not\` | Yes \`:recurse\` | No -- -- /See:/ for @healthcare.projects.locations.datasets.fhirStores.fhir.search@. module Network.Google.Resource.Healthcare.Projects.Locations.DataSets.FhirStores.Fhir.Search ( -- * REST Resource ProjectsLocationsDataSetsFhirStoresFhirSearchResource -- * Creating a Request , projectsLocationsDataSetsFhirStoresFhirSearch , ProjectsLocationsDataSetsFhirStoresFhirSearch -- * Request Lenses , pldsfsfsParent , pldsfsfsXgafv , pldsfsfsUploadProtocol , pldsfsfsAccessToken , pldsfsfsUploadType , pldsfsfsPayload , pldsfsfsCallback ) where import Network.Google.Healthcare.Types import Network.Google.Prelude -- | A resource alias for @healthcare.projects.locations.datasets.fhirStores.fhir.search@ method which the -- 'ProjectsLocationsDataSetsFhirStoresFhirSearch' request conforms to. type ProjectsLocationsDataSetsFhirStoresFhirSearchResource = "v1beta1" :> Capture "parent" Text :> "fhir" :> "_search" :> QueryParam "$.xgafv" Xgafv :> QueryParam "upload_protocol" Text :> QueryParam "access_token" Text :> QueryParam "uploadType" Text :> QueryParam "callback" Text :> QueryParam "alt" AltJSON :> ReqBody '[JSON] SearchResourcesRequest :> Post '[JSON] HTTPBody -- | Searches for resources in the given FHIR store according to criteria -- specified as query parameters. Implements the FHIR standard [search -- interaction](http:\/\/hl7.org\/implement\/standards\/fhir\/STU3\/http.html#search) -- using the search semantics described in the [FHIR Search -- specification](http:\/\/hl7.org\/implement\/standards\/fhir\/STU3\/search.html). -- Supports three methods of search defined by the specification: * \`GET -- [base]?[parameters]\` to search across all resources. * \`GET -- [base]\/[type]?[parameters]\` to search resources of a specified type. * -- \`POST [base]\/[type]\/_search?[parameters]\` as an alternate form -- having the same semantics as the \`GET\` method. The \`GET\` methods do -- not support compartment searches. The \`POST\` method does not support -- \`application\/x-www-form-urlencoded\` search parameters. On success, -- the response body will contain a JSON-encoded representation of a -- \`Bundle\` resource of type \`searchset\`, containing the results of the -- search. Errors generated by the FHIR store will contain a JSON-encoded -- \`OperationOutcome\` resource describing the reason for the error. If -- the request cannot be mapped to a valid API method on a FHIR store, a -- generic GCP error might be returned instead. # Search Parameters The -- server\'s capability statement, retrieved through capabilities, -- indicates what search parameters are supported on each FHIR resource. A -- list of all search parameters defined by the specification can be found -- in the [FHIR Search Parameter -- Registry](http:\/\/hl7.org\/implement\/standards\/fhir\/STU3\/searchparameter-registry.html). -- # Search Modifiers Modifier | Supported ----------- | --------- -- \`:missing\` | Yes \`:exact\` | Yes \`:contains\` | Yes \`:text\` | Yes -- \`:in\` | Yes \`:not-in\` | Yes \`:above\` | Yes \`:below\` | Yes -- \`:[type]\` | Yes \`:not\` | Yes \`:recurse\` | No -- -- /See:/ 'projectsLocationsDataSetsFhirStoresFhirSearch' smart constructor. data ProjectsLocationsDataSetsFhirStoresFhirSearch = ProjectsLocationsDataSetsFhirStoresFhirSearch' { _pldsfsfsParent :: !Text , _pldsfsfsXgafv :: !(Maybe Xgafv) , _pldsfsfsUploadProtocol :: !(Maybe Text) , _pldsfsfsAccessToken :: !(Maybe Text) , _pldsfsfsUploadType :: !(Maybe Text) , _pldsfsfsPayload :: !SearchResourcesRequest , _pldsfsfsCallback :: !(Maybe Text) } deriving (Eq, Show, Data, Typeable, Generic) -- | Creates a value of 'ProjectsLocationsDataSetsFhirStoresFhirSearch' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'pldsfsfsParent' -- -- * 'pldsfsfsXgafv' -- -- * 'pldsfsfsUploadProtocol' -- -- * 'pldsfsfsAccessToken' -- -- * 'pldsfsfsUploadType' -- -- * 'pldsfsfsPayload' -- -- * 'pldsfsfsCallback' projectsLocationsDataSetsFhirStoresFhirSearch :: Text -- ^ 'pldsfsfsParent' -> SearchResourcesRequest -- ^ 'pldsfsfsPayload' -> ProjectsLocationsDataSetsFhirStoresFhirSearch projectsLocationsDataSetsFhirStoresFhirSearch pPldsfsfsParent_ pPldsfsfsPayload_ = ProjectsLocationsDataSetsFhirStoresFhirSearch' { _pldsfsfsParent = pPldsfsfsParent_ , _pldsfsfsXgafv = Nothing , _pldsfsfsUploadProtocol = Nothing , _pldsfsfsAccessToken = Nothing , _pldsfsfsUploadType = Nothing , _pldsfsfsPayload = pPldsfsfsPayload_ , _pldsfsfsCallback = Nothing } -- | Name of the FHIR store to retrieve resources from. pldsfsfsParent :: Lens' ProjectsLocationsDataSetsFhirStoresFhirSearch Text pldsfsfsParent = lens _pldsfsfsParent (\ s a -> s{_pldsfsfsParent = a}) -- | V1 error format. pldsfsfsXgafv :: Lens' ProjectsLocationsDataSetsFhirStoresFhirSearch (Maybe Xgafv) pldsfsfsXgafv = lens _pldsfsfsXgafv (\ s a -> s{_pldsfsfsXgafv = a}) -- | Upload protocol for media (e.g. \"raw\", \"multipart\"). pldsfsfsUploadProtocol :: Lens' ProjectsLocationsDataSetsFhirStoresFhirSearch (Maybe Text) pldsfsfsUploadProtocol = lens _pldsfsfsUploadProtocol (\ s a -> s{_pldsfsfsUploadProtocol = a}) -- | OAuth access token. pldsfsfsAccessToken :: Lens' ProjectsLocationsDataSetsFhirStoresFhirSearch (Maybe Text) pldsfsfsAccessToken = lens _pldsfsfsAccessToken (\ s a -> s{_pldsfsfsAccessToken = a}) -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). pldsfsfsUploadType :: Lens' ProjectsLocationsDataSetsFhirStoresFhirSearch (Maybe Text) pldsfsfsUploadType = lens _pldsfsfsUploadType (\ s a -> s{_pldsfsfsUploadType = a}) -- | Multipart request metadata. pldsfsfsPayload :: Lens' ProjectsLocationsDataSetsFhirStoresFhirSearch SearchResourcesRequest pldsfsfsPayload = lens _pldsfsfsPayload (\ s a -> s{_pldsfsfsPayload = a}) -- | JSONP pldsfsfsCallback :: Lens' ProjectsLocationsDataSetsFhirStoresFhirSearch (Maybe Text) pldsfsfsCallback = lens _pldsfsfsCallback (\ s a -> s{_pldsfsfsCallback = a}) instance GoogleRequest ProjectsLocationsDataSetsFhirStoresFhirSearch where type Rs ProjectsLocationsDataSetsFhirStoresFhirSearch = HTTPBody type Scopes ProjectsLocationsDataSetsFhirStoresFhirSearch = '["https://www.googleapis.com/auth/cloud-platform"] requestClient ProjectsLocationsDataSetsFhirStoresFhirSearch'{..} = go _pldsfsfsParent _pldsfsfsXgafv _pldsfsfsUploadProtocol _pldsfsfsAccessToken _pldsfsfsUploadType _pldsfsfsCallback (Just AltJSON) _pldsfsfsPayload healthcareService where go = buildClient (Proxy :: Proxy ProjectsLocationsDataSetsFhirStoresFhirSearchResource) mempty