Class PolicyController.Builder

  • All Implemented Interfaces:
    PolicyControllerOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    PolicyController

    public static final class PolicyController.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<PolicyController.Builder>
    implements PolicyControllerOrBuilder
     Configuration for Policy Controller
     
    Protobuf type google.cloud.gkehub.configmanagement.v1alpha.PolicyController
    • 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<PolicyController.Builder>
      • clear

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

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

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

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

        public PolicyController.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<PolicyController.Builder>
      • setField

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

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

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

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

        public PolicyController.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<PolicyController.Builder>
      • mergeFrom

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

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

        public PolicyController.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<PolicyController.Builder>
        Throws:
        IOException
      • getEnabled

        public boolean getEnabled()
         Enables the installation of Policy Controller.
         If false, the rest of PolicyController fields take no
         effect.
         
        bool enabled = 1;
        Specified by:
        getEnabled in interface PolicyControllerOrBuilder
        Returns:
        The enabled.
      • setEnabled

        public PolicyController.Builder setEnabled​(boolean value)
         Enables the installation of Policy Controller.
         If false, the rest of PolicyController fields take no
         effect.
         
        bool enabled = 1;
        Parameters:
        value - The enabled to set.
        Returns:
        This builder for chaining.
      • clearEnabled

        public PolicyController.Builder clearEnabled()
         Enables the installation of Policy Controller.
         If false, the rest of PolicyController fields take no
         effect.
         
        bool enabled = 1;
        Returns:
        This builder for chaining.
      • hasTemplateLibraryInstalled

        public boolean hasTemplateLibraryInstalled()
         Installs the default template library along with Policy Controller.
         
        optional bool template_library_installed = 2;
        Specified by:
        hasTemplateLibraryInstalled in interface PolicyControllerOrBuilder
        Returns:
        Whether the templateLibraryInstalled field is set.
      • getTemplateLibraryInstalled

        public boolean getTemplateLibraryInstalled()
         Installs the default template library along with Policy Controller.
         
        optional bool template_library_installed = 2;
        Specified by:
        getTemplateLibraryInstalled in interface PolicyControllerOrBuilder
        Returns:
        The templateLibraryInstalled.
      • setTemplateLibraryInstalled

        public PolicyController.Builder setTemplateLibraryInstalled​(boolean value)
         Installs the default template library along with Policy Controller.
         
        optional bool template_library_installed = 2;
        Parameters:
        value - The templateLibraryInstalled to set.
        Returns:
        This builder for chaining.
      • clearTemplateLibraryInstalled

        public PolicyController.Builder clearTemplateLibraryInstalled()
         Installs the default template library along with Policy Controller.
         
        optional bool template_library_installed = 2;
        Returns:
        This builder for chaining.
      • hasAuditIntervalSeconds

        public boolean hasAuditIntervalSeconds()
         Sets the interval for Policy Controller Audit Scans (in seconds).
         When set to 0, this disables audit functionality altogether.
         
        optional int64 audit_interval_seconds = 3;
        Specified by:
        hasAuditIntervalSeconds in interface PolicyControllerOrBuilder
        Returns:
        Whether the auditIntervalSeconds field is set.
      • getAuditIntervalSeconds

        public long getAuditIntervalSeconds()
         Sets the interval for Policy Controller Audit Scans (in seconds).
         When set to 0, this disables audit functionality altogether.
         
        optional int64 audit_interval_seconds = 3;
        Specified by:
        getAuditIntervalSeconds in interface PolicyControllerOrBuilder
        Returns:
        The auditIntervalSeconds.
      • setAuditIntervalSeconds

        public PolicyController.Builder setAuditIntervalSeconds​(long value)
         Sets the interval for Policy Controller Audit Scans (in seconds).
         When set to 0, this disables audit functionality altogether.
         
        optional int64 audit_interval_seconds = 3;
        Parameters:
        value - The auditIntervalSeconds to set.
        Returns:
        This builder for chaining.
      • clearAuditIntervalSeconds

        public PolicyController.Builder clearAuditIntervalSeconds()
         Sets the interval for Policy Controller Audit Scans (in seconds).
         When set to 0, this disables audit functionality altogether.
         
        optional int64 audit_interval_seconds = 3;
        Returns:
        This builder for chaining.
      • getExemptableNamespacesList

        public com.google.protobuf.ProtocolStringList getExemptableNamespacesList()
         The set of namespaces that are excluded from Policy Controller checks.
         Namespaces do not need to currently exist on the cluster.
         
        repeated string exemptable_namespaces = 4;
        Specified by:
        getExemptableNamespacesList in interface PolicyControllerOrBuilder
        Returns:
        A list containing the exemptableNamespaces.
      • getExemptableNamespacesCount

        public int getExemptableNamespacesCount()
         The set of namespaces that are excluded from Policy Controller checks.
         Namespaces do not need to currently exist on the cluster.
         
        repeated string exemptable_namespaces = 4;
        Specified by:
        getExemptableNamespacesCount in interface PolicyControllerOrBuilder
        Returns:
        The count of exemptableNamespaces.
      • getExemptableNamespaces

        public String getExemptableNamespaces​(int index)
         The set of namespaces that are excluded from Policy Controller checks.
         Namespaces do not need to currently exist on the cluster.
         
        repeated string exemptable_namespaces = 4;
        Specified by:
        getExemptableNamespaces in interface PolicyControllerOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The exemptableNamespaces at the given index.
      • getExemptableNamespacesBytes

        public com.google.protobuf.ByteString getExemptableNamespacesBytes​(int index)
         The set of namespaces that are excluded from Policy Controller checks.
         Namespaces do not need to currently exist on the cluster.
         
        repeated string exemptable_namespaces = 4;
        Specified by:
        getExemptableNamespacesBytes in interface PolicyControllerOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the exemptableNamespaces at the given index.
      • setExemptableNamespaces

        public PolicyController.Builder setExemptableNamespaces​(int index,
                                                                String value)
         The set of namespaces that are excluded from Policy Controller checks.
         Namespaces do not need to currently exist on the cluster.
         
        repeated string exemptable_namespaces = 4;
        Parameters:
        index - The index to set the value at.
        value - The exemptableNamespaces to set.
        Returns:
        This builder for chaining.
      • addExemptableNamespaces

        public PolicyController.Builder addExemptableNamespaces​(String value)
         The set of namespaces that are excluded from Policy Controller checks.
         Namespaces do not need to currently exist on the cluster.
         
        repeated string exemptable_namespaces = 4;
        Parameters:
        value - The exemptableNamespaces to add.
        Returns:
        This builder for chaining.
      • addAllExemptableNamespaces

        public PolicyController.Builder addAllExemptableNamespaces​(Iterable<String> values)
         The set of namespaces that are excluded from Policy Controller checks.
         Namespaces do not need to currently exist on the cluster.
         
        repeated string exemptable_namespaces = 4;
        Parameters:
        values - The exemptableNamespaces to add.
        Returns:
        This builder for chaining.
      • clearExemptableNamespaces

        public PolicyController.Builder clearExemptableNamespaces()
         The set of namespaces that are excluded from Policy Controller checks.
         Namespaces do not need to currently exist on the cluster.
         
        repeated string exemptable_namespaces = 4;
        Returns:
        This builder for chaining.
      • addExemptableNamespacesBytes

        public PolicyController.Builder addExemptableNamespacesBytes​(com.google.protobuf.ByteString value)
         The set of namespaces that are excluded from Policy Controller checks.
         Namespaces do not need to currently exist on the cluster.
         
        repeated string exemptable_namespaces = 4;
        Parameters:
        value - The bytes of the exemptableNamespaces to add.
        Returns:
        This builder for chaining.
      • getReferentialRulesEnabled

        public boolean getReferentialRulesEnabled()
         Enables the ability to use Constraint Templates that reference to objects
         other than the object currently being evaluated.
         
        bool referential_rules_enabled = 5;
        Specified by:
        getReferentialRulesEnabled in interface PolicyControllerOrBuilder
        Returns:
        The referentialRulesEnabled.
      • setReferentialRulesEnabled

        public PolicyController.Builder setReferentialRulesEnabled​(boolean value)
         Enables the ability to use Constraint Templates that reference to objects
         other than the object currently being evaluated.
         
        bool referential_rules_enabled = 5;
        Parameters:
        value - The referentialRulesEnabled to set.
        Returns:
        This builder for chaining.
      • clearReferentialRulesEnabled

        public PolicyController.Builder clearReferentialRulesEnabled()
         Enables the ability to use Constraint Templates that reference to objects
         other than the object currently being evaluated.
         
        bool referential_rules_enabled = 5;
        Returns:
        This builder for chaining.
      • getLogDeniesEnabled

        public boolean getLogDeniesEnabled()
         Logs all denies and dry run failures.
         
        bool log_denies_enabled = 6;
        Specified by:
        getLogDeniesEnabled in interface PolicyControllerOrBuilder
        Returns:
        The logDeniesEnabled.
      • setLogDeniesEnabled

        public PolicyController.Builder setLogDeniesEnabled​(boolean value)
         Logs all denies and dry run failures.
         
        bool log_denies_enabled = 6;
        Parameters:
        value - The logDeniesEnabled to set.
        Returns:
        This builder for chaining.
      • clearLogDeniesEnabled

        public PolicyController.Builder clearLogDeniesEnabled()
         Logs all denies and dry run failures.
         
        bool log_denies_enabled = 6;
        Returns:
        This builder for chaining.
      • getMutationEnabled

        public boolean getMutationEnabled()
         Enable users to try out mutation for PolicyController.
         
        bool mutation_enabled = 7;
        Specified by:
        getMutationEnabled in interface PolicyControllerOrBuilder
        Returns:
        The mutationEnabled.
      • setMutationEnabled

        public PolicyController.Builder setMutationEnabled​(boolean value)
         Enable users to try out mutation for PolicyController.
         
        bool mutation_enabled = 7;
        Parameters:
        value - The mutationEnabled to set.
        Returns:
        This builder for chaining.
      • clearMutationEnabled

        public PolicyController.Builder clearMutationEnabled()
         Enable users to try out mutation for PolicyController.
         
        bool mutation_enabled = 7;
        Returns:
        This builder for chaining.
      • setUnknownFields

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

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