Class Policy.BooleanPolicy.Builder

  • All Implemented Interfaces:
    Policy.BooleanPolicyOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Policy.BooleanPolicy

    public static final class Policy.BooleanPolicy.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Policy.BooleanPolicy.Builder>
    implements Policy.BooleanPolicyOrBuilder
     Used in `policy_type` to specify how `boolean_policy` will behave at this
     resource.
     
    Protobuf type google.cloud.orgpolicy.v1.Policy.BooleanPolicy
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Policy.BooleanPolicy.Builder>
      • clear

        public Policy.BooleanPolicy.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.GeneratedMessageV3.Builder<Policy.BooleanPolicy.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.GeneratedMessageV3.Builder<Policy.BooleanPolicy.Builder>
      • getDefaultInstanceForType

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

        public Policy.BooleanPolicy build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public Policy.BooleanPolicy buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public Policy.BooleanPolicy.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Policy.BooleanPolicy.Builder>
      • setField

        public Policy.BooleanPolicy.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                     Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Policy.BooleanPolicy.Builder>
      • clearField

        public Policy.BooleanPolicy.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Policy.BooleanPolicy.Builder>
      • clearOneof

        public Policy.BooleanPolicy.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Policy.BooleanPolicy.Builder>
      • setRepeatedField

        public Policy.BooleanPolicy.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                             int index,
                                                             Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Policy.BooleanPolicy.Builder>
      • addRepeatedField

        public Policy.BooleanPolicy.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                             Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Policy.BooleanPolicy.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Policy.BooleanPolicy.Builder>
      • mergeFrom

        public Policy.BooleanPolicy.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<Policy.BooleanPolicy.Builder>
        Throws:
        IOException
      • getEnforced

        public boolean getEnforced()
         If `true`, then the `Policy` is enforced. If `false`, then any
         configuration is acceptable.
        
         Suppose you have a `Constraint`
         `constraints/compute.disableSerialPortAccess` with `constraint_default`
         set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
         behavior:
           - If the `Policy` at this resource has enforced set to `false`, serial
             port connection attempts will be allowed.
           - If the `Policy` at this resource has enforced set to `true`, serial
             port connection attempts will be refused.
           - If the `Policy` at this resource is `RestoreDefault`, serial port
             connection attempts will be allowed.
           - If no `Policy` is set at this resource or anywhere higher in the
             resource hierarchy, serial port connection attempts will be allowed.
           - If no `Policy` is set at this resource, but one exists higher in the
             resource hierarchy, the behavior is as if the`Policy` were set at
             this resource.
        
         The following examples demonstrate the different possible layerings:
        
         Example 1 (nearest `Constraint` wins):
           `organizations/foo` has a `Policy` with:
             {enforced: false}
           `projects/bar` has no `Policy` set.
         The constraint at `projects/bar` and `organizations/foo` will not be
         enforced.
        
         Example 2 (enforcement gets replaced):
           `organizations/foo` has a `Policy` with:
             {enforced: false}
           `projects/bar` has a `Policy` with:
             {enforced: true}
         The constraint at `organizations/foo` is not enforced.
         The constraint at `projects/bar` is enforced.
        
         Example 3 (RestoreDefault):
           `organizations/foo` has a `Policy` with:
             {enforced: true}
           `projects/bar` has a `Policy` with:
             {RestoreDefault: {}}
         The constraint at `organizations/foo` is enforced.
         The constraint at `projects/bar` is not enforced, because
         `constraint_default` for the `Constraint` is `ALLOW`.
         
        bool enforced = 1;
        Specified by:
        getEnforced in interface Policy.BooleanPolicyOrBuilder
        Returns:
        The enforced.
      • setEnforced

        public Policy.BooleanPolicy.Builder setEnforced​(boolean value)
         If `true`, then the `Policy` is enforced. If `false`, then any
         configuration is acceptable.
        
         Suppose you have a `Constraint`
         `constraints/compute.disableSerialPortAccess` with `constraint_default`
         set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
         behavior:
           - If the `Policy` at this resource has enforced set to `false`, serial
             port connection attempts will be allowed.
           - If the `Policy` at this resource has enforced set to `true`, serial
             port connection attempts will be refused.
           - If the `Policy` at this resource is `RestoreDefault`, serial port
             connection attempts will be allowed.
           - If no `Policy` is set at this resource or anywhere higher in the
             resource hierarchy, serial port connection attempts will be allowed.
           - If no `Policy` is set at this resource, but one exists higher in the
             resource hierarchy, the behavior is as if the`Policy` were set at
             this resource.
        
         The following examples demonstrate the different possible layerings:
        
         Example 1 (nearest `Constraint` wins):
           `organizations/foo` has a `Policy` with:
             {enforced: false}
           `projects/bar` has no `Policy` set.
         The constraint at `projects/bar` and `organizations/foo` will not be
         enforced.
        
         Example 2 (enforcement gets replaced):
           `organizations/foo` has a `Policy` with:
             {enforced: false}
           `projects/bar` has a `Policy` with:
             {enforced: true}
         The constraint at `organizations/foo` is not enforced.
         The constraint at `projects/bar` is enforced.
        
         Example 3 (RestoreDefault):
           `organizations/foo` has a `Policy` with:
             {enforced: true}
           `projects/bar` has a `Policy` with:
             {RestoreDefault: {}}
         The constraint at `organizations/foo` is enforced.
         The constraint at `projects/bar` is not enforced, because
         `constraint_default` for the `Constraint` is `ALLOW`.
         
        bool enforced = 1;
        Parameters:
        value - The enforced to set.
        Returns:
        This builder for chaining.
      • clearEnforced

        public Policy.BooleanPolicy.Builder clearEnforced()
         If `true`, then the `Policy` is enforced. If `false`, then any
         configuration is acceptable.
        
         Suppose you have a `Constraint`
         `constraints/compute.disableSerialPortAccess` with `constraint_default`
         set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
         behavior:
           - If the `Policy` at this resource has enforced set to `false`, serial
             port connection attempts will be allowed.
           - If the `Policy` at this resource has enforced set to `true`, serial
             port connection attempts will be refused.
           - If the `Policy` at this resource is `RestoreDefault`, serial port
             connection attempts will be allowed.
           - If no `Policy` is set at this resource or anywhere higher in the
             resource hierarchy, serial port connection attempts will be allowed.
           - If no `Policy` is set at this resource, but one exists higher in the
             resource hierarchy, the behavior is as if the`Policy` were set at
             this resource.
        
         The following examples demonstrate the different possible layerings:
        
         Example 1 (nearest `Constraint` wins):
           `organizations/foo` has a `Policy` with:
             {enforced: false}
           `projects/bar` has no `Policy` set.
         The constraint at `projects/bar` and `organizations/foo` will not be
         enforced.
        
         Example 2 (enforcement gets replaced):
           `organizations/foo` has a `Policy` with:
             {enforced: false}
           `projects/bar` has a `Policy` with:
             {enforced: true}
         The constraint at `organizations/foo` is not enforced.
         The constraint at `projects/bar` is enforced.
        
         Example 3 (RestoreDefault):
           `organizations/foo` has a `Policy` with:
             {enforced: true}
           `projects/bar` has a `Policy` with:
             {RestoreDefault: {}}
         The constraint at `organizations/foo` is enforced.
         The constraint at `projects/bar` is not enforced, because
         `constraint_default` for the `Constraint` is `ALLOW`.
         
        bool enforced = 1;
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final Policy.BooleanPolicy.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Policy.BooleanPolicy.Builder>
      • mergeUnknownFields

        public final Policy.BooleanPolicy.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Policy.BooleanPolicy.Builder>