implements
// @@protoc_insertion_point(builder_implements:google.cloud.audit.RequestMetadata)
com.google.cloud.audit.RequestMetadataOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.audit.AuditLogProto
.internal_static_google_cloud_audit_RequestMetadata_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.audit.AuditLogProto
.internal_static_google_cloud_audit_RequestMetadata_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.audit.RequestMetadata.class,
com.google.cloud.audit.RequestMetadata.Builder.class);
}
// Construct using com.google.cloud.audit.RequestMetadata.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getRequestAttributesFieldBuilder();
getDestinationAttributesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
callerIp_ = "";
callerSuppliedUserAgent_ = "";
callerNetwork_ = "";
requestAttributes_ = null;
if (requestAttributesBuilder_ != null) {
requestAttributesBuilder_.dispose();
requestAttributesBuilder_ = null;
}
destinationAttributes_ = null;
if (destinationAttributesBuilder_ != null) {
destinationAttributesBuilder_.dispose();
destinationAttributesBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.audit.AuditLogProto
.internal_static_google_cloud_audit_RequestMetadata_descriptor;
}
@java.lang.Override
public com.google.cloud.audit.RequestMetadata getDefaultInstanceForType() {
return com.google.cloud.audit.RequestMetadata.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.audit.RequestMetadata build() {
com.google.cloud.audit.RequestMetadata result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.audit.RequestMetadata buildPartial() {
com.google.cloud.audit.RequestMetadata result =
new com.google.cloud.audit.RequestMetadata(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.audit.RequestMetadata result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.callerIp_ = callerIp_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.callerSuppliedUserAgent_ = callerSuppliedUserAgent_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.callerNetwork_ = callerNetwork_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000008) != 0)) {
result.requestAttributes_ =
requestAttributesBuilder_ == null
? requestAttributes_
: requestAttributesBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.destinationAttributes_ =
destinationAttributesBuilder_ == null
? destinationAttributes_
: destinationAttributesBuilder_.build();
to_bitField0_ |= 0x00000002;
}
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.RequestMetadata) {
return mergeFrom((com.google.cloud.audit.RequestMetadata) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.audit.RequestMetadata other) {
if (other == com.google.cloud.audit.RequestMetadata.getDefaultInstance()) return this;
if (!other.getCallerIp().isEmpty()) {
callerIp_ = other.callerIp_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getCallerSuppliedUserAgent().isEmpty()) {
callerSuppliedUserAgent_ = other.callerSuppliedUserAgent_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getCallerNetwork().isEmpty()) {
callerNetwork_ = other.callerNetwork_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.hasRequestAttributes()) {
mergeRequestAttributes(other.getRequestAttributes());
}
if (other.hasDestinationAttributes()) {
mergeDestinationAttributes(other.getDestinationAttributes());
}
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:
{
callerIp_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
callerSuppliedUserAgent_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
callerNetwork_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 58:
{
input.readMessage(
getRequestAttributesFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 58
case 66:
{
input.readMessage(
getDestinationAttributesFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000010;
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 callerIp_ = "";
/**
*
*
*
* The IP address of the caller.
* For a caller from the internet, this will be the public IPv4 or IPv6
* address. For calls made from inside Google's internal production network
* from one GCP service to another, `caller_ip` will be redacted to "private".
* For a caller from a Compute Engine VM with a external IP address,
* `caller_ip` will be the VM's external IP address. For a caller from a
* Compute Engine VM without a external IP address, if the VM is in the same
* organization (or project) as the accessed resource, `caller_ip` will be the
* VM's internal IPv4 address, otherwise `caller_ip` will be redacted to
* "gce-internal-ip". See https://cloud.google.com/compute/docs/vpc/ for more
* information.
*
*
* string caller_ip = 1;
*
* @return The callerIp.
*/
public java.lang.String getCallerIp() {
java.lang.Object ref = callerIp_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
callerIp_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The IP address of the caller.
* For a caller from the internet, this will be the public IPv4 or IPv6
* address. For calls made from inside Google's internal production network
* from one GCP service to another, `caller_ip` will be redacted to "private".
* For a caller from a Compute Engine VM with a external IP address,
* `caller_ip` will be the VM's external IP address. For a caller from a
* Compute Engine VM without a external IP address, if the VM is in the same
* organization (or project) as the accessed resource, `caller_ip` will be the
* VM's internal IPv4 address, otherwise `caller_ip` will be redacted to
* "gce-internal-ip". See https://cloud.google.com/compute/docs/vpc/ for more
* information.
*
*
* string caller_ip = 1;
*
* @return The bytes for callerIp.
*/
public com.google.protobuf.ByteString getCallerIpBytes() {
java.lang.Object ref = callerIp_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
callerIp_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The IP address of the caller.
* For a caller from the internet, this will be the public IPv4 or IPv6
* address. For calls made from inside Google's internal production network
* from one GCP service to another, `caller_ip` will be redacted to "private".
* For a caller from a Compute Engine VM with a external IP address,
* `caller_ip` will be the VM's external IP address. For a caller from a
* Compute Engine VM without a external IP address, if the VM is in the same
* organization (or project) as the accessed resource, `caller_ip` will be the
* VM's internal IPv4 address, otherwise `caller_ip` will be redacted to
* "gce-internal-ip". See https://cloud.google.com/compute/docs/vpc/ for more
* information.
*
*
* string caller_ip = 1;
*
* @param value The callerIp to set.
* @return This builder for chaining.
*/
public Builder setCallerIp(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
callerIp_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The IP address of the caller.
* For a caller from the internet, this will be the public IPv4 or IPv6
* address. For calls made from inside Google's internal production network
* from one GCP service to another, `caller_ip` will be redacted to "private".
* For a caller from a Compute Engine VM with a external IP address,
* `caller_ip` will be the VM's external IP address. For a caller from a
* Compute Engine VM without a external IP address, if the VM is in the same
* organization (or project) as the accessed resource, `caller_ip` will be the
* VM's internal IPv4 address, otherwise `caller_ip` will be redacted to
* "gce-internal-ip". See https://cloud.google.com/compute/docs/vpc/ for more
* information.
*
*
* string caller_ip = 1;
*
* @return This builder for chaining.
*/
public Builder clearCallerIp() {
callerIp_ = getDefaultInstance().getCallerIp();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* The IP address of the caller.
* For a caller from the internet, this will be the public IPv4 or IPv6
* address. For calls made from inside Google's internal production network
* from one GCP service to another, `caller_ip` will be redacted to "private".
* For a caller from a Compute Engine VM with a external IP address,
* `caller_ip` will be the VM's external IP address. For a caller from a
* Compute Engine VM without a external IP address, if the VM is in the same
* organization (or project) as the accessed resource, `caller_ip` will be the
* VM's internal IPv4 address, otherwise `caller_ip` will be redacted to
* "gce-internal-ip". See https://cloud.google.com/compute/docs/vpc/ for more
* information.
*
*
* string caller_ip = 1;
*
* @param value The bytes for callerIp to set.
* @return This builder for chaining.
*/
public Builder setCallerIpBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
callerIp_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object callerSuppliedUserAgent_ = "";
/**
*
*
*
* The user agent of the caller.
* This information is not authenticated and should be treated accordingly.
* For example:
*
* + `google-api-python-client/1.4.0`:
* The request was made by the Google API client for Python.
* + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
* The request was made by the Google Cloud SDK CLI (gcloud).
* + `AppEngine-Google; (+http://code.google.com/appengine; appid:
* s~my-project`:
* The request was made from the `my-project` App Engine app.
*
*
* string caller_supplied_user_agent = 2;
*
* @return The callerSuppliedUserAgent.
*/
public java.lang.String getCallerSuppliedUserAgent() {
java.lang.Object ref = callerSuppliedUserAgent_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
callerSuppliedUserAgent_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The user agent of the caller.
* This information is not authenticated and should be treated accordingly.
* For example:
*
* + `google-api-python-client/1.4.0`:
* The request was made by the Google API client for Python.
* + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
* The request was made by the Google Cloud SDK CLI (gcloud).
* + `AppEngine-Google; (+http://code.google.com/appengine; appid:
* s~my-project`:
* The request was made from the `my-project` App Engine app.
*
*
* string caller_supplied_user_agent = 2;
*
* @return The bytes for callerSuppliedUserAgent.
*/
public com.google.protobuf.ByteString getCallerSuppliedUserAgentBytes() {
java.lang.Object ref = callerSuppliedUserAgent_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
callerSuppliedUserAgent_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The user agent of the caller.
* This information is not authenticated and should be treated accordingly.
* For example:
*
* + `google-api-python-client/1.4.0`:
* The request was made by the Google API client for Python.
* + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
* The request was made by the Google Cloud SDK CLI (gcloud).
* + `AppEngine-Google; (+http://code.google.com/appengine; appid:
* s~my-project`:
* The request was made from the `my-project` App Engine app.
*
*
* string caller_supplied_user_agent = 2;
*
* @param value The callerSuppliedUserAgent to set.
* @return This builder for chaining.
*/
public Builder setCallerSuppliedUserAgent(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
callerSuppliedUserAgent_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* The user agent of the caller.
* This information is not authenticated and should be treated accordingly.
* For example:
*
* + `google-api-python-client/1.4.0`:
* The request was made by the Google API client for Python.
* + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
* The request was made by the Google Cloud SDK CLI (gcloud).
* + `AppEngine-Google; (+http://code.google.com/appengine; appid:
* s~my-project`:
* The request was made from the `my-project` App Engine app.
*
*
* string caller_supplied_user_agent = 2;
*
* @return This builder for chaining.
*/
public Builder clearCallerSuppliedUserAgent() {
callerSuppliedUserAgent_ = getDefaultInstance().getCallerSuppliedUserAgent();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* The user agent of the caller.
* This information is not authenticated and should be treated accordingly.
* For example:
*
* + `google-api-python-client/1.4.0`:
* The request was made by the Google API client for Python.
* + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
* The request was made by the Google Cloud SDK CLI (gcloud).
* + `AppEngine-Google; (+http://code.google.com/appengine; appid:
* s~my-project`:
* The request was made from the `my-project` App Engine app.
*
*
* string caller_supplied_user_agent = 2;
*
* @param value The bytes for callerSuppliedUserAgent to set.
* @return This builder for chaining.
*/
public Builder setCallerSuppliedUserAgentBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
callerSuppliedUserAgent_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object callerNetwork_ = "";
/**
*
*
*
* The network of the caller.
* Set only if the network host project is part of the same GCP organization
* (or project) as the accessed resource.
* See https://cloud.google.com/compute/docs/vpc/ for more information.
* This is a scheme-less URI full resource name. For example:
*
* "//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID"
*
*
* string caller_network = 3;
*
* @return The callerNetwork.
*/
public java.lang.String getCallerNetwork() {
java.lang.Object ref = callerNetwork_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
callerNetwork_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The network of the caller.
* Set only if the network host project is part of the same GCP organization
* (or project) as the accessed resource.
* See https://cloud.google.com/compute/docs/vpc/ for more information.
* This is a scheme-less URI full resource name. For example:
*
* "//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID"
*
*
* string caller_network = 3;
*
* @return The bytes for callerNetwork.
*/
public com.google.protobuf.ByteString getCallerNetworkBytes() {
java.lang.Object ref = callerNetwork_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
callerNetwork_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The network of the caller.
* Set only if the network host project is part of the same GCP organization
* (or project) as the accessed resource.
* See https://cloud.google.com/compute/docs/vpc/ for more information.
* This is a scheme-less URI full resource name. For example:
*
* "//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID"
*
*
* string caller_network = 3;
*
* @param value The callerNetwork to set.
* @return This builder for chaining.
*/
public Builder setCallerNetwork(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
callerNetwork_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* The network of the caller.
* Set only if the network host project is part of the same GCP organization
* (or project) as the accessed resource.
* See https://cloud.google.com/compute/docs/vpc/ for more information.
* This is a scheme-less URI full resource name. For example:
*
* "//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID"
*
*
* string caller_network = 3;
*
* @return This builder for chaining.
*/
public Builder clearCallerNetwork() {
callerNetwork_ = getDefaultInstance().getCallerNetwork();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* The network of the caller.
* Set only if the network host project is part of the same GCP organization
* (or project) as the accessed resource.
* See https://cloud.google.com/compute/docs/vpc/ for more information.
* This is a scheme-less URI full resource name. For example:
*
* "//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID"
*
*
* string caller_network = 3;
*
* @param value The bytes for callerNetwork to set.
* @return This builder for chaining.
*/
public Builder setCallerNetworkBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
callerNetwork_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private com.google.rpc.context.AttributeContext.Request requestAttributes_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.rpc.context.AttributeContext.Request,
com.google.rpc.context.AttributeContext.Request.Builder,
com.google.rpc.context.AttributeContext.RequestOrBuilder>
requestAttributesBuilder_;
/**
*
*
*
* Request attributes used in IAM condition evaluation. This field contains
* request attributes like request time and access levels associated with
* the request.
*
*
* To get the whole view of the attributes used in IAM
* condition evaluation, the user must also look into
* `AuditLog.authentication_info.resource_attributes`.
*
*
* .google.rpc.context.AttributeContext.Request request_attributes = 7;
*
* @return Whether the requestAttributes field is set.
*/
public boolean hasRequestAttributes() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Request attributes used in IAM condition evaluation. This field contains
* request attributes like request time and access levels associated with
* the request.
*
*
* To get the whole view of the attributes used in IAM
* condition evaluation, the user must also look into
* `AuditLog.authentication_info.resource_attributes`.
*
*
* .google.rpc.context.AttributeContext.Request request_attributes = 7;
*
* @return The requestAttributes.
*/
public com.google.rpc.context.AttributeContext.Request getRequestAttributes() {
if (requestAttributesBuilder_ == null) {
return requestAttributes_ == null
? com.google.rpc.context.AttributeContext.Request.getDefaultInstance()
: requestAttributes_;
} else {
return requestAttributesBuilder_.getMessage();
}
}
/**
*
*
*
* Request attributes used in IAM condition evaluation. This field contains
* request attributes like request time and access levels associated with
* the request.
*
*
* To get the whole view of the attributes used in IAM
* condition evaluation, the user must also look into
* `AuditLog.authentication_info.resource_attributes`.
*
*
* .google.rpc.context.AttributeContext.Request request_attributes = 7;
*/
public Builder setRequestAttributes(com.google.rpc.context.AttributeContext.Request value) {
if (requestAttributesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
requestAttributes_ = value;
} else {
requestAttributesBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Request attributes used in IAM condition evaluation. This field contains
* request attributes like request time and access levels associated with
* the request.
*
*
* To get the whole view of the attributes used in IAM
* condition evaluation, the user must also look into
* `AuditLog.authentication_info.resource_attributes`.
*
*
* .google.rpc.context.AttributeContext.Request request_attributes = 7;
*/
public Builder setRequestAttributes(
com.google.rpc.context.AttributeContext.Request.Builder builderForValue) {
if (requestAttributesBuilder_ == null) {
requestAttributes_ = builderForValue.build();
} else {
requestAttributesBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Request attributes used in IAM condition evaluation. This field contains
* request attributes like request time and access levels associated with
* the request.
*
*
* To get the whole view of the attributes used in IAM
* condition evaluation, the user must also look into
* `AuditLog.authentication_info.resource_attributes`.
*
*
* .google.rpc.context.AttributeContext.Request request_attributes = 7;
*/
public Builder mergeRequestAttributes(com.google.rpc.context.AttributeContext.Request value) {
if (requestAttributesBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)
&& requestAttributes_ != null
&& requestAttributes_
!= com.google.rpc.context.AttributeContext.Request.getDefaultInstance()) {
getRequestAttributesBuilder().mergeFrom(value);
} else {
requestAttributes_ = value;
}
} else {
requestAttributesBuilder_.mergeFrom(value);
}
if (requestAttributes_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
*
*
* Request attributes used in IAM condition evaluation. This field contains
* request attributes like request time and access levels associated with
* the request.
*
*
* To get the whole view of the attributes used in IAM
* condition evaluation, the user must also look into
* `AuditLog.authentication_info.resource_attributes`.
*
*
* .google.rpc.context.AttributeContext.Request request_attributes = 7;
*/
public Builder clearRequestAttributes() {
bitField0_ = (bitField0_ & ~0x00000008);
requestAttributes_ = null;
if (requestAttributesBuilder_ != null) {
requestAttributesBuilder_.dispose();
requestAttributesBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Request attributes used in IAM condition evaluation. This field contains
* request attributes like request time and access levels associated with
* the request.
*
*
* To get the whole view of the attributes used in IAM
* condition evaluation, the user must also look into
* `AuditLog.authentication_info.resource_attributes`.
*
*
* .google.rpc.context.AttributeContext.Request request_attributes = 7;
*/
public com.google.rpc.context.AttributeContext.Request.Builder getRequestAttributesBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getRequestAttributesFieldBuilder().getBuilder();
}
/**
*
*
*
* Request attributes used in IAM condition evaluation. This field contains
* request attributes like request time and access levels associated with
* the request.
*
*
* To get the whole view of the attributes used in IAM
* condition evaluation, the user must also look into
* `AuditLog.authentication_info.resource_attributes`.
*
*
* .google.rpc.context.AttributeContext.Request request_attributes = 7;
*/
public com.google.rpc.context.AttributeContext.RequestOrBuilder
getRequestAttributesOrBuilder() {
if (requestAttributesBuilder_ != null) {
return requestAttributesBuilder_.getMessageOrBuilder();
} else {
return requestAttributes_ == null
? com.google.rpc.context.AttributeContext.Request.getDefaultInstance()
: requestAttributes_;
}
}
/**
*
*
*
* Request attributes used in IAM condition evaluation. This field contains
* request attributes like request time and access levels associated with
* the request.
*
*
* To get the whole view of the attributes used in IAM
* condition evaluation, the user must also look into
* `AuditLog.authentication_info.resource_attributes`.
*
*
* .google.rpc.context.AttributeContext.Request request_attributes = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.rpc.context.AttributeContext.Request,
com.google.rpc.context.AttributeContext.Request.Builder,
com.google.rpc.context.AttributeContext.RequestOrBuilder>
getRequestAttributesFieldBuilder() {
if (requestAttributesBuilder_ == null) {
requestAttributesBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.rpc.context.AttributeContext.Request,
com.google.rpc.context.AttributeContext.Request.Builder,
com.google.rpc.context.AttributeContext.RequestOrBuilder>(
getRequestAttributes(), getParentForChildren(), isClean());
requestAttributes_ = null;
}
return requestAttributesBuilder_;
}
private com.google.rpc.context.AttributeContext.Peer destinationAttributes_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.rpc.context.AttributeContext.Peer,
com.google.rpc.context.AttributeContext.Peer.Builder,
com.google.rpc.context.AttributeContext.PeerOrBuilder>
destinationAttributesBuilder_;
/**
*
*
*
* The destination of a network activity, such as accepting a TCP connection.
* In a multi hop network activity, the destination represents the receiver of
* the last hop. Only two fields are used in this message, Peer.port and
* Peer.ip. These fields are optionally populated by those services utilizing
* the IAM condition feature.
*
*
* .google.rpc.context.AttributeContext.Peer destination_attributes = 8;
*
* @return Whether the destinationAttributes field is set.
*/
public boolean hasDestinationAttributes() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
*
*
* The destination of a network activity, such as accepting a TCP connection.
* In a multi hop network activity, the destination represents the receiver of
* the last hop. Only two fields are used in this message, Peer.port and
* Peer.ip. These fields are optionally populated by those services utilizing
* the IAM condition feature.
*
*
* .google.rpc.context.AttributeContext.Peer destination_attributes = 8;
*
* @return The destinationAttributes.
*/
public com.google.rpc.context.AttributeContext.Peer getDestinationAttributes() {
if (destinationAttributesBuilder_ == null) {
return destinationAttributes_ == null
? com.google.rpc.context.AttributeContext.Peer.getDefaultInstance()
: destinationAttributes_;
} else {
return destinationAttributesBuilder_.getMessage();
}
}
/**
*
*
*
* The destination of a network activity, such as accepting a TCP connection.
* In a multi hop network activity, the destination represents the receiver of
* the last hop. Only two fields are used in this message, Peer.port and
* Peer.ip. These fields are optionally populated by those services utilizing
* the IAM condition feature.
*
*
* .google.rpc.context.AttributeContext.Peer destination_attributes = 8;
*/
public Builder setDestinationAttributes(com.google.rpc.context.AttributeContext.Peer value) {
if (destinationAttributesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
destinationAttributes_ = value;
} else {
destinationAttributesBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* The destination of a network activity, such as accepting a TCP connection.
* In a multi hop network activity, the destination represents the receiver of
* the last hop. Only two fields are used in this message, Peer.port and
* Peer.ip. These fields are optionally populated by those services utilizing
* the IAM condition feature.
*
*
* .google.rpc.context.AttributeContext.Peer destination_attributes = 8;
*/
public Builder setDestinationAttributes(
com.google.rpc.context.AttributeContext.Peer.Builder builderForValue) {
if (destinationAttributesBuilder_ == null) {
destinationAttributes_ = builderForValue.build();
} else {
destinationAttributesBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* The destination of a network activity, such as accepting a TCP connection.
* In a multi hop network activity, the destination represents the receiver of
* the last hop. Only two fields are used in this message, Peer.port and
* Peer.ip. These fields are optionally populated by those services utilizing
* the IAM condition feature.
*
*
* .google.rpc.context.AttributeContext.Peer destination_attributes = 8;
*/
public Builder mergeDestinationAttributes(com.google.rpc.context.AttributeContext.Peer value) {
if (destinationAttributesBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0)
&& destinationAttributes_ != null
&& destinationAttributes_
!= com.google.rpc.context.AttributeContext.Peer.getDefaultInstance()) {
getDestinationAttributesBuilder().mergeFrom(value);
} else {
destinationAttributes_ = value;
}
} else {
destinationAttributesBuilder_.mergeFrom(value);
}
if (destinationAttributes_ != null) {
bitField0_ |= 0x00000010;
onChanged();
}
return this;
}
/**
*
*
*
* The destination of a network activity, such as accepting a TCP connection.
* In a multi hop network activity, the destination represents the receiver of
* the last hop. Only two fields are used in this message, Peer.port and
* Peer.ip. These fields are optionally populated by those services utilizing
* the IAM condition feature.
*
*
* .google.rpc.context.AttributeContext.Peer destination_attributes = 8;
*/
public Builder clearDestinationAttributes() {
bitField0_ = (bitField0_ & ~0x00000010);
destinationAttributes_ = null;
if (destinationAttributesBuilder_ != null) {
destinationAttributesBuilder_.dispose();
destinationAttributesBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* The destination of a network activity, such as accepting a TCP connection.
* In a multi hop network activity, the destination represents the receiver of
* the last hop. Only two fields are used in this message, Peer.port and
* Peer.ip. These fields are optionally populated by those services utilizing
* the IAM condition feature.
*
*
* .google.rpc.context.AttributeContext.Peer destination_attributes = 8;
*/
public com.google.rpc.context.AttributeContext.Peer.Builder getDestinationAttributesBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getDestinationAttributesFieldBuilder().getBuilder();
}
/**
*
*
*
* The destination of a network activity, such as accepting a TCP connection.
* In a multi hop network activity, the destination represents the receiver of
* the last hop. Only two fields are used in this message, Peer.port and
* Peer.ip. These fields are optionally populated by those services utilizing
* the IAM condition feature.
*
*
* .google.rpc.context.AttributeContext.Peer destination_attributes = 8;
*/
public com.google.rpc.context.AttributeContext.PeerOrBuilder
getDestinationAttributesOrBuilder() {
if (destinationAttributesBuilder_ != null) {
return destinationAttributesBuilder_.getMessageOrBuilder();
} else {
return destinationAttributes_ == null
? com.google.rpc.context.AttributeContext.Peer.getDefaultInstance()
: destinationAttributes_;
}
}
/**
*
*
*
* The destination of a network activity, such as accepting a TCP connection.
* In a multi hop network activity, the destination represents the receiver of
* the last hop. Only two fields are used in this message, Peer.port and
* Peer.ip. These fields are optionally populated by those services utilizing
* the IAM condition feature.
*
*
* .google.rpc.context.AttributeContext.Peer destination_attributes = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.rpc.context.AttributeContext.Peer,
com.google.rpc.context.AttributeContext.Peer.Builder,
com.google.rpc.context.AttributeContext.PeerOrBuilder>
getDestinationAttributesFieldBuilder() {
if (destinationAttributesBuilder_ == null) {
destinationAttributesBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.rpc.context.AttributeContext.Peer,
com.google.rpc.context.AttributeContext.Peer.Builder,
com.google.rpc.context.AttributeContext.PeerOrBuilder>(
getDestinationAttributes(), getParentForChildren(), isClean());
destinationAttributes_ = null;
}
return destinationAttributesBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.audit.RequestMetadata)
}
// @@protoc_insertion_point(class_scope:google.cloud.audit.RequestMetadata)
private static final com.google.cloud.audit.RequestMetadata DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.audit.RequestMetadata();
}
public static com.google.cloud.audit.RequestMetadata getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RequestMetadata parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
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();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.audit.RequestMetadata getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}