Class OrgPolicyViolationsPreview

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.policysimulator.v1.OrgPolicyViolationsPreview
All Implemented Interfaces:
OrgPolicyViolationsPreviewOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class OrgPolicyViolationsPreview extends com.google.protobuf.GeneratedMessage 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
See Also:
  • Field Details

    • NAME_FIELD_NUMBER

      public static final int NAME_FIELD_NUMBER
      See Also:
    • STATE_FIELD_NUMBER

      public static final int STATE_FIELD_NUMBER
      See Also:
    • OVERLAY_FIELD_NUMBER

      public static final int OVERLAY_FIELD_NUMBER
      See Also:
    • VIOLATIONS_COUNT_FIELD_NUMBER

      public static final int VIOLATIONS_COUNT_FIELD_NUMBER
      See Also:
    • RESOURCE_COUNTS_FIELD_NUMBER

      public static final int RESOURCE_COUNTS_FIELD_NUMBER
      See Also:
    • CUSTOM_CONSTRAINTS_FIELD_NUMBER

      public static final int CUSTOM_CONSTRAINTS_FIELD_NUMBER
      See Also:
    • CREATE_TIME_FIELD_NUMBER

      public static final int CREATE_TIME_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • 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];
      Specified by:
      getName in interface OrgPolicyViolationsPreviewOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.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];
      Specified by:
      getNameBytes in interface OrgPolicyViolationsPreviewOrBuilder
      Returns:
      The bytes for name.
    • getStateValue

      public int getStateValue()
       Output only. The state of the `OrgPolicyViolationsPreview`.
       
      .google.cloud.policysimulator.v1.PreviewState state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getStateValue in interface OrgPolicyViolationsPreviewOrBuilder
      Returns:
      The enum numeric value on the wire for state.
    • getState

      public PreviewState getState()
       Output only. The state of the `OrgPolicyViolationsPreview`.
       
      .google.cloud.policysimulator.v1.PreviewState state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getState in interface OrgPolicyViolationsPreviewOrBuilder
      Returns:
      The state.
    • 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];
      Specified by:
      hasOverlay in interface OrgPolicyViolationsPreviewOrBuilder
      Returns:
      Whether the overlay field is set.
    • 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];
      Specified by:
      getOverlay in interface OrgPolicyViolationsPreviewOrBuilder
      Returns:
      The overlay.
    • 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];
      Specified by:
      getOverlayOrBuilder in interface OrgPolicyViolationsPreviewOrBuilder
    • 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][google.cloud.policysimulator.v1.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];
      Specified by:
      getViolationsCount in interface OrgPolicyViolationsPreviewOrBuilder
      Returns:
      The violationsCount.
    • 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];
      Specified by:
      hasResourceCounts in interface OrgPolicyViolationsPreviewOrBuilder
      Returns:
      Whether the resourceCounts field is set.
    • 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];
      Specified by:
      getResourceCounts in interface OrgPolicyViolationsPreviewOrBuilder
      Returns:
      The resourceCounts.
    • 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];
      Specified by:
      getResourceCountsOrBuilder in interface OrgPolicyViolationsPreviewOrBuilder
    • getCustomConstraintsList

      public com.google.protobuf.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) = { ... }
      Specified by:
      getCustomConstraintsList in interface OrgPolicyViolationsPreviewOrBuilder
      Returns:
      A list containing the customConstraints.
    • 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) = { ... }
      Specified by:
      getCustomConstraintsCount in interface OrgPolicyViolationsPreviewOrBuilder
      Returns:
      The count of customConstraints.
    • getCustomConstraints

      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) = { ... }
      Specified by:
      getCustomConstraints in interface OrgPolicyViolationsPreviewOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The customConstraints at the given index.
    • getCustomConstraintsBytes

      public com.google.protobuf.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) = { ... }
      Specified by:
      getCustomConstraintsBytes in interface OrgPolicyViolationsPreviewOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the customConstraints at the given index.
    • hasCreateTime

      public boolean hasCreateTime()
       Output only. Time when this `OrgPolicyViolationsPreview` was created.
       
      .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasCreateTime in interface OrgPolicyViolationsPreviewOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. Time when this `OrgPolicyViolationsPreview` was created.
       
      .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTime in interface OrgPolicyViolationsPreviewOrBuilder
      Returns:
      The createTime.
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. Time when this `OrgPolicyViolationsPreview` was created.
       
      .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTimeOrBuilder in interface OrgPolicyViolationsPreviewOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static OrgPolicyViolationsPreview parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OrgPolicyViolationsPreview parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OrgPolicyViolationsPreview parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OrgPolicyViolationsPreview parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OrgPolicyViolationsPreview parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OrgPolicyViolationsPreview parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OrgPolicyViolationsPreview parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static OrgPolicyViolationsPreview parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static OrgPolicyViolationsPreview parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static OrgPolicyViolationsPreview parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static OrgPolicyViolationsPreview parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static OrgPolicyViolationsPreview parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public OrgPolicyViolationsPreview.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static OrgPolicyViolationsPreview.Builder newBuilder()
    • newBuilder

      public static OrgPolicyViolationsPreview.Builder newBuilder(OrgPolicyViolationsPreview prototype)
    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected OrgPolicyViolationsPreview.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static OrgPolicyViolationsPreview getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<OrgPolicyViolationsPreview> parser()
    • getParserForType

      public com.google.protobuf.Parser<OrgPolicyViolationsPreview> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public OrgPolicyViolationsPreview getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder