@google-cloud/spanner 5.18.0 → 6.1.1
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/CHANGELOG.md +46 -0
- package/README.md +3 -0
- package/build/protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto +22 -10
- package/build/protos/google/spanner/v1/commit_response.proto +1 -1
- package/build/protos/google/spanner/v1/keys.proto +1 -1
- package/build/protos/google/spanner/v1/mutation.proto +1 -1
- package/build/protos/google/spanner/v1/query_plan.proto +1 -1
- package/build/protos/google/spanner/v1/result_set.proto +1 -2
- package/build/protos/google/spanner/v1/spanner.proto +4 -1
- package/build/protos/google/spanner/v1/transaction.proto +73 -21
- package/build/protos/google/spanner/v1/type.proto +1 -1
- package/build/protos/protos.d.ts +239 -0
- package/build/protos/protos.js +668 -1
- package/build/protos/protos.json +70 -0
- package/build/src/backup.d.ts +5 -1
- package/build/src/backup.js +2 -2
- package/build/src/batch-transaction.js +1 -1
- package/build/src/codec.d.ts +1 -1
- package/build/src/codec.js +5 -11
- package/build/src/common-grpc/service-object.js +1 -1
- package/build/src/common-grpc/service.js +2 -2
- package/build/src/database.d.ts +26 -6
- package/build/src/database.js +8 -8
- package/build/src/index.d.ts +1 -1
- package/build/src/index.js +7 -7
- package/build/src/instance.d.ts +2 -1
- package/build/src/instance.js +2 -2
- package/build/src/session-pool.d.ts +1 -0
- package/build/src/session-pool.js +51 -47
- package/build/src/session.js +1 -1
- package/build/src/table.d.ts +5 -1
- package/build/src/table.js +1 -1
- package/build/src/transaction-runner.js +3 -3
- package/build/src/transaction.d.ts +10 -2
- package/build/src/transaction.js +12 -12
- package/build/src/v1/database_admin_client.d.ts +102 -25
- package/build/src/v1/database_admin_client.js +42 -9
- package/build/src/v1/index.js +1 -0
- package/build/src/v1/instance_admin_client.d.ts +63 -18
- package/build/src/v1/instance_admin_client.js +42 -9
- package/build/src/v1/spanner_client.d.ts +70 -19
- package/build/src/v1/spanner_client.js +7 -8
- package/package.json +13 -13
package/build/protos/protos.js
CHANGED
|
@@ -5489,6 +5489,7 @@
|
|
|
5489
5489
|
* @property {boolean|null} [packed] FieldOptions packed
|
|
5490
5490
|
* @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype
|
|
5491
5491
|
* @property {boolean|null} [lazy] FieldOptions lazy
|
|
5492
|
+
* @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy
|
|
5492
5493
|
* @property {boolean|null} [deprecated] FieldOptions deprecated
|
|
5493
5494
|
* @property {boolean|null} [weak] FieldOptions weak
|
|
5494
5495
|
* @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] FieldOptions uninterpretedOption
|
|
@@ -5545,6 +5546,14 @@
|
|
|
5545
5546
|
*/
|
|
5546
5547
|
FieldOptions.prototype.lazy = false;
|
|
5547
5548
|
|
|
5549
|
+
/**
|
|
5550
|
+
* FieldOptions unverifiedLazy.
|
|
5551
|
+
* @member {boolean} unverifiedLazy
|
|
5552
|
+
* @memberof google.protobuf.FieldOptions
|
|
5553
|
+
* @instance
|
|
5554
|
+
*/
|
|
5555
|
+
FieldOptions.prototype.unverifiedLazy = false;
|
|
5556
|
+
|
|
5548
5557
|
/**
|
|
5549
5558
|
* FieldOptions deprecated.
|
|
5550
5559
|
* @member {boolean} deprecated
|
|
@@ -5621,6 +5630,8 @@
|
|
|
5621
5630
|
writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype);
|
|
5622
5631
|
if (message.weak != null && Object.hasOwnProperty.call(message, "weak"))
|
|
5623
5632
|
writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak);
|
|
5633
|
+
if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy"))
|
|
5634
|
+
writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy);
|
|
5624
5635
|
if (message.uninterpretedOption != null && message.uninterpretedOption.length)
|
|
5625
5636
|
for (var i = 0; i < message.uninterpretedOption.length; ++i)
|
|
5626
5637
|
$root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
|
|
@@ -5678,6 +5689,9 @@
|
|
|
5678
5689
|
case 5:
|
|
5679
5690
|
message.lazy = reader.bool();
|
|
5680
5691
|
break;
|
|
5692
|
+
case 15:
|
|
5693
|
+
message.unverifiedLazy = reader.bool();
|
|
5694
|
+
break;
|
|
5681
5695
|
case 3:
|
|
5682
5696
|
message.deprecated = reader.bool();
|
|
5683
5697
|
break;
|
|
@@ -5761,6 +5775,9 @@
|
|
|
5761
5775
|
if (message.lazy != null && message.hasOwnProperty("lazy"))
|
|
5762
5776
|
if (typeof message.lazy !== "boolean")
|
|
5763
5777
|
return "lazy: boolean expected";
|
|
5778
|
+
if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy"))
|
|
5779
|
+
if (typeof message.unverifiedLazy !== "boolean")
|
|
5780
|
+
return "unverifiedLazy: boolean expected";
|
|
5764
5781
|
if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
|
5765
5782
|
if (typeof message.deprecated !== "boolean")
|
|
5766
5783
|
return "deprecated: boolean expected";
|
|
@@ -5846,6 +5863,8 @@
|
|
|
5846
5863
|
}
|
|
5847
5864
|
if (object.lazy != null)
|
|
5848
5865
|
message.lazy = Boolean(object.lazy);
|
|
5866
|
+
if (object.unverifiedLazy != null)
|
|
5867
|
+
message.unverifiedLazy = Boolean(object.unverifiedLazy);
|
|
5849
5868
|
if (object.deprecated != null)
|
|
5850
5869
|
message.deprecated = Boolean(object.deprecated);
|
|
5851
5870
|
if (object.weak != null)
|
|
@@ -5933,6 +5952,7 @@
|
|
|
5933
5952
|
object.lazy = false;
|
|
5934
5953
|
object.jstype = options.enums === String ? "JS_NORMAL" : 0;
|
|
5935
5954
|
object.weak = false;
|
|
5955
|
+
object.unverifiedLazy = false;
|
|
5936
5956
|
object[".google.api.resourceReference"] = null;
|
|
5937
5957
|
}
|
|
5938
5958
|
if (message.ctype != null && message.hasOwnProperty("ctype"))
|
|
@@ -5947,6 +5967,8 @@
|
|
|
5947
5967
|
object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype;
|
|
5948
5968
|
if (message.weak != null && message.hasOwnProperty("weak"))
|
|
5949
5969
|
object.weak = message.weak;
|
|
5970
|
+
if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy"))
|
|
5971
|
+
object.unverifiedLazy = message.unverifiedLazy;
|
|
5950
5972
|
if (message.uninterpretedOption && message.uninterpretedOption.length) {
|
|
5951
5973
|
object.uninterpretedOption = [];
|
|
5952
5974
|
for (var j = 0; j < message.uninterpretedOption.length; ++j)
|
|
@@ -24878,6 +24900,8 @@
|
|
|
24878
24900
|
* @property {google.spanner.admin.instance.v1.Instance.State|null} [state] Instance state
|
|
24879
24901
|
* @property {Object.<string,string>|null} [labels] Instance labels
|
|
24880
24902
|
* @property {Array.<string>|null} [endpointUris] Instance endpointUris
|
|
24903
|
+
* @property {google.protobuf.ITimestamp|null} [createTime] Instance createTime
|
|
24904
|
+
* @property {google.protobuf.ITimestamp|null} [updateTime] Instance updateTime
|
|
24881
24905
|
*/
|
|
24882
24906
|
|
|
24883
24907
|
/**
|
|
@@ -24961,6 +24985,22 @@
|
|
|
24961
24985
|
*/
|
|
24962
24986
|
Instance.prototype.endpointUris = $util.emptyArray;
|
|
24963
24987
|
|
|
24988
|
+
/**
|
|
24989
|
+
* Instance createTime.
|
|
24990
|
+
* @member {google.protobuf.ITimestamp|null|undefined} createTime
|
|
24991
|
+
* @memberof google.spanner.admin.instance.v1.Instance
|
|
24992
|
+
* @instance
|
|
24993
|
+
*/
|
|
24994
|
+
Instance.prototype.createTime = null;
|
|
24995
|
+
|
|
24996
|
+
/**
|
|
24997
|
+
* Instance updateTime.
|
|
24998
|
+
* @member {google.protobuf.ITimestamp|null|undefined} updateTime
|
|
24999
|
+
* @memberof google.spanner.admin.instance.v1.Instance
|
|
25000
|
+
* @instance
|
|
25001
|
+
*/
|
|
25002
|
+
Instance.prototype.updateTime = null;
|
|
25003
|
+
|
|
24964
25004
|
/**
|
|
24965
25005
|
* Creates a new Instance instance using the specified properties.
|
|
24966
25006
|
* @function create
|
|
@@ -25003,6 +25043,10 @@
|
|
|
25003
25043
|
writer.uint32(/* id 8, wireType 2 =*/66).string(message.endpointUris[i]);
|
|
25004
25044
|
if (message.processingUnits != null && Object.hasOwnProperty.call(message, "processingUnits"))
|
|
25005
25045
|
writer.uint32(/* id 9, wireType 0 =*/72).int32(message.processingUnits);
|
|
25046
|
+
if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime"))
|
|
25047
|
+
$root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
|
|
25048
|
+
if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime"))
|
|
25049
|
+
$root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
|
|
25006
25050
|
return writer;
|
|
25007
25051
|
};
|
|
25008
25052
|
|
|
@@ -25082,6 +25126,12 @@
|
|
|
25082
25126
|
message.endpointUris = [];
|
|
25083
25127
|
message.endpointUris.push(reader.string());
|
|
25084
25128
|
break;
|
|
25129
|
+
case 11:
|
|
25130
|
+
message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
|
25131
|
+
break;
|
|
25132
|
+
case 12:
|
|
25133
|
+
message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
|
25134
|
+
break;
|
|
25085
25135
|
default:
|
|
25086
25136
|
reader.skipType(tag & 7);
|
|
25087
25137
|
break;
|
|
@@ -25156,6 +25206,16 @@
|
|
|
25156
25206
|
if (!$util.isString(message.endpointUris[i]))
|
|
25157
25207
|
return "endpointUris: string[] expected";
|
|
25158
25208
|
}
|
|
25209
|
+
if (message.createTime != null && message.hasOwnProperty("createTime")) {
|
|
25210
|
+
var error = $root.google.protobuf.Timestamp.verify(message.createTime);
|
|
25211
|
+
if (error)
|
|
25212
|
+
return "createTime." + error;
|
|
25213
|
+
}
|
|
25214
|
+
if (message.updateTime != null && message.hasOwnProperty("updateTime")) {
|
|
25215
|
+
var error = $root.google.protobuf.Timestamp.verify(message.updateTime);
|
|
25216
|
+
if (error)
|
|
25217
|
+
return "updateTime." + error;
|
|
25218
|
+
}
|
|
25159
25219
|
return null;
|
|
25160
25220
|
};
|
|
25161
25221
|
|
|
@@ -25209,6 +25269,16 @@
|
|
|
25209
25269
|
for (var i = 0; i < object.endpointUris.length; ++i)
|
|
25210
25270
|
message.endpointUris[i] = String(object.endpointUris[i]);
|
|
25211
25271
|
}
|
|
25272
|
+
if (object.createTime != null) {
|
|
25273
|
+
if (typeof object.createTime !== "object")
|
|
25274
|
+
throw TypeError(".google.spanner.admin.instance.v1.Instance.createTime: object expected");
|
|
25275
|
+
message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime);
|
|
25276
|
+
}
|
|
25277
|
+
if (object.updateTime != null) {
|
|
25278
|
+
if (typeof object.updateTime !== "object")
|
|
25279
|
+
throw TypeError(".google.spanner.admin.instance.v1.Instance.updateTime: object expected");
|
|
25280
|
+
message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime);
|
|
25281
|
+
}
|
|
25212
25282
|
return message;
|
|
25213
25283
|
};
|
|
25214
25284
|
|
|
@@ -25236,6 +25306,8 @@
|
|
|
25236
25306
|
object.nodeCount = 0;
|
|
25237
25307
|
object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0;
|
|
25238
25308
|
object.processingUnits = 0;
|
|
25309
|
+
object.createTime = null;
|
|
25310
|
+
object.updateTime = null;
|
|
25239
25311
|
}
|
|
25240
25312
|
if (message.name != null && message.hasOwnProperty("name"))
|
|
25241
25313
|
object.name = message.name;
|
|
@@ -25260,6 +25332,10 @@
|
|
|
25260
25332
|
}
|
|
25261
25333
|
if (message.processingUnits != null && message.hasOwnProperty("processingUnits"))
|
|
25262
25334
|
object.processingUnits = message.processingUnits;
|
|
25335
|
+
if (message.createTime != null && message.hasOwnProperty("createTime"))
|
|
25336
|
+
object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options);
|
|
25337
|
+
if (message.updateTime != null && message.hasOwnProperty("updateTime"))
|
|
25338
|
+
object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options);
|
|
25263
25339
|
return object;
|
|
25264
25340
|
};
|
|
25265
25341
|
|
|
@@ -35363,6 +35439,7 @@
|
|
|
35363
35439
|
* @property {Object.<string,string>|null} [labels] Session labels
|
|
35364
35440
|
* @property {google.protobuf.ITimestamp|null} [createTime] Session createTime
|
|
35365
35441
|
* @property {google.protobuf.ITimestamp|null} [approximateLastUseTime] Session approximateLastUseTime
|
|
35442
|
+
* @property {string|null} [creatorRole] Session creatorRole
|
|
35366
35443
|
*/
|
|
35367
35444
|
|
|
35368
35445
|
/**
|
|
@@ -35413,6 +35490,14 @@
|
|
|
35413
35490
|
*/
|
|
35414
35491
|
Session.prototype.approximateLastUseTime = null;
|
|
35415
35492
|
|
|
35493
|
+
/**
|
|
35494
|
+
* Session creatorRole.
|
|
35495
|
+
* @member {string} creatorRole
|
|
35496
|
+
* @memberof google.spanner.v1.Session
|
|
35497
|
+
* @instance
|
|
35498
|
+
*/
|
|
35499
|
+
Session.prototype.creatorRole = "";
|
|
35500
|
+
|
|
35416
35501
|
/**
|
|
35417
35502
|
* Creates a new Session instance using the specified properties.
|
|
35418
35503
|
* @function create
|
|
@@ -35446,6 +35531,8 @@
|
|
|
35446
35531
|
$root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
35447
35532
|
if (message.approximateLastUseTime != null && Object.hasOwnProperty.call(message, "approximateLastUseTime"))
|
|
35448
35533
|
$root.google.protobuf.Timestamp.encode(message.approximateLastUseTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
35534
|
+
if (message.creatorRole != null && Object.hasOwnProperty.call(message, "creatorRole"))
|
|
35535
|
+
writer.uint32(/* id 5, wireType 2 =*/42).string(message.creatorRole);
|
|
35449
35536
|
return writer;
|
|
35450
35537
|
};
|
|
35451
35538
|
|
|
@@ -35511,6 +35598,9 @@
|
|
|
35511
35598
|
case 4:
|
|
35512
35599
|
message.approximateLastUseTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
|
35513
35600
|
break;
|
|
35601
|
+
case 5:
|
|
35602
|
+
message.creatorRole = reader.string();
|
|
35603
|
+
break;
|
|
35514
35604
|
default:
|
|
35515
35605
|
reader.skipType(tag & 7);
|
|
35516
35606
|
break;
|
|
@@ -35567,6 +35657,9 @@
|
|
|
35567
35657
|
if (error)
|
|
35568
35658
|
return "approximateLastUseTime." + error;
|
|
35569
35659
|
}
|
|
35660
|
+
if (message.creatorRole != null && message.hasOwnProperty("creatorRole"))
|
|
35661
|
+
if (!$util.isString(message.creatorRole))
|
|
35662
|
+
return "creatorRole: string expected";
|
|
35570
35663
|
return null;
|
|
35571
35664
|
};
|
|
35572
35665
|
|
|
@@ -35601,6 +35694,8 @@
|
|
|
35601
35694
|
throw TypeError(".google.spanner.v1.Session.approximateLastUseTime: object expected");
|
|
35602
35695
|
message.approximateLastUseTime = $root.google.protobuf.Timestamp.fromObject(object.approximateLastUseTime);
|
|
35603
35696
|
}
|
|
35697
|
+
if (object.creatorRole != null)
|
|
35698
|
+
message.creatorRole = String(object.creatorRole);
|
|
35604
35699
|
return message;
|
|
35605
35700
|
};
|
|
35606
35701
|
|
|
@@ -35623,6 +35718,7 @@
|
|
|
35623
35718
|
object.name = "";
|
|
35624
35719
|
object.createTime = null;
|
|
35625
35720
|
object.approximateLastUseTime = null;
|
|
35721
|
+
object.creatorRole = "";
|
|
35626
35722
|
}
|
|
35627
35723
|
if (message.name != null && message.hasOwnProperty("name"))
|
|
35628
35724
|
object.name = message.name;
|
|
@@ -35636,6 +35732,8 @@
|
|
|
35636
35732
|
object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options);
|
|
35637
35733
|
if (message.approximateLastUseTime != null && message.hasOwnProperty("approximateLastUseTime"))
|
|
35638
35734
|
object.approximateLastUseTime = $root.google.protobuf.Timestamp.toObject(message.approximateLastUseTime, options);
|
|
35735
|
+
if (message.creatorRole != null && message.hasOwnProperty("creatorRole"))
|
|
35736
|
+
object.creatorRole = message.creatorRole;
|
|
35639
35737
|
return object;
|
|
35640
35738
|
};
|
|
35641
35739
|
|
|
@@ -44762,6 +44860,7 @@
|
|
|
44762
44860
|
* @interface ISetIamPolicyRequest
|
|
44763
44861
|
* @property {string|null} [resource] SetIamPolicyRequest resource
|
|
44764
44862
|
* @property {google.iam.v1.IPolicy|null} [policy] SetIamPolicyRequest policy
|
|
44863
|
+
* @property {google.protobuf.IFieldMask|null} [updateMask] SetIamPolicyRequest updateMask
|
|
44765
44864
|
*/
|
|
44766
44865
|
|
|
44767
44866
|
/**
|
|
@@ -44795,6 +44894,14 @@
|
|
|
44795
44894
|
*/
|
|
44796
44895
|
SetIamPolicyRequest.prototype.policy = null;
|
|
44797
44896
|
|
|
44897
|
+
/**
|
|
44898
|
+
* SetIamPolicyRequest updateMask.
|
|
44899
|
+
* @member {google.protobuf.IFieldMask|null|undefined} updateMask
|
|
44900
|
+
* @memberof google.iam.v1.SetIamPolicyRequest
|
|
44901
|
+
* @instance
|
|
44902
|
+
*/
|
|
44903
|
+
SetIamPolicyRequest.prototype.updateMask = null;
|
|
44904
|
+
|
|
44798
44905
|
/**
|
|
44799
44906
|
* Creates a new SetIamPolicyRequest instance using the specified properties.
|
|
44800
44907
|
* @function create
|
|
@@ -44823,6 +44930,8 @@
|
|
|
44823
44930
|
writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource);
|
|
44824
44931
|
if (message.policy != null && Object.hasOwnProperty.call(message, "policy"))
|
|
44825
44932
|
$root.google.iam.v1.Policy.encode(message.policy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
44933
|
+
if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask"))
|
|
44934
|
+
$root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
44826
44935
|
return writer;
|
|
44827
44936
|
};
|
|
44828
44937
|
|
|
@@ -44863,6 +44972,9 @@
|
|
|
44863
44972
|
case 2:
|
|
44864
44973
|
message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32());
|
|
44865
44974
|
break;
|
|
44975
|
+
case 3:
|
|
44976
|
+
message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32());
|
|
44977
|
+
break;
|
|
44866
44978
|
default:
|
|
44867
44979
|
reader.skipType(tag & 7);
|
|
44868
44980
|
break;
|
|
@@ -44906,6 +45018,11 @@
|
|
|
44906
45018
|
if (error)
|
|
44907
45019
|
return "policy." + error;
|
|
44908
45020
|
}
|
|
45021
|
+
if (message.updateMask != null && message.hasOwnProperty("updateMask")) {
|
|
45022
|
+
var error = $root.google.protobuf.FieldMask.verify(message.updateMask);
|
|
45023
|
+
if (error)
|
|
45024
|
+
return "updateMask." + error;
|
|
45025
|
+
}
|
|
44909
45026
|
return null;
|
|
44910
45027
|
};
|
|
44911
45028
|
|
|
@@ -44928,6 +45045,11 @@
|
|
|
44928
45045
|
throw TypeError(".google.iam.v1.SetIamPolicyRequest.policy: object expected");
|
|
44929
45046
|
message.policy = $root.google.iam.v1.Policy.fromObject(object.policy);
|
|
44930
45047
|
}
|
|
45048
|
+
if (object.updateMask != null) {
|
|
45049
|
+
if (typeof object.updateMask !== "object")
|
|
45050
|
+
throw TypeError(".google.iam.v1.SetIamPolicyRequest.updateMask: object expected");
|
|
45051
|
+
message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask);
|
|
45052
|
+
}
|
|
44931
45053
|
return message;
|
|
44932
45054
|
};
|
|
44933
45055
|
|
|
@@ -44947,11 +45069,14 @@
|
|
|
44947
45069
|
if (options.defaults) {
|
|
44948
45070
|
object.resource = "";
|
|
44949
45071
|
object.policy = null;
|
|
45072
|
+
object.updateMask = null;
|
|
44950
45073
|
}
|
|
44951
45074
|
if (message.resource != null && message.hasOwnProperty("resource"))
|
|
44952
45075
|
object.resource = message.resource;
|
|
44953
45076
|
if (message.policy != null && message.hasOwnProperty("policy"))
|
|
44954
45077
|
object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options);
|
|
45078
|
+
if (message.updateMask != null && message.hasOwnProperty("updateMask"))
|
|
45079
|
+
object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options);
|
|
44955
45080
|
return object;
|
|
44956
45081
|
};
|
|
44957
45082
|
|
|
@@ -45808,6 +45933,7 @@
|
|
|
45808
45933
|
* @interface IPolicy
|
|
45809
45934
|
* @property {number|null} [version] Policy version
|
|
45810
45935
|
* @property {Array.<google.iam.v1.IBinding>|null} [bindings] Policy bindings
|
|
45936
|
+
* @property {Array.<google.iam.v1.IAuditConfig>|null} [auditConfigs] Policy auditConfigs
|
|
45811
45937
|
* @property {Uint8Array|null} [etag] Policy etag
|
|
45812
45938
|
*/
|
|
45813
45939
|
|
|
@@ -45821,6 +45947,7 @@
|
|
|
45821
45947
|
*/
|
|
45822
45948
|
function Policy(properties) {
|
|
45823
45949
|
this.bindings = [];
|
|
45950
|
+
this.auditConfigs = [];
|
|
45824
45951
|
if (properties)
|
|
45825
45952
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
45826
45953
|
if (properties[keys[i]] != null)
|
|
@@ -45843,6 +45970,14 @@
|
|
|
45843
45970
|
*/
|
|
45844
45971
|
Policy.prototype.bindings = $util.emptyArray;
|
|
45845
45972
|
|
|
45973
|
+
/**
|
|
45974
|
+
* Policy auditConfigs.
|
|
45975
|
+
* @member {Array.<google.iam.v1.IAuditConfig>} auditConfigs
|
|
45976
|
+
* @memberof google.iam.v1.Policy
|
|
45977
|
+
* @instance
|
|
45978
|
+
*/
|
|
45979
|
+
Policy.prototype.auditConfigs = $util.emptyArray;
|
|
45980
|
+
|
|
45846
45981
|
/**
|
|
45847
45982
|
* Policy etag.
|
|
45848
45983
|
* @member {Uint8Array} etag
|
|
@@ -45882,6 +46017,9 @@
|
|
|
45882
46017
|
if (message.bindings != null && message.bindings.length)
|
|
45883
46018
|
for (var i = 0; i < message.bindings.length; ++i)
|
|
45884
46019
|
$root.google.iam.v1.Binding.encode(message.bindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
46020
|
+
if (message.auditConfigs != null && message.auditConfigs.length)
|
|
46021
|
+
for (var i = 0; i < message.auditConfigs.length; ++i)
|
|
46022
|
+
$root.google.iam.v1.AuditConfig.encode(message.auditConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
|
45885
46023
|
return writer;
|
|
45886
46024
|
};
|
|
45887
46025
|
|
|
@@ -45924,6 +46062,11 @@
|
|
|
45924
46062
|
message.bindings = [];
|
|
45925
46063
|
message.bindings.push($root.google.iam.v1.Binding.decode(reader, reader.uint32()));
|
|
45926
46064
|
break;
|
|
46065
|
+
case 6:
|
|
46066
|
+
if (!(message.auditConfigs && message.auditConfigs.length))
|
|
46067
|
+
message.auditConfigs = [];
|
|
46068
|
+
message.auditConfigs.push($root.google.iam.v1.AuditConfig.decode(reader, reader.uint32()));
|
|
46069
|
+
break;
|
|
45927
46070
|
case 3:
|
|
45928
46071
|
message.etag = reader.bytes();
|
|
45929
46072
|
break;
|
|
@@ -45974,6 +46117,15 @@
|
|
|
45974
46117
|
return "bindings." + error;
|
|
45975
46118
|
}
|
|
45976
46119
|
}
|
|
46120
|
+
if (message.auditConfigs != null && message.hasOwnProperty("auditConfigs")) {
|
|
46121
|
+
if (!Array.isArray(message.auditConfigs))
|
|
46122
|
+
return "auditConfigs: array expected";
|
|
46123
|
+
for (var i = 0; i < message.auditConfigs.length; ++i) {
|
|
46124
|
+
var error = $root.google.iam.v1.AuditConfig.verify(message.auditConfigs[i]);
|
|
46125
|
+
if (error)
|
|
46126
|
+
return "auditConfigs." + error;
|
|
46127
|
+
}
|
|
46128
|
+
}
|
|
45977
46129
|
if (message.etag != null && message.hasOwnProperty("etag"))
|
|
45978
46130
|
if (!(message.etag && typeof message.etag.length === "number" || $util.isString(message.etag)))
|
|
45979
46131
|
return "etag: buffer expected";
|
|
@@ -46004,6 +46156,16 @@
|
|
|
46004
46156
|
message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i]);
|
|
46005
46157
|
}
|
|
46006
46158
|
}
|
|
46159
|
+
if (object.auditConfigs) {
|
|
46160
|
+
if (!Array.isArray(object.auditConfigs))
|
|
46161
|
+
throw TypeError(".google.iam.v1.Policy.auditConfigs: array expected");
|
|
46162
|
+
message.auditConfigs = [];
|
|
46163
|
+
for (var i = 0; i < object.auditConfigs.length; ++i) {
|
|
46164
|
+
if (typeof object.auditConfigs[i] !== "object")
|
|
46165
|
+
throw TypeError(".google.iam.v1.Policy.auditConfigs: object expected");
|
|
46166
|
+
message.auditConfigs[i] = $root.google.iam.v1.AuditConfig.fromObject(object.auditConfigs[i]);
|
|
46167
|
+
}
|
|
46168
|
+
}
|
|
46007
46169
|
if (object.etag != null)
|
|
46008
46170
|
if (typeof object.etag === "string")
|
|
46009
46171
|
$util.base64.decode(object.etag, message.etag = $util.newBuffer($util.base64.length(object.etag)), 0);
|
|
@@ -46025,8 +46187,10 @@
|
|
|
46025
46187
|
if (!options)
|
|
46026
46188
|
options = {};
|
|
46027
46189
|
var object = {};
|
|
46028
|
-
if (options.arrays || options.defaults)
|
|
46190
|
+
if (options.arrays || options.defaults) {
|
|
46029
46191
|
object.bindings = [];
|
|
46192
|
+
object.auditConfigs = [];
|
|
46193
|
+
}
|
|
46030
46194
|
if (options.defaults) {
|
|
46031
46195
|
object.version = 0;
|
|
46032
46196
|
if (options.bytes === String)
|
|
@@ -46046,6 +46210,11 @@
|
|
|
46046
46210
|
for (var j = 0; j < message.bindings.length; ++j)
|
|
46047
46211
|
object.bindings[j] = $root.google.iam.v1.Binding.toObject(message.bindings[j], options);
|
|
46048
46212
|
}
|
|
46213
|
+
if (message.auditConfigs && message.auditConfigs.length) {
|
|
46214
|
+
object.auditConfigs = [];
|
|
46215
|
+
for (var j = 0; j < message.auditConfigs.length; ++j)
|
|
46216
|
+
object.auditConfigs[j] = $root.google.iam.v1.AuditConfig.toObject(message.auditConfigs[j], options);
|
|
46217
|
+
}
|
|
46049
46218
|
return object;
|
|
46050
46219
|
};
|
|
46051
46220
|
|
|
@@ -46317,6 +46486,504 @@
|
|
|
46317
46486
|
return Binding;
|
|
46318
46487
|
})();
|
|
46319
46488
|
|
|
46489
|
+
v1.AuditConfig = (function() {
|
|
46490
|
+
|
|
46491
|
+
/**
|
|
46492
|
+
* Properties of an AuditConfig.
|
|
46493
|
+
* @memberof google.iam.v1
|
|
46494
|
+
* @interface IAuditConfig
|
|
46495
|
+
* @property {string|null} [service] AuditConfig service
|
|
46496
|
+
* @property {Array.<google.iam.v1.IAuditLogConfig>|null} [auditLogConfigs] AuditConfig auditLogConfigs
|
|
46497
|
+
*/
|
|
46498
|
+
|
|
46499
|
+
/**
|
|
46500
|
+
* Constructs a new AuditConfig.
|
|
46501
|
+
* @memberof google.iam.v1
|
|
46502
|
+
* @classdesc Represents an AuditConfig.
|
|
46503
|
+
* @implements IAuditConfig
|
|
46504
|
+
* @constructor
|
|
46505
|
+
* @param {google.iam.v1.IAuditConfig=} [properties] Properties to set
|
|
46506
|
+
*/
|
|
46507
|
+
function AuditConfig(properties) {
|
|
46508
|
+
this.auditLogConfigs = [];
|
|
46509
|
+
if (properties)
|
|
46510
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
46511
|
+
if (properties[keys[i]] != null)
|
|
46512
|
+
this[keys[i]] = properties[keys[i]];
|
|
46513
|
+
}
|
|
46514
|
+
|
|
46515
|
+
/**
|
|
46516
|
+
* AuditConfig service.
|
|
46517
|
+
* @member {string} service
|
|
46518
|
+
* @memberof google.iam.v1.AuditConfig
|
|
46519
|
+
* @instance
|
|
46520
|
+
*/
|
|
46521
|
+
AuditConfig.prototype.service = "";
|
|
46522
|
+
|
|
46523
|
+
/**
|
|
46524
|
+
* AuditConfig auditLogConfigs.
|
|
46525
|
+
* @member {Array.<google.iam.v1.IAuditLogConfig>} auditLogConfigs
|
|
46526
|
+
* @memberof google.iam.v1.AuditConfig
|
|
46527
|
+
* @instance
|
|
46528
|
+
*/
|
|
46529
|
+
AuditConfig.prototype.auditLogConfigs = $util.emptyArray;
|
|
46530
|
+
|
|
46531
|
+
/**
|
|
46532
|
+
* Creates a new AuditConfig instance using the specified properties.
|
|
46533
|
+
* @function create
|
|
46534
|
+
* @memberof google.iam.v1.AuditConfig
|
|
46535
|
+
* @static
|
|
46536
|
+
* @param {google.iam.v1.IAuditConfig=} [properties] Properties to set
|
|
46537
|
+
* @returns {google.iam.v1.AuditConfig} AuditConfig instance
|
|
46538
|
+
*/
|
|
46539
|
+
AuditConfig.create = function create(properties) {
|
|
46540
|
+
return new AuditConfig(properties);
|
|
46541
|
+
};
|
|
46542
|
+
|
|
46543
|
+
/**
|
|
46544
|
+
* Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages.
|
|
46545
|
+
* @function encode
|
|
46546
|
+
* @memberof google.iam.v1.AuditConfig
|
|
46547
|
+
* @static
|
|
46548
|
+
* @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode
|
|
46549
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
46550
|
+
* @returns {$protobuf.Writer} Writer
|
|
46551
|
+
*/
|
|
46552
|
+
AuditConfig.encode = function encode(message, writer) {
|
|
46553
|
+
if (!writer)
|
|
46554
|
+
writer = $Writer.create();
|
|
46555
|
+
if (message.service != null && Object.hasOwnProperty.call(message, "service"))
|
|
46556
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.service);
|
|
46557
|
+
if (message.auditLogConfigs != null && message.auditLogConfigs.length)
|
|
46558
|
+
for (var i = 0; i < message.auditLogConfigs.length; ++i)
|
|
46559
|
+
$root.google.iam.v1.AuditLogConfig.encode(message.auditLogConfigs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
46560
|
+
return writer;
|
|
46561
|
+
};
|
|
46562
|
+
|
|
46563
|
+
/**
|
|
46564
|
+
* Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages.
|
|
46565
|
+
* @function encodeDelimited
|
|
46566
|
+
* @memberof google.iam.v1.AuditConfig
|
|
46567
|
+
* @static
|
|
46568
|
+
* @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode
|
|
46569
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
46570
|
+
* @returns {$protobuf.Writer} Writer
|
|
46571
|
+
*/
|
|
46572
|
+
AuditConfig.encodeDelimited = function encodeDelimited(message, writer) {
|
|
46573
|
+
return this.encode(message, writer).ldelim();
|
|
46574
|
+
};
|
|
46575
|
+
|
|
46576
|
+
/**
|
|
46577
|
+
* Decodes an AuditConfig message from the specified reader or buffer.
|
|
46578
|
+
* @function decode
|
|
46579
|
+
* @memberof google.iam.v1.AuditConfig
|
|
46580
|
+
* @static
|
|
46581
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
46582
|
+
* @param {number} [length] Message length if known beforehand
|
|
46583
|
+
* @returns {google.iam.v1.AuditConfig} AuditConfig
|
|
46584
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
46585
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
46586
|
+
*/
|
|
46587
|
+
AuditConfig.decode = function decode(reader, length) {
|
|
46588
|
+
if (!(reader instanceof $Reader))
|
|
46589
|
+
reader = $Reader.create(reader);
|
|
46590
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfig();
|
|
46591
|
+
while (reader.pos < end) {
|
|
46592
|
+
var tag = reader.uint32();
|
|
46593
|
+
switch (tag >>> 3) {
|
|
46594
|
+
case 1:
|
|
46595
|
+
message.service = reader.string();
|
|
46596
|
+
break;
|
|
46597
|
+
case 3:
|
|
46598
|
+
if (!(message.auditLogConfigs && message.auditLogConfigs.length))
|
|
46599
|
+
message.auditLogConfigs = [];
|
|
46600
|
+
message.auditLogConfigs.push($root.google.iam.v1.AuditLogConfig.decode(reader, reader.uint32()));
|
|
46601
|
+
break;
|
|
46602
|
+
default:
|
|
46603
|
+
reader.skipType(tag & 7);
|
|
46604
|
+
break;
|
|
46605
|
+
}
|
|
46606
|
+
}
|
|
46607
|
+
return message;
|
|
46608
|
+
};
|
|
46609
|
+
|
|
46610
|
+
/**
|
|
46611
|
+
* Decodes an AuditConfig message from the specified reader or buffer, length delimited.
|
|
46612
|
+
* @function decodeDelimited
|
|
46613
|
+
* @memberof google.iam.v1.AuditConfig
|
|
46614
|
+
* @static
|
|
46615
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
46616
|
+
* @returns {google.iam.v1.AuditConfig} AuditConfig
|
|
46617
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
46618
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
46619
|
+
*/
|
|
46620
|
+
AuditConfig.decodeDelimited = function decodeDelimited(reader) {
|
|
46621
|
+
if (!(reader instanceof $Reader))
|
|
46622
|
+
reader = new $Reader(reader);
|
|
46623
|
+
return this.decode(reader, reader.uint32());
|
|
46624
|
+
};
|
|
46625
|
+
|
|
46626
|
+
/**
|
|
46627
|
+
* Verifies an AuditConfig message.
|
|
46628
|
+
* @function verify
|
|
46629
|
+
* @memberof google.iam.v1.AuditConfig
|
|
46630
|
+
* @static
|
|
46631
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
46632
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
46633
|
+
*/
|
|
46634
|
+
AuditConfig.verify = function verify(message) {
|
|
46635
|
+
if (typeof message !== "object" || message === null)
|
|
46636
|
+
return "object expected";
|
|
46637
|
+
if (message.service != null && message.hasOwnProperty("service"))
|
|
46638
|
+
if (!$util.isString(message.service))
|
|
46639
|
+
return "service: string expected";
|
|
46640
|
+
if (message.auditLogConfigs != null && message.hasOwnProperty("auditLogConfigs")) {
|
|
46641
|
+
if (!Array.isArray(message.auditLogConfigs))
|
|
46642
|
+
return "auditLogConfigs: array expected";
|
|
46643
|
+
for (var i = 0; i < message.auditLogConfigs.length; ++i) {
|
|
46644
|
+
var error = $root.google.iam.v1.AuditLogConfig.verify(message.auditLogConfigs[i]);
|
|
46645
|
+
if (error)
|
|
46646
|
+
return "auditLogConfigs." + error;
|
|
46647
|
+
}
|
|
46648
|
+
}
|
|
46649
|
+
return null;
|
|
46650
|
+
};
|
|
46651
|
+
|
|
46652
|
+
/**
|
|
46653
|
+
* Creates an AuditConfig message from a plain object. Also converts values to their respective internal types.
|
|
46654
|
+
* @function fromObject
|
|
46655
|
+
* @memberof google.iam.v1.AuditConfig
|
|
46656
|
+
* @static
|
|
46657
|
+
* @param {Object.<string,*>} object Plain object
|
|
46658
|
+
* @returns {google.iam.v1.AuditConfig} AuditConfig
|
|
46659
|
+
*/
|
|
46660
|
+
AuditConfig.fromObject = function fromObject(object) {
|
|
46661
|
+
if (object instanceof $root.google.iam.v1.AuditConfig)
|
|
46662
|
+
return object;
|
|
46663
|
+
var message = new $root.google.iam.v1.AuditConfig();
|
|
46664
|
+
if (object.service != null)
|
|
46665
|
+
message.service = String(object.service);
|
|
46666
|
+
if (object.auditLogConfigs) {
|
|
46667
|
+
if (!Array.isArray(object.auditLogConfigs))
|
|
46668
|
+
throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: array expected");
|
|
46669
|
+
message.auditLogConfigs = [];
|
|
46670
|
+
for (var i = 0; i < object.auditLogConfigs.length; ++i) {
|
|
46671
|
+
if (typeof object.auditLogConfigs[i] !== "object")
|
|
46672
|
+
throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: object expected");
|
|
46673
|
+
message.auditLogConfigs[i] = $root.google.iam.v1.AuditLogConfig.fromObject(object.auditLogConfigs[i]);
|
|
46674
|
+
}
|
|
46675
|
+
}
|
|
46676
|
+
return message;
|
|
46677
|
+
};
|
|
46678
|
+
|
|
46679
|
+
/**
|
|
46680
|
+
* Creates a plain object from an AuditConfig message. Also converts values to other types if specified.
|
|
46681
|
+
* @function toObject
|
|
46682
|
+
* @memberof google.iam.v1.AuditConfig
|
|
46683
|
+
* @static
|
|
46684
|
+
* @param {google.iam.v1.AuditConfig} message AuditConfig
|
|
46685
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
46686
|
+
* @returns {Object.<string,*>} Plain object
|
|
46687
|
+
*/
|
|
46688
|
+
AuditConfig.toObject = function toObject(message, options) {
|
|
46689
|
+
if (!options)
|
|
46690
|
+
options = {};
|
|
46691
|
+
var object = {};
|
|
46692
|
+
if (options.arrays || options.defaults)
|
|
46693
|
+
object.auditLogConfigs = [];
|
|
46694
|
+
if (options.defaults)
|
|
46695
|
+
object.service = "";
|
|
46696
|
+
if (message.service != null && message.hasOwnProperty("service"))
|
|
46697
|
+
object.service = message.service;
|
|
46698
|
+
if (message.auditLogConfigs && message.auditLogConfigs.length) {
|
|
46699
|
+
object.auditLogConfigs = [];
|
|
46700
|
+
for (var j = 0; j < message.auditLogConfigs.length; ++j)
|
|
46701
|
+
object.auditLogConfigs[j] = $root.google.iam.v1.AuditLogConfig.toObject(message.auditLogConfigs[j], options);
|
|
46702
|
+
}
|
|
46703
|
+
return object;
|
|
46704
|
+
};
|
|
46705
|
+
|
|
46706
|
+
/**
|
|
46707
|
+
* Converts this AuditConfig to JSON.
|
|
46708
|
+
* @function toJSON
|
|
46709
|
+
* @memberof google.iam.v1.AuditConfig
|
|
46710
|
+
* @instance
|
|
46711
|
+
* @returns {Object.<string,*>} JSON object
|
|
46712
|
+
*/
|
|
46713
|
+
AuditConfig.prototype.toJSON = function toJSON() {
|
|
46714
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
46715
|
+
};
|
|
46716
|
+
|
|
46717
|
+
return AuditConfig;
|
|
46718
|
+
})();
|
|
46719
|
+
|
|
46720
|
+
v1.AuditLogConfig = (function() {
|
|
46721
|
+
|
|
46722
|
+
/**
|
|
46723
|
+
* Properties of an AuditLogConfig.
|
|
46724
|
+
* @memberof google.iam.v1
|
|
46725
|
+
* @interface IAuditLogConfig
|
|
46726
|
+
* @property {google.iam.v1.AuditLogConfig.LogType|null} [logType] AuditLogConfig logType
|
|
46727
|
+
* @property {Array.<string>|null} [exemptedMembers] AuditLogConfig exemptedMembers
|
|
46728
|
+
*/
|
|
46729
|
+
|
|
46730
|
+
/**
|
|
46731
|
+
* Constructs a new AuditLogConfig.
|
|
46732
|
+
* @memberof google.iam.v1
|
|
46733
|
+
* @classdesc Represents an AuditLogConfig.
|
|
46734
|
+
* @implements IAuditLogConfig
|
|
46735
|
+
* @constructor
|
|
46736
|
+
* @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set
|
|
46737
|
+
*/
|
|
46738
|
+
function AuditLogConfig(properties) {
|
|
46739
|
+
this.exemptedMembers = [];
|
|
46740
|
+
if (properties)
|
|
46741
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
46742
|
+
if (properties[keys[i]] != null)
|
|
46743
|
+
this[keys[i]] = properties[keys[i]];
|
|
46744
|
+
}
|
|
46745
|
+
|
|
46746
|
+
/**
|
|
46747
|
+
* AuditLogConfig logType.
|
|
46748
|
+
* @member {google.iam.v1.AuditLogConfig.LogType} logType
|
|
46749
|
+
* @memberof google.iam.v1.AuditLogConfig
|
|
46750
|
+
* @instance
|
|
46751
|
+
*/
|
|
46752
|
+
AuditLogConfig.prototype.logType = 0;
|
|
46753
|
+
|
|
46754
|
+
/**
|
|
46755
|
+
* AuditLogConfig exemptedMembers.
|
|
46756
|
+
* @member {Array.<string>} exemptedMembers
|
|
46757
|
+
* @memberof google.iam.v1.AuditLogConfig
|
|
46758
|
+
* @instance
|
|
46759
|
+
*/
|
|
46760
|
+
AuditLogConfig.prototype.exemptedMembers = $util.emptyArray;
|
|
46761
|
+
|
|
46762
|
+
/**
|
|
46763
|
+
* Creates a new AuditLogConfig instance using the specified properties.
|
|
46764
|
+
* @function create
|
|
46765
|
+
* @memberof google.iam.v1.AuditLogConfig
|
|
46766
|
+
* @static
|
|
46767
|
+
* @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set
|
|
46768
|
+
* @returns {google.iam.v1.AuditLogConfig} AuditLogConfig instance
|
|
46769
|
+
*/
|
|
46770
|
+
AuditLogConfig.create = function create(properties) {
|
|
46771
|
+
return new AuditLogConfig(properties);
|
|
46772
|
+
};
|
|
46773
|
+
|
|
46774
|
+
/**
|
|
46775
|
+
* Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages.
|
|
46776
|
+
* @function encode
|
|
46777
|
+
* @memberof google.iam.v1.AuditLogConfig
|
|
46778
|
+
* @static
|
|
46779
|
+
* @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode
|
|
46780
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
46781
|
+
* @returns {$protobuf.Writer} Writer
|
|
46782
|
+
*/
|
|
46783
|
+
AuditLogConfig.encode = function encode(message, writer) {
|
|
46784
|
+
if (!writer)
|
|
46785
|
+
writer = $Writer.create();
|
|
46786
|
+
if (message.logType != null && Object.hasOwnProperty.call(message, "logType"))
|
|
46787
|
+
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logType);
|
|
46788
|
+
if (message.exemptedMembers != null && message.exemptedMembers.length)
|
|
46789
|
+
for (var i = 0; i < message.exemptedMembers.length; ++i)
|
|
46790
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.exemptedMembers[i]);
|
|
46791
|
+
return writer;
|
|
46792
|
+
};
|
|
46793
|
+
|
|
46794
|
+
/**
|
|
46795
|
+
* Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages.
|
|
46796
|
+
* @function encodeDelimited
|
|
46797
|
+
* @memberof google.iam.v1.AuditLogConfig
|
|
46798
|
+
* @static
|
|
46799
|
+
* @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode
|
|
46800
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
46801
|
+
* @returns {$protobuf.Writer} Writer
|
|
46802
|
+
*/
|
|
46803
|
+
AuditLogConfig.encodeDelimited = function encodeDelimited(message, writer) {
|
|
46804
|
+
return this.encode(message, writer).ldelim();
|
|
46805
|
+
};
|
|
46806
|
+
|
|
46807
|
+
/**
|
|
46808
|
+
* Decodes an AuditLogConfig message from the specified reader or buffer.
|
|
46809
|
+
* @function decode
|
|
46810
|
+
* @memberof google.iam.v1.AuditLogConfig
|
|
46811
|
+
* @static
|
|
46812
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
46813
|
+
* @param {number} [length] Message length if known beforehand
|
|
46814
|
+
* @returns {google.iam.v1.AuditLogConfig} AuditLogConfig
|
|
46815
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
46816
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
46817
|
+
*/
|
|
46818
|
+
AuditLogConfig.decode = function decode(reader, length) {
|
|
46819
|
+
if (!(reader instanceof $Reader))
|
|
46820
|
+
reader = $Reader.create(reader);
|
|
46821
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditLogConfig();
|
|
46822
|
+
while (reader.pos < end) {
|
|
46823
|
+
var tag = reader.uint32();
|
|
46824
|
+
switch (tag >>> 3) {
|
|
46825
|
+
case 1:
|
|
46826
|
+
message.logType = reader.int32();
|
|
46827
|
+
break;
|
|
46828
|
+
case 2:
|
|
46829
|
+
if (!(message.exemptedMembers && message.exemptedMembers.length))
|
|
46830
|
+
message.exemptedMembers = [];
|
|
46831
|
+
message.exemptedMembers.push(reader.string());
|
|
46832
|
+
break;
|
|
46833
|
+
default:
|
|
46834
|
+
reader.skipType(tag & 7);
|
|
46835
|
+
break;
|
|
46836
|
+
}
|
|
46837
|
+
}
|
|
46838
|
+
return message;
|
|
46839
|
+
};
|
|
46840
|
+
|
|
46841
|
+
/**
|
|
46842
|
+
* Decodes an AuditLogConfig message from the specified reader or buffer, length delimited.
|
|
46843
|
+
* @function decodeDelimited
|
|
46844
|
+
* @memberof google.iam.v1.AuditLogConfig
|
|
46845
|
+
* @static
|
|
46846
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
46847
|
+
* @returns {google.iam.v1.AuditLogConfig} AuditLogConfig
|
|
46848
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
46849
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
46850
|
+
*/
|
|
46851
|
+
AuditLogConfig.decodeDelimited = function decodeDelimited(reader) {
|
|
46852
|
+
if (!(reader instanceof $Reader))
|
|
46853
|
+
reader = new $Reader(reader);
|
|
46854
|
+
return this.decode(reader, reader.uint32());
|
|
46855
|
+
};
|
|
46856
|
+
|
|
46857
|
+
/**
|
|
46858
|
+
* Verifies an AuditLogConfig message.
|
|
46859
|
+
* @function verify
|
|
46860
|
+
* @memberof google.iam.v1.AuditLogConfig
|
|
46861
|
+
* @static
|
|
46862
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
46863
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
46864
|
+
*/
|
|
46865
|
+
AuditLogConfig.verify = function verify(message) {
|
|
46866
|
+
if (typeof message !== "object" || message === null)
|
|
46867
|
+
return "object expected";
|
|
46868
|
+
if (message.logType != null && message.hasOwnProperty("logType"))
|
|
46869
|
+
switch (message.logType) {
|
|
46870
|
+
default:
|
|
46871
|
+
return "logType: enum value expected";
|
|
46872
|
+
case 0:
|
|
46873
|
+
case 1:
|
|
46874
|
+
case 2:
|
|
46875
|
+
case 3:
|
|
46876
|
+
break;
|
|
46877
|
+
}
|
|
46878
|
+
if (message.exemptedMembers != null && message.hasOwnProperty("exemptedMembers")) {
|
|
46879
|
+
if (!Array.isArray(message.exemptedMembers))
|
|
46880
|
+
return "exemptedMembers: array expected";
|
|
46881
|
+
for (var i = 0; i < message.exemptedMembers.length; ++i)
|
|
46882
|
+
if (!$util.isString(message.exemptedMembers[i]))
|
|
46883
|
+
return "exemptedMembers: string[] expected";
|
|
46884
|
+
}
|
|
46885
|
+
return null;
|
|
46886
|
+
};
|
|
46887
|
+
|
|
46888
|
+
/**
|
|
46889
|
+
* Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types.
|
|
46890
|
+
* @function fromObject
|
|
46891
|
+
* @memberof google.iam.v1.AuditLogConfig
|
|
46892
|
+
* @static
|
|
46893
|
+
* @param {Object.<string,*>} object Plain object
|
|
46894
|
+
* @returns {google.iam.v1.AuditLogConfig} AuditLogConfig
|
|
46895
|
+
*/
|
|
46896
|
+
AuditLogConfig.fromObject = function fromObject(object) {
|
|
46897
|
+
if (object instanceof $root.google.iam.v1.AuditLogConfig)
|
|
46898
|
+
return object;
|
|
46899
|
+
var message = new $root.google.iam.v1.AuditLogConfig();
|
|
46900
|
+
switch (object.logType) {
|
|
46901
|
+
case "LOG_TYPE_UNSPECIFIED":
|
|
46902
|
+
case 0:
|
|
46903
|
+
message.logType = 0;
|
|
46904
|
+
break;
|
|
46905
|
+
case "ADMIN_READ":
|
|
46906
|
+
case 1:
|
|
46907
|
+
message.logType = 1;
|
|
46908
|
+
break;
|
|
46909
|
+
case "DATA_WRITE":
|
|
46910
|
+
case 2:
|
|
46911
|
+
message.logType = 2;
|
|
46912
|
+
break;
|
|
46913
|
+
case "DATA_READ":
|
|
46914
|
+
case 3:
|
|
46915
|
+
message.logType = 3;
|
|
46916
|
+
break;
|
|
46917
|
+
}
|
|
46918
|
+
if (object.exemptedMembers) {
|
|
46919
|
+
if (!Array.isArray(object.exemptedMembers))
|
|
46920
|
+
throw TypeError(".google.iam.v1.AuditLogConfig.exemptedMembers: array expected");
|
|
46921
|
+
message.exemptedMembers = [];
|
|
46922
|
+
for (var i = 0; i < object.exemptedMembers.length; ++i)
|
|
46923
|
+
message.exemptedMembers[i] = String(object.exemptedMembers[i]);
|
|
46924
|
+
}
|
|
46925
|
+
return message;
|
|
46926
|
+
};
|
|
46927
|
+
|
|
46928
|
+
/**
|
|
46929
|
+
* Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified.
|
|
46930
|
+
* @function toObject
|
|
46931
|
+
* @memberof google.iam.v1.AuditLogConfig
|
|
46932
|
+
* @static
|
|
46933
|
+
* @param {google.iam.v1.AuditLogConfig} message AuditLogConfig
|
|
46934
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
46935
|
+
* @returns {Object.<string,*>} Plain object
|
|
46936
|
+
*/
|
|
46937
|
+
AuditLogConfig.toObject = function toObject(message, options) {
|
|
46938
|
+
if (!options)
|
|
46939
|
+
options = {};
|
|
46940
|
+
var object = {};
|
|
46941
|
+
if (options.arrays || options.defaults)
|
|
46942
|
+
object.exemptedMembers = [];
|
|
46943
|
+
if (options.defaults)
|
|
46944
|
+
object.logType = options.enums === String ? "LOG_TYPE_UNSPECIFIED" : 0;
|
|
46945
|
+
if (message.logType != null && message.hasOwnProperty("logType"))
|
|
46946
|
+
object.logType = options.enums === String ? $root.google.iam.v1.AuditLogConfig.LogType[message.logType] : message.logType;
|
|
46947
|
+
if (message.exemptedMembers && message.exemptedMembers.length) {
|
|
46948
|
+
object.exemptedMembers = [];
|
|
46949
|
+
for (var j = 0; j < message.exemptedMembers.length; ++j)
|
|
46950
|
+
object.exemptedMembers[j] = message.exemptedMembers[j];
|
|
46951
|
+
}
|
|
46952
|
+
return object;
|
|
46953
|
+
};
|
|
46954
|
+
|
|
46955
|
+
/**
|
|
46956
|
+
* Converts this AuditLogConfig to JSON.
|
|
46957
|
+
* @function toJSON
|
|
46958
|
+
* @memberof google.iam.v1.AuditLogConfig
|
|
46959
|
+
* @instance
|
|
46960
|
+
* @returns {Object.<string,*>} JSON object
|
|
46961
|
+
*/
|
|
46962
|
+
AuditLogConfig.prototype.toJSON = function toJSON() {
|
|
46963
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
46964
|
+
};
|
|
46965
|
+
|
|
46966
|
+
/**
|
|
46967
|
+
* LogType enum.
|
|
46968
|
+
* @name google.iam.v1.AuditLogConfig.LogType
|
|
46969
|
+
* @enum {number}
|
|
46970
|
+
* @property {number} LOG_TYPE_UNSPECIFIED=0 LOG_TYPE_UNSPECIFIED value
|
|
46971
|
+
* @property {number} ADMIN_READ=1 ADMIN_READ value
|
|
46972
|
+
* @property {number} DATA_WRITE=2 DATA_WRITE value
|
|
46973
|
+
* @property {number} DATA_READ=3 DATA_READ value
|
|
46974
|
+
*/
|
|
46975
|
+
AuditLogConfig.LogType = (function() {
|
|
46976
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
46977
|
+
values[valuesById[0] = "LOG_TYPE_UNSPECIFIED"] = 0;
|
|
46978
|
+
values[valuesById[1] = "ADMIN_READ"] = 1;
|
|
46979
|
+
values[valuesById[2] = "DATA_WRITE"] = 2;
|
|
46980
|
+
values[valuesById[3] = "DATA_READ"] = 3;
|
|
46981
|
+
return values;
|
|
46982
|
+
})();
|
|
46983
|
+
|
|
46984
|
+
return AuditLogConfig;
|
|
46985
|
+
})();
|
|
46986
|
+
|
|
46320
46987
|
v1.PolicyDelta = (function() {
|
|
46321
46988
|
|
|
46322
46989
|
/**
|