Class OrgPolicyViolationsPreview.ResourceCounts.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<OrgPolicyViolationsPreview.ResourceCounts.Builder>
com.google.cloud.policysimulator.v1.OrgPolicyViolationsPreview.ResourceCounts.Builder
All Implemented Interfaces:
OrgPolicyViolationsPreview.ResourceCountsOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
OrgPolicyViolationsPreview.ResourceCounts

public static final class OrgPolicyViolationsPreview.ResourceCounts.Builder extends com.google.protobuf.GeneratedMessage.Builder<OrgPolicyViolationsPreview.ResourceCounts.Builder> implements OrgPolicyViolationsPreview.ResourceCountsOrBuilder
 A summary of the state of all resources scanned for compliance with the
 changed OrgPolicy.
 
Protobuf type google.cloud.policysimulator.v1.OrgPolicyViolationsPreview.ResourceCounts
  • 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.Builder<OrgPolicyViolationsPreview.ResourceCounts.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<OrgPolicyViolationsPreview.ResourceCounts.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<OrgPolicyViolationsPreview.ResourceCounts.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public OrgPolicyViolationsPreview.ResourceCounts.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<OrgPolicyViolationsPreview.ResourceCounts.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<OrgPolicyViolationsPreview.ResourceCounts.Builder>
    • mergeFrom

      public OrgPolicyViolationsPreview.ResourceCounts.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<OrgPolicyViolationsPreview.ResourceCounts.Builder>
      Throws:
      IOException
    • getScanned

      public int getScanned()
       Output only. Number of resources checked for compliance.
      
       Must equal:  unenforced + noncompliant + compliant + error
       
      int32 scanned = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getScanned in interface OrgPolicyViolationsPreview.ResourceCountsOrBuilder
      Returns:
      The scanned.
    • setScanned

       Output only. Number of resources checked for compliance.
      
       Must equal:  unenforced + noncompliant + compliant + error
       
      int32 scanned = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The scanned to set.
      Returns:
      This builder for chaining.
    • clearScanned

       Output only. Number of resources checked for compliance.
      
       Must equal:  unenforced + noncompliant + compliant + error
       
      int32 scanned = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • getNoncompliant

      public int getNoncompliant()
       Output only. Number of scanned resources with at least one violation.
       
      int32 noncompliant = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getNoncompliant in interface OrgPolicyViolationsPreview.ResourceCountsOrBuilder
      Returns:
      The noncompliant.
    • setNoncompliant

      public OrgPolicyViolationsPreview.ResourceCounts.Builder setNoncompliant(int value)
       Output only. Number of scanned resources with at least one violation.
       
      int32 noncompliant = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The noncompliant to set.
      Returns:
      This builder for chaining.
    • clearNoncompliant

       Output only. Number of scanned resources with at least one violation.
       
      int32 noncompliant = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • getCompliant

      public int getCompliant()
       Output only. Number of scanned resources with zero violations.
       
      int32 compliant = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCompliant in interface OrgPolicyViolationsPreview.ResourceCountsOrBuilder
      Returns:
      The compliant.
    • setCompliant

      public OrgPolicyViolationsPreview.ResourceCounts.Builder setCompliant(int value)
       Output only. Number of scanned resources with zero violations.
       
      int32 compliant = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The compliant to set.
      Returns:
      This builder for chaining.
    • clearCompliant

       Output only. Number of scanned resources with zero violations.
       
      int32 compliant = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • getUnenforced

      public int getUnenforced()
       Output only. Number of resources where the constraint was not enforced,
       i.e. the Policy set `enforced: false` for that resource.
       
      int32 unenforced = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUnenforced in interface OrgPolicyViolationsPreview.ResourceCountsOrBuilder
      Returns:
      The unenforced.
    • setUnenforced

      public OrgPolicyViolationsPreview.ResourceCounts.Builder setUnenforced(int value)
       Output only. Number of resources where the constraint was not enforced,
       i.e. the Policy set `enforced: false` for that resource.
       
      int32 unenforced = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The unenforced to set.
      Returns:
      This builder for chaining.
    • clearUnenforced

       Output only. Number of resources where the constraint was not enforced,
       i.e. the Policy set `enforced: false` for that resource.
       
      int32 unenforced = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • getErrors

      public int getErrors()
       Output only. Number of resources that returned an error when scanned.
       
      int32 errors = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getErrors in interface OrgPolicyViolationsPreview.ResourceCountsOrBuilder
      Returns:
      The errors.
    • setErrors

       Output only. Number of resources that returned an error when scanned.
       
      int32 errors = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The errors to set.
      Returns:
      This builder for chaining.
    • clearErrors

       Output only. Number of resources that returned an error when scanned.
       
      int32 errors = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.