public static final class OrgPolicyViolationsPreview.Builder extends GeneratedMessageV3.Builder<OrgPolicyViolationsPreview.Builder> implements OrgPolicyViolationsPreviewOrBuilder
OrgPolicyViolationsPreview is a resource providing a preview of the violations that will exist if an OrgPolicy change is made.
The list of violations are modeled as child resources and retrieved via a [ListOrgPolicyViolations][] API call. There are potentially more [OrgPolicyViolations][] than could fit in an embedded field. Thus, the use of a child resource instead of a field.
Protobuf type google.cloud.policysimulator.v1.OrgPolicyViolationsPreview
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > OrgPolicyViolationsPreview.BuilderImplements
OrgPolicyViolationsPreviewOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
Methods
addAllCustomConstraints(Iterable<String> values)
public OrgPolicyViolationsPreview.Builder addAllCustomConstraints(Iterable<String> values)
Output only. The names of the constraints against which all
OrgPolicyViolations
were evaluated.
If OrgPolicyOverlay
only contains PolicyOverlay
then it contains
the name of the configured custom constraint, applicable to the specified
policies. Otherwise it contains the name of the constraint specified in
CustomConstraintOverlay
.
Format:
organizations/{organization_id}/customConstraints/{custom_constraint_id}
Example: organizations/123/customConstraints/custom.createOnlyE2TypeVms
repeated string custom_constraints = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
Parameter | |
---|---|
Name | Description |
values |
Iterable<String> The customConstraints to add. |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
This builder for chaining. |
addCustomConstraints(String value)
public OrgPolicyViolationsPreview.Builder addCustomConstraints(String value)
Output only. The names of the constraints against which all
OrgPolicyViolations
were evaluated.
If OrgPolicyOverlay
only contains PolicyOverlay
then it contains
the name of the configured custom constraint, applicable to the specified
policies. Otherwise it contains the name of the constraint specified in
CustomConstraintOverlay
.
Format:
organizations/{organization_id}/customConstraints/{custom_constraint_id}
Example: organizations/123/customConstraints/custom.createOnlyE2TypeVms
repeated string custom_constraints = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
Parameter | |
---|---|
Name | Description |
value |
String The customConstraints to add. |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
This builder for chaining. |
addCustomConstraintsBytes(ByteString value)
public OrgPolicyViolationsPreview.Builder addCustomConstraintsBytes(ByteString value)
Output only. The names of the constraints against which all
OrgPolicyViolations
were evaluated.
If OrgPolicyOverlay
only contains PolicyOverlay
then it contains
the name of the configured custom constraint, applicable to the specified
policies. Otherwise it contains the name of the constraint specified in
CustomConstraintOverlay
.
Format:
organizations/{organization_id}/customConstraints/{custom_constraint_id}
Example: organizations/123/customConstraints/custom.createOnlyE2TypeVms
repeated string custom_constraints = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
Parameter | |
---|---|
Name | Description |
value |
ByteString The bytes of the customConstraints to add. |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
This builder for chaining. |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public OrgPolicyViolationsPreview.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
build()
public OrgPolicyViolationsPreview build()
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview |
buildPartial()
public OrgPolicyViolationsPreview buildPartial()
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview |
clear()
public OrgPolicyViolationsPreview.Builder clear()
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
clearCreateTime()
public OrgPolicyViolationsPreview.Builder clearCreateTime()
Output only. Time when this OrgPolicyViolationsPreview
was created.
.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
clearCustomConstraints()
public OrgPolicyViolationsPreview.Builder clearCustomConstraints()
Output only. The names of the constraints against which all
OrgPolicyViolations
were evaluated.
If OrgPolicyOverlay
only contains PolicyOverlay
then it contains
the name of the configured custom constraint, applicable to the specified
policies. Otherwise it contains the name of the constraint specified in
CustomConstraintOverlay
.
Format:
organizations/{organization_id}/customConstraints/{custom_constraint_id}
Example: organizations/123/customConstraints/custom.createOnlyE2TypeVms
repeated string custom_constraints = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public OrgPolicyViolationsPreview.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field |
FieldDescriptor |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
clearName()
public OrgPolicyViolationsPreview.Builder clearName()
Output only. The resource name of the OrgPolicyViolationsPreview
. It has
the following format:
organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}
Example:
organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public OrgPolicyViolationsPreview.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof |
OneofDescriptor |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
clearOverlay()
public OrgPolicyViolationsPreview.Builder clearOverlay()
Required. The proposed changes we are previewing violations for.
.google.cloud.policysimulator.v1.OrgPolicyOverlay overlay = 3 [(.google.api.field_behavior) = REQUIRED];
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
clearResourceCounts()
public OrgPolicyViolationsPreview.Builder clearResourceCounts()
Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.
.google.cloud.policysimulator.v1.OrgPolicyViolationsPreview.ResourceCounts resource_counts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
clearState()
public OrgPolicyViolationsPreview.Builder clearState()
Output only. The state of the OrgPolicyViolationsPreview
.
.google.cloud.policysimulator.v1.PreviewState state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
This builder for chaining. |
clearViolationsCount()
public OrgPolicyViolationsPreview.Builder clearViolationsCount()
Output only. The number of [OrgPolicyViolations][] in this
OrgPolicyViolationsPreview
. This count may differ from
resource_summary.noncompliant_count
because each
OrgPolicyViolation is
specific to a resource and constraint. If there are multiple
constraints being evaluated (i.e. multiple policies in the overlay), a
single resource may violate multiple constraints.
int32 violations_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
This builder for chaining. |
clone()
public OrgPolicyViolationsPreview.Builder clone()
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
getCreateTime()
public Timestamp getCreateTime()
Output only. Time when this OrgPolicyViolationsPreview
was created.
.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
Timestamp |
The createTime. |
getCreateTimeBuilder()
public Timestamp.Builder getCreateTimeBuilder()
Output only. Time when this OrgPolicyViolationsPreview
was created.
.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
Builder |
getCreateTimeOrBuilder()
public TimestampOrBuilder getCreateTimeOrBuilder()
Output only. Time when this OrgPolicyViolationsPreview
was created.
.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
TimestampOrBuilder |
getCustomConstraints(int index)
public String getCustomConstraints(int index)
Output only. The names of the constraints against which all
OrgPolicyViolations
were evaluated.
If OrgPolicyOverlay
only contains PolicyOverlay
then it contains
the name of the configured custom constraint, applicable to the specified
policies. Otherwise it contains the name of the constraint specified in
CustomConstraintOverlay
.
Format:
organizations/{organization_id}/customConstraints/{custom_constraint_id}
Example: organizations/123/customConstraints/custom.createOnlyE2TypeVms
repeated string custom_constraints = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
Parameter | |
---|---|
Name | Description |
index |
int The index of the element to return. |
Returns | |
---|---|
Type | Description |
String |
The customConstraints at the given index. |
getCustomConstraintsBytes(int index)
public ByteString getCustomConstraintsBytes(int index)
Output only. The names of the constraints against which all
OrgPolicyViolations
were evaluated.
If OrgPolicyOverlay
only contains PolicyOverlay
then it contains
the name of the configured custom constraint, applicable to the specified
policies. Otherwise it contains the name of the constraint specified in
CustomConstraintOverlay
.
Format:
organizations/{organization_id}/customConstraints/{custom_constraint_id}
Example: organizations/123/customConstraints/custom.createOnlyE2TypeVms
repeated string custom_constraints = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
Parameter | |
---|---|
Name | Description |
index |
int The index of the value to return. |
Returns | |
---|---|
Type | Description |
ByteString |
The bytes of the customConstraints at the given index. |
getCustomConstraintsCount()
public int getCustomConstraintsCount()
Output only. The names of the constraints against which all
OrgPolicyViolations
were evaluated.
If OrgPolicyOverlay
only contains PolicyOverlay
then it contains
the name of the configured custom constraint, applicable to the specified
policies. Otherwise it contains the name of the constraint specified in
CustomConstraintOverlay
.
Format:
organizations/{organization_id}/customConstraints/{custom_constraint_id}
Example: organizations/123/customConstraints/custom.createOnlyE2TypeVms
repeated string custom_constraints = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
Returns | |
---|---|
Type | Description |
int |
The count of customConstraints. |
getCustomConstraintsList()
public ProtocolStringList getCustomConstraintsList()
Output only. The names of the constraints against which all
OrgPolicyViolations
were evaluated.
If OrgPolicyOverlay
only contains PolicyOverlay
then it contains
the name of the configured custom constraint, applicable to the specified
policies. Otherwise it contains the name of the constraint specified in
CustomConstraintOverlay
.
Format:
organizations/{organization_id}/customConstraints/{custom_constraint_id}
Example: organizations/123/customConstraints/custom.createOnlyE2TypeVms
repeated string custom_constraints = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
Returns | |
---|---|
Type | Description |
ProtocolStringList |
A list containing the customConstraints. |
getDefaultInstanceForType()
public OrgPolicyViolationsPreview getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
Type | Description |
Descriptor |
getName()
public String getName()
Output only. The resource name of the OrgPolicyViolationsPreview
. It has
the following format:
organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}
Example:
organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
String |
The name. |
getNameBytes()
public ByteString getNameBytes()
Output only. The resource name of the OrgPolicyViolationsPreview
. It has
the following format:
organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}
Example:
organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for name. |
getOverlay()
public OrgPolicyOverlay getOverlay()
Required. The proposed changes we are previewing violations for.
.google.cloud.policysimulator.v1.OrgPolicyOverlay overlay = 3 [(.google.api.field_behavior) = REQUIRED];
Returns | |
---|---|
Type | Description |
OrgPolicyOverlay |
The overlay. |
getOverlayBuilder()
public OrgPolicyOverlay.Builder getOverlayBuilder()
Required. The proposed changes we are previewing violations for.
.google.cloud.policysimulator.v1.OrgPolicyOverlay overlay = 3 [(.google.api.field_behavior) = REQUIRED];
Returns | |
---|---|
Type | Description |
OrgPolicyOverlay.Builder |
getOverlayOrBuilder()
public OrgPolicyOverlayOrBuilder getOverlayOrBuilder()
Required. The proposed changes we are previewing violations for.
.google.cloud.policysimulator.v1.OrgPolicyOverlay overlay = 3 [(.google.api.field_behavior) = REQUIRED];
Returns | |
---|---|
Type | Description |
OrgPolicyOverlayOrBuilder |
getResourceCounts()
public OrgPolicyViolationsPreview.ResourceCounts getResourceCounts()
Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.
.google.cloud.policysimulator.v1.OrgPolicyViolationsPreview.ResourceCounts resource_counts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.ResourceCounts |
The resourceCounts. |
getResourceCountsBuilder()
public OrgPolicyViolationsPreview.ResourceCounts.Builder getResourceCountsBuilder()
Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.
.google.cloud.policysimulator.v1.OrgPolicyViolationsPreview.ResourceCounts resource_counts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.ResourceCounts.Builder |
getResourceCountsOrBuilder()
public OrgPolicyViolationsPreview.ResourceCountsOrBuilder getResourceCountsOrBuilder()
Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.
.google.cloud.policysimulator.v1.OrgPolicyViolationsPreview.ResourceCounts resource_counts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.ResourceCountsOrBuilder |
getState()
public PreviewState getState()
Output only. The state of the OrgPolicyViolationsPreview
.
.google.cloud.policysimulator.v1.PreviewState state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
PreviewState |
The state. |
getStateValue()
public int getStateValue()
Output only. The state of the OrgPolicyViolationsPreview
.
.google.cloud.policysimulator.v1.PreviewState state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
int |
The enum numeric value on the wire for state. |
getViolationsCount()
public int getViolationsCount()
Output only. The number of [OrgPolicyViolations][] in this
OrgPolicyViolationsPreview
. This count may differ from
resource_summary.noncompliant_count
because each
OrgPolicyViolation is
specific to a resource and constraint. If there are multiple
constraints being evaluated (i.e. multiple policies in the overlay), a
single resource may violate multiple constraints.
int32 violations_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
int |
The violationsCount. |
hasCreateTime()
public boolean hasCreateTime()
Output only. Time when this OrgPolicyViolationsPreview
was created.
.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
boolean |
Whether the createTime field is set. |
hasOverlay()
public boolean hasOverlay()
Required. The proposed changes we are previewing violations for.
.google.cloud.policysimulator.v1.OrgPolicyOverlay overlay = 3 [(.google.api.field_behavior) = REQUIRED];
Returns | |
---|---|
Type | Description |
boolean |
Whether the overlay field is set. |
hasResourceCounts()
public boolean hasResourceCounts()
Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.
.google.cloud.policysimulator.v1.OrgPolicyViolationsPreview.ResourceCounts resource_counts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
boolean |
Whether the resourceCounts field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
mergeCreateTime(Timestamp value)
public OrgPolicyViolationsPreview.Builder mergeCreateTime(Timestamp value)
Output only. Time when this OrgPolicyViolationsPreview
was created.
.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
value |
Timestamp |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
mergeFrom(OrgPolicyViolationsPreview other)
public OrgPolicyViolationsPreview.Builder mergeFrom(OrgPolicyViolationsPreview other)
Parameter | |
---|---|
Name | Description |
other |
OrgPolicyViolationsPreview |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public OrgPolicyViolationsPreview.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public OrgPolicyViolationsPreview.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other |
Message |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
mergeOverlay(OrgPolicyOverlay value)
public OrgPolicyViolationsPreview.Builder mergeOverlay(OrgPolicyOverlay value)
Required. The proposed changes we are previewing violations for.
.google.cloud.policysimulator.v1.OrgPolicyOverlay overlay = 3 [(.google.api.field_behavior) = REQUIRED];
Parameter | |
---|---|
Name | Description |
value |
OrgPolicyOverlay |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
mergeResourceCounts(OrgPolicyViolationsPreview.ResourceCounts value)
public OrgPolicyViolationsPreview.Builder mergeResourceCounts(OrgPolicyViolationsPreview.ResourceCounts value)
Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.
.google.cloud.policysimulator.v1.OrgPolicyViolationsPreview.ResourceCounts resource_counts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
value |
OrgPolicyViolationsPreview.ResourceCounts |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final OrgPolicyViolationsPreview.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
setCreateTime(Timestamp value)
public OrgPolicyViolationsPreview.Builder setCreateTime(Timestamp value)
Output only. Time when this OrgPolicyViolationsPreview
was created.
.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
value |
Timestamp |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
setCreateTime(Timestamp.Builder builderForValue)
public OrgPolicyViolationsPreview.Builder setCreateTime(Timestamp.Builder builderForValue)
Output only. Time when this OrgPolicyViolationsPreview
was created.
.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
builderForValue |
Builder |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
setCustomConstraints(int index, String value)
public OrgPolicyViolationsPreview.Builder setCustomConstraints(int index, String value)
Output only. The names of the constraints against which all
OrgPolicyViolations
were evaluated.
If OrgPolicyOverlay
only contains PolicyOverlay
then it contains
the name of the configured custom constraint, applicable to the specified
policies. Otherwise it contains the name of the constraint specified in
CustomConstraintOverlay
.
Format:
organizations/{organization_id}/customConstraints/{custom_constraint_id}
Example: organizations/123/customConstraints/custom.createOnlyE2TypeVms
repeated string custom_constraints = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
Parameters | |
---|---|
Name | Description |
index |
int The index to set the value at. |
value |
String The customConstraints to set. |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public OrgPolicyViolationsPreview.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
setName(String value)
public OrgPolicyViolationsPreview.Builder setName(String value)
Output only. The resource name of the OrgPolicyViolationsPreview
. It has
the following format:
organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}
Example:
organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
value |
String The name to set. |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
This builder for chaining. |
setNameBytes(ByteString value)
public OrgPolicyViolationsPreview.Builder setNameBytes(ByteString value)
Output only. The resource name of the OrgPolicyViolationsPreview
. It has
the following format:
organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}
Example:
organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
value |
ByteString The bytes for name to set. |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
This builder for chaining. |
setOverlay(OrgPolicyOverlay value)
public OrgPolicyViolationsPreview.Builder setOverlay(OrgPolicyOverlay value)
Required. The proposed changes we are previewing violations for.
.google.cloud.policysimulator.v1.OrgPolicyOverlay overlay = 3 [(.google.api.field_behavior) = REQUIRED];
Parameter | |
---|---|
Name | Description |
value |
OrgPolicyOverlay |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
setOverlay(OrgPolicyOverlay.Builder builderForValue)
public OrgPolicyViolationsPreview.Builder setOverlay(OrgPolicyOverlay.Builder builderForValue)
Required. The proposed changes we are previewing violations for.
.google.cloud.policysimulator.v1.OrgPolicyOverlay overlay = 3 [(.google.api.field_behavior) = REQUIRED];
Parameter | |
---|---|
Name | Description |
builderForValue |
OrgPolicyOverlay.Builder |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public OrgPolicyViolationsPreview.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
setResourceCounts(OrgPolicyViolationsPreview.ResourceCounts value)
public OrgPolicyViolationsPreview.Builder setResourceCounts(OrgPolicyViolationsPreview.ResourceCounts value)
Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.
.google.cloud.policysimulator.v1.OrgPolicyViolationsPreview.ResourceCounts resource_counts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
value |
OrgPolicyViolationsPreview.ResourceCounts |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
setResourceCounts(OrgPolicyViolationsPreview.ResourceCounts.Builder builderForValue)
public OrgPolicyViolationsPreview.Builder setResourceCounts(OrgPolicyViolationsPreview.ResourceCounts.Builder builderForValue)
Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.
.google.cloud.policysimulator.v1.OrgPolicyViolationsPreview.ResourceCounts resource_counts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
builderForValue |
OrgPolicyViolationsPreview.ResourceCounts.Builder |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
setState(PreviewState value)
public OrgPolicyViolationsPreview.Builder setState(PreviewState value)
Output only. The state of the OrgPolicyViolationsPreview
.
.google.cloud.policysimulator.v1.PreviewState state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
value |
PreviewState The state to set. |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
This builder for chaining. |
setStateValue(int value)
public OrgPolicyViolationsPreview.Builder setStateValue(int value)
Output only. The state of the OrgPolicyViolationsPreview
.
.google.cloud.policysimulator.v1.PreviewState state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
value |
int The enum numeric value on the wire for state to set. |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final OrgPolicyViolationsPreview.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
setViolationsCount(int value)
public OrgPolicyViolationsPreview.Builder setViolationsCount(int value)
Output only. The number of [OrgPolicyViolations][] in this
OrgPolicyViolationsPreview
. This count may differ from
resource_summary.noncompliant_count
because each
OrgPolicyViolation is
specific to a resource and constraint. If there are multiple
constraints being evaluated (i.e. multiple policies in the overlay), a
single resource may violate multiple constraints.
int32 violations_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
value |
int The violationsCount to set. |
Returns | |
---|---|
Type | Description |
OrgPolicyViolationsPreview.Builder |
This builder for chaining. |