1
1
/*
2
- * Copyright 2020 Google LLC
2
+ * Copyright 2024 Google LLC
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
16
16
// Generated by the protocol buffer compiler. DO NOT EDIT!
17
17
// source: google/iam/v1/logging/audit_data.proto
18
18
19
+ // Protobuf Java Version: 3.25.3
19
20
package com .google .iam .v1 .logging ;
20
21
21
22
/**
@@ -47,63 +48,6 @@ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
47
48
return new AuditData ();
48
49
}
49
50
50
- @ java .lang .Override
51
- public final com .google .protobuf .UnknownFieldSet getUnknownFields () {
52
- return this .unknownFields ;
53
- }
54
-
55
- private AuditData (
56
- com .google .protobuf .CodedInputStream input ,
57
- com .google .protobuf .ExtensionRegistryLite extensionRegistry )
58
- throws com .google .protobuf .InvalidProtocolBufferException {
59
- this ();
60
- if (extensionRegistry == null ) {
61
- throw new java .lang .NullPointerException ();
62
- }
63
- com .google .protobuf .UnknownFieldSet .Builder unknownFields =
64
- com .google .protobuf .UnknownFieldSet .newBuilder ();
65
- try {
66
- boolean done = false ;
67
- while (!done ) {
68
- int tag = input .readTag ();
69
- switch (tag ) {
70
- case 0 :
71
- done = true ;
72
- break ;
73
- case 18 :
74
- {
75
- com .google .iam .v1 .PolicyDelta .Builder subBuilder = null ;
76
- if (policyDelta_ != null ) {
77
- subBuilder = policyDelta_ .toBuilder ();
78
- }
79
- policyDelta_ =
80
- input .readMessage (com .google .iam .v1 .PolicyDelta .parser (), extensionRegistry );
81
- if (subBuilder != null ) {
82
- subBuilder .mergeFrom (policyDelta_ );
83
- policyDelta_ = subBuilder .buildPartial ();
84
- }
85
-
86
- break ;
87
- }
88
- default :
89
- {
90
- if (!parseUnknownField (input , unknownFields , extensionRegistry , tag )) {
91
- done = true ;
92
- }
93
- break ;
94
- }
95
- }
96
- }
97
- } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
98
- throw e .setUnfinishedMessage (this );
99
- } catch (java .io .IOException e ) {
100
- throw new com .google .protobuf .InvalidProtocolBufferException (e ).setUnfinishedMessage (this );
101
- } finally {
102
- this .unknownFields = unknownFields .build ();
103
- makeExtensionsImmutable ();
104
- }
105
- }
106
-
107
51
public static final com .google .protobuf .Descriptors .Descriptor getDescriptor () {
108
52
return com .google .iam .v1 .logging .AuditDataProto
109
53
.internal_static_google_iam_v1_logging_AuditData_descriptor ;
@@ -119,6 +63,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
119
63
com .google .iam .v1 .logging .AuditData .Builder .class );
120
64
}
121
65
66
+ private int bitField0_ ;
122
67
public static final int POLICY_DELTA_FIELD_NUMBER = 2 ;
123
68
private com .google .iam .v1 .PolicyDelta policyDelta_ ;
124
69
/**
@@ -134,7 +79,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
134
79
*/
135
80
@ java .lang .Override
136
81
public boolean hasPolicyDelta () {
137
- return policyDelta_ != null ;
82
+ return (( bitField0_ & 0x00000001 ) != 0 ) ;
138
83
}
139
84
/**
140
85
*
@@ -162,7 +107,7 @@ public com.google.iam.v1.PolicyDelta getPolicyDelta() {
162
107
*/
163
108
@ java .lang .Override
164
109
public com .google .iam .v1 .PolicyDeltaOrBuilder getPolicyDeltaOrBuilder () {
165
- return getPolicyDelta () ;
110
+ return policyDelta_ == null ? com . google . iam . v1 . PolicyDelta . getDefaultInstance () : policyDelta_ ;
166
111
}
167
112
168
113
private byte memoizedIsInitialized = -1 ;
@@ -179,10 +124,10 @@ public final boolean isInitialized() {
179
124
180
125
@ java .lang .Override
181
126
public void writeTo (com .google .protobuf .CodedOutputStream output ) throws java .io .IOException {
182
- if (policyDelta_ != null ) {
127
+ if ((( bitField0_ & 0x00000001 ) != 0 ) ) {
183
128
output .writeMessage (2 , getPolicyDelta ());
184
129
}
185
- unknownFields .writeTo (output );
130
+ getUnknownFields () .writeTo (output );
186
131
}
187
132
188
133
@ java .lang .Override
@@ -191,10 +136,10 @@ public int getSerializedSize() {
191
136
if (size != -1 ) return size ;
192
137
193
138
size = 0 ;
194
- if (policyDelta_ != null ) {
139
+ if ((( bitField0_ & 0x00000001 ) != 0 ) ) {
195
140
size += com .google .protobuf .CodedOutputStream .computeMessageSize (2 , getPolicyDelta ());
196
141
}
197
- size += unknownFields .getSerializedSize ();
142
+ size += getUnknownFields () .getSerializedSize ();
198
143
memoizedSize = size ;
199
144
return size ;
200
145
}
@@ -213,7 +158,7 @@ public boolean equals(final java.lang.Object obj) {
213
158
if (hasPolicyDelta ()) {
214
159
if (!getPolicyDelta ().equals (other .getPolicyDelta ())) return false ;
215
160
}
216
- if (!unknownFields .equals (other .unknownFields )) return false ;
161
+ if (!getUnknownFields () .equals (other .getUnknownFields () )) return false ;
217
162
return true ;
218
163
}
219
164
@@ -228,7 +173,7 @@ public int hashCode() {
228
173
hash = (37 * hash ) + POLICY_DELTA_FIELD_NUMBER ;
229
174
hash = (53 * hash ) + getPolicyDelta ().hashCode ();
230
175
}
231
- hash = (29 * hash ) + unknownFields .hashCode ();
176
+ hash = (29 * hash ) + getUnknownFields () .hashCode ();
232
177
memoizedHashCode = hash ;
233
178
return hash ;
234
179
}
@@ -368,16 +313,18 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
368
313
}
369
314
370
315
private void maybeForceBuilderInitialization () {
371
- if (com .google .protobuf .GeneratedMessageV3 .alwaysUseFieldBuilders ) {}
316
+ if (com .google .protobuf .GeneratedMessageV3 .alwaysUseFieldBuilders ) {
317
+ getPolicyDeltaFieldBuilder ();
318
+ }
372
319
}
373
320
374
321
@ java .lang .Override
375
322
public Builder clear () {
376
323
super .clear ();
377
- if ( policyDeltaBuilder_ == null ) {
378
- policyDelta_ = null ;
379
- } else {
380
- policyDelta_ = null ;
324
+ bitField0_ = 0 ;
325
+ policyDelta_ = null ;
326
+ if ( policyDeltaBuilder_ != null ) {
327
+ policyDeltaBuilder_ . dispose () ;
381
328
policyDeltaBuilder_ = null ;
382
329
}
383
330
return this ;
@@ -406,15 +353,24 @@ public com.google.iam.v1.logging.AuditData build() {
406
353
@ java .lang .Override
407
354
public com .google .iam .v1 .logging .AuditData buildPartial () {
408
355
com .google .iam .v1 .logging .AuditData result = new com .google .iam .v1 .logging .AuditData (this );
409
- if (policyDeltaBuilder_ == null ) {
410
- result .policyDelta_ = policyDelta_ ;
411
- } else {
412
- result .policyDelta_ = policyDeltaBuilder_ .build ();
356
+ if (bitField0_ != 0 ) {
357
+ buildPartial0 (result );
413
358
}
414
359
onBuilt ();
415
360
return result ;
416
361
}
417
362
363
+ private void buildPartial0 (com .google .iam .v1 .logging .AuditData result ) {
364
+ int from_bitField0_ = bitField0_ ;
365
+ int to_bitField0_ = 0 ;
366
+ if (((from_bitField0_ & 0x00000001 ) != 0 )) {
367
+ result .policyDelta_ =
368
+ policyDeltaBuilder_ == null ? policyDelta_ : policyDeltaBuilder_ .build ();
369
+ to_bitField0_ |= 0x00000001 ;
370
+ }
371
+ result .bitField0_ |= to_bitField0_ ;
372
+ }
373
+
418
374
@ java .lang .Override
419
375
public Builder clone () {
420
376
return super .clone ();
@@ -463,7 +419,7 @@ public Builder mergeFrom(com.google.iam.v1.logging.AuditData other) {
463
419
if (other .hasPolicyDelta ()) {
464
420
mergePolicyDelta (other .getPolicyDelta ());
465
421
}
466
- this .mergeUnknownFields (other .unknownFields );
422
+ this .mergeUnknownFields (other .getUnknownFields () );
467
423
onChanged ();
468
424
return this ;
469
425
}
@@ -478,20 +434,42 @@ public Builder mergeFrom(
478
434
com .google .protobuf .CodedInputStream input ,
479
435
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
480
436
throws java .io .IOException {
481
- com .google .iam .v1 .logging .AuditData parsedMessage = null ;
437
+ if (extensionRegistry == null ) {
438
+ throw new java .lang .NullPointerException ();
439
+ }
482
440
try {
483
- parsedMessage = PARSER .parsePartialFrom (input , extensionRegistry );
441
+ boolean done = false ;
442
+ while (!done ) {
443
+ int tag = input .readTag ();
444
+ switch (tag ) {
445
+ case 0 :
446
+ done = true ;
447
+ break ;
448
+ case 18 :
449
+ {
450
+ input .readMessage (getPolicyDeltaFieldBuilder ().getBuilder (), extensionRegistry );
451
+ bitField0_ |= 0x00000001 ;
452
+ break ;
453
+ } // case 18
454
+ default :
455
+ {
456
+ if (!super .parseUnknownField (input , extensionRegistry , tag )) {
457
+ done = true ; // was an endgroup tag
458
+ }
459
+ break ;
460
+ } // default:
461
+ } // switch (tag)
462
+ } // while (!done)
484
463
} catch (com .google .protobuf .InvalidProtocolBufferException e ) {
485
- parsedMessage = (com .google .iam .v1 .logging .AuditData ) e .getUnfinishedMessage ();
486
464
throw e .unwrapIOException ();
487
465
} finally {
488
- if (parsedMessage != null ) {
489
- mergeFrom (parsedMessage );
490
- }
491
- }
466
+ onChanged ();
467
+ } // finally
492
468
return this ;
493
469
}
494
470
471
+ private int bitField0_ ;
472
+
495
473
private com .google .iam .v1 .PolicyDelta policyDelta_ ;
496
474
private com .google .protobuf .SingleFieldBuilderV3 <
497
475
com .google .iam .v1 .PolicyDelta ,
@@ -510,7 +488,7 @@ public Builder mergeFrom(
510
488
* @return Whether the policyDelta field is set.
511
489
*/
512
490
public boolean hasPolicyDelta () {
513
- return policyDeltaBuilder_ != null || policyDelta_ != null ;
491
+ return (( bitField0_ & 0x00000001 ) != 0 ) ;
514
492
}
515
493
/**
516
494
*
@@ -547,11 +525,11 @@ public Builder setPolicyDelta(com.google.iam.v1.PolicyDelta value) {
547
525
throw new NullPointerException ();
548
526
}
549
527
policyDelta_ = value ;
550
- onChanged ();
551
528
} else {
552
529
policyDeltaBuilder_ .setMessage (value );
553
530
}
554
-
531
+ bitField0_ |= 0x00000001 ;
532
+ onChanged ();
555
533
return this ;
556
534
}
557
535
/**
@@ -566,11 +544,11 @@ public Builder setPolicyDelta(com.google.iam.v1.PolicyDelta value) {
566
544
public Builder setPolicyDelta (com .google .iam .v1 .PolicyDelta .Builder builderForValue ) {
567
545
if (policyDeltaBuilder_ == null ) {
568
546
policyDelta_ = builderForValue .build ();
569
- onChanged ();
570
547
} else {
571
548
policyDeltaBuilder_ .setMessage (builderForValue .build ());
572
549
}
573
-
550
+ bitField0_ |= 0x00000001 ;
551
+ onChanged ();
574
552
return this ;
575
553
}
576
554
/**
@@ -584,19 +562,20 @@ public Builder setPolicyDelta(com.google.iam.v1.PolicyDelta.Builder builderForVa
584
562
*/
585
563
public Builder mergePolicyDelta (com .google .iam .v1 .PolicyDelta value ) {
586
564
if (policyDeltaBuilder_ == null ) {
587
- if (policyDelta_ != null ) {
588
- policyDelta_ =
589
- com .google .iam .v1 .PolicyDelta .newBuilder (policyDelta_ )
590
- .mergeFrom (value )
591
- .buildPartial ();
565
+ if (((bitField0_ & 0x00000001 ) != 0 )
566
+ && policyDelta_ != null
567
+ && policyDelta_ != com .google .iam .v1 .PolicyDelta .getDefaultInstance ()) {
568
+ getPolicyDeltaBuilder ().mergeFrom (value );
592
569
} else {
593
570
policyDelta_ = value ;
594
571
}
595
- onChanged ();
596
572
} else {
597
573
policyDeltaBuilder_ .mergeFrom (value );
598
574
}
599
-
575
+ if (policyDelta_ != null ) {
576
+ bitField0_ |= 0x00000001 ;
577
+ onChanged ();
578
+ }
600
579
return this ;
601
580
}
602
581
/**
@@ -609,14 +588,13 @@ public Builder mergePolicyDelta(com.google.iam.v1.PolicyDelta value) {
609
588
* <code>.google.iam.v1.PolicyDelta policy_delta = 2;</code>
610
589
*/
611
590
public Builder clearPolicyDelta () {
612
- if (policyDeltaBuilder_ == null ) {
613
- policyDelta_ = null ;
614
- onChanged ();
615
- } else {
616
- policyDelta_ = null ;
591
+ bitField0_ = (bitField0_ & ~0x00000001 );
592
+ policyDelta_ = null ;
593
+ if (policyDeltaBuilder_ != null ) {
594
+ policyDeltaBuilder_ .dispose ();
617
595
policyDeltaBuilder_ = null ;
618
596
}
619
-
597
+ onChanged ();
620
598
return this ;
621
599
}
622
600
/**
@@ -629,7 +607,7 @@ public Builder clearPolicyDelta() {
629
607
* <code>.google.iam.v1.PolicyDelta policy_delta = 2;</code>
630
608
*/
631
609
public com .google .iam .v1 .PolicyDelta .Builder getPolicyDeltaBuilder () {
632
-
610
+ bitField0_ |= 0x00000001 ;
633
611
onChanged ();
634
612
return getPolicyDeltaFieldBuilder ().getBuilder ();
635
613
}
@@ -709,7 +687,18 @@ public AuditData parsePartialFrom(
709
687
com .google .protobuf .CodedInputStream input ,
710
688
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
711
689
throws com .google .protobuf .InvalidProtocolBufferException {
712
- return new AuditData (input , extensionRegistry );
690
+ Builder builder = newBuilder ();
691
+ try {
692
+ builder .mergeFrom (input , extensionRegistry );
693
+ } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
694
+ throw e .setUnfinishedMessage (builder .buildPartial ());
695
+ } catch (com .google .protobuf .UninitializedMessageException e ) {
696
+ throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (builder .buildPartial ());
697
+ } catch (java .io .IOException e ) {
698
+ throw new com .google .protobuf .InvalidProtocolBufferException (e )
699
+ .setUnfinishedMessage (builder .buildPartial ());
700
+ }
701
+ return builder .buildPartial ();
713
702
}
714
703
};
715
704
0 commit comments