Class Policy.BooleanPolicy

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

    public static final class Policy.BooleanPolicy
    extends com.google.protobuf.GeneratedMessageV3
    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
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Policy.BooleanPolicy.Builder
      Used in `policy_type` to specify how `boolean_policy` will behave at this resource.
      • Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3

        com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,​BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,​BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ENFORCED_FIELD_NUMBER  
      • Fields inherited from class com.google.protobuf.GeneratedMessageV3

        alwaysUseFieldBuilders, unknownFields
      • Fields inherited from class com.google.protobuf.AbstractMessage

        memoizedSize
      • Fields inherited from class com.google.protobuf.AbstractMessageLite

        memoizedHashCode
    • Field Detail

    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • 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
      • 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.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • 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.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • 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 Policy.BooleanPolicy parseFrom​(ByteBuffer data)
                                              throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

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

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

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

        protected Policy.BooleanPolicy.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<Policy.BooleanPolicy> 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.GeneratedMessageV3
      • getDefaultInstanceForType

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