aboutsummaryrefslogtreecommitdiff
path: root/googleapiclient/discovery_cache/documents/firebaserules.v1.json
blob: 9c1b67dc7397aeee10792662f37cfbcabef38cd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
{
  "auth": {
    "oauth2": {
      "scopes": {
        "https://www.googleapis.com/auth/cloud-platform": {
          "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account."
        },
        "https://www.googleapis.com/auth/firebase": {
          "description": "View and administer all your Firebase data and settings"
        },
        "https://www.googleapis.com/auth/firebase.readonly": {
          "description": "View all your Firebase data and settings"
        }
      }
    }
  },
  "basePath": "",
  "baseUrl": "https://firebaserules.googleapis.com/",
  "batchPath": "batch",
  "canonicalName": "Firebase Rules",
  "description": "Creates and manages rules that determine when a Firebase Rules-enabled service should permit a request. ",
  "discoveryVersion": "v1",
  "documentationLink": "https://firebase.google.com/docs/storage/security",
  "fullyEncodeReservedExpansion": true,
  "icons": {
    "x16": "http://www.google.com/images/icons/product/search-16.gif",
    "x32": "http://www.google.com/images/icons/product/search-32.gif"
  },
  "id": "firebaserules:v1",
  "kind": "discovery#restDescription",
  "mtlsRootUrl": "https://firebaserules.mtls.googleapis.com/",
  "name": "firebaserules",
  "ownerDomain": "google.com",
  "ownerName": "Google",
  "parameters": {
    "$.xgafv": {
      "description": "V1 error format.",
      "enum": [
        "1",
        "2"
      ],
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "location": "query",
      "type": "string"
    },
    "access_token": {
      "description": "OAuth access token.",
      "location": "query",
      "type": "string"
    },
    "alt": {
      "default": "json",
      "description": "Data format for response.",
      "enum": [
        "json",
        "media",
        "proto"
      ],
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "location": "query",
      "type": "string"
    },
    "callback": {
      "description": "JSONP",
      "location": "query",
      "type": "string"
    },
    "fields": {
      "description": "Selector specifying which fields to include in a partial response.",
      "location": "query",
      "type": "string"
    },
    "key": {
      "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
      "location": "query",
      "type": "string"
    },
    "oauth_token": {
      "description": "OAuth 2.0 token for the current user.",
      "location": "query",
      "type": "string"
    },
    "prettyPrint": {
      "default": "true",
      "description": "Returns response with indentations and line breaks.",
      "location": "query",
      "type": "boolean"
    },
    "quotaUser": {
      "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
      "location": "query",
      "type": "string"
    },
    "uploadType": {
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "location": "query",
      "type": "string"
    },
    "upload_protocol": {
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
      "location": "query",
      "type": "string"
    }
  },
  "protocol": "rest",
  "resources": {
    "projects": {
      "methods": {
        "test": {
          "description": "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/') } }",
          "flatPath": "v1/projects/{projectsId}:test",
          "httpMethod": "POST",
          "id": "firebaserules.projects.test",
          "parameterOrder": [
            "name"
          ],
          "parameters": {
            "name": {
              "description": "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}`",
              "location": "path",
              "pattern": "^projects/.*$",
              "required": true,
              "type": "string"
            }
          },
          "path": "v1/{+name}:test",
          "request": {
            "$ref": "TestRulesetRequest"
          },
          "response": {
            "$ref": "TestRulesetResponse"
          },
          "scopes": [
            "https://www.googleapis.com/auth/cloud-platform",
            "https://www.googleapis.com/auth/firebase",
            "https://www.googleapis.com/auth/firebase.readonly"
          ]
        }
      },
      "resources": {
        "releases": {
          "methods": {
            "create": {
              "description": "Create a `Release`. Release names should reflect the developer's deployment practices. For example, the release name may include the environment name, application name, application version, or any other name meaningful to the developer. Once a `Release` refers to a `Ruleset`, the rules can be enforced by Firebase Rules-enabled services. More than one `Release` may be 'live' concurrently. Consider the following three `Release` names for `projects/foo` and the `Ruleset` to which they refer. Release Name -> Ruleset Name * projects/foo/releases/prod -> projects/foo/rulesets/uuid123 * projects/foo/releases/prod/beta -> projects/foo/rulesets/uuid123 * projects/foo/releases/prod/v23 -> projects/foo/rulesets/uuid456 The relationships reflect a `Ruleset` rollout in progress. The `prod` and `prod/beta` releases refer to the same `Ruleset`. However, `prod/v23` refers to a new `Ruleset`. The `Ruleset` reference for a `Release` may be updated using the UpdateRelease method.",
              "flatPath": "v1/projects/{projectsId}/releases",
              "httpMethod": "POST",
              "id": "firebaserules.projects.releases.create",
              "parameterOrder": [
                "name"
              ],
              "parameters": {
                "name": {
                  "description": "Required. Resource name for the project which owns this `Release`. Format: `projects/{project_id}`",
                  "location": "path",
                  "pattern": "^projects/[^/]+$",
                  "required": true,
                  "type": "string"
                }
              },
              "path": "v1/{+name}/releases",
              "request": {
                "$ref": "Release"
              },
              "response": {
                "$ref": "Release"
              },
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform",
                "https://www.googleapis.com/auth/firebase"
              ]
            },
            "delete": {
              "description": "Delete a `Release` by resource name.",
              "flatPath": "v1/projects/{projectsId}/releases/{releasesId}",
              "httpMethod": "DELETE",
              "id": "firebaserules.projects.releases.delete",
              "parameterOrder": [
                "name"
              ],
              "parameters": {
                "name": {
                  "description": "Required. Resource name for the `Release` to delete. Format: `projects/{project_id}/releases/{release_id}`",
                  "location": "path",
                  "pattern": "^projects/[^/]+/releases/.*$",
                  "required": true,
                  "type": "string"
                }
              },
              "path": "v1/{+name}",
              "response": {
                "$ref": "Empty"
              },
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform",
                "https://www.googleapis.com/auth/firebase"
              ]
            },
            "get": {
              "description": "Get a `Release` by name.",
              "flatPath": "v1/projects/{projectsId}/releases/{releasesId}",
              "httpMethod": "GET",
              "id": "firebaserules.projects.releases.get",
              "parameterOrder": [
                "name"
              ],
              "parameters": {
                "name": {
                  "description": "Required. Resource name of the `Release`. Format: `projects/{project_id}/releases/{release_id}`",
                  "location": "path",
                  "pattern": "^projects/[^/]+/releases/.*$",
                  "required": true,
                  "type": "string"
                }
              },
              "path": "v1/{+name}",
              "response": {
                "$ref": "Release"
              },
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform",
                "https://www.googleapis.com/auth/firebase",
                "https://www.googleapis.com/auth/firebase.readonly"
              ]
            },
            "getExecutable": {
              "description": "Get the `Release` executable to use when enforcing rules.",
              "flatPath": "v1/projects/{projectsId}/releases/{releasesId}:getExecutable",
              "httpMethod": "GET",
              "id": "firebaserules.projects.releases.getExecutable",
              "parameterOrder": [
                "name"
              ],
              "parameters": {
                "executableVersion": {
                  "description": "The requested runtime executable version. Defaults to FIREBASE_RULES_EXECUTABLE_V1.",
                  "enum": [
                    "RELEASE_EXECUTABLE_VERSION_UNSPECIFIED",
                    "FIREBASE_RULES_EXECUTABLE_V1",
                    "FIREBASE_RULES_EXECUTABLE_V2"
                  ],
                  "enumDescriptions": [
                    "Executable format unspecified. Defaults to FIREBASE_RULES_EXECUTABLE_V1",
                    "Firebase Rules syntax 'rules2' executable versions: Custom AST for use with Java clients.",
                    "CEL-based executable for use with C++ clients."
                  ],
                  "location": "query",
                  "type": "string"
                },
                "name": {
                  "description": "Required. Resource name of the `Release`. Format: `projects/{project_id}/releases/{release_id}`",
                  "location": "path",
                  "pattern": "^projects/[^/]+/releases/.*$",
                  "required": true,
                  "type": "string"
                }
              },
              "path": "v1/{+name}:getExecutable",
              "response": {
                "$ref": "GetReleaseExecutableResponse"
              },
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform",
                "https://www.googleapis.com/auth/firebase",
                "https://www.googleapis.com/auth/firebase.readonly"
              ]
            },
            "list": {
              "description": "List the `Release` values for a project. This list may optionally be filtered by `Release` name, `Ruleset` name, `TestSuite` name, or any combination thereof.",
              "flatPath": "v1/projects/{projectsId}/releases",
              "httpMethod": "GET",
              "id": "firebaserules.projects.releases.list",
              "parameterOrder": [
                "name"
              ],
              "parameters": {
                "filter": {
                  "description": "`Release` filter. The list method supports filters with restrictions on the `Release.name`, and `Release.ruleset_name`. Example 1: A filter of 'name=prod*' might return `Release`s with names within 'projects/foo' prefixed with 'prod': Name -> Ruleset Name: * projects/foo/releases/prod -> projects/foo/rulesets/uuid1234 * projects/foo/releases/prod/v1 -> projects/foo/rulesets/uuid1234 * projects/foo/releases/prod/v2 -> projects/foo/rulesets/uuid8888 Example 2: A filter of `name=prod* ruleset_name=uuid1234` would return only `Release` instances for 'projects/foo' with names prefixed with 'prod' referring to the same `Ruleset` name of 'uuid1234': Name -> Ruleset Name: * projects/foo/releases/prod -> projects/foo/rulesets/1234 * projects/foo/releases/prod/v1 -> projects/foo/rulesets/1234 In the examples, the filter parameters refer to the search filters are relative to the project. Fully qualified prefixed may also be used.",
                  "location": "query",
                  "type": "string"
                },
                "name": {
                  "description": "Required. Resource name for the project. Format: `projects/{project_id}`",
                  "location": "path",
                  "pattern": "^projects/[^/]+$",
                  "required": true,
                  "type": "string"
                },
                "pageSize": {
                  "description": "Page size to load. Maximum of 100. Defaults to 10. Note: `page_size` is just a hint and the service may choose to load fewer than `page_size` results due to the size of the output. To traverse all of the releases, the caller should iterate until the `page_token` on the response is empty.",
                  "format": "int32",
                  "location": "query",
                  "type": "integer"
                },
                "pageToken": {
                  "description": "Next page token for the next batch of `Release` instances.",
                  "location": "query",
                  "type": "string"
                }
              },
              "path": "v1/{+name}/releases",
              "response": {
                "$ref": "ListReleasesResponse"
              },
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform",
                "https://www.googleapis.com/auth/firebase",
                "https://www.googleapis.com/auth/firebase.readonly"
              ]
            },
            "patch": {
              "description": "Update a `Release` via PATCH. Only updates to `ruleset_name` will be honored. `Release` rename is not supported. To create a `Release` use the CreateRelease method.",
              "flatPath": "v1/projects/{projectsId}/releases/{releasesId}",
              "httpMethod": "PATCH",
              "id": "firebaserules.projects.releases.patch",
              "parameterOrder": [
                "name"
              ],
              "parameters": {
                "name": {
                  "description": "Required. Resource name for the project which owns this `Release`. Format: `projects/{project_id}`",
                  "location": "path",
                  "pattern": "^projects/[^/]+/releases/.*$",
                  "required": true,
                  "type": "string"
                }
              },
              "path": "v1/{+name}",
              "request": {
                "$ref": "UpdateReleaseRequest"
              },
              "response": {
                "$ref": "Release"
              },
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform",
                "https://www.googleapis.com/auth/firebase"
              ]
            }
          }
        },
        "rulesets": {
          "methods": {
            "create": {
              "description": "Create a `Ruleset` from `Source`. The `Ruleset` is given a unique generated name which is returned to the caller. `Source` containing syntactic or semantics errors will result in an error response indicating the first error encountered. For a detailed view of `Source` issues, use TestRuleset.",
              "flatPath": "v1/projects/{projectsId}/rulesets",
              "httpMethod": "POST",
              "id": "firebaserules.projects.rulesets.create",
              "parameterOrder": [
                "name"
              ],
              "parameters": {
                "name": {
                  "description": "Required. Resource name for Project which owns this `Ruleset`. Format: `projects/{project_id}`",
                  "location": "path",
                  "pattern": "^projects/[^/]+$",
                  "required": true,
                  "type": "string"
                }
              },
              "path": "v1/{+name}/rulesets",
              "request": {
                "$ref": "Ruleset"
              },
              "response": {
                "$ref": "Ruleset"
              },
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform",
                "https://www.googleapis.com/auth/firebase"
              ]
            },
            "delete": {
              "description": "Delete a `Ruleset` by resource name. If the `Ruleset` is referenced by a `Release` the operation will fail.",
              "flatPath": "v1/projects/{projectsId}/rulesets/{rulesetsId}",
              "httpMethod": "DELETE",
              "id": "firebaserules.projects.rulesets.delete",
              "parameterOrder": [
                "name"
              ],
              "parameters": {
                "name": {
                  "description": "Required. Resource name for the ruleset to delete. Format: `projects/{project_id}/rulesets/{ruleset_id}`",
                  "location": "path",
                  "pattern": "^projects/[^/]+/rulesets/[^/]+$",
                  "required": true,
                  "type": "string"
                }
              },
              "path": "v1/{+name}",
              "response": {
                "$ref": "Empty"
              },
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform",
                "https://www.googleapis.com/auth/firebase"
              ]
            },
            "get": {
              "description": "Get a `Ruleset` by name including the full `Source` contents.",
              "flatPath": "v1/projects/{projectsId}/rulesets/{rulesetsId}",
              "httpMethod": "GET",
              "id": "firebaserules.projects.rulesets.get",
              "parameterOrder": [
                "name"
              ],
              "parameters": {
                "name": {
                  "description": "Required. Resource name for the ruleset to get. Format: `projects/{project_id}/rulesets/{ruleset_id}`",
                  "location": "path",
                  "pattern": "^projects/[^/]+/rulesets/[^/]+$",
                  "required": true,
                  "type": "string"
                }
              },
              "path": "v1/{+name}",
              "response": {
                "$ref": "Ruleset"
              },
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform",
                "https://www.googleapis.com/auth/firebase",
                "https://www.googleapis.com/auth/firebase.readonly"
              ]
            },
            "list": {
              "description": "List `Ruleset` metadata only and optionally filter the results by `Ruleset` name. The full `Source` contents of a `Ruleset` may be retrieved with GetRuleset.",
              "flatPath": "v1/projects/{projectsId}/rulesets",
              "httpMethod": "GET",
              "id": "firebaserules.projects.rulesets.list",
              "parameterOrder": [
                "name"
              ],
              "parameters": {
                "filter": {
                  "description": "`Ruleset` filter. The list method supports filters with restrictions on `Ruleset.name`. Filters on `Ruleset.create_time` should use the `date` function which parses strings that conform to the RFC 3339 date/time specifications. Example: `create_time > date(\"2017-01-01T00:00:00Z\") AND name=UUID-*`",
                  "location": "query",
                  "type": "string"
                },
                "name": {
                  "description": "Required. Resource name for the project. Format: `projects/{project_id}`",
                  "location": "path",
                  "pattern": "^projects/[^/]+$",
                  "required": true,
                  "type": "string"
                },
                "pageSize": {
                  "description": "Page size to load. Maximum of 100. Defaults to 10. Note: `page_size` is just a hint and the service may choose to load less than `page_size` due to the size of the output. To traverse all of the releases, caller should iterate until the `page_token` is empty.",
                  "format": "int32",
                  "location": "query",
                  "type": "integer"
                },
                "pageToken": {
                  "description": "Next page token for loading the next batch of `Ruleset` instances.",
                  "location": "query",
                  "type": "string"
                }
              },
              "path": "v1/{+name}/rulesets",
              "response": {
                "$ref": "ListRulesetsResponse"
              },
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform",
                "https://www.googleapis.com/auth/firebase",
                "https://www.googleapis.com/auth/firebase.readonly"
              ]
            }
          }
        }
      }
    }
  },
  "revision": "20211027",
  "rootUrl": "https://firebaserules.googleapis.com/",
  "schemas": {
    "Arg": {
      "description": "Arg matchers for the mock function.",
      "id": "Arg",
      "properties": {
        "anyValue": {
          "$ref": "Empty",
          "description": "Argument matches any value provided."
        },
        "exactValue": {
          "description": "Argument exactly matches value provided.",
          "type": "any"
        }
      },
      "type": "object"
    },
    "Empty": {
      "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.",
      "id": "Empty",
      "properties": {},
      "type": "object"
    },
    "ExpressionReport": {
      "description": "Describes where in a file an expression is found and what it was evaluated to over the course of its use.",
      "id": "ExpressionReport",
      "properties": {
        "children": {
          "description": "Subexpressions",
          "items": {
            "$ref": "ExpressionReport"
          },
          "type": "array"
        },
        "sourcePosition": {
          "$ref": "SourcePosition",
          "description": "Position of expression in original rules source."
        },
        "values": {
          "description": "Values that this expression evaluated to when encountered.",
          "items": {
            "$ref": "ValueCount"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "File": {
      "description": "`File` containing source content.",
      "id": "File",
      "properties": {
        "content": {
          "description": "Textual Content.",
          "type": "string"
        },
        "fingerprint": {
          "description": "Fingerprint (e.g. github sha) associated with the `File`.",
          "format": "byte",
          "type": "string"
        },
        "name": {
          "description": "File name.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "FunctionCall": {
      "description": "Represents a service-defined function call that was invoked during test execution.",
      "id": "FunctionCall",
      "properties": {
        "args": {
          "description": "The arguments that were provided to the function.",
          "items": {
            "type": "any"
          },
          "type": "array"
        },
        "function": {
          "description": "Name of the function invoked.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "FunctionMock": {
      "description": "Mock function definition. Mocks must refer to a function declared by the target service. The type of the function args and result will be inferred at test time. If either the arg or result values are not compatible with function type declaration, the request will be considered invalid. More than one `FunctionMock` may be provided for a given function name so long as the `Arg` matchers are distinct. There may be only one function for a given overload where all `Arg` values are `Arg.any_value`.",
      "id": "FunctionMock",
      "properties": {
        "args": {
          "description": "The list of `Arg` values to match. The order in which the arguments are provided is the order in which they must appear in the function invocation.",
          "items": {
            "$ref": "Arg"
          },
          "type": "array"
        },
        "function": {
          "description": "The name of the function. The function name must match one provided by a service declaration.",
          "type": "string"
        },
        "result": {
          "$ref": "Result",
          "description": "The mock result of the function call."
        }
      },
      "type": "object"
    },
    "GetReleaseExecutableResponse": {
      "description": "The response for FirebaseRulesService.GetReleaseExecutable",
      "id": "GetReleaseExecutableResponse",
      "properties": {
        "executable": {
          "description": "Executable view of the `Ruleset` referenced by the `Release`.",
          "format": "byte",
          "type": "string"
        },
        "executableVersion": {
          "description": "The Rules runtime version of the executable.",
          "enum": [
            "RELEASE_EXECUTABLE_VERSION_UNSPECIFIED",
            "FIREBASE_RULES_EXECUTABLE_V1",
            "FIREBASE_RULES_EXECUTABLE_V2"
          ],
          "enumDescriptions": [
            "Executable format unspecified. Defaults to FIREBASE_RULES_EXECUTABLE_V1",
            "Firebase Rules syntax 'rules2' executable versions: Custom AST for use with Java clients.",
            "CEL-based executable for use with C++ clients."
          ],
          "type": "string"
        },
        "language": {
          "description": "`Language` used to generate the executable bytes.",
          "enum": [
            "LANGUAGE_UNSPECIFIED",
            "FIREBASE_RULES",
            "EVENT_FLOW_TRIGGERS"
          ],
          "enumDescriptions": [
            "Language unspecified. Defaults to FIREBASE_RULES.",
            "Firebase Rules language.",
            "Event Flow triggers."
          ],
          "type": "string"
        },
        "rulesetName": {
          "description": "`Ruleset` name associated with the `Release` executable.",
          "type": "string"
        },
        "syncTime": {
          "description": "Optional, indicates the freshness of the result. The response is guaranteed to be the latest within an interval up to the sync_time (inclusive).",
          "format": "google-datetime",
          "type": "string"
        },
        "updateTime": {
          "description": "Timestamp for the most recent `Release.update_time`.",
          "format": "google-datetime",
          "type": "string"
        }
      },
      "type": "object"
    },
    "Issue": {
      "description": "Issues include warnings, errors, and deprecation notices.",
      "id": "Issue",
      "properties": {
        "description": {
          "description": "Short error description.",
          "type": "string"
        },
        "severity": {
          "description": "The severity of the issue.",
          "enum": [
            "SEVERITY_UNSPECIFIED",
            "DEPRECATION",
            "WARNING",
            "ERROR"
          ],
          "enumDescriptions": [
            "An unspecified severity.",
            "Deprecation issue for statements and method that may no longer be supported or maintained.",
            "Warnings such as: unused variables.",
            "Errors such as: unmatched curly braces or variable redefinition."
          ],
          "type": "string"
        },
        "sourcePosition": {
          "$ref": "SourcePosition",
          "description": "Position of the issue in the `Source`."
        }
      },
      "type": "object"
    },
    "ListReleasesResponse": {
      "description": "The response for FirebaseRulesService.ListReleases.",
      "id": "ListReleasesResponse",
      "properties": {
        "nextPageToken": {
          "description": "The pagination token to retrieve the next page of results. If the value is empty, no further results remain.",
          "type": "string"
        },
        "releases": {
          "description": "List of `Release` instances.",
          "items": {
            "$ref": "Release"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "ListRulesetsResponse": {
      "description": "The response for FirebaseRulesService.ListRulesets.",
      "id": "ListRulesetsResponse",
      "properties": {
        "nextPageToken": {
          "description": "The pagination token to retrieve the next page of results. If the value is empty, no further results remain.",
          "type": "string"
        },
        "rulesets": {
          "description": "List of `Ruleset` instances.",
          "items": {
            "$ref": "Ruleset"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "Metadata": {
      "description": "Metadata for a Ruleset.",
      "id": "Metadata",
      "properties": {
        "services": {
          "description": "Services that this ruleset has declarations for (e.g., \"cloud.firestore\"). There may be 0+ of these.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "Release": {
      "description": "`Release` is a named reference to a `Ruleset`. Once a `Release` refers to a `Ruleset`, rules-enabled services will be able to enforce the `Ruleset`.",
      "id": "Release",
      "properties": {
        "createTime": {
          "description": "Output only. Time the release was created.",
          "format": "google-datetime",
          "readOnly": true,
          "type": "string"
        },
        "name": {
          "description": "Format: `projects/{project_id}/releases/{release_id}`",
          "type": "string"
        },
        "rulesetName": {
          "description": "Name of the `Ruleset` referred to by this `Release`. The `Ruleset` must exist the `Release` to be created.",
          "type": "string"
        },
        "updateTime": {
          "description": "Output only. Time the release was updated.",
          "format": "google-datetime",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object"
    },
    "Result": {
      "description": "Possible result values from the function mock invocation.",
      "id": "Result",
      "properties": {
        "undefined": {
          "$ref": "Empty",
          "description": "The result is undefined, meaning the result could not be computed."
        },
        "value": {
          "description": "The result is an actual value. The type of the value must match that of the type declared by the service.",
          "type": "any"
        }
      },
      "type": "object"
    },
    "Ruleset": {
      "description": "`Ruleset` is an immutable copy of `Source` with a globally unique identifier and a creation time.",
      "id": "Ruleset",
      "properties": {
        "createTime": {
          "description": "Output only. Time the `Ruleset` was created.",
          "format": "google-datetime",
          "readOnly": true,
          "type": "string"
        },
        "metadata": {
          "$ref": "Metadata",
          "description": "Output only. The metadata for this ruleset.",
          "readOnly": true
        },
        "name": {
          "description": "Output only. Name of the `Ruleset`. The ruleset_id is auto generated by the service. Format: `projects/{project_id}/rulesets/{ruleset_id}`",
          "readOnly": true,
          "type": "string"
        },
        "source": {
          "$ref": "Source",
          "description": "`Source` for the `Ruleset`."
        }
      },
      "type": "object"
    },
    "Source": {
      "description": "`Source` is one or more `File` messages comprising a logical set of rules.",
      "id": "Source",
      "properties": {
        "files": {
          "description": "`File` set constituting the `Source` bundle.",
          "items": {
            "$ref": "File"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "SourcePosition": {
      "description": "Position in the `Source` content including its line, column number, and an index of the `File` in the `Source` message. Used for debug purposes.",
      "id": "SourcePosition",
      "properties": {
        "column": {
          "description": "First column on the source line associated with the source fragment.",
          "format": "int32",
          "type": "integer"
        },
        "currentOffset": {
          "description": "Start position relative to the beginning of the file.",
          "format": "int32",
          "type": "integer"
        },
        "endOffset": {
          "description": "End position relative to the beginning of the file.",
          "format": "int32",
          "type": "integer"
        },
        "fileName": {
          "description": "Name of the `File`.",
          "type": "string"
        },
        "line": {
          "description": "Line number of the source fragment. 1-based.",
          "format": "int32",
          "type": "integer"
        }
      },
      "type": "object"
    },
    "TestCase": {
      "description": "`TestCase` messages provide the request context and an expectation as to whether the given context will be allowed or denied. Test cases may specify the `request`, `resource`, and `function_mocks` to mock a function call to a service-provided function. The `request` object represents context present at request-time. The `resource` is the value of the target resource as it appears in persistent storage before the request is executed.",
      "id": "TestCase",
      "properties": {
        "expectation": {
          "description": "Test expectation.",
          "enum": [
            "EXPECTATION_UNSPECIFIED",
            "ALLOW",
            "DENY"
          ],
          "enumDescriptions": [
            "Unspecified expectation.",
            "Expect an allowed result.",
            "Expect a denied result."
          ],
          "type": "string"
        },
        "expressionReportLevel": {
          "description": "Specifies what should be included in the response.",
          "enum": [
            "LEVEL_UNSPECIFIED",
            "NONE",
            "FULL",
            "VISITED"
          ],
          "enumDescriptions": [
            "No level has been specified. Defaults to \"NONE\" behavior.",
            "Do not include any additional information.",
            "Include detailed reporting on expressions evaluated.",
            "Only include the expressions that were visited during evaluation."
          ],
          "type": "string"
        },
        "functionMocks": {
          "description": "Optional function mocks for service-defined functions. If not set, any service defined function is expected to return an error, which may or may not influence the test outcome.",
          "items": {
            "$ref": "FunctionMock"
          },
          "type": "array"
        },
        "pathEncoding": {
          "description": "Specifies whether paths (such as request.path) are encoded and how.",
          "enum": [
            "ENCODING_UNSPECIFIED",
            "URL_ENCODED",
            "PLAIN"
          ],
          "enumDescriptions": [
            "No encoding has been specified. Defaults to \"URL_ENCODED\" behavior.",
            "Treats path segments as URL encoded but with non-encoded separators (\"/\"). This is the default behavior.",
            "Treats total path as non-URL encoded e.g. raw."
          ],
          "type": "string"
        },
        "request": {
          "description": "Request context. The exact format of the request context is service-dependent. See the appropriate service documentation for information about the supported fields and types on the request. Minimally, all services support the following fields and types: Request field | Type ---------------|----------------- auth.uid | `string` auth.token | `map` headers | `map` method | `string` params | `map` path | `string` time | `google.protobuf.Timestamp` If the request value is not well-formed for the service, the request will be rejected as an invalid argument.",
          "type": "any"
        },
        "resource": {
          "description": "Optional resource value as it appears in persistent storage before the request is fulfilled. The resource type depends on the `request.path` value.",
          "type": "any"
        }
      },
      "type": "object"
    },
    "TestResult": {
      "description": "Test result message containing the state of the test as well as a description and source position for test failures.",
      "id": "TestResult",
      "properties": {
        "debugMessages": {
          "description": "Debug messages related to test execution issues encountered during evaluation. Debug messages may be related to too many or too few invocations of function mocks or to runtime errors that occur during evaluation. For example: ```Unable to read variable [name: \"resource\"]```",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "errorPosition": {
          "$ref": "SourcePosition",
          "description": "Position in the `Source` or `Ruleset` where the principle runtime error occurs. Evaluation of an expression may result in an error. Rules are deny by default, so a `DENY` expectation when an error is generated is valid. When there is a `DENY` with an error, the `SourcePosition` is returned. E.g. `error_position { line: 19 column: 37 }`"
        },
        "expressionReports": {
          "description": "The mapping from expression in the ruleset AST to the values they were evaluated to. Partially-nested to mirror AST structure. Note that this field is actually tracking expressions and not permission statements in contrast to the \"visited_expressions\" field above. Literal expressions are omitted.",
          "items": {
            "$ref": "ExpressionReport"
          },
          "type": "array"
        },
        "functionCalls": {
          "description": "The set of function calls made to service-defined methods. Function calls are included in the order in which they are encountered during evaluation, are provided for both mocked and unmocked functions, and included on the response regardless of the test `state`.",
          "items": {
            "$ref": "FunctionCall"
          },
          "type": "array"
        },
        "state": {
          "description": "State of the test.",
          "enum": [
            "STATE_UNSPECIFIED",
            "SUCCESS",
            "FAILURE"
          ],
          "enumDescriptions": [
            "Test state is not set.",
            "Test is a success.",
            "Test is a failure."
          ],
          "type": "string"
        },
        "visitedExpressions": {
          "description": "The set of visited permission expressions for a given test. This returns the positions and evaluation results of all visited permission expressions which were relevant to the test case, e.g. ``` match /path { allow read if: } ``` For a detailed report of the intermediate evaluation states, see the `expression_reports` field",
          "items": {
            "$ref": "VisitedExpression"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "TestRulesetRequest": {
      "description": "The request for FirebaseRulesService.TestRuleset.",
      "id": "TestRulesetRequest",
      "properties": {
        "source": {
          "$ref": "Source",
          "description": "Optional `Source` to be checked for correctness. This field must not be set when the resource name refers to a `Ruleset`."
        },
        "testSuite": {
          "$ref": "TestSuite",
          "description": "The tests to execute against the `Source`. When `Source` is provided inline, the test cases will only be run if the `Source` is syntactically and semantically valid. Inline `TestSuite` to run."
        }
      },
      "type": "object"
    },
    "TestRulesetResponse": {
      "description": "The response for FirebaseRulesService.TestRuleset.",
      "id": "TestRulesetResponse",
      "properties": {
        "issues": {
          "description": "Syntactic and semantic `Source` issues of varying severity. Issues of `ERROR` severity will prevent tests from executing.",
          "items": {
            "$ref": "Issue"
          },
          "type": "array"
        },
        "testResults": {
          "description": "The set of test results given the test cases in the `TestSuite`. The results will appear in the same order as the test cases appear in the `TestSuite`.",
          "items": {
            "$ref": "TestResult"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "TestSuite": {
      "description": "`TestSuite` is a collection of `TestCase` instances that validate the logical correctness of a `Ruleset`. The `TestSuite` may be referenced in-line within a `TestRuleset` invocation or as part of a `Release` object as a pre-release check.",
      "id": "TestSuite",
      "properties": {
        "testCases": {
          "description": "Collection of test cases associated with the `TestSuite`.",
          "items": {
            "$ref": "TestCase"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "UpdateReleaseRequest": {
      "description": "The request for FirebaseRulesService.UpdateRelease.",
      "id": "UpdateReleaseRequest",
      "properties": {
        "release": {
          "$ref": "Release",
          "description": "`Release` to update."
        },
        "updateMask": {
          "description": "Specifies which fields to update.",
          "format": "google-fieldmask",
          "type": "string"
        }
      },
      "type": "object"
    },
    "ValueCount": {
      "description": "Tuple for how many times an Expression was evaluated to a particular ExpressionValue.",
      "id": "ValueCount",
      "properties": {
        "count": {
          "description": "The amount of times that expression returned.",
          "format": "int32",
          "type": "integer"
        },
        "value": {
          "description": "The return value of the expression",
          "type": "any"
        }
      },
      "type": "object"
    },
    "VisitedExpression": {
      "description": "Store the position and access outcome for an expression visited in rules.",
      "id": "VisitedExpression",
      "properties": {
        "sourcePosition": {
          "$ref": "SourcePosition",
          "description": "Position in the `Source` or `Ruleset` where an expression was visited."
        },
        "value": {
          "description": "The evaluated value for the visited expression, e.g. true/false",
          "type": "any"
        }
      },
      "type": "object"
    }
  },
  "servicePath": "",
  "title": "Firebase Rules API",
  "version": "v1",
  "version_module": true
}