Skip to content

Commit a6f2fc9

Browse files
yoshi-automationcallmehiphop
authored andcommitted
feat: .d.ts for protos (#148)
1 parent c53aa2a commit a6f2fc9

6 files changed

Lines changed: 47623 additions & 41 deletions

File tree

packages/google-cloud-securitycenter/.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
src/**/doc/*
33
build/
44
docs/
5+
protos/

packages/google-cloud-securitycenter/protos/protos.d.ts

Lines changed: 13800 additions & 0 deletions
Large diffs are not rendered by default.

packages/google-cloud-securitycenter/protos/protos.js

Lines changed: 33741 additions & 0 deletions
Large diffs are not rendered by default.

packages/google-cloud-securitycenter/src/v1/doc/google/iam/v1/doc_policy.js

Lines changed: 38 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,36 @@
2020
* specify access control policies for Cloud Platform resources.
2121
*
2222
*
23-
* A `Policy` consists of a list of `bindings`. A `binding` binds a list of
24-
* `members` to a `role`, where the members can be user accounts, Google groups,
25-
* Google domains, and service accounts. A `role` is a named list of permissions
26-
* defined by IAM.
23+
* A `Policy` is a collection of `bindings`. A `binding` binds one or more
24+
* `members` to a single `role`. Members can be user accounts, service accounts,
25+
* Google groups, and domains (such as G Suite). A `role` is a named list of
26+
* permissions (defined by IAM or configured by users). A `binding` can
27+
* optionally specify a `condition`, which is a logic expression that further
28+
* constrains the role binding based on attributes about the request and/or
29+
* target resource.
2730
*
2831
* **JSON Example**
2932
*
3033
* {
3134
* "bindings": [
3235
* {
33-
* "role": "roles/owner",
36+
* "role": "role/resourcemanager.organizationAdmin",
3437
* "members": [
3538
* "user:mike@example.com",
3639
* "group:[email protected]",
3740
* "domain:google.com",
38-
* "serviceAccount:my-other-app@appspot.gserviceaccount.com"
41+
* "serviceAccount:my-project-id@appspot.gserviceaccount.com"
3942
* ]
4043
* },
4144
* {
42-
* "role": "roles/viewer",
43-
* "members": ["user:sean@example.com"]
45+
* "role": "roles/resourcemanager.organizationViewer",
46+
* "members": ["user:eve@example.com"],
47+
* "condition": {
48+
* "title": "expirable access",
49+
* "description": "Does not grant access after Sep 2020",
50+
* "expression": "request.time <
51+
* timestamp('2020-10-01T00:00:00.000Z')",
52+
* }
4453
* }
4554
* ]
4655
* }
@@ -52,12 +61,15 @@
5261
5362
5463
* - domain:google.com
55-
* - serviceAccount:my-other-app@appspot.gserviceaccount.com
56-
* role: roles/owner
64+
* - serviceAccount:my-project-id@appspot.gserviceaccount.com
65+
* role: roles/resourcemanager.organizationAdmin
5766
* - members:
58-
59-
* role: roles/viewer
60-
*
67+
68+
* role: roles/resourcemanager.organizationViewer
69+
* condition:
70+
* title: expirable access
71+
* description: Does not grant access after Sep 2020
72+
* expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
6173
*
6274
* For a description of IAM and its features, see the
6375
* [IAM developer's guide](https://cloud.google.com/iam/docs).
@@ -68,12 +80,18 @@
6880
* Valid values are 0, 1, and 3. Requests specifying an invalid value will be
6981
* rejected.
7082
*
71-
* Policies with any conditional bindings must specify version 3. Policies
72-
* without any conditional bindings may specify any valid value or leave the
73-
* field unset.
83+
* Operations affecting conditional bindings must specify version 3. This can
84+
* be either setting a conditional policy, modifying a conditional binding,
85+
* or removing a conditional binding from the stored conditional policy.
86+
* Operations on non-conditional policies may specify any valid value or
87+
* leave the field unset.
88+
*
89+
* If no etag is provided in the call to `setIamPolicy`, any version
90+
* compliance checks on the incoming and/or stored policy is skipped.
7491
*
7592
* @property {Object[]} bindings
76-
* Associates a list of `members` to a `role`.
93+
* Associates a list of `members` to a `role`. Optionally may specify a
94+
* `condition` that determines when binding is in effect.
7795
* `bindings` with no members will result in an error.
7896
*
7997
* This object should have the same structure as [Binding]{@link google.iam.v1.Binding}
@@ -88,7 +106,9 @@
88106
* ensure that their change will be applied to the same version of the policy.
89107
*
90108
* If no `etag` is provided in the call to `setIamPolicy`, then the existing
91-
* policy is overwritten.
109+
* policy is overwritten. Due to blind-set semantics of an etag-less policy,
110+
* 'setIamPolicy' will not fail even if either of incoming or stored policy
111+
* does not meet the version requirements.
92112
*
93113
* @typedef Policy
94114
* @memberof google.iam.v1

packages/google-cloud-securitycenter/src/v1beta1/doc/google/iam/v1/doc_policy.js

Lines changed: 38 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,36 @@
2020
* specify access control policies for Cloud Platform resources.
2121
*
2222
*
23-
* A `Policy` consists of a list of `bindings`. A `binding` binds a list of
24-
* `members` to a `role`, where the members can be user accounts, Google groups,
25-
* Google domains, and service accounts. A `role` is a named list of permissions
26-
* defined by IAM.
23+
* A `Policy` is a collection of `bindings`. A `binding` binds one or more
24+
* `members` to a single `role`. Members can be user accounts, service accounts,
25+
* Google groups, and domains (such as G Suite). A `role` is a named list of
26+
* permissions (defined by IAM or configured by users). A `binding` can
27+
* optionally specify a `condition`, which is a logic expression that further
28+
* constrains the role binding based on attributes about the request and/or
29+
* target resource.
2730
*
2831
* **JSON Example**
2932
*
3033
* {
3134
* "bindings": [
3235
* {
33-
* "role": "roles/owner",
36+
* "role": "role/resourcemanager.organizationAdmin",
3437
* "members": [
3538
* "user:mike@example.com",
3639
* "group:[email protected]",
3740
* "domain:google.com",
38-
* "serviceAccount:my-other-app@appspot.gserviceaccount.com"
41+
* "serviceAccount:my-project-id@appspot.gserviceaccount.com"
3942
* ]
4043
* },
4144
* {
42-
* "role": "roles/viewer",
43-
* "members": ["user:sean@example.com"]
45+
* "role": "roles/resourcemanager.organizationViewer",
46+
* "members": ["user:eve@example.com"],
47+
* "condition": {
48+
* "title": "expirable access",
49+
* "description": "Does not grant access after Sep 2020",
50+
* "expression": "request.time <
51+
* timestamp('2020-10-01T00:00:00.000Z')",
52+
* }
4453
* }
4554
* ]
4655
* }
@@ -52,12 +61,15 @@
5261
5362
5463
* - domain:google.com
55-
* - serviceAccount:my-other-app@appspot.gserviceaccount.com
56-
* role: roles/owner
64+
* - serviceAccount:my-project-id@appspot.gserviceaccount.com
65+
* role: roles/resourcemanager.organizationAdmin
5766
* - members:
58-
59-
* role: roles/viewer
60-
*
67+
68+
* role: roles/resourcemanager.organizationViewer
69+
* condition:
70+
* title: expirable access
71+
* description: Does not grant access after Sep 2020
72+
* expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
6173
*
6274
* For a description of IAM and its features, see the
6375
* [IAM developer's guide](https://cloud.google.com/iam/docs).
@@ -68,12 +80,18 @@
6880
* Valid values are 0, 1, and 3. Requests specifying an invalid value will be
6981
* rejected.
7082
*
71-
* Policies with any conditional bindings must specify version 3. Policies
72-
* without any conditional bindings may specify any valid value or leave the
73-
* field unset.
83+
* Operations affecting conditional bindings must specify version 3. This can
84+
* be either setting a conditional policy, modifying a conditional binding,
85+
* or removing a conditional binding from the stored conditional policy.
86+
* Operations on non-conditional policies may specify any valid value or
87+
* leave the field unset.
88+
*
89+
* If no etag is provided in the call to `setIamPolicy`, any version
90+
* compliance checks on the incoming and/or stored policy is skipped.
7491
*
7592
* @property {Object[]} bindings
76-
* Associates a list of `members` to a `role`.
93+
* Associates a list of `members` to a `role`. Optionally may specify a
94+
* `condition` that determines when binding is in effect.
7795
* `bindings` with no members will result in an error.
7896
*
7997
* This object should have the same structure as [Binding]{@link google.iam.v1.Binding}
@@ -88,7 +106,9 @@
88106
* ensure that their change will be applied to the same version of the policy.
89107
*
90108
* If no `etag` is provided in the call to `setIamPolicy`, then the existing
91-
* policy is overwritten.
109+
* policy is overwritten. Due to blind-set semantics of an etag-less policy,
110+
* 'setIamPolicy' will not fail even if either of incoming or stored policy
111+
* does not meet the version requirements.
92112
*
93113
* @typedef Policy
94114
* @memberof google.iam.v1

packages/google-cloud-securitycenter/synth.metadata

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
2-
"updateTime": "2019-08-31T11:17:38.289655Z",
2+
"updateTime": "2019-09-20T11:23:04.653894Z",
33
"sources": [
44
{
55
"generator": {
66
"name": "artman",
7-
"version": "0.36.1",
8-
"dockerImage": "googleapis/artman@sha256:7c20f006c7a62d9d782e2665647d52290c37a952ef3cd134624d5dd62b3f71bd"
7+
"version": "0.36.3",
8+
"dockerImage": "googleapis/artman@sha256:66ca01f27ef7dc50fbfb7743b67028115a6a8acf43b2d82f9fc826de008adac4"
99
}
1010
},
1111
{
1212
"git": {
1313
"name": "googleapis",
1414
"remote": "https://github.com/googleapis/googleapis.git",
15-
"sha": "82809578652607c8ee29d9e199c21f28f81a03e0",
16-
"internalRef": "266247326"
15+
"sha": "44e588d97e7497dff01107d39b6a19062f9a4ffa",
16+
"internalRef": "270200097"
1717
}
1818
},
1919
{

0 commit comments

Comments
 (0)