gogol-firebase-rules-0.1.0: Google Firebase Rules SDK.

Copyright(c) 2015-2016 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.Google.Resource.FirebaseRules.Projects.Test

Contents

Description

Test `Source` for syntactic and semantic correctness. Issues present in the rules, if any, will be returned to the caller with a description, severity, and source location. The test method will typically be executed with a developer provided `Source`, but if regression testing is desired, this method may be executed against a `Ruleset` resource name and the `Source` will be retrieved from the persisted `Ruleset`. The following is an example of `Source` that permits users to upload images to a bucket bearing their user id and matching the correct metadata: _*Example*_ // Users are allowed to subscribe and unsubscribe to the blog. service firebase.storage { match /users/{userId}/images/{imageName} { allow write: if userId == request.userId && (imageName.endsWith('.png') || imageName.endsWith('.jpg')) && resource.mimeType.startsWith('image/') } }

See: Firebase Rules API Reference for firebaserules.projects.test.

Synopsis

REST Resource

type ProjectsTestResource = "v1" :> (CaptureMode "name" "test" Text :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "pp" Bool :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "bearer_token" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] TestRulesetRequest :> Post '[JSON] TestRulesetResponse)))))))))) Source #

A resource alias for firebaserules.projects.test method which the ProjectsTest request conforms to.

Creating a Request

projectsTest Source #

Creates a value of ProjectsTest with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data ProjectsTest Source #

Test `Source` for syntactic and semantic correctness. Issues present in the rules, if any, will be returned to the caller with a description, severity, and source location. The test method will typically be executed with a developer provided `Source`, but if regression testing is desired, this method may be executed against a `Ruleset` resource name and the `Source` will be retrieved from the persisted `Ruleset`. The following is an example of `Source` that permits users to upload images to a bucket bearing their user id and matching the correct metadata: _*Example*_ // Users are allowed to subscribe and unsubscribe to the blog. service firebase.storage { match /users/{userId}/images/{imageName} { allow write: if userId == request.userId && (imageName.endsWith('.png') || imageName.endsWith('.jpg')) && resource.mimeType.startsWith('image/') } }

See: projectsTest smart constructor.

Instances

Eq ProjectsTest Source # 
Data ProjectsTest Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ProjectsTest -> c ProjectsTest #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ProjectsTest #

toConstr :: ProjectsTest -> Constr #

dataTypeOf :: ProjectsTest -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c ProjectsTest) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ProjectsTest) #

gmapT :: (forall b. Data b => b -> b) -> ProjectsTest -> ProjectsTest #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ProjectsTest -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ProjectsTest -> r #

gmapQ :: (forall d. Data d => d -> u) -> ProjectsTest -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ProjectsTest -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ProjectsTest -> m ProjectsTest #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ProjectsTest -> m ProjectsTest #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ProjectsTest -> m ProjectsTest #

Show ProjectsTest Source # 
Generic ProjectsTest Source # 

Associated Types

type Rep ProjectsTest :: * -> * #

GoogleRequest ProjectsTest Source # 

Associated Types

type Rs ProjectsTest :: * #

type Scopes ProjectsTest :: [Symbol] #

type Rep ProjectsTest Source # 
type Scopes ProjectsTest Source # 
type Scopes ProjectsTest = (:) Symbol "https://www.googleapis.com/auth/cloud-platform" ([] Symbol)
type Rs ProjectsTest Source # 

Request Lenses

ptUploadProtocol :: Lens' ProjectsTest (Maybe Text) Source #

Upload protocol for media (e.g. "raw", "multipart").

ptPp :: Lens' ProjectsTest Bool Source #

Pretty-print response.

ptUploadType :: Lens' ProjectsTest (Maybe Text) Source #

Legacy upload protocol for media (e.g. "media", "multipart").

ptPayload :: Lens' ProjectsTest TestRulesetRequest Source #

Multipart request metadata.

ptName :: Lens' ProjectsTest Text Source #

Name of the project. Format: `projects/{project_id}`