FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

chore: add iam logging by JoeWang1127 · Pull Request #2932 · googleapis/sdk-platform-java · GitHub

This repository was archived by the owner on May 14, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .java  (3) .json  (1) .proto  (3) .sh  (1) .yaml  (1) All 5 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
4 changes: 0 additions & 4 deletions java-iam/.OwlBot-hermetic.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ deep-remove-regex:
- "/java-iam/grpc-google-.*/src"
- "/java-iam/proto-google-.*/src"

deep-preserve-regex:
- "/java-iam/proto-google-iam-v1/src/main/java/com/google/iam/v1/logging"
- "/java-iam/proto-google-iam-v1/src/main/proto/google/iam/v1"

deep-copy-regex:
- source: "/google/iam/(v.*)/.*-java/grpc-google-.*/src"
dest: "/owl-bot-staging/java-iam/$1/grpc-google-iam-$1/src"
Expand Down
2 changes: 1 addition & 1 deletion java-iam/.repo-metadata.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"api_description": "Manages access control for Google Cloud Platform resources",
"client_documentation": "https://cloud.google.com/java/docs/reference/proto-google-iam-v1/latest/overview",
"release_level": "stable",
"transport": "grpc",
"transport": "both",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Do we know why the transport changed? Is it because this PR #2890?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Yes, now iam/v2 is used to get the transport.

"language": "java",
"repo": "googleapis/sdk-platform-java",
"repo_short": "java-iam",
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,6 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/iam/v1/logging/audit_data.proto

// Protobuf Java Version: 3.25.3
package com.google.iam.v1.logging;

/**
Expand Down Expand Up @@ -47,63 +48,6 @@ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new AuditData();
}

@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}

private AuditData(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 18:
{
com.google.iam.v1.PolicyDelta.Builder subBuilder = null;
if (policyDelta_ != null) {
subBuilder = policyDelta_.toBuilder();
}
policyDelta_ =
input.readMessage(com.google.iam.v1.PolicyDelta.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(policyDelta_);
policyDelta_ = subBuilder.buildPartial();
}

break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}

public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.iam.v1.logging.AuditDataProto
.internal_static_google_iam_v1_logging_AuditData_descriptor;
Expand All @@ -119,6 +63,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
com.google.iam.v1.logging.AuditData.Builder.class);
}

private int bitField0_;
public static final int POLICY_DELTA_FIELD_NUMBER = 2;
private com.google.iam.v1.PolicyDelta policyDelta_;
/**
Expand All @@ -134,7 +79,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*/
@java.lang.Override
public boolean hasPolicyDelta() {
return policyDelta_ != null;
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
Expand Down Expand Up @@ -162,7 +107,7 @@ public com.google.iam.v1.PolicyDelta getPolicyDelta() {
*/
@java.lang.Override
public com.google.iam.v1.PolicyDeltaOrBuilder getPolicyDeltaOrBuilder() {
return getPolicyDelta();
return policyDelta_ == null ? com.google.iam.v1.PolicyDelta.getDefaultInstance() : policyDelta_;
}

private byte memoizedIsInitialized = -1;
Expand All @@ -179,10 +124,10 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (policyDelta_ != null) {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getPolicyDelta());
}
unknownFields.writeTo(output);
getUnknownFields().writeTo(output);
}

@java.lang.Override
Expand All @@ -191,10 +136,10 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (policyDelta_ != null) {
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPolicyDelta());
}
size += unknownFields.getSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
Expand All @@ -213,7 +158,7 @@ public boolean equals(final java.lang.Object obj) {
if (hasPolicyDelta()) {
if (!getPolicyDelta().equals(other.getPolicyDelta())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}

Expand All @@ -228,7 +173,7 @@ public int hashCode() {
hash = (37 * hash) + POLICY_DELTA_FIELD_NUMBER;
hash = (53 * hash) + getPolicyDelta().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
Expand Down Expand Up @@ -368,16 +313,18 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
}

private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getPolicyDeltaFieldBuilder();
}
}

@java.lang.Override
public Builder clear() {
super.clear();
if (policyDeltaBuilder_ == null) {
policyDelta_ = null;
} else {
policyDelta_ = null;
bitField0_ = 0;
policyDelta_ = null;
if (policyDeltaBuilder_ != null) {
policyDeltaBuilder_.dispose();
policyDeltaBuilder_ = null;
}
return this;
Expand Down Expand Up @@ -406,15 +353,24 @@ public com.google.iam.v1.logging.AuditData build() {
@java.lang.Override
public com.google.iam.v1.logging.AuditData buildPartial() {
com.google.iam.v1.logging.AuditData result = new com.google.iam.v1.logging.AuditData(this);
if (policyDeltaBuilder_ == null) {
result.policyDelta_ = policyDelta_;
} else {
result.policyDelta_ = policyDeltaBuilder_.build();
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}

private void buildPartial0(com.google.iam.v1.logging.AuditData result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.policyDelta_ =
policyDeltaBuilder_ == null ? policyDelta_ : policyDeltaBuilder_.build();
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}

@java.lang.Override
public Builder clone() {
return super.clone();
Expand Down Expand Up @@ -463,7 +419,7 @@ public Builder mergeFrom(com.google.iam.v1.logging.AuditData other) {
if (other.hasPolicyDelta()) {
mergePolicyDelta(other.getPolicyDelta());
}
this.mergeUnknownFields(other.unknownFields);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
Expand All @@ -478,20 +434,42 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.iam.v1.logging.AuditData parsedMessage = null;
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 18:
{
input.readMessage(getPolicyDeltaFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 18
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.iam.v1.logging.AuditData) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
onChanged();
} // finally
return this;
}

private int bitField0_;

private com.google.iam.v1.PolicyDelta policyDelta_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.iam.v1.PolicyDelta,
Expand All @@ -510,7 +488,7 @@ public Builder mergeFrom(
* @return Whether the policyDelta field is set.
*/
public boolean hasPolicyDelta() {
return policyDeltaBuilder_ != null || policyDelta_ != null;
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
Expand Down Expand Up @@ -547,11 +525,11 @@ public Builder setPolicyDelta(com.google.iam.v1.PolicyDelta value) {
throw new NullPointerException();
}
policyDelta_ = value;
onChanged();
} else {
policyDeltaBuilder_.setMessage(value);
}

bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
Expand All @@ -566,11 +544,11 @@ public Builder setPolicyDelta(com.google.iam.v1.PolicyDelta value) {
public Builder setPolicyDelta(com.google.iam.v1.PolicyDelta.Builder builderForValue) {
if (policyDeltaBuilder_ == null) {
policyDelta_ = builderForValue.build();
onChanged();
} else {
policyDeltaBuilder_.setMessage(builderForValue.build());
}

bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
Expand All @@ -584,19 +562,20 @@ public Builder setPolicyDelta(com.google.iam.v1.PolicyDelta.Builder builderForVa
*/
public Builder mergePolicyDelta(com.google.iam.v1.PolicyDelta value) {
if (policyDeltaBuilder_ == null) {
if (policyDelta_ != null) {
policyDelta_ =
com.google.iam.v1.PolicyDelta.newBuilder(policyDelta_)
.mergeFrom(value)
.buildPartial();
if (((bitField0_ & 0x00000001) != 0)
&& policyDelta_ != null
&& policyDelta_ != com.google.iam.v1.PolicyDelta.getDefaultInstance()) {
getPolicyDeltaBuilder().mergeFrom(value);
} else {
policyDelta_ = value;
}
onChanged();
} else {
policyDeltaBuilder_.mergeFrom(value);
}

if (policyDelta_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
Expand All @@ -609,14 +588,13 @@ public Builder mergePolicyDelta(com.google.iam.v1.PolicyDelta value) {
* <code>.google.iam.v1.PolicyDelta policy_delta = 2;</code>
*/
public Builder clearPolicyDelta() {
if (policyDeltaBuilder_ == null) {
policyDelta_ = null;
onChanged();
} else {
policyDelta_ = null;
bitField0_ = (bitField0_ & ~0x00000001);
policyDelta_ = null;
if (policyDeltaBuilder_ != null) {
policyDeltaBuilder_.dispose();
policyDeltaBuilder_ = null;
}

onChanged();
return this;
}
/**
Expand All @@ -629,7 +607,7 @@ public Builder clearPolicyDelta() {
* <code>.google.iam.v1.PolicyDelta policy_delta = 2;</code>
*/
public com.google.iam.v1.PolicyDelta.Builder getPolicyDeltaBuilder() {

bitField0_ |= 0x00000001;
onChanged();
return getPolicyDeltaFieldBuilder().getBuilder();
}
Expand Down Expand Up @@ -709,7 +687,18 @@ public AuditData parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new AuditData(input, extensionRegistry);
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};

Expand Down
Loading

Back | FazBrowse Home | New Git URL