Class PolicySpec.PolicyRule.Builder

    • 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<PolicySpec.PolicyRule.Builder>
      • clear

        public PolicySpec.PolicyRule.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<PolicySpec.PolicyRule.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<PolicySpec.PolicyRule.Builder>
      • getDefaultInstanceForType

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

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

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

        public PolicySpec.PolicyRule.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<PolicySpec.PolicyRule.Builder>
      • clearField

        public PolicySpec.PolicyRule.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<PolicySpec.PolicyRule.Builder>
      • clearOneof

        public PolicySpec.PolicyRule.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<PolicySpec.PolicyRule.Builder>
      • setRepeatedField

        public PolicySpec.PolicyRule.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<PolicySpec.PolicyRule.Builder>
      • addRepeatedField

        public PolicySpec.PolicyRule.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<PolicySpec.PolicyRule.Builder>
      • isInitialized

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

        public PolicySpec.PolicyRule.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<PolicySpec.PolicyRule.Builder>
        Throws:
        IOException
      • hasValues

        public boolean hasValues()
         List of values to be used for this PolicyRule. This field can be set
         only in Policies for list constraints.
         
        .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule.StringValues values = 1;
        Specified by:
        hasValues in interface PolicySpec.PolicyRuleOrBuilder
        Returns:
        Whether the values field is set.
      • clearValues

        public PolicySpec.PolicyRule.Builder clearValues()
         List of values to be used for this PolicyRule. This field can be set
         only in Policies for list constraints.
         
        .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule.StringValues values = 1;
      • getValuesBuilder

        public PolicySpec.PolicyRule.StringValues.Builder getValuesBuilder()
         List of values to be used for this PolicyRule. This field can be set
         only in Policies for list constraints.
         
        .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule.StringValues values = 1;
      • hasAllowAll

        public boolean hasAllowAll()
         Setting this to true means that all values are allowed. This field can
         be set only in Policies for list constraints.
         
        bool allow_all = 2;
        Specified by:
        hasAllowAll in interface PolicySpec.PolicyRuleOrBuilder
        Returns:
        Whether the allowAll field is set.
      • getAllowAll

        public boolean getAllowAll()
         Setting this to true means that all values are allowed. This field can
         be set only in Policies for list constraints.
         
        bool allow_all = 2;
        Specified by:
        getAllowAll in interface PolicySpec.PolicyRuleOrBuilder
        Returns:
        The allowAll.
      • setAllowAll

        public PolicySpec.PolicyRule.Builder setAllowAll​(boolean value)
         Setting this to true means that all values are allowed. This field can
         be set only in Policies for list constraints.
         
        bool allow_all = 2;
        Parameters:
        value - The allowAll to set.
        Returns:
        This builder for chaining.
      • clearAllowAll

        public PolicySpec.PolicyRule.Builder clearAllowAll()
         Setting this to true means that all values are allowed. This field can
         be set only in Policies for list constraints.
         
        bool allow_all = 2;
        Returns:
        This builder for chaining.
      • hasDenyAll

        public boolean hasDenyAll()
         Setting this to true means that all values are denied. This field can
         be set only in Policies for list constraints.
         
        bool deny_all = 3;
        Specified by:
        hasDenyAll in interface PolicySpec.PolicyRuleOrBuilder
        Returns:
        Whether the denyAll field is set.
      • getDenyAll

        public boolean getDenyAll()
         Setting this to true means that all values are denied. This field can
         be set only in Policies for list constraints.
         
        bool deny_all = 3;
        Specified by:
        getDenyAll in interface PolicySpec.PolicyRuleOrBuilder
        Returns:
        The denyAll.
      • setDenyAll

        public PolicySpec.PolicyRule.Builder setDenyAll​(boolean value)
         Setting this to true means that all values are denied. This field can
         be set only in Policies for list constraints.
         
        bool deny_all = 3;
        Parameters:
        value - The denyAll to set.
        Returns:
        This builder for chaining.
      • clearDenyAll

        public PolicySpec.PolicyRule.Builder clearDenyAll()
         Setting this to true means that all values are denied. This field can
         be set only in Policies for list constraints.
         
        bool deny_all = 3;
        Returns:
        This builder for chaining.
      • hasEnforce

        public boolean hasEnforce()
         If `true`, then the `Policy` is enforced. If `false`, then any
         configuration is acceptable.
         This field can be set only in Policies for boolean constraints.
         
        bool enforce = 4;
        Specified by:
        hasEnforce in interface PolicySpec.PolicyRuleOrBuilder
        Returns:
        Whether the enforce field is set.
      • getEnforce

        public boolean getEnforce()
         If `true`, then the `Policy` is enforced. If `false`, then any
         configuration is acceptable.
         This field can be set only in Policies for boolean constraints.
         
        bool enforce = 4;
        Specified by:
        getEnforce in interface PolicySpec.PolicyRuleOrBuilder
        Returns:
        The enforce.
      • setEnforce

        public PolicySpec.PolicyRule.Builder setEnforce​(boolean value)
         If `true`, then the `Policy` is enforced. If `false`, then any
         configuration is acceptable.
         This field can be set only in Policies for boolean constraints.
         
        bool enforce = 4;
        Parameters:
        value - The enforce to set.
        Returns:
        This builder for chaining.
      • clearEnforce

        public PolicySpec.PolicyRule.Builder clearEnforce()
         If `true`, then the `Policy` is enforced. If `false`, then any
         configuration is acceptable.
         This field can be set only in Policies for boolean constraints.
         
        bool enforce = 4;
        Returns:
        This builder for chaining.
      • hasCondition

        public boolean hasCondition()
         A condition which determines whether this rule is used
         in the evaluation of the policy. When set, the `expression` field in
         the `Expr' must include from 1 to 10 subexpressions, joined by the "||"
         or "&&" operators. Each subexpression must be of the form
         "resource.matchTag('<ORG_ID>/tag_key_short_name,
         'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id',
         'tagValues/value_id')". where key_name and value_name are the resource
         names for Label Keys and Values. These names are available from the Tag
         Manager Service. An example expression is:
         "resource.matchTag('123456789/environment,
         'prod')". or "resource.matchTagId('tagKeys/123',
         'tagValues/456')".
         
        .google.type.Expr condition = 5;
        Specified by:
        hasCondition in interface PolicySpec.PolicyRuleOrBuilder
        Returns:
        Whether the condition field is set.
      • getCondition

        public com.google.type.Expr getCondition()
         A condition which determines whether this rule is used
         in the evaluation of the policy. When set, the `expression` field in
         the `Expr' must include from 1 to 10 subexpressions, joined by the "||"
         or "&&" operators. Each subexpression must be of the form
         "resource.matchTag('<ORG_ID>/tag_key_short_name,
         'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id',
         'tagValues/value_id')". where key_name and value_name are the resource
         names for Label Keys and Values. These names are available from the Tag
         Manager Service. An example expression is:
         "resource.matchTag('123456789/environment,
         'prod')". or "resource.matchTagId('tagKeys/123',
         'tagValues/456')".
         
        .google.type.Expr condition = 5;
        Specified by:
        getCondition in interface PolicySpec.PolicyRuleOrBuilder
        Returns:
        The condition.
      • setCondition

        public PolicySpec.PolicyRule.Builder setCondition​(com.google.type.Expr value)
         A condition which determines whether this rule is used
         in the evaluation of the policy. When set, the `expression` field in
         the `Expr' must include from 1 to 10 subexpressions, joined by the "||"
         or "&&" operators. Each subexpression must be of the form
         "resource.matchTag('<ORG_ID>/tag_key_short_name,
         'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id',
         'tagValues/value_id')". where key_name and value_name are the resource
         names for Label Keys and Values. These names are available from the Tag
         Manager Service. An example expression is:
         "resource.matchTag('123456789/environment,
         'prod')". or "resource.matchTagId('tagKeys/123',
         'tagValues/456')".
         
        .google.type.Expr condition = 5;
      • setCondition

        public PolicySpec.PolicyRule.Builder setCondition​(com.google.type.Expr.Builder builderForValue)
         A condition which determines whether this rule is used
         in the evaluation of the policy. When set, the `expression` field in
         the `Expr' must include from 1 to 10 subexpressions, joined by the "||"
         or "&&" operators. Each subexpression must be of the form
         "resource.matchTag('<ORG_ID>/tag_key_short_name,
         'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id',
         'tagValues/value_id')". where key_name and value_name are the resource
         names for Label Keys and Values. These names are available from the Tag
         Manager Service. An example expression is:
         "resource.matchTag('123456789/environment,
         'prod')". or "resource.matchTagId('tagKeys/123',
         'tagValues/456')".
         
        .google.type.Expr condition = 5;
      • mergeCondition

        public PolicySpec.PolicyRule.Builder mergeCondition​(com.google.type.Expr value)
         A condition which determines whether this rule is used
         in the evaluation of the policy. When set, the `expression` field in
         the `Expr' must include from 1 to 10 subexpressions, joined by the "||"
         or "&&" operators. Each subexpression must be of the form
         "resource.matchTag('<ORG_ID>/tag_key_short_name,
         'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id',
         'tagValues/value_id')". where key_name and value_name are the resource
         names for Label Keys and Values. These names are available from the Tag
         Manager Service. An example expression is:
         "resource.matchTag('123456789/environment,
         'prod')". or "resource.matchTagId('tagKeys/123',
         'tagValues/456')".
         
        .google.type.Expr condition = 5;
      • clearCondition

        public PolicySpec.PolicyRule.Builder clearCondition()
         A condition which determines whether this rule is used
         in the evaluation of the policy. When set, the `expression` field in
         the `Expr' must include from 1 to 10 subexpressions, joined by the "||"
         or "&&" operators. Each subexpression must be of the form
         "resource.matchTag('<ORG_ID>/tag_key_short_name,
         'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id',
         'tagValues/value_id')". where key_name and value_name are the resource
         names for Label Keys and Values. These names are available from the Tag
         Manager Service. An example expression is:
         "resource.matchTag('123456789/environment,
         'prod')". or "resource.matchTagId('tagKeys/123',
         'tagValues/456')".
         
        .google.type.Expr condition = 5;
      • getConditionBuilder

        public com.google.type.Expr.Builder getConditionBuilder()
         A condition which determines whether this rule is used
         in the evaluation of the policy. When set, the `expression` field in
         the `Expr' must include from 1 to 10 subexpressions, joined by the "||"
         or "&&" operators. Each subexpression must be of the form
         "resource.matchTag('<ORG_ID>/tag_key_short_name,
         'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id',
         'tagValues/value_id')". where key_name and value_name are the resource
         names for Label Keys and Values. These names are available from the Tag
         Manager Service. An example expression is:
         "resource.matchTag('123456789/environment,
         'prod')". or "resource.matchTagId('tagKeys/123',
         'tagValues/456')".
         
        .google.type.Expr condition = 5;
      • getConditionOrBuilder

        public com.google.type.ExprOrBuilder getConditionOrBuilder()
         A condition which determines whether this rule is used
         in the evaluation of the policy. When set, the `expression` field in
         the `Expr' must include from 1 to 10 subexpressions, joined by the "||"
         or "&&" operators. Each subexpression must be of the form
         "resource.matchTag('<ORG_ID>/tag_key_short_name,
         'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id',
         'tagValues/value_id')". where key_name and value_name are the resource
         names for Label Keys and Values. These names are available from the Tag
         Manager Service. An example expression is:
         "resource.matchTag('123456789/environment,
         'prod')". or "resource.matchTagId('tagKeys/123',
         'tagValues/456')".
         
        .google.type.Expr condition = 5;
        Specified by:
        getConditionOrBuilder in interface PolicySpec.PolicyRuleOrBuilder
      • setUnknownFields

        public final PolicySpec.PolicyRule.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<PolicySpec.PolicyRule.Builder>
      • mergeUnknownFields

        public final PolicySpec.PolicyRule.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<PolicySpec.PolicyRule.Builder>