Class OrgPolicyViolationInfo.Builder (2.38.0)

public static final class OrgPolicyViolationInfo.Builder extends GeneratedMessageV3.Builder<OrgPolicyViolationInfo.Builder> implements OrgPolicyViolationInfoOrBuilder

Represents OrgPolicy Violation information.

Protobuf type google.cloud.audit.OrgPolicyViolationInfo

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllViolationInfo(Iterable<? extends ViolationInfo> values)

public OrgPolicyViolationInfo.Builder addAllViolationInfo(Iterable<? extends ViolationInfo> values)

Optional. Policy violations

repeated .google.cloud.audit.ViolationInfo violation_info = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.cloud.audit.ViolationInfo>
Returns
Type Description
OrgPolicyViolationInfo.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public OrgPolicyViolationInfo.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
OrgPolicyViolationInfo.Builder
Overrides

addViolationInfo(ViolationInfo value)

public OrgPolicyViolationInfo.Builder addViolationInfo(ViolationInfo value)

Optional. Policy violations

repeated .google.cloud.audit.ViolationInfo violation_info = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ViolationInfo
Returns
Type Description
OrgPolicyViolationInfo.Builder

addViolationInfo(ViolationInfo.Builder builderForValue)

public OrgPolicyViolationInfo.Builder addViolationInfo(ViolationInfo.Builder builderForValue)

Optional. Policy violations

repeated .google.cloud.audit.ViolationInfo violation_info = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue ViolationInfo.Builder
Returns
Type Description
OrgPolicyViolationInfo.Builder

addViolationInfo(int index, ViolationInfo value)

public OrgPolicyViolationInfo.Builder addViolationInfo(int index, ViolationInfo value)

Optional. Policy violations

repeated .google.cloud.audit.ViolationInfo violation_info = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value ViolationInfo
Returns
Type Description
OrgPolicyViolationInfo.Builder

addViolationInfo(int index, ViolationInfo.Builder builderForValue)

public OrgPolicyViolationInfo.Builder addViolationInfo(int index, ViolationInfo.Builder builderForValue)

Optional. Policy violations

repeated .google.cloud.audit.ViolationInfo violation_info = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue ViolationInfo.Builder
Returns
Type Description
OrgPolicyViolationInfo.Builder

addViolationInfoBuilder()

public ViolationInfo.Builder addViolationInfoBuilder()

Optional. Policy violations

repeated .google.cloud.audit.ViolationInfo violation_info = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ViolationInfo.Builder

addViolationInfoBuilder(int index)

public ViolationInfo.Builder addViolationInfoBuilder(int index)

Optional. Policy violations

repeated .google.cloud.audit.ViolationInfo violation_info = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
ViolationInfo.Builder

build()

public OrgPolicyViolationInfo build()
Returns
Type Description
OrgPolicyViolationInfo

buildPartial()

public OrgPolicyViolationInfo buildPartial()
Returns
Type Description
OrgPolicyViolationInfo

clear()

public OrgPolicyViolationInfo.Builder clear()
Returns
Type Description
OrgPolicyViolationInfo.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public OrgPolicyViolationInfo.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
OrgPolicyViolationInfo.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public OrgPolicyViolationInfo.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
OrgPolicyViolationInfo.Builder
Overrides

clearPayload()

public OrgPolicyViolationInfo.Builder clearPayload()

Optional. Resource payload that is currently in scope and is subjected to orgpolicy conditions. This payload may be the subset of the actual Resource that may come in the request. This payload should not contain any core content.

.google.protobuf.Struct payload = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
OrgPolicyViolationInfo.Builder

clearResourceTags()

public OrgPolicyViolationInfo.Builder clearResourceTags()
Returns
Type Description
OrgPolicyViolationInfo.Builder

clearResourceType()

public OrgPolicyViolationInfo.Builder clearResourceType()

Optional. Resource type that the orgpolicy is checked against. Example: compute.googleapis.com/Instance, store.googleapis.com/bucket

string resource_type = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
OrgPolicyViolationInfo.Builder

This builder for chaining.

clearViolationInfo()

public OrgPolicyViolationInfo.Builder clearViolationInfo()

Optional. Policy violations

repeated .google.cloud.audit.ViolationInfo violation_info = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
OrgPolicyViolationInfo.Builder

clone()

public OrgPolicyViolationInfo.Builder clone()
Returns
Type Description
OrgPolicyViolationInfo.Builder
Overrides

containsResourceTags(String key)

public boolean containsResourceTags(String key)

Optional. Tags referenced on the resource at the time of evaluation. These also include the federated tags, if they are supplied in the CheckOrgPolicy or CheckCustomConstraints Requests.

Optional field as of now. These tags are the Cloud tags that are available on the resource during the policy evaluation and will be available as part of the OrgPolicy check response for logging purposes.

map<string, string> resource_tags = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

getDefaultInstanceForType()

public OrgPolicyViolationInfo getDefaultInstanceForType()
Returns
Type Description
OrgPolicyViolationInfo

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getMutableResourceTags() (deprecated)

public Map<String,String> getMutableResourceTags()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getPayload()

public Struct getPayload()

Optional. Resource payload that is currently in scope and is subjected to orgpolicy conditions. This payload may be the subset of the actual Resource that may come in the request. This payload should not contain any core content.

.google.protobuf.Struct payload = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Struct

The payload.

getPayloadBuilder()

public Struct.Builder getPayloadBuilder()

Optional. Resource payload that is currently in scope and is subjected to orgpolicy conditions. This payload may be the subset of the actual Resource that may come in the request. This payload should not contain any core content.

.google.protobuf.Struct payload = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Builder

getPayloadOrBuilder()

public StructOrBuilder getPayloadOrBuilder()

Optional. Resource payload that is currently in scope and is subjected to orgpolicy conditions. This payload may be the subset of the actual Resource that may come in the request. This payload should not contain any core content.

.google.protobuf.Struct payload = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
StructOrBuilder

getResourceTags() (deprecated)

public Map<String,String> getResourceTags()

Use #getResourceTagsMap() instead.

Returns
Type Description
Map<String,String>

getResourceTagsCount()

public int getResourceTagsCount()

Optional. Tags referenced on the resource at the time of evaluation. These also include the federated tags, if they are supplied in the CheckOrgPolicy or CheckCustomConstraints Requests.

Optional field as of now. These tags are the Cloud tags that are available on the resource during the policy evaluation and will be available as part of the OrgPolicy check response for logging purposes.

map<string, string> resource_tags = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getResourceTagsMap()

public Map<String,String> getResourceTagsMap()

Optional. Tags referenced on the resource at the time of evaluation. These also include the federated tags, if they are supplied in the CheckOrgPolicy or CheckCustomConstraints Requests.

Optional field as of now. These tags are the Cloud tags that are available on the resource during the policy evaluation and will be available as part of the OrgPolicy check response for logging purposes.

map<string, string> resource_tags = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,String>

getResourceTagsOrDefault(String key, String defaultValue)

public String getResourceTagsOrDefault(String key, String defaultValue)

Optional. Tags referenced on the resource at the time of evaluation. These also include the federated tags, if they are supplied in the CheckOrgPolicy or CheckCustomConstraints Requests.

Optional field as of now. These tags are the Cloud tags that are available on the resource during the policy evaluation and will be available as part of the OrgPolicy check response for logging purposes.

map<string, string> resource_tags = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getResourceTagsOrThrow(String key)

public String getResourceTagsOrThrow(String key)

Optional. Tags referenced on the resource at the time of evaluation. These also include the federated tags, if they are supplied in the CheckOrgPolicy or CheckCustomConstraints Requests.

Optional field as of now. These tags are the Cloud tags that are available on the resource during the policy evaluation and will be available as part of the OrgPolicy check response for logging purposes.

map<string, string> resource_tags = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
String

getResourceType()

public String getResourceType()

Optional. Resource type that the orgpolicy is checked against. Example: compute.googleapis.com/Instance, store.googleapis.com/bucket

string resource_type = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The resourceType.

getResourceTypeBytes()

public ByteString getResourceTypeBytes()

Optional. Resource type that the orgpolicy is checked against. Example: compute.googleapis.com/Instance, store.googleapis.com/bucket

string resource_type = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for resourceType.

getViolationInfo(int index)

public ViolationInfo getViolationInfo(int index)

Optional. Policy violations

repeated .google.cloud.audit.ViolationInfo violation_info = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
ViolationInfo

getViolationInfoBuilder(int index)

public ViolationInfo.Builder getViolationInfoBuilder(int index)

Optional. Policy violations

repeated .google.cloud.audit.ViolationInfo violation_info = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
ViolationInfo.Builder

getViolationInfoBuilderList()

public List<ViolationInfo.Builder> getViolationInfoBuilderList()

Optional. Policy violations

repeated .google.cloud.audit.ViolationInfo violation_info = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Builder>

getViolationInfoCount()

public int getViolationInfoCount()

Optional. Policy violations

repeated .google.cloud.audit.ViolationInfo violation_info = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getViolationInfoList()

public List<ViolationInfo> getViolationInfoList()

Optional. Policy violations

repeated .google.cloud.audit.ViolationInfo violation_info = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<ViolationInfo>

getViolationInfoOrBuilder(int index)

public ViolationInfoOrBuilder getViolationInfoOrBuilder(int index)

Optional. Policy violations

repeated .google.cloud.audit.ViolationInfo violation_info = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
ViolationInfoOrBuilder

getViolationInfoOrBuilderList()

public List<? extends ViolationInfoOrBuilder> getViolationInfoOrBuilderList()

Optional. Policy violations

repeated .google.cloud.audit.ViolationInfo violation_info = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.cloud.audit.ViolationInfoOrBuilder>

hasPayload()

public boolean hasPayload()

Optional. Resource payload that is currently in scope and is subjected to orgpolicy conditions. This payload may be the subset of the actual Resource that may come in the request. This payload should not contain any core content.

.google.protobuf.Struct payload = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the payload field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(OrgPolicyViolationInfo other)

public OrgPolicyViolationInfo.Builder mergeFrom(OrgPolicyViolationInfo other)
Parameter
Name Description
other OrgPolicyViolationInfo
Returns
Type Description
OrgPolicyViolationInfo.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public OrgPolicyViolationInfo.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OrgPolicyViolationInfo.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public OrgPolicyViolationInfo.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
OrgPolicyViolationInfo.Builder
Overrides

mergePayload(Struct value)

public OrgPolicyViolationInfo.Builder mergePayload(Struct value)

Optional. Resource payload that is currently in scope and is subjected to orgpolicy conditions. This payload may be the subset of the actual Resource that may come in the request. This payload should not contain any core content.

.google.protobuf.Struct payload = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Struct
Returns
Type Description
OrgPolicyViolationInfo.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final OrgPolicyViolationInfo.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
OrgPolicyViolationInfo.Builder
Overrides

putAllResourceTags(Map<String,String> values)

public OrgPolicyViolationInfo.Builder putAllResourceTags(Map<String,String> values)

Optional. Tags referenced on the resource at the time of evaluation. These also include the federated tags, if they are supplied in the CheckOrgPolicy or CheckCustomConstraints Requests.

Optional field as of now. These tags are the Cloud tags that are available on the resource during the policy evaluation and will be available as part of the OrgPolicy check response for logging purposes.

map<string, string> resource_tags = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Map<String,String>
Returns
Type Description
OrgPolicyViolationInfo.Builder

putResourceTags(String key, String value)

public OrgPolicyViolationInfo.Builder putResourceTags(String key, String value)

Optional. Tags referenced on the resource at the time of evaluation. These also include the federated tags, if they are supplied in the CheckOrgPolicy or CheckCustomConstraints Requests.

Optional field as of now. These tags are the Cloud tags that are available on the resource during the policy evaluation and will be available as part of the OrgPolicy check response for logging purposes.

map<string, string> resource_tags = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
value String
Returns
Type Description
OrgPolicyViolationInfo.Builder

removeResourceTags(String key)

public OrgPolicyViolationInfo.Builder removeResourceTags(String key)

Optional. Tags referenced on the resource at the time of evaluation. These also include the federated tags, if they are supplied in the CheckOrgPolicy or CheckCustomConstraints Requests.

Optional field as of now. These tags are the Cloud tags that are available on the resource during the policy evaluation and will be available as part of the OrgPolicy check response for logging purposes.

map<string, string> resource_tags = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
OrgPolicyViolationInfo.Builder

removeViolationInfo(int index)

public OrgPolicyViolationInfo.Builder removeViolationInfo(int index)

Optional. Policy violations

repeated .google.cloud.audit.ViolationInfo violation_info = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
OrgPolicyViolationInfo.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public OrgPolicyViolationInfo.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
OrgPolicyViolationInfo.Builder
Overrides

setPayload(Struct value)

public OrgPolicyViolationInfo.Builder setPayload(Struct value)

Optional. Resource payload that is currently in scope and is subjected to orgpolicy conditions. This payload may be the subset of the actual Resource that may come in the request. This payload should not contain any core content.

.google.protobuf.Struct payload = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Struct
Returns
Type Description
OrgPolicyViolationInfo.Builder

setPayload(Struct.Builder builderForValue)

public OrgPolicyViolationInfo.Builder setPayload(Struct.Builder builderForValue)

Optional. Resource payload that is currently in scope and is subjected to orgpolicy conditions. This payload may be the subset of the actual Resource that may come in the request. This payload should not contain any core content.

.google.protobuf.Struct payload = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
OrgPolicyViolationInfo.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public OrgPolicyViolationInfo.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
OrgPolicyViolationInfo.Builder
Overrides

setResourceType(String value)

public OrgPolicyViolationInfo.Builder setResourceType(String value)

Optional. Resource type that the orgpolicy is checked against. Example: compute.googleapis.com/Instance, store.googleapis.com/bucket

string resource_type = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The resourceType to set.

Returns
Type Description
OrgPolicyViolationInfo.Builder

This builder for chaining.

setResourceTypeBytes(ByteString value)

public OrgPolicyViolationInfo.Builder setResourceTypeBytes(ByteString value)

Optional. Resource type that the orgpolicy is checked against. Example: compute.googleapis.com/Instance, store.googleapis.com/bucket

string resource_type = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for resourceType to set.

Returns
Type Description
OrgPolicyViolationInfo.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final OrgPolicyViolationInfo.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
OrgPolicyViolationInfo.Builder
Overrides

setViolationInfo(int index, ViolationInfo value)

public OrgPolicyViolationInfo.Builder setViolationInfo(int index, ViolationInfo value)

Optional. Policy violations

repeated .google.cloud.audit.ViolationInfo violation_info = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value ViolationInfo
Returns
Type Description
OrgPolicyViolationInfo.Builder

setViolationInfo(int index, ViolationInfo.Builder builderForValue)

public OrgPolicyViolationInfo.Builder setViolationInfo(int index, ViolationInfo.Builder builderForValue)

Optional. Policy violations

repeated .google.cloud.audit.ViolationInfo violation_info = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue ViolationInfo.Builder
Returns
Type Description
OrgPolicyViolationInfo.Builder