Class ProjectsResource.TestRequest
Test Source
for syntactic and semantic correctness. Issues present, if any, will be returned to the caller
with a description, severity, and source location. The test method may be executed with Source
or a
Ruleset
name. Passing Source
is useful for unit testing new rules. Passing a Ruleset
name is useful
for regression testing an existing rule. 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.auth.uid &&
(imageName.matches('.png$') || imageName.matches('.jpg$')) &&
resource.mimeType.matches('^image/') } }
Inheritance
System.Object
Google.Apis.Requests.ClientServiceRequest
ProjectsResource.TestRequest
Implements
Google.Apis.Requests.IClientServiceRequest
Inherited Members
Google.Apis.Requests.ClientServiceRequest<Google.Apis.FirebaseRules.v1.Data.TestRulesetResponse>.Execute()
Google.Apis.Requests.ClientServiceRequest<Google.Apis.FirebaseRules.v1.Data.TestRulesetResponse>.ExecuteAsStream()
Google.Apis.Requests.ClientServiceRequest<Google.Apis.FirebaseRules.v1.Data.TestRulesetResponse>.ExecuteAsync()
Google.Apis.Requests.ClientServiceRequest<Google.Apis.FirebaseRules.v1.Data.TestRulesetResponse>.ExecuteAsync(System.Threading.CancellationToken)
Google.Apis.Requests.ClientServiceRequest<Google.Apis.FirebaseRules.v1.Data.TestRulesetResponse>.ExecuteAsStreamAsync()
Google.Apis.Requests.ClientServiceRequest<Google.Apis.FirebaseRules.v1.Data.TestRulesetResponse>.ExecuteAsStreamAsync(System.Threading.CancellationToken)
Google.Apis.Requests.ClientServiceRequest<Google.Apis.FirebaseRules.v1.Data.TestRulesetResponse>.CreateRequest(System.Nullable<System.Boolean>)
Google.Apis.Requests.ClientServiceRequest<Google.Apis.FirebaseRules.v1.Data.TestRulesetResponse>.GenerateRequestUri()
Google.Apis.Requests.ClientServiceRequest<Google.Apis.FirebaseRules.v1.Data.TestRulesetResponse>.GetDefaultETagAction(System.String)
Google.Apis.Requests.ClientServiceRequest<Google.Apis.FirebaseRules.v1.Data.TestRulesetResponse>.ETagAction
Google.Apis.Requests.ClientServiceRequest<Google.Apis.FirebaseRules.v1.Data.TestRulesetResponse>.ModifyRequest
Google.Apis.Requests.ClientServiceRequest<Google.Apis.FirebaseRules.v1.Data.TestRulesetResponse>.ValidateParameters
Google.Apis.Requests.ClientServiceRequest<Google.Apis.FirebaseRules.v1.Data.TestRulesetResponse>.RequestParameters
Google.Apis.Requests.ClientServiceRequest<Google.Apis.FirebaseRules.v1.Data.TestRulesetResponse>.Service
Google.Apis.Requests.ClientServiceRequest._unsuccessfulResponseHandlers
Google.Apis.Requests.ClientServiceRequest._exceptionHandlers
Google.Apis.Requests.ClientServiceRequest._executeInterceptors
Google.Apis.Requests.ClientServiceRequest.AddUnsuccessfulResponseHandler(Google.Apis.Http.IHttpUnsuccessfulResponseHandler)
Google.Apis.Requests.ClientServiceRequest.AddExceptionHandler(Google.Apis.Http.IHttpExceptionHandler)
Google.Apis.Requests.ClientServiceRequest.AddExecuteInterceptor(Google.Apis.Http.IHttpExecuteInterceptor)
Google.Apis.Requests.ClientServiceRequest.Credential
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Google.Apis.FirebaseRules.v1.dll
Syntax
public class TestRequest : FirebaseRulesBaseServiceRequest<TestRulesetResponse>, IClientServiceRequest<TestRulesetResponse>, IClientServiceRequest
Constructors
TestRequest(IClientService, TestRulesetRequest, String)
Constructs a new Test request.
Declaration
public TestRequest(IClientService service, TestRulesetRequest body, string name)
Parameters
Type |
Name |
Description |
Google.Apis.Services.IClientService |
service |
|
TestRulesetRequest |
body |
|
System.String |
name |
|
Properties
HttpMethod
Declaration
public override string HttpMethod { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
Google.Apis.Requests.ClientServiceRequest<Google.Apis.FirebaseRules.v1.Data.TestRulesetResponse>.HttpMethod
MethodName
Declaration
public override string MethodName { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
Google.Apis.Requests.ClientServiceRequest<Google.Apis.FirebaseRules.v1.Data.TestRulesetResponse>.MethodName
Name
Required. Tests may either provide source
or a Ruleset
resource name. For tests against source
,
the resource name must refer to the project: Format: projects/{project_id}
For tests against a
Ruleset
, this must be the Ruleset
resource name: Format:
projects/{project_id}/rulesets/{ruleset_id}
Declaration
[RequestParameter("name", RequestParameterType.Path)]
public virtual string Name { get; }
Property Value
Type |
Description |
System.String |
|
RestPath
Declaration
public override string RestPath { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
Google.Apis.Requests.ClientServiceRequest<Google.Apis.FirebaseRules.v1.Data.TestRulesetResponse>.RestPath
Methods
GetBody()
Returns the body of the request.
Declaration
protected override object GetBody()
Returns
Type |
Description |
System.Object |
|
Overrides
Google.Apis.Requests.ClientServiceRequest<Google.Apis.FirebaseRules.v1.Data.TestRulesetResponse>.GetBody()
InitParameters()
Initializes Test parameter list.
Declaration
protected override void InitParameters()
Overrides
Google.Apis.FirebaseRules.v1.FirebaseRulesBaseServiceRequest<Google.Apis.FirebaseRules.v1.Data.TestRulesetResponse>.InitParameters()
Implements
Google.Apis.Requests.IClientServiceRequest<TResponse>
Google.Apis.Requests.IClientServiceRequest