Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/audit/audit_log.proto
// Protobuf Java Version: 3.25.3
package com.google.cloud.audit;
/**
*
*
*
* Authentication information for the operation.
*
*
* Protobuf type {@code google.cloud.audit.AuthenticationInfo}
*/
public final class AuthenticationInfo extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.audit.AuthenticationInfo)
AuthenticationInfoOrBuilder {
private static final long serialVersionUID = 0L;
// Use AuthenticationInfo.newBuilder() to construct.
private AuthenticationInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AuthenticationInfo() {
principalEmail_ = "";
authoritySelector_ = "";
serviceAccountKeyName_ = "";
serviceAccountDelegationInfo_ = java.util.Collections.emptyList();
principalSubject_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new AuthenticationInfo();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.audit.AuditLogProto
.internal_static_google_cloud_audit_AuthenticationInfo_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.audit.AuditLogProto
.internal_static_google_cloud_audit_AuthenticationInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.audit.AuthenticationInfo.class,
com.google.cloud.audit.AuthenticationInfo.Builder.class);
}
private int bitField0_;
public static final int PRINCIPAL_EMAIL_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object principalEmail_ = "";
/**
*
*
*
* The email address of the authenticated user (or service account on behalf
* of third party principal) making the request. For third party identity
* callers, the `principal_subject` field is populated instead of this field.
* For privacy reasons, the principal email address is sometimes redacted.
* For more information, see [Caller identities in audit
* logs](https://cloud.google.com/logging/docs/audit#user-id).
*
* The email address of the authenticated user (or service account on behalf
* of third party principal) making the request. For third party identity
* callers, the `principal_subject` field is populated instead of this field.
* For privacy reasons, the principal email address is sometimes redacted.
* For more information, see [Caller identities in audit
* logs](https://cloud.google.com/logging/docs/audit#user-id).
*
*
* string principal_email = 1;
*
* @return The bytes for principalEmail.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPrincipalEmailBytes() {
java.lang.Object ref = principalEmail_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
principalEmail_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int AUTHORITY_SELECTOR_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object authoritySelector_ = "";
/**
*
*
*
* The authority selector specified by the requestor, if any.
* It is not guaranteed that the principal was allowed to use this authority.
*
* The authority selector specified by the requestor, if any.
* It is not guaranteed that the principal was allowed to use this authority.
*
*
* string authority_selector = 2;
*
* @return The bytes for authoritySelector.
*/
@java.lang.Override
public com.google.protobuf.ByteString getAuthoritySelectorBytes() {
java.lang.Object ref = authoritySelector_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
authoritySelector_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int THIRD_PARTY_PRINCIPAL_FIELD_NUMBER = 4;
private com.google.protobuf.Struct thirdPartyPrincipal_;
/**
*
*
*
* The third party identification (if any) of the authenticated user making
* the request.
* When the JSON object represented here has a proto equivalent, the proto
* name will be indicated in the `@type` property.
*
*
* .google.protobuf.Struct third_party_principal = 4;
*
* @return Whether the thirdPartyPrincipal field is set.
*/
@java.lang.Override
public boolean hasThirdPartyPrincipal() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* The third party identification (if any) of the authenticated user making
* the request.
* When the JSON object represented here has a proto equivalent, the proto
* name will be indicated in the `@type` property.
*
* The third party identification (if any) of the authenticated user making
* the request.
* When the JSON object represented here has a proto equivalent, the proto
* name will be indicated in the `@type` property.
*
*
* .google.protobuf.Struct third_party_principal = 4;
*/
@java.lang.Override
public com.google.protobuf.StructOrBuilder getThirdPartyPrincipalOrBuilder() {
return thirdPartyPrincipal_ == null
? com.google.protobuf.Struct.getDefaultInstance()
: thirdPartyPrincipal_;
}
public static final int SERVICE_ACCOUNT_KEY_NAME_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private volatile java.lang.Object serviceAccountKeyName_ = "";
/**
*
*
*
* The name of the service account key used to create or exchange
* credentials for authenticating the service account making the request.
* This is a scheme-less URI full resource name. For example:
*
* "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}"
*
* The name of the service account key used to create or exchange
* credentials for authenticating the service account making the request.
* This is a scheme-less URI full resource name. For example:
*
* "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}"
*
*
* string service_account_key_name = 5;
*
* @return The bytes for serviceAccountKeyName.
*/
@java.lang.Override
public com.google.protobuf.ByteString getServiceAccountKeyNameBytes() {
java.lang.Object ref = serviceAccountKeyName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
serviceAccountKeyName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SERVICE_ACCOUNT_DELEGATION_INFO_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
private java.util.List
serviceAccountDelegationInfo_;
/**
*
*
*
* Identity delegation history of an authenticated service account that makes
* the request. It contains information on the real authorities that try to
* access GCP resources by delegating on a service account. When multiple
* authorities present, they are guaranteed to be sorted based on the original
* ordering of the identity delegation events.
*
* Identity delegation history of an authenticated service account that makes
* the request. It contains information on the real authorities that try to
* access GCP resources by delegating on a service account. When multiple
* authorities present, they are guaranteed to be sorted based on the original
* ordering of the identity delegation events.
*
* Identity delegation history of an authenticated service account that makes
* the request. It contains information on the real authorities that try to
* access GCP resources by delegating on a service account. When multiple
* authorities present, they are guaranteed to be sorted based on the original
* ordering of the identity delegation events.
*
* Identity delegation history of an authenticated service account that makes
* the request. It contains information on the real authorities that try to
* access GCP resources by delegating on a service account. When multiple
* authorities present, they are guaranteed to be sorted based on the original
* ordering of the identity delegation events.
*
* Identity delegation history of an authenticated service account that makes
* the request. It contains information on the real authorities that try to
* access GCP resources by delegating on a service account. When multiple
* authorities present, they are guaranteed to be sorted based on the original
* ordering of the identity delegation events.
*
*
*
* repeated .google.cloud.audit.ServiceAccountDelegationInfo service_account_delegation_info = 6;
*
*/
@java.lang.Override
public com.google.cloud.audit.ServiceAccountDelegationInfoOrBuilder
getServiceAccountDelegationInfoOrBuilder(int index) {
return serviceAccountDelegationInfo_.get(index);
}
public static final int PRINCIPAL_SUBJECT_FIELD_NUMBER = 8;
@SuppressWarnings("serial")
private volatile java.lang.Object principalSubject_ = "";
/**
*
*
*
* String representation of identity of requesting party.
* Populated for both first and third party identities.
*
* String representation of identity of requesting party.
* Populated for both first and third party identities.
*
*
* string principal_subject = 8;
*
* @return The bytes for principalSubject.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPrincipalSubjectBytes() {
java.lang.Object ref = principalSubject_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
principalSubject_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principalEmail_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, principalEmail_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authoritySelector_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, authoritySelector_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(4, getThirdPartyPrincipal());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountKeyName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, serviceAccountKeyName_);
}
for (int i = 0; i < serviceAccountDelegationInfo_.size(); i++) {
output.writeMessage(6, serviceAccountDelegationInfo_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principalSubject_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, principalSubject_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principalEmail_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, principalEmail_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authoritySelector_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, authoritySelector_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getThirdPartyPrincipal());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountKeyName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, serviceAccountKeyName_);
}
for (int i = 0; i < serviceAccountDelegationInfo_.size(); i++) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
6, serviceAccountDelegationInfo_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principalSubject_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, principalSubject_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.audit.AuthenticationInfo)) {
return super.equals(obj);
}
com.google.cloud.audit.AuthenticationInfo other =
(com.google.cloud.audit.AuthenticationInfo) obj;
if (!getPrincipalEmail().equals(other.getPrincipalEmail())) return false;
if (!getAuthoritySelector().equals(other.getAuthoritySelector())) return false;
if (hasThirdPartyPrincipal() != other.hasThirdPartyPrincipal()) return false;
if (hasThirdPartyPrincipal()) {
if (!getThirdPartyPrincipal().equals(other.getThirdPartyPrincipal())) return false;
}
if (!getServiceAccountKeyName().equals(other.getServiceAccountKeyName())) return false;
if (!getServiceAccountDelegationInfoList().equals(other.getServiceAccountDelegationInfoList()))
return false;
if (!getPrincipalSubject().equals(other.getPrincipalSubject())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + PRINCIPAL_EMAIL_FIELD_NUMBER;
hash = (53 * hash) + getPrincipalEmail().hashCode();
hash = (37 * hash) + AUTHORITY_SELECTOR_FIELD_NUMBER;
hash = (53 * hash) + getAuthoritySelector().hashCode();
if (hasThirdPartyPrincipal()) {
hash = (37 * hash) + THIRD_PARTY_PRINCIPAL_FIELD_NUMBER;
hash = (53 * hash) + getThirdPartyPrincipal().hashCode();
}
hash = (37 * hash) + SERVICE_ACCOUNT_KEY_NAME_FIELD_NUMBER;
hash = (53 * hash) + getServiceAccountKeyName().hashCode();
if (getServiceAccountDelegationInfoCount() > 0) {
hash = (37 * hash) + SERVICE_ACCOUNT_DELEGATION_INFO_FIELD_NUMBER;
hash = (53 * hash) + getServiceAccountDelegationInfoList().hashCode();
}
hash = (37 * hash) + PRINCIPAL_SUBJECT_FIELD_NUMBER;
hash = (53 * hash) + getPrincipalSubject().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.audit.AuthenticationInfo parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.audit.AuthenticationInfo parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.audit.AuthenticationInfo parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.audit.AuthenticationInfo parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.audit.AuthenticationInfo parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.audit.AuthenticationInfo parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.audit.AuthenticationInfo parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.audit.AuthenticationInfo parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.audit.AuthenticationInfo parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.audit.AuthenticationInfo parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.audit.AuthenticationInfo parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.audit.AuthenticationInfo parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.audit.AuthenticationInfo prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Authentication information for the operation.
*
*
* Protobuf type {@code google.cloud.audit.AuthenticationInfo}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.audit.AuthenticationInfo)
com.google.cloud.audit.AuthenticationInfoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.audit.AuditLogProto
.internal_static_google_cloud_audit_AuthenticationInfo_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.audit.AuditLogProto
.internal_static_google_cloud_audit_AuthenticationInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.audit.AuthenticationInfo.class,
com.google.cloud.audit.AuthenticationInfo.Builder.class);
}
// Construct using com.google.cloud.audit.AuthenticationInfo.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getThirdPartyPrincipalFieldBuilder();
getServiceAccountDelegationInfoFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
principalEmail_ = "";
authoritySelector_ = "";
thirdPartyPrincipal_ = null;
if (thirdPartyPrincipalBuilder_ != null) {
thirdPartyPrincipalBuilder_.dispose();
thirdPartyPrincipalBuilder_ = null;
}
serviceAccountKeyName_ = "";
if (serviceAccountDelegationInfoBuilder_ == null) {
serviceAccountDelegationInfo_ = java.util.Collections.emptyList();
} else {
serviceAccountDelegationInfo_ = null;
serviceAccountDelegationInfoBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
principalSubject_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.audit.AuditLogProto
.internal_static_google_cloud_audit_AuthenticationInfo_descriptor;
}
@java.lang.Override
public com.google.cloud.audit.AuthenticationInfo getDefaultInstanceForType() {
return com.google.cloud.audit.AuthenticationInfo.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.audit.AuthenticationInfo build() {
com.google.cloud.audit.AuthenticationInfo result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.audit.AuthenticationInfo buildPartial() {
com.google.cloud.audit.AuthenticationInfo result =
new com.google.cloud.audit.AuthenticationInfo(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.cloud.audit.AuthenticationInfo result) {
if (serviceAccountDelegationInfoBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0)) {
serviceAccountDelegationInfo_ =
java.util.Collections.unmodifiableList(serviceAccountDelegationInfo_);
bitField0_ = (bitField0_ & ~0x00000010);
}
result.serviceAccountDelegationInfo_ = serviceAccountDelegationInfo_;
} else {
result.serviceAccountDelegationInfo_ = serviceAccountDelegationInfoBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.audit.AuthenticationInfo result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.principalEmail_ = principalEmail_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.authoritySelector_ = authoritySelector_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.thirdPartyPrincipal_ =
thirdPartyPrincipalBuilder_ == null
? thirdPartyPrincipal_
: thirdPartyPrincipalBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.serviceAccountKeyName_ = serviceAccountKeyName_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.principalSubject_ = principalSubject_;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.audit.AuthenticationInfo) {
return mergeFrom((com.google.cloud.audit.AuthenticationInfo) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.audit.AuthenticationInfo other) {
if (other == com.google.cloud.audit.AuthenticationInfo.getDefaultInstance()) return this;
if (!other.getPrincipalEmail().isEmpty()) {
principalEmail_ = other.principalEmail_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getAuthoritySelector().isEmpty()) {
authoritySelector_ = other.authoritySelector_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasThirdPartyPrincipal()) {
mergeThirdPartyPrincipal(other.getThirdPartyPrincipal());
}
if (!other.getServiceAccountKeyName().isEmpty()) {
serviceAccountKeyName_ = other.serviceAccountKeyName_;
bitField0_ |= 0x00000008;
onChanged();
}
if (serviceAccountDelegationInfoBuilder_ == null) {
if (!other.serviceAccountDelegationInfo_.isEmpty()) {
if (serviceAccountDelegationInfo_.isEmpty()) {
serviceAccountDelegationInfo_ = other.serviceAccountDelegationInfo_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureServiceAccountDelegationInfoIsMutable();
serviceAccountDelegationInfo_.addAll(other.serviceAccountDelegationInfo_);
}
onChanged();
}
} else {
if (!other.serviceAccountDelegationInfo_.isEmpty()) {
if (serviceAccountDelegationInfoBuilder_.isEmpty()) {
serviceAccountDelegationInfoBuilder_.dispose();
serviceAccountDelegationInfoBuilder_ = null;
serviceAccountDelegationInfo_ = other.serviceAccountDelegationInfo_;
bitField0_ = (bitField0_ & ~0x00000010);
serviceAccountDelegationInfoBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getServiceAccountDelegationInfoFieldBuilder()
: null;
} else {
serviceAccountDelegationInfoBuilder_.addAllMessages(
other.serviceAccountDelegationInfo_);
}
}
}
if (!other.getPrincipalSubject().isEmpty()) {
principalSubject_ = other.principalSubject_;
bitField0_ |= 0x00000020;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
principalEmail_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
authoritySelector_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 34:
{
input.readMessage(
getThirdPartyPrincipalFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 34
case 42:
{
serviceAccountKeyName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 42
case 50:
{
com.google.cloud.audit.ServiceAccountDelegationInfo m =
input.readMessage(
com.google.cloud.audit.ServiceAccountDelegationInfo.parser(),
extensionRegistry);
if (serviceAccountDelegationInfoBuilder_ == null) {
ensureServiceAccountDelegationInfoIsMutable();
serviceAccountDelegationInfo_.add(m);
} else {
serviceAccountDelegationInfoBuilder_.addMessage(m);
}
break;
} // case 50
case 66:
{
principalSubject_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000020;
break;
} // case 66
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) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object principalEmail_ = "";
/**
*
*
*
* The email address of the authenticated user (or service account on behalf
* of third party principal) making the request. For third party identity
* callers, the `principal_subject` field is populated instead of this field.
* For privacy reasons, the principal email address is sometimes redacted.
* For more information, see [Caller identities in audit
* logs](https://cloud.google.com/logging/docs/audit#user-id).
*
* The email address of the authenticated user (or service account on behalf
* of third party principal) making the request. For third party identity
* callers, the `principal_subject` field is populated instead of this field.
* For privacy reasons, the principal email address is sometimes redacted.
* For more information, see [Caller identities in audit
* logs](https://cloud.google.com/logging/docs/audit#user-id).
*
*
* string principal_email = 1;
*
* @return The bytes for principalEmail.
*/
public com.google.protobuf.ByteString getPrincipalEmailBytes() {
java.lang.Object ref = principalEmail_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
principalEmail_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The email address of the authenticated user (or service account on behalf
* of third party principal) making the request. For third party identity
* callers, the `principal_subject` field is populated instead of this field.
* For privacy reasons, the principal email address is sometimes redacted.
* For more information, see [Caller identities in audit
* logs](https://cloud.google.com/logging/docs/audit#user-id).
*
*
* string principal_email = 1;
*
* @param value The principalEmail to set.
* @return This builder for chaining.
*/
public Builder setPrincipalEmail(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
principalEmail_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The email address of the authenticated user (or service account on behalf
* of third party principal) making the request. For third party identity
* callers, the `principal_subject` field is populated instead of this field.
* For privacy reasons, the principal email address is sometimes redacted.
* For more information, see [Caller identities in audit
* logs](https://cloud.google.com/logging/docs/audit#user-id).
*
* The email address of the authenticated user (or service account on behalf
* of third party principal) making the request. For third party identity
* callers, the `principal_subject` field is populated instead of this field.
* For privacy reasons, the principal email address is sometimes redacted.
* For more information, see [Caller identities in audit
* logs](https://cloud.google.com/logging/docs/audit#user-id).
*
*
* string principal_email = 1;
*
* @param value The bytes for principalEmail to set.
* @return This builder for chaining.
*/
public Builder setPrincipalEmailBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
principalEmail_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object authoritySelector_ = "";
/**
*
*
*
* The authority selector specified by the requestor, if any.
* It is not guaranteed that the principal was allowed to use this authority.
*
* The authority selector specified by the requestor, if any.
* It is not guaranteed that the principal was allowed to use this authority.
*
*
* string authority_selector = 2;
*
* @param value The bytes for authoritySelector to set.
* @return This builder for chaining.
*/
public Builder setAuthoritySelectorBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
authoritySelector_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private com.google.protobuf.Struct thirdPartyPrincipal_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct,
com.google.protobuf.Struct.Builder,
com.google.protobuf.StructOrBuilder>
thirdPartyPrincipalBuilder_;
/**
*
*
*
* The third party identification (if any) of the authenticated user making
* the request.
* When the JSON object represented here has a proto equivalent, the proto
* name will be indicated in the `@type` property.
*
*
* .google.protobuf.Struct third_party_principal = 4;
*
* @return Whether the thirdPartyPrincipal field is set.
*/
public boolean hasThirdPartyPrincipal() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* The third party identification (if any) of the authenticated user making
* the request.
* When the JSON object represented here has a proto equivalent, the proto
* name will be indicated in the `@type` property.
*
* The third party identification (if any) of the authenticated user making
* the request.
* When the JSON object represented here has a proto equivalent, the proto
* name will be indicated in the `@type` property.
*
* The third party identification (if any) of the authenticated user making
* the request.
* When the JSON object represented here has a proto equivalent, the proto
* name will be indicated in the `@type` property.
*
* The third party identification (if any) of the authenticated user making
* the request.
* When the JSON object represented here has a proto equivalent, the proto
* name will be indicated in the `@type` property.
*
* The third party identification (if any) of the authenticated user making
* the request.
* When the JSON object represented here has a proto equivalent, the proto
* name will be indicated in the `@type` property.
*
* The third party identification (if any) of the authenticated user making
* the request.
* When the JSON object represented here has a proto equivalent, the proto
* name will be indicated in the `@type` property.
*
* The third party identification (if any) of the authenticated user making
* the request.
* When the JSON object represented here has a proto equivalent, the proto
* name will be indicated in the `@type` property.
*
* The third party identification (if any) of the authenticated user making
* the request.
* When the JSON object represented here has a proto equivalent, the proto
* name will be indicated in the `@type` property.
*
* The name of the service account key used to create or exchange
* credentials for authenticating the service account making the request.
* This is a scheme-less URI full resource name. For example:
*
* "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}"
*
* The name of the service account key used to create or exchange
* credentials for authenticating the service account making the request.
* This is a scheme-less URI full resource name. For example:
*
* "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}"
*
*
* string service_account_key_name = 5;
*
* @return The bytes for serviceAccountKeyName.
*/
public com.google.protobuf.ByteString getServiceAccountKeyNameBytes() {
java.lang.Object ref = serviceAccountKeyName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
serviceAccountKeyName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The name of the service account key used to create or exchange
* credentials for authenticating the service account making the request.
* This is a scheme-less URI full resource name. For example:
*
* "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}"
*
*
* string service_account_key_name = 5;
*
* @param value The serviceAccountKeyName to set.
* @return This builder for chaining.
*/
public Builder setServiceAccountKeyName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
serviceAccountKeyName_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* The name of the service account key used to create or exchange
* credentials for authenticating the service account making the request.
* This is a scheme-less URI full resource name. For example:
*
* "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}"
*
* The name of the service account key used to create or exchange
* credentials for authenticating the service account making the request.
* This is a scheme-less URI full resource name. For example:
*
* "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}"
*
*
* string service_account_key_name = 5;
*
* @param value The bytes for serviceAccountKeyName to set.
* @return This builder for chaining.
*/
public Builder setServiceAccountKeyNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
serviceAccountKeyName_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private java.util.List
serviceAccountDelegationInfo_ = java.util.Collections.emptyList();
private void ensureServiceAccountDelegationInfoIsMutable() {
if (!((bitField0_ & 0x00000010) != 0)) {
serviceAccountDelegationInfo_ =
new java.util.ArrayList(
serviceAccountDelegationInfo_);
bitField0_ |= 0x00000010;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.audit.ServiceAccountDelegationInfo,
com.google.cloud.audit.ServiceAccountDelegationInfo.Builder,
com.google.cloud.audit.ServiceAccountDelegationInfoOrBuilder>
serviceAccountDelegationInfoBuilder_;
/**
*
*
*
* Identity delegation history of an authenticated service account that makes
* the request. It contains information on the real authorities that try to
* access GCP resources by delegating on a service account. When multiple
* authorities present, they are guaranteed to be sorted based on the original
* ordering of the identity delegation events.
*
* Identity delegation history of an authenticated service account that makes
* the request. It contains information on the real authorities that try to
* access GCP resources by delegating on a service account. When multiple
* authorities present, they are guaranteed to be sorted based on the original
* ordering of the identity delegation events.
*
* Identity delegation history of an authenticated service account that makes
* the request. It contains information on the real authorities that try to
* access GCP resources by delegating on a service account. When multiple
* authorities present, they are guaranteed to be sorted based on the original
* ordering of the identity delegation events.
*
* Identity delegation history of an authenticated service account that makes
* the request. It contains information on the real authorities that try to
* access GCP resources by delegating on a service account. When multiple
* authorities present, they are guaranteed to be sorted based on the original
* ordering of the identity delegation events.
*
*
*
* repeated .google.cloud.audit.ServiceAccountDelegationInfo service_account_delegation_info = 6;
*
*/
public Builder setServiceAccountDelegationInfo(
int index, com.google.cloud.audit.ServiceAccountDelegationInfo value) {
if (serviceAccountDelegationInfoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureServiceAccountDelegationInfoIsMutable();
serviceAccountDelegationInfo_.set(index, value);
onChanged();
} else {
serviceAccountDelegationInfoBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Identity delegation history of an authenticated service account that makes
* the request. It contains information on the real authorities that try to
* access GCP resources by delegating on a service account. When multiple
* authorities present, they are guaranteed to be sorted based on the original
* ordering of the identity delegation events.
*
* Identity delegation history of an authenticated service account that makes
* the request. It contains information on the real authorities that try to
* access GCP resources by delegating on a service account. When multiple
* authorities present, they are guaranteed to be sorted based on the original
* ordering of the identity delegation events.
*
* Identity delegation history of an authenticated service account that makes
* the request. It contains information on the real authorities that try to
* access GCP resources by delegating on a service account. When multiple
* authorities present, they are guaranteed to be sorted based on the original
* ordering of the identity delegation events.
*
*
*
* repeated .google.cloud.audit.ServiceAccountDelegationInfo service_account_delegation_info = 6;
*
*/
public Builder addServiceAccountDelegationInfo(
int index, com.google.cloud.audit.ServiceAccountDelegationInfo value) {
if (serviceAccountDelegationInfoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureServiceAccountDelegationInfoIsMutable();
serviceAccountDelegationInfo_.add(index, value);
onChanged();
} else {
serviceAccountDelegationInfoBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Identity delegation history of an authenticated service account that makes
* the request. It contains information on the real authorities that try to
* access GCP resources by delegating on a service account. When multiple
* authorities present, they are guaranteed to be sorted based on the original
* ordering of the identity delegation events.
*
* Identity delegation history of an authenticated service account that makes
* the request. It contains information on the real authorities that try to
* access GCP resources by delegating on a service account. When multiple
* authorities present, they are guaranteed to be sorted based on the original
* ordering of the identity delegation events.
*
* Identity delegation history of an authenticated service account that makes
* the request. It contains information on the real authorities that try to
* access GCP resources by delegating on a service account. When multiple
* authorities present, they are guaranteed to be sorted based on the original
* ordering of the identity delegation events.
*
* Identity delegation history of an authenticated service account that makes
* the request. It contains information on the real authorities that try to
* access GCP resources by delegating on a service account. When multiple
* authorities present, they are guaranteed to be sorted based on the original
* ordering of the identity delegation events.
*
* Identity delegation history of an authenticated service account that makes
* the request. It contains information on the real authorities that try to
* access GCP resources by delegating on a service account. When multiple
* authorities present, they are guaranteed to be sorted based on the original
* ordering of the identity delegation events.
*
* Identity delegation history of an authenticated service account that makes
* the request. It contains information on the real authorities that try to
* access GCP resources by delegating on a service account. When multiple
* authorities present, they are guaranteed to be sorted based on the original
* ordering of the identity delegation events.
*
* Identity delegation history of an authenticated service account that makes
* the request. It contains information on the real authorities that try to
* access GCP resources by delegating on a service account. When multiple
* authorities present, they are guaranteed to be sorted based on the original
* ordering of the identity delegation events.
*
* Identity delegation history of an authenticated service account that makes
* the request. It contains information on the real authorities that try to
* access GCP resources by delegating on a service account. When multiple
* authorities present, they are guaranteed to be sorted based on the original
* ordering of the identity delegation events.
*
* Identity delegation history of an authenticated service account that makes
* the request. It contains information on the real authorities that try to
* access GCP resources by delegating on a service account. When multiple
* authorities present, they are guaranteed to be sorted based on the original
* ordering of the identity delegation events.
*
* Identity delegation history of an authenticated service account that makes
* the request. It contains information on the real authorities that try to
* access GCP resources by delegating on a service account. When multiple
* authorities present, they are guaranteed to be sorted based on the original
* ordering of the identity delegation events.
*
* Identity delegation history of an authenticated service account that makes
* the request. It contains information on the real authorities that try to
* access GCP resources by delegating on a service account. When multiple
* authorities present, they are guaranteed to be sorted based on the original
* ordering of the identity delegation events.
*