@maxim_mazurok/gapi.client.cloudasset-v1p1beta1 0.0.20220805

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts ADDED
@@ -0,0 +1,734 @@
1
+ /* Type definitions for non-npm package Cloud Asset API v1p1beta1 0.0 */
2
+ // Project: https://cloud.google.com/asset-inventory/docs/quickstart
3
+ // Definitions by: Maxim Mazurok <https://github.com/Maxim-Mazurok>
4
+ // Nick Amoscato <https://github.com/namoscato>
5
+ // Declan Vong <https://github.com/declanvong>
6
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
7
+ // TypeScript Version: 2.8
8
+
9
+ // IMPORTANT
10
+ // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
11
+ // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
12
+ // Generated from: https://cloudasset.googleapis.com/$discovery/rest?version=v1p1beta1
13
+ // Revision: 20220805
14
+
15
+ /// <reference types="gapi.client" />
16
+
17
+ declare namespace gapi.client {
18
+ /** Load Cloud Asset API v1p1beta1 */
19
+ function load(urlOrObject: "https://cloudasset.googleapis.com/$discovery/rest?version=v1p1beta1"): Promise<void>;
20
+ /** @deprecated Please load APIs with discovery documents. */
21
+ function load(name: "cloudasset", version: "v1p1beta1"): Promise<void>;
22
+ /** @deprecated Please load APIs with discovery documents. */
23
+ function load(name: "cloudasset", version: "v1p1beta1", callback: () => any): void;
24
+
25
+ namespace cloudasset {
26
+ interface AnalyzeIamPolicyLongrunningMetadata {
27
+ /** Output only. The time the operation was created. */
28
+ createTime?: string;
29
+ }
30
+ // tslint:disable-next-line:no-empty-interface
31
+ interface AnalyzeIamPolicyLongrunningResponse {
32
+ }
33
+ interface AuditConfig {
34
+ /** The configuration for logging of each type of permission. */
35
+ auditLogConfigs?: AuditLogConfig[];
36
+ /**
37
+ * Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all
38
+ * services.
39
+ */
40
+ service?: string;
41
+ }
42
+ interface AuditLogConfig {
43
+ /** Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members. */
44
+ exemptedMembers?: string[];
45
+ /** The log type that this config enables. */
46
+ logType?: string;
47
+ }
48
+ interface Binding {
49
+ /**
50
+ * The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`,
51
+ * then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which
52
+ * resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
53
+ */
54
+ condition?: Expr;
55
+ /**
56
+ * Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on
57
+ * the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service
58
+ * account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that
59
+ * represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier
60
+ * for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example,
61
+ * `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. *
62
+ * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example,
63
+ * `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. *
64
+ * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example,
65
+ * `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service
66
+ * account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently
67
+ * deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in
68
+ * the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
69
+ */
70
+ members?: string[];
71
+ /** Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. */
72
+ role?: string;
73
+ }
74
+ interface Explanation {
75
+ /**
76
+ * The map from roles to their included permission matching the permission query (e.g. containing `policy.role.permissions:`). Example role string: "roles/compute.instanceAdmin". The
77
+ * roles can also be found in the returned `policy` bindings. Note that the map is populated only if requesting with a permission query.
78
+ */
79
+ matchedPermissions?: { [P in string]: Permissions };
80
+ }
81
+ interface Expr {
82
+ /** Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. */
83
+ description?: string;
84
+ /** Textual representation of an expression in Common Expression Language syntax. */
85
+ expression?: string;
86
+ /** Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. */
87
+ location?: string;
88
+ /** Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. */
89
+ title?: string;
90
+ }
91
+ interface GoogleCloudAssetV1p7beta1Asset {
92
+ /** Please also refer to the [access level user guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels). */
93
+ accessLevel?: GoogleIdentityAccesscontextmanagerV1AccessLevel;
94
+ /** Please also refer to the [access policy user guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies). */
95
+ accessPolicy?: GoogleIdentityAccesscontextmanagerV1AccessPolicy;
96
+ /**
97
+ * The ancestry path of an asset in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of
98
+ * relative resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root. If the asset is a project, folder, or organization, the ancestry path
99
+ * starts from the asset itself. Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
100
+ */
101
+ ancestors?: string[];
102
+ /** The type of the asset. Example: `compute.googleapis.com/Disk` See [Supported asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) for more information. */
103
+ assetType?: string;
104
+ /**
105
+ * A representation of the Cloud IAM policy set on a Google Cloud resource. There can be a maximum of one Cloud IAM policy set on any given resource. In addition, Cloud IAM policies
106
+ * inherit their granted access scope from any policies set on parent resources in the resource hierarchy. Therefore, the effectively policy is the union of both the policy set on this
107
+ * resource and each policy set on all of the resource's ancestry resource levels in the hierarchy. See [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance) for
108
+ * more information.
109
+ */
110
+ iamPolicy?: Policy;
111
+ /**
112
+ * The full name of the asset. Example: `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` See [Resource
113
+ * names](https://cloud.google.com/apis/design/resource_names#full_resource_name) for more information.
114
+ */
115
+ name?: string;
116
+ /**
117
+ * A representation of an [organization policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy). There can be more than one
118
+ * organization policy with different constraints set on a given resource.
119
+ */
120
+ orgPolicy?: GoogleCloudOrgpolicyV1Policy[];
121
+ /** The related assets of the asset of one relationship type. One asset only represents one type of relationship. */
122
+ relatedAssets?: GoogleCloudAssetV1p7beta1RelatedAssets;
123
+ /** A representation of the resource. */
124
+ resource?: GoogleCloudAssetV1p7beta1Resource;
125
+ /** Please also refer to the [service perimeter user guide](https://cloud.google.com/vpc-service-controls/docs/overview). */
126
+ servicePerimeter?: GoogleIdentityAccesscontextmanagerV1ServicePerimeter;
127
+ /** The last update timestamp of an asset. update_time is updated when create/update/delete operation is performed. */
128
+ updateTime?: string;
129
+ }
130
+ interface GoogleCloudAssetV1p7beta1RelatedAsset {
131
+ /**
132
+ * The ancestors of an asset in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative
133
+ * resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root. Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
134
+ */
135
+ ancestors?: string[];
136
+ /**
137
+ * The full name of the asset. Example: `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` See [Resource
138
+ * names](https://cloud.google.com/apis/design/resource_names#full_resource_name) for more information.
139
+ */
140
+ asset?: string;
141
+ /** The type of the asset. Example: `compute.googleapis.com/Disk` See [Supported asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) for more information. */
142
+ assetType?: string;
143
+ }
144
+ interface GoogleCloudAssetV1p7beta1RelatedAssets {
145
+ /** The peer resources of the relationship. */
146
+ assets?: GoogleCloudAssetV1p7beta1RelatedAsset[];
147
+ /** The detailed relation attributes. */
148
+ relationshipAttributes?: GoogleCloudAssetV1p7beta1RelationshipAttributes;
149
+ }
150
+ interface GoogleCloudAssetV1p7beta1RelationshipAttributes {
151
+ /** The detail of the relationship, e.g. `contains`, `attaches` */
152
+ action?: string;
153
+ /** The source asset type. Example: `compute.googleapis.com/Instance` */
154
+ sourceResourceType?: string;
155
+ /** The target asset type. Example: `compute.googleapis.com/Disk` */
156
+ targetResourceType?: string;
157
+ /** The unique identifier of the relationship type. Example: `INSTANCE_TO_INSTANCEGROUP` */
158
+ type?: string;
159
+ }
160
+ interface GoogleCloudAssetV1p7beta1Resource {
161
+ /** The content of the resource, in which some sensitive fields are removed and may not be present. */
162
+ data?: { [P in string]: any };
163
+ /**
164
+ * The URL of the discovery document containing the resource's JSON schema. Example: `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest` This value is unspecified for
165
+ * resources that do not have an API based on a discovery document, such as Cloud Bigtable.
166
+ */
167
+ discoveryDocumentUri?: string;
168
+ /**
169
+ * The JSON schema name listed in the discovery document. Example: `Project` This value is unspecified for resources that do not have an API based on a discovery document, such as
170
+ * Cloud Bigtable.
171
+ */
172
+ discoveryName?: string;
173
+ /** The location of the resource in Google Cloud, such as its zone and region. For more information, see https://cloud.google.com/about/locations/. */
174
+ location?: string;
175
+ /**
176
+ * The full name of the immediate parent of this resource. See [Resource Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) for more information. For Google
177
+ * Cloud assets, this value is the parent resource defined in the [Cloud IAM policy hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). Example:
178
+ * `//cloudresourcemanager.googleapis.com/projects/my_project_123` For third-party assets, this field may be set differently.
179
+ */
180
+ parent?: string;
181
+ /**
182
+ * The REST URL for accessing the resource. An HTTP `GET` request using this URL returns the resource itself. Example:
183
+ * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123` This value is unspecified for resources without a REST API.
184
+ */
185
+ resourceUrl?: string;
186
+ /** The API version. Example: `v1` */
187
+ version?: string;
188
+ }
189
+ interface GoogleCloudOrgpolicyV1BooleanPolicy {
190
+ /**
191
+ * If `true`, then the `Policy` is enforced. If `false`, then any configuration is acceptable. Suppose you have a `Constraint` `constraints/compute.disableSerialPortAccess` with
192
+ * `constraint_default` set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following behavior: - If the `Policy` at this resource has enforced set to `false`, serial port
193
+ * connection attempts will be allowed. - If the `Policy` at this resource has enforced set to `true`, serial port connection attempts will be refused. - If the `Policy` at this
194
+ * resource is `RestoreDefault`, serial port connection attempts will be allowed. - If no `Policy` is set at this resource or anywhere higher in the resource hierarchy, serial port
195
+ * connection attempts will be allowed. - If no `Policy` is set at this resource, but one exists higher in the resource hierarchy, the behavior is as if the`Policy` were set at this
196
+ * resource. The following examples demonstrate the different possible layerings: Example 1 (nearest `Constraint` wins): `organizations/foo` has a `Policy` with: {enforced: false}
197
+ * `projects/bar` has no `Policy` set. The constraint at `projects/bar` and `organizations/foo` will not be enforced. Example 2 (enforcement gets replaced): `organizations/foo` has a
198
+ * `Policy` with: {enforced: false} `projects/bar` has a `Policy` with: {enforced: true} The constraint at `organizations/foo` is not enforced. The constraint at `projects/bar` is
199
+ * enforced. Example 3 (RestoreDefault): `organizations/foo` has a `Policy` with: {enforced: true} `projects/bar` has a `Policy` with: {RestoreDefault: {}} The constraint at
200
+ * `organizations/foo` is enforced. The constraint at `projects/bar` is not enforced, because `constraint_default` for the `Constraint` is `ALLOW`.
201
+ */
202
+ enforced?: boolean;
203
+ }
204
+ interface GoogleCloudOrgpolicyV1ListPolicy {
205
+ /** List of values allowed at this resource. Can only be set if `all_values` is set to `ALL_VALUES_UNSPECIFIED`. */
206
+ allowedValues?: string[];
207
+ /** The policy all_values state. */
208
+ allValues?: string;
209
+ /** List of values denied at this resource. Can only be set if `all_values` is set to `ALL_VALUES_UNSPECIFIED`. */
210
+ deniedValues?: string[];
211
+ /**
212
+ * Determines the inheritance behavior for this `Policy`. By default, a `ListPolicy` set at a resource supersedes any `Policy` set anywhere up the resource hierarchy. However, if
213
+ * `inherit_from_parent` is set to `true`, then the values from the effective `Policy` of the parent resource are inherited, meaning the values set in this `Policy` are added to the
214
+ * values inherited up the hierarchy. Setting `Policy` hierarchies that inherit both allowed values and denied values isn't recommended in most circumstances to keep the configuration
215
+ * simple and understandable. However, it is possible to set a `Policy` with `allowed_values` set that inherits a `Policy` with `denied_values` set. In this case, the values that are
216
+ * allowed must be in `allowed_values` and not present in `denied_values`. For example, suppose you have a `Constraint` `constraints/serviceuser.services`, which has a
217
+ * `constraint_type` of `list_constraint`, and with `constraint_default` set to `ALLOW`. Suppose that at the Organization level, a `Policy` is applied that restricts the allowed API
218
+ * activations to {`E1`, `E2`}. Then, if a `Policy` is applied to a project below the Organization that has `inherit_from_parent` set to `false` and field all_values set to DENY, then
219
+ * an attempt to activate any API will be denied. The following examples demonstrate different possible layerings for `projects/bar` parented by `organizations/foo`: Example 1 (no
220
+ * inherited values): `organizations/foo` has a `Policy` with values: {allowed_values: "E1" allowed_values:"E2"} `projects/bar` has `inherit_from_parent` `false` and values:
221
+ * {allowed_values: "E3" allowed_values: "E4"} The accepted values at `organizations/foo` are `E1`, `E2`. The accepted values at `projects/bar` are `E3`, and `E4`. Example 2 (inherited
222
+ * values): `organizations/foo` has a `Policy` with values: {allowed_values: "E1" allowed_values:"E2"} `projects/bar` has a `Policy` with values: {value: "E3" value: "E4"
223
+ * inherit_from_parent: true} The accepted values at `organizations/foo` are `E1`, `E2`. The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`. Example 3 (inheriting
224
+ * both allowed and denied values): `organizations/foo` has a `Policy` with values: {allowed_values: "E1" allowed_values: "E2"} `projects/bar` has a `Policy` with: {denied_values:
225
+ * "E1"} The accepted values at `organizations/foo` are `E1`, `E2`. The value accepted at `projects/bar` is `E2`. Example 4 (RestoreDefault): `organizations/foo` has a `Policy` with
226
+ * values: {allowed_values: "E1" allowed_values:"E2"} `projects/bar` has a `Policy` with values: {RestoreDefault: {}} The accepted values at `organizations/foo` are `E1`, `E2`. The
227
+ * accepted values at `projects/bar` are either all or none depending on the value of `constraint_default` (if `ALLOW`, all; if `DENY`, none). Example 5 (no policy inherits parent
228
+ * policy): `organizations/foo` has no `Policy` set. `projects/bar` has no `Policy` set. The accepted values at both levels are either all or none depending on the value of
229
+ * `constraint_default` (if `ALLOW`, all; if `DENY`, none). Example 6 (ListConstraint allowing all): `organizations/foo` has a `Policy` with values: {allowed_values: "E1"
230
+ * allowed_values: "E2"} `projects/bar` has a `Policy` with: {all: ALLOW} The accepted values at `organizations/foo` are `E1`, E2`. Any value is accepted at `projects/bar`. Example 7
231
+ * (ListConstraint allowing none): `organizations/foo` has a `Policy` with values: {allowed_values: "E1" allowed_values: "E2"} `projects/bar` has a `Policy` with: {all: DENY} The
232
+ * accepted values at `organizations/foo` are `E1`, E2`. No value is accepted at `projects/bar`. Example 10 (allowed and denied subtrees of Resource Manager hierarchy): Given the
233
+ * following resource hierarchy O1->{F1, F2}; F1->{P1}; F2->{P2, P3}, `organizations/foo` has a `Policy` with values: {allowed_values: "under:organizations/O1"} `projects/bar` has a
234
+ * `Policy` with: {allowed_values: "under:projects/P3"} {denied_values: "under:folders/F2"} The accepted values at `organizations/foo` are `organizations/O1`, `folders/F1`,
235
+ * `folders/F2`, `projects/P1`, `projects/P2`, `projects/P3`. The accepted values at `projects/bar` are `organizations/O1`, `folders/F1`, `projects/P1`.
236
+ */
237
+ inheritFromParent?: boolean;
238
+ /**
239
+ * Optional. The Google Cloud Console will try to default to a configuration that matches the value specified in this `Policy`. If `suggested_value` is not set, it will inherit the
240
+ * value specified higher in the hierarchy, unless `inherit_from_parent` is `false`.
241
+ */
242
+ suggestedValue?: string;
243
+ }
244
+ interface GoogleCloudOrgpolicyV1Policy {
245
+ /** For boolean `Constraints`, whether to enforce the `Constraint` or not. */
246
+ booleanPolicy?: GoogleCloudOrgpolicyV1BooleanPolicy;
247
+ /**
248
+ * The name of the `Constraint` the `Policy` is configuring, for example, `constraints/serviceuser.services`. A [list of available
249
+ * constraints](/resource-manager/docs/organization-policy/org-policy-constraints) is available. Immutable after creation.
250
+ */
251
+ constraint?: string;
252
+ /**
253
+ * An opaque tag indicating the current version of the `Policy`, used for concurrency control. When the `Policy` is returned from either a `GetPolicy` or a `ListOrgPolicy` request,
254
+ * this `etag` indicates the version of the current `Policy` to use when executing a read-modify-write loop. When the `Policy` is returned from a `GetEffectivePolicy` request, the
255
+ * `etag` will be unset. When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value that was returned from a `GetOrgPolicy` request as part of a read-modify-write loop
256
+ * for concurrency control. Not setting the `etag`in a `SetOrgPolicy` request will result in an unconditional write of the `Policy`.
257
+ */
258
+ etag?: string;
259
+ /** List of values either allowed or disallowed. */
260
+ listPolicy?: GoogleCloudOrgpolicyV1ListPolicy;
261
+ /** Restores the default behavior of the constraint; independent of `Constraint` type. */
262
+ restoreDefault?: any;
263
+ /**
264
+ * The time stamp the `Policy` was previously updated. This is set by the server, not specified by the caller, and represents the last time a call to `SetOrgPolicy` was made for that
265
+ * `Policy`. Any value set by the client will be ignored.
266
+ */
267
+ updateTime?: string;
268
+ /** Version of the `Policy`. Default version is 0; */
269
+ version?: number;
270
+ }
271
+ // tslint:disable-next-line:no-empty-interface
272
+ interface GoogleCloudOrgpolicyV1RestoreDefault {
273
+ }
274
+ interface GoogleIdentityAccesscontextmanagerV1AccessLevel {
275
+ /** A `BasicLevel` composed of `Conditions`. */
276
+ basic?: GoogleIdentityAccesscontextmanagerV1BasicLevel;
277
+ /** A `CustomLevel` written in the Common Expression Language. */
278
+ custom?: GoogleIdentityAccesscontextmanagerV1CustomLevel;
279
+ /** Description of the `AccessLevel` and its use. Does not affect behavior. */
280
+ description?: string;
281
+ /**
282
+ * Required. Resource name for the Access Level. The `short_name` component must begin with a letter and only include alphanumeric and '_'. Format:
283
+ * `accessPolicies/{access_policy}/accessLevels/{access_level}`. The maximum length of the `access_level` component is 50 characters.
284
+ */
285
+ name?: string;
286
+ /** Human readable title. Must be unique within the Policy. */
287
+ title?: string;
288
+ }
289
+ interface GoogleIdentityAccesscontextmanagerV1AccessPolicy {
290
+ /**
291
+ * Output only. An opaque identifier for the current version of the `AccessPolicy`. This will always be a strongly validated etag, meaning that two Access Polices will be identical if
292
+ * and only if their etags are identical. Clients should not expect this to be in any specific format.
293
+ */
294
+ etag?: string;
295
+ /** Output only. Resource name of the `AccessPolicy`. Format: `accessPolicies/{access_policy}` */
296
+ name?: string;
297
+ /** Required. The parent of this `AccessPolicy` in the Cloud Resource Hierarchy. Currently immutable once created. Format: `organizations/{organization_id}` */
298
+ parent?: string;
299
+ /**
300
+ * The scopes of a policy define which resources an ACM policy can restrict, and where ACM resources can be referenced. For example, a policy with scopes=["folders/123"] has the
301
+ * following behavior: - vpcsc perimeters can only restrict projects within folders/123 - access levels can only be referenced by resources within folders/123. If empty, there are no
302
+ * limitations on which resources can be restricted by an ACM policy, and there are no limitations on where ACM resources can be referenced. Only one policy can include a given scope
303
+ * (attempting to create a second policy which includes "folders/123" will result in an error). Currently, scopes cannot be modified after a policy is created. Currently, policies can
304
+ * only have a single scope. Format: list of `folders/{folder_number}` or `projects/{project_number}`
305
+ */
306
+ scopes?: string[];
307
+ /** Required. Human readable title. Does not affect behavior. */
308
+ title?: string;
309
+ }
310
+ interface GoogleIdentityAccesscontextmanagerV1ApiOperation {
311
+ /**
312
+ * API methods or permissions to allow. Method or permission must belong to the service specified by `service_name` field. A single MethodSelector entry with `*` specified for the
313
+ * `method` field will allow all methods AND permissions for the service specified in `service_name`.
314
+ */
315
+ methodSelectors?: GoogleIdentityAccesscontextmanagerV1MethodSelector[];
316
+ /**
317
+ * The name of the API whose methods or permissions the IngressPolicy or EgressPolicy want to allow. A single ApiOperation with `service_name` field set to `*` will allow all methods
318
+ * AND permissions for all services.
319
+ */
320
+ serviceName?: string;
321
+ }
322
+ interface GoogleIdentityAccesscontextmanagerV1BasicLevel {
323
+ /**
324
+ * How the `conditions` list should be combined to determine if a request is granted this `AccessLevel`. If AND is used, each `Condition` in `conditions` must be satisfied for the
325
+ * `AccessLevel` to be applied. If OR is used, at least one `Condition` in `conditions` must be satisfied for the `AccessLevel` to be applied. Default behavior is AND.
326
+ */
327
+ combiningFunction?: string;
328
+ /** Required. A list of requirements for the `AccessLevel` to be granted. */
329
+ conditions?: GoogleIdentityAccesscontextmanagerV1Condition[];
330
+ }
331
+ interface GoogleIdentityAccesscontextmanagerV1Condition {
332
+ /** Device specific restrictions, all restrictions must hold for the Condition to be true. If not specified, all devices are allowed. */
333
+ devicePolicy?: GoogleIdentityAccesscontextmanagerV1DevicePolicy;
334
+ /**
335
+ * CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for a CIDR IP address block, the specified IP address portion must be properly truncated (i.e. all the host
336
+ * bits must be zero) or the input is considered malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. Similarly, for IPv6, "2001:db8::/32" is accepted whereas
337
+ * "2001:db8::1/32" is not. The originating IP of a request must be in one of the listed subnets in order for this Condition to be true. If empty, all IP addresses are allowed.
338
+ */
339
+ ipSubnetworks?: string[];
340
+ /**
341
+ * The request must be made by one of the provided user or service accounts. Groups are not supported. Syntax: `user:{emailid}` `serviceAccount:{emailid}` If not specified, a request
342
+ * may come from any user.
343
+ */
344
+ members?: string[];
345
+ /**
346
+ * Whether to negate the Condition. If true, the Condition becomes a NAND over its non-empty fields, each field must be false for the Condition overall to be satisfied. Defaults to
347
+ * false.
348
+ */
349
+ negate?: boolean;
350
+ /** The request must originate from one of the provided countries/regions. Must be valid ISO 3166-1 alpha-2 codes. */
351
+ regions?: string[];
352
+ /**
353
+ * A list of other access levels defined in the same `Policy`, referenced by resource name. Referencing an `AccessLevel` which does not exist is an error. All access levels listed must
354
+ * be granted for the Condition to be true. Example: "`accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME"`
355
+ */
356
+ requiredAccessLevels?: string[];
357
+ }
358
+ interface GoogleIdentityAccesscontextmanagerV1CustomLevel {
359
+ /** Required. A Cloud CEL expression evaluating to a boolean. */
360
+ expr?: Expr;
361
+ }
362
+ interface GoogleIdentityAccesscontextmanagerV1DevicePolicy {
363
+ /** Allowed device management levels, an empty list allows all management levels. */
364
+ allowedDeviceManagementLevels?: string[];
365
+ /** Allowed encryptions statuses, an empty list allows all statuses. */
366
+ allowedEncryptionStatuses?: string[];
367
+ /** Allowed OS versions, an empty list allows all types and all versions. */
368
+ osConstraints?: GoogleIdentityAccesscontextmanagerV1OsConstraint[];
369
+ /** Whether the device needs to be approved by the customer admin. */
370
+ requireAdminApproval?: boolean;
371
+ /** Whether the device needs to be corp owned. */
372
+ requireCorpOwned?: boolean;
373
+ /** Whether or not screenlock is required for the DevicePolicy to be true. Defaults to `false`. */
374
+ requireScreenlock?: boolean;
375
+ }
376
+ interface GoogleIdentityAccesscontextmanagerV1EgressFrom {
377
+ /**
378
+ * A list of identities that are allowed access through this [EgressPolicy]. Should be in the format of email address. The email address should represent individual user or service
379
+ * account only.
380
+ */
381
+ identities?: string[];
382
+ /** Specifies the type of identities that are allowed access to outside the perimeter. If left unspecified, then members of `identities` field will be allowed access. */
383
+ identityType?: string;
384
+ }
385
+ interface GoogleIdentityAccesscontextmanagerV1EgressPolicy {
386
+ /** Defines conditions on the source of a request causing this EgressPolicy to apply. */
387
+ egressFrom?: GoogleIdentityAccesscontextmanagerV1EgressFrom;
388
+ /** Defines the conditions on the ApiOperation and destination resources that cause this EgressPolicy to apply. */
389
+ egressTo?: GoogleIdentityAccesscontextmanagerV1EgressTo;
390
+ }
391
+ interface GoogleIdentityAccesscontextmanagerV1EgressTo {
392
+ /**
393
+ * A list of external resources that are allowed to be accessed. Only AWS and Azure resources are supported. For Amazon S3, the supported format is s3://BUCKET_NAME. For Azure Storage,
394
+ * the supported format is azure://myaccount.blob.core.windows.net/CONTAINER_NAME. A request matches if it contains an external resource in this list (Example: s3://bucket/path).
395
+ * Currently '*' is not allowed.
396
+ */
397
+ externalResources?: string[];
398
+ /** A list of ApiOperations allowed to be performed by the sources specified in the corresponding EgressFrom. A request matches if it uses an operation/service in this list. */
399
+ operations?: GoogleIdentityAccesscontextmanagerV1ApiOperation[];
400
+ /**
401
+ * A list of resources, currently only projects in the form `projects/`, that are allowed to be accessed by sources defined in the corresponding EgressFrom. A request matches if it
402
+ * contains a resource in this list. If `*` is specified for `resources`, then this EgressTo rule will authorize access to all resources outside the perimeter.
403
+ */
404
+ resources?: string[];
405
+ }
406
+ interface GoogleIdentityAccesscontextmanagerV1IngressFrom {
407
+ /**
408
+ * A list of identities that are allowed access through this ingress policy. Should be in the format of email address. The email address should represent individual user or service
409
+ * account only.
410
+ */
411
+ identities?: string[];
412
+ /** Specifies the type of identities that are allowed access from outside the perimeter. If left unspecified, then members of `identities` field will be allowed access. */
413
+ identityType?: string;
414
+ /** Sources that this IngressPolicy authorizes access from. */
415
+ sources?: GoogleIdentityAccesscontextmanagerV1IngressSource[];
416
+ }
417
+ interface GoogleIdentityAccesscontextmanagerV1IngressPolicy {
418
+ /** Defines the conditions on the source of a request causing this IngressPolicy to apply. */
419
+ ingressFrom?: GoogleIdentityAccesscontextmanagerV1IngressFrom;
420
+ /** Defines the conditions on the ApiOperation and request destination that cause this IngressPolicy to apply. */
421
+ ingressTo?: GoogleIdentityAccesscontextmanagerV1IngressTo;
422
+ }
423
+ interface GoogleIdentityAccesscontextmanagerV1IngressSource {
424
+ /**
425
+ * An AccessLevel resource name that allow resources within the ServicePerimeters to be accessed from the internet. AccessLevels listed must be in the same policy as this
426
+ * ServicePerimeter. Referencing a nonexistent AccessLevel will cause an error. If no AccessLevel names are listed, resources within the perimeter can only be accessed via Google Cloud
427
+ * calls with request origins within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a single `*` is specified for `access_level`, then all IngressSources
428
+ * will be allowed.
429
+ */
430
+ accessLevel?: string;
431
+ /**
432
+ * A Google Cloud resource that is allowed to ingress the perimeter. Requests from these resources will be allowed to access perimeter data. Currently only projects are allowed.
433
+ * Format: `projects/{project_number}` The project may be in any Google Cloud organization, not just the organization that the perimeter is defined in. `*` is not allowed, the case of
434
+ * allowing all Google Cloud resources only is not supported.
435
+ */
436
+ resource?: string;
437
+ }
438
+ interface GoogleIdentityAccesscontextmanagerV1IngressTo {
439
+ /** A list of ApiOperations allowed to be performed by the sources specified in corresponding IngressFrom in this ServicePerimeter. */
440
+ operations?: GoogleIdentityAccesscontextmanagerV1ApiOperation[];
441
+ /**
442
+ * A list of resources, currently only projects in the form `projects/`, protected by this ServicePerimeter that are allowed to be accessed by sources defined in the corresponding
443
+ * IngressFrom. If a single `*` is specified, then access to all resources inside the perimeter are allowed.
444
+ */
445
+ resources?: string[];
446
+ }
447
+ interface GoogleIdentityAccesscontextmanagerV1MethodSelector {
448
+ /**
449
+ * Value for `method` should be a valid method name for the corresponding `service_name` in ApiOperation. If `*` used as value for `method`, then ALL methods and permissions are
450
+ * allowed.
451
+ */
452
+ method?: string;
453
+ /** Value for `permission` should be a valid Cloud IAM permission for the corresponding `service_name` in ApiOperation. */
454
+ permission?: string;
455
+ }
456
+ interface GoogleIdentityAccesscontextmanagerV1OsConstraint {
457
+ /** The minimum allowed OS version. If not set, any version of this OS satisfies the constraint. Format: `"major.minor.patch"`. Examples: `"10.5.301"`, `"9.2.1"`. */
458
+ minimumVersion?: string;
459
+ /** Required. The allowed OS type. */
460
+ osType?: string;
461
+ /**
462
+ * Only allows requests from devices with a verified Chrome OS. Verifications includes requirements that the device is enterprise-managed, conformant to domain policies, and the caller
463
+ * has permission to call the API targeted by the request.
464
+ */
465
+ requireVerifiedChromeOs?: boolean;
466
+ }
467
+ interface GoogleIdentityAccesscontextmanagerV1ServicePerimeter {
468
+ /** Description of the `ServicePerimeter` and its use. Does not affect behavior. */
469
+ description?: string;
470
+ /**
471
+ * Required. Resource name for the ServicePerimeter. The `short_name` component must begin with a letter and only include alphanumeric and '_'. Format:
472
+ * `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}`
473
+ */
474
+ name?: string;
475
+ /**
476
+ * Perimeter type indicator. A single project is allowed to be a member of single regular perimeter, but multiple service perimeter bridges. A project cannot be a included in a
477
+ * perimeter bridge without being included in regular perimeter. For perimeter bridges, the restricted service list as well as access level lists must be empty.
478
+ */
479
+ perimeterType?: string;
480
+ /**
481
+ * Proposed (or dry run) ServicePerimeter configuration. This configuration allows to specify and test ServicePerimeter configuration without enforcing actual access restrictions. Only
482
+ * allowed to be set when the "use_explicit_dry_run_spec" flag is set.
483
+ */
484
+ spec?: GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig;
485
+ /** Current ServicePerimeter configuration. Specifies sets of resources, restricted services and access levels that determine perimeter content and boundaries. */
486
+ status?: GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig;
487
+ /** Human readable title. Must be unique within the Policy. */
488
+ title?: string;
489
+ /**
490
+ * Use explicit dry run spec flag. Ordinarily, a dry-run spec implicitly exists for all Service Perimeters, and that spec is identical to the status for those Service Perimeters. When
491
+ * this flag is set, it inhibits the generation of the implicit spec, thereby allowing the user to explicitly provide a configuration ("spec") to use in a dry-run version of the
492
+ * Service Perimeter. This allows the user to test changes to the enforced config ("status") without actually enforcing them. This testing is done through analyzing the differences
493
+ * between currently enforced and suggested restrictions. use_explicit_dry_run_spec must bet set to True if any of the fields in the spec are set to non-default values.
494
+ */
495
+ useExplicitDryRunSpec?: boolean;
496
+ }
497
+ interface GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig {
498
+ /**
499
+ * A list of `AccessLevel` resource names that allow resources within the `ServicePerimeter` to be accessed from the internet. `AccessLevels` listed must be in the same policy as this
500
+ * `ServicePerimeter`. Referencing a nonexistent `AccessLevel` is a syntax error. If no `AccessLevel` names are listed, resources within the perimeter can only be accessed via Google
501
+ * Cloud calls with request origins within the perimeter. Example: `"accessPolicies/MY_POLICY/accessLevels/MY_LEVEL"`. For Service Perimeter Bridge, must be empty.
502
+ */
503
+ accessLevels?: string[];
504
+ /**
505
+ * List of EgressPolicies to apply to the perimeter. A perimeter may have multiple EgressPolicies, each of which is evaluated separately. Access is granted if any EgressPolicy grants
506
+ * it. Must be empty for a perimeter bridge.
507
+ */
508
+ egressPolicies?: GoogleIdentityAccesscontextmanagerV1EgressPolicy[];
509
+ /**
510
+ * List of IngressPolicies to apply to the perimeter. A perimeter may have multiple IngressPolicies, each of which is evaluated separately. Access is granted if any Ingress Policy
511
+ * grants it. Must be empty for a perimeter bridge.
512
+ */
513
+ ingressPolicies?: GoogleIdentityAccesscontextmanagerV1IngressPolicy[];
514
+ /** A list of Google Cloud resources that are inside of the service perimeter. Currently only projects are allowed. Format: `projects/{project_number}` */
515
+ resources?: string[];
516
+ /**
517
+ * Google Cloud services that are subject to the Service Perimeter restrictions. For example, if `storage.googleapis.com` is specified, access to the storage buckets inside the
518
+ * perimeter must meet the perimeter's access restrictions.
519
+ */
520
+ restrictedServices?: string[];
521
+ /** Configuration for APIs allowed within Perimeter. */
522
+ vpcAccessibleServices?: GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices;
523
+ }
524
+ interface GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices {
525
+ /**
526
+ * The list of APIs usable within the Service Perimeter. Must be empty unless 'enable_restriction' is True. You can specify a list of individual services, as well as include the
527
+ * 'RESTRICTED-SERVICES' value, which automatically includes all of the services protected by the perimeter.
528
+ */
529
+ allowedServices?: string[];
530
+ /** Whether to restrict API calls within the Service Perimeter to the list of APIs specified in 'allowed_services'. */
531
+ enableRestriction?: boolean;
532
+ }
533
+ interface IamPolicySearchResult {
534
+ /** Explanation about the IAM policy search result. It contains additional information that explains why the search result matches the query. */
535
+ explanation?: Explanation;
536
+ /**
537
+ * The IAM policy attached to the specified resource. Note that the original IAM policy can contain multiple bindings. This only contains the bindings that match the given query. For
538
+ * queries that don't contain a constraint on policies (e.g. an empty query), this contains all the bindings.
539
+ */
540
+ policy?: Policy;
541
+ /**
542
+ * The project that the associated Google Cloud resource belongs to, in the form of `projects/{project_number}`. If an IAM policy is set on a resource -- such as a Compute Engine
543
+ * instance or a Cloud Storage bucket -- the project field will indicate the project that contains the resource. If an IAM policy is set on a folder or orgnization, the project field
544
+ * will be empty.
545
+ */
546
+ project?: string;
547
+ /** The [full resource name](https://cloud.google.com/apis/design/resource_names#full_resource_name) of the resource associated with this IAM policy. */
548
+ resource?: string;
549
+ }
550
+ interface Permissions {
551
+ /** A list of permissions. Example permission string: "compute.disk.get". */
552
+ permissions?: string[];
553
+ }
554
+ interface Policy {
555
+ /** Specifies cloud audit logging configuration for this policy. */
556
+ auditConfigs?: AuditConfig[];
557
+ /**
558
+ * Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings`
559
+ * must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a
560
+ * principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another
561
+ * 1,450 principals to the `bindings` in the `Policy`.
562
+ */
563
+ bindings?: Binding[];
564
+ /**
565
+ * `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make
566
+ * use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems
567
+ * are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM
568
+ * Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1`
569
+ * policy, and all of the conditions in the version `3` policy are lost.
570
+ */
571
+ etag?: string;
572
+ /**
573
+ * Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings
574
+ * must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a
575
+ * policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use
576
+ * IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1`
577
+ * policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave
578
+ * the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
579
+ */
580
+ version?: number;
581
+ }
582
+ interface SearchAllIamPoliciesResponse {
583
+ /** Set if there are more results than those appearing in this response; to get the next set of results, call this method again, using this value as the `page_token`. */
584
+ nextPageToken?: string;
585
+ /** A list of IamPolicy that match the search query. Related information such as the associated resource is returned along with the policy. */
586
+ results?: IamPolicySearchResult[];
587
+ }
588
+ interface SearchAllResourcesResponse {
589
+ /**
590
+ * If there are more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of
591
+ * `next_page_token` as `page_token`.
592
+ */
593
+ nextPageToken?: string;
594
+ /** A list of resource that match the search query. */
595
+ results?: StandardResourceMetadata[];
596
+ }
597
+ interface StandardResourceMetadata {
598
+ /** Additional searchable attributes of this resource. Informational only. The exact set of attributes is subject to change. For example: project id, DNS name etc. */
599
+ additionalAttributes?: string[];
600
+ /** The type of this resource. For example: "compute.googleapis.com/Disk". */
601
+ assetType?: string;
602
+ /** One or more paragraphs of text description of this resource. Maximum length could be up to 1M bytes. */
603
+ description?: string;
604
+ /** The display name of this resource. */
605
+ displayName?: string;
606
+ /**
607
+ * Labels associated with this resource. See [Labelling and grouping GCP
608
+ * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) for more information.
609
+ */
610
+ labels?: { [P in string]: string };
611
+ /** Location can be "global", regional like "us-east1", or zonal like "us-west1-b". */
612
+ location?: string;
613
+ /**
614
+ * The full resource name. For example: `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. See [Resource
615
+ * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) for more information.
616
+ */
617
+ name?: string;
618
+ /**
619
+ * Network tags associated with this resource. Like labels, network tags are a type of annotations used to group GCP resources. See [Labelling GCP
620
+ * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) for more information.
621
+ */
622
+ networkTags?: string[];
623
+ /** The project that this resource belongs to, in the form of `projects/{project_number}`. */
624
+ project?: string;
625
+ }
626
+ interface IamPoliciesResource {
627
+ /**
628
+ * Searches all the IAM policies within a given accessible CRM scope (project/folder/organization). This RPC gives callers especially administrators the ability to search all the IAM
629
+ * policies within a scope, even if they don't have `.getIamPolicy` permission of all the IAM policies. Callers should have `cloud.assets.SearchAllIamPolicies` permission on the
630
+ * requested scope, otherwise the request will be rejected.
631
+ */
632
+ searchAll(request?: {
633
+ /** V1 error format. */
634
+ "$.xgafv"?: string;
635
+ /** OAuth access token. */
636
+ access_token?: string;
637
+ /** Data format for response. */
638
+ alt?: string;
639
+ /** JSONP */
640
+ callback?: string;
641
+ /** Selector specifying which fields to include in a partial response. */
642
+ fields?: string;
643
+ /** 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. */
644
+ key?: string;
645
+ /** OAuth 2.0 token for the current user. */
646
+ oauth_token?: string;
647
+ /**
648
+ * Optional. The page size for search result pagination. Page size is capped at 500 even if a larger value is given. If set to zero, server will pick an appropriate default.
649
+ * Returned results may be fewer than requested. When this happens, there could be more results as long as `next_page_token` is returned.
650
+ */
651
+ pageSize?: number;
652
+ /**
653
+ * Optional. If present, retrieve the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response.
654
+ * The values of all other method parameters must be identical to those in the previous call.
655
+ */
656
+ pageToken?: string;
657
+ /** Returns response with indentations and line breaks. */
658
+ prettyPrint?: boolean;
659
+ /** Optional. The query statement. Examples: * "policy:myuser@mydomain.com" * "policy:(myuser@mydomain.com viewer)" */
660
+ query?: string;
661
+ /** 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. */
662
+ quotaUser?: string;
663
+ /**
664
+ * Required. The relative name of an asset. The search is limited to the resources within the `scope`. The allowed value must be: * Organization number (such as
665
+ * "organizations/123") * Folder number(such as "folders/1234") * Project number (such as "projects/12345") * Project id (such as "projects/abc")
666
+ */
667
+ scope: string;
668
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
669
+ upload_protocol?: string;
670
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
671
+ uploadType?: string;
672
+ }): Request<SearchAllIamPoliciesResponse>;
673
+ }
674
+ interface ResourcesResource {
675
+ /**
676
+ * Searches all the resources within a given accessible CRM scope (project/folder/organization). This RPC gives callers especially administrators the ability to search all the
677
+ * resources within a scope, even if they don't have `.get` permission of all the resources. Callers should have `cloud.assets.SearchAllResources` permission on the requested scope,
678
+ * otherwise the request will be rejected.
679
+ */
680
+ searchAll(request?: {
681
+ /** V1 error format. */
682
+ "$.xgafv"?: string;
683
+ /** OAuth access token. */
684
+ access_token?: string;
685
+ /** Data format for response. */
686
+ alt?: string;
687
+ /** Optional. A list of asset types that this request searches for. If empty, it will search all the supported asset types. */
688
+ assetTypes?: string | string[];
689
+ /** JSONP */
690
+ callback?: string;
691
+ /** Selector specifying which fields to include in a partial response. */
692
+ fields?: string;
693
+ /** 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. */
694
+ key?: string;
695
+ /** OAuth 2.0 token for the current user. */
696
+ oauth_token?: string;
697
+ /**
698
+ * Optional. A comma separated list of fields specifying the sorting order of the results. The default order is ascending. Add ` DESC` after the field name to indicate descending
699
+ * order. Redundant space characters are ignored. For example, ` location DESC , name `.
700
+ */
701
+ orderBy?: string;
702
+ /**
703
+ * Optional. The page size for search result pagination. Page size is capped at 500 even if a larger value is given. If set to zero, server will pick an appropriate default.
704
+ * Returned results may be fewer than requested. When this happens, there could be more results as long as `next_page_token` is returned.
705
+ */
706
+ pageSize?: number;
707
+ /**
708
+ * Optional. If present, then retrieve the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous
709
+ * response. The values of all other method parameters, must be identical to those in the previous call.
710
+ */
711
+ pageToken?: string;
712
+ /** Returns response with indentations and line breaks. */
713
+ prettyPrint?: boolean;
714
+ /** Optional. The query statement. */
715
+ query?: string;
716
+ /** 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. */
717
+ quotaUser?: string;
718
+ /**
719
+ * Required. The relative name of an asset. The search is limited to the resources within the `scope`. The allowed value must be: * Organization number (such as
720
+ * "organizations/123") * Folder number(such as "folders/1234") * Project number (such as "projects/12345") * Project id (such as "projects/abc")
721
+ */
722
+ scope: string;
723
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
724
+ upload_protocol?: string;
725
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
726
+ uploadType?: string;
727
+ }): Request<SearchAllResourcesResponse>;
728
+ }
729
+
730
+ const iamPolicies: IamPoliciesResource;
731
+
732
+ const resources: ResourcesResource;
733
+ }
734
+ }
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@maxim_mazurok/gapi.client.cloudasset-v1p1beta1",
3
+ "version": "0.0.20220805",
4
+ "description": "TypeScript typings for Cloud Asset API v1p1beta1",
5
+ "license": "MIT",
6
+ "author": {
7
+ "email": "maxim@mazurok.com",
8
+ "name": "Maxim Mazurok",
9
+ "url": "https://maxim.mazurok.com"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
14
+ },
15
+ "types": "index.d.ts",
16
+ "dependencies": {
17
+ "@types/gapi.client": "*",
18
+ "@types/gapi.client.discovery": "*"
19
+ }
20
+ }
package/readme.md ADDED
@@ -0,0 +1,78 @@
1
+ # TypeScript typings for Cloud Asset API v1p1beta1
2
+
3
+ The cloud asset API manages the history and inventory of cloud resources.
4
+ For detailed description please check [documentation](https://cloud.google.com/asset-inventory/docs/quickstart).
5
+
6
+ ## Installing
7
+
8
+ Install typings for Cloud Asset API:
9
+
10
+ ```
11
+ npm install @types/gapi.client.cloudasset-v1p1beta1 --save-dev
12
+ ```
13
+
14
+ ## Usage
15
+
16
+ You need to initialize Google API client in your code:
17
+
18
+ ```typescript
19
+ gapi.load('client', () => {
20
+ // now we can use gapi.client
21
+ // ...
22
+ });
23
+ ```
24
+
25
+ Then load api client wrapper:
26
+
27
+ ```typescript
28
+ gapi.client.load('https://cloudasset.googleapis.com/$discovery/rest?version=v1p1beta1', () => {
29
+ // now we can use:
30
+ // gapi.client.cloudasset
31
+ });
32
+ ```
33
+
34
+ ```typescript
35
+ // Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
36
+ gapi.client.load('cloudasset', 'v1p1beta1', () => {
37
+ // now we can use:
38
+ // gapi.client.cloudasset
39
+ });
40
+ ```
41
+
42
+ Don't forget to authenticate your client before sending any request to resources:
43
+
44
+ ```typescript
45
+ // declare client_id registered in Google Developers Console
46
+ var client_id = '',
47
+ scope = [
48
+ // See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
49
+ 'https://www.googleapis.com/auth/cloud-platform',
50
+ ],
51
+ immediate = true;
52
+ // ...
53
+
54
+ gapi.auth.authorize(
55
+ { client_id: client_id, scope: scope, immediate: immediate },
56
+ authResult => {
57
+ if (authResult && !authResult.error) {
58
+ /* handle successful authorization */
59
+ } else {
60
+ /* handle authorization error */
61
+ }
62
+ });
63
+ ```
64
+
65
+ After that you can use Cloud Asset API resources: <!-- TODO: make this work for multiple namespaces -->
66
+
67
+ ```typescript
68
+
69
+ /*
70
+ Searches all the IAM policies within a given accessible CRM scope (project/folder/organization). This RPC gives callers especially administrators the ability to search all the IAM policies within a scope, even if they don't have `.getIamPolicy` permission of all the IAM policies. Callers should have `cloud.assets.SearchAllIamPolicies` permission on the requested scope, otherwise the request will be rejected.
71
+ */
72
+ await gapi.client.cloudasset.iamPolicies.searchAll({ scope: "scope", });
73
+
74
+ /*
75
+ Searches all the resources within a given accessible CRM scope (project/folder/organization). This RPC gives callers especially administrators the ability to search all the resources within a scope, even if they don't have `.get` permission of all the resources. Callers should have `cloud.assets.SearchAllResources` permission on the requested scope, otherwise the request will be rejected.
76
+ */
77
+ await gapi.client.cloudasset.resources.searchAll({ scope: "scope", });
78
+ ```
package/tests.ts ADDED
@@ -0,0 +1,57 @@
1
+ /* This is stub file for gapi.client.cloudasset-v1p1beta1 definition tests */
2
+ // IMPORTANT
3
+ // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
+ // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
+
6
+ // Revision: 20220805
7
+
8
+ gapi.load('client', async () => {
9
+ /** now we can use gapi.client */
10
+
11
+ await gapi.client.load('https://cloudasset.googleapis.com/$discovery/rest?version=v1p1beta1');
12
+ /** now we can use gapi.client.cloudasset */
13
+
14
+ /** don't forget to authenticate your client before sending any request to resources: */
15
+ /** declare client_id registered in Google Developers Console */
16
+ const client_id = '<<PUT YOUR CLIENT ID HERE>>';
17
+ const scope = [
18
+ /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. */
19
+ 'https://www.googleapis.com/auth/cloud-platform',
20
+ ];
21
+ const immediate = false;
22
+ gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
23
+ if (authResult && !authResult.error) {
24
+ /** handle successful authorization */
25
+ run();
26
+ } else {
27
+ /** handle authorization error */
28
+ }
29
+ });
30
+
31
+ async function run() {
32
+ /**
33
+ * Searches all the IAM policies within a given accessible CRM scope (project/folder/organization). This RPC gives callers especially administrators the ability to search all the IAM
34
+ * policies within a scope, even if they don't have `.getIamPolicy` permission of all the IAM policies. Callers should have `cloud.assets.SearchAllIamPolicies` permission on the requested
35
+ * scope, otherwise the request will be rejected.
36
+ */
37
+ await gapi.client.cloudasset.iamPolicies.searchAll({
38
+ pageSize: 42,
39
+ pageToken: "Test string",
40
+ query: "Test string",
41
+ scope: "Test string",
42
+ });
43
+ /**
44
+ * Searches all the resources within a given accessible CRM scope (project/folder/organization). This RPC gives callers especially administrators the ability to search all the resources
45
+ * within a scope, even if they don't have `.get` permission of all the resources. Callers should have `cloud.assets.SearchAllResources` permission on the requested scope, otherwise the
46
+ * request will be rejected.
47
+ */
48
+ await gapi.client.cloudasset.resources.searchAll({
49
+ assetTypes: "Test string",
50
+ orderBy: "Test string",
51
+ pageSize: 42,
52
+ pageToken: "Test string",
53
+ query: "Test string",
54
+ scope: "Test string",
55
+ });
56
+ }
57
+ });
package/tsconfig.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "compilerOptions": {
3
+ "module": "commonjs",
4
+ "lib": ["es6", "dom"],
5
+ "noImplicitAny": true,
6
+ "noImplicitThis": true,
7
+ "strictNullChecks": true,
8
+ "baseUrl": "../",
9
+ "typeRoots": [
10
+ "../"
11
+ ],
12
+ "types": [],
13
+ "noEmit": true,
14
+ "forceConsistentCasingInFileNames": true,
15
+ "strictFunctionTypes": true
16
+ },
17
+ "files": ["index.d.ts", "tests.ts"]
18
+ }
package/tslint.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "dtslint/dtslint.json",
3
+ "rules": {
4
+ "no-redundant-jsdoc": false
5
+ }
6
+ }