Class HubConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<HubConfig.Builder>
com.google.cloud.gkehub.policycontroller.v1beta.HubConfig.Builder
All Implemented Interfaces:
HubConfigOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
HubConfig

public static final class HubConfig.Builder extends com.google.protobuf.GeneratedMessage.Builder<HubConfig.Builder> implements HubConfigOrBuilder
 Configuration for Policy Controller
 
Protobuf type google.cloud.gkehub.policycontroller.v1beta.HubConfig
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<HubConfig.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<HubConfig.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<HubConfig.Builder>
    • clear

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

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

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

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

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

      public HubConfig.Builder mergeFrom(HubConfig other)
    • isInitialized

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

      public HubConfig.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<HubConfig.Builder>
      Throws:
      IOException
    • getInstallSpecValue

      public int getInstallSpecValue()
       The install_spec represents the intended state specified by the
       latest request that mutated install_spec in the feature spec,
       not the lifecycle state of the
       feature observed by the Hub feature controller
       that is reported in the feature state.
       
      .google.cloud.gkehub.policycontroller.v1beta.HubConfig.InstallSpec install_spec = 1;
      Specified by:
      getInstallSpecValue in interface HubConfigOrBuilder
      Returns:
      The enum numeric value on the wire for installSpec.
    • setInstallSpecValue

      public HubConfig.Builder setInstallSpecValue(int value)
       The install_spec represents the intended state specified by the
       latest request that mutated install_spec in the feature spec,
       not the lifecycle state of the
       feature observed by the Hub feature controller
       that is reported in the feature state.
       
      .google.cloud.gkehub.policycontroller.v1beta.HubConfig.InstallSpec install_spec = 1;
      Parameters:
      value - The enum numeric value on the wire for installSpec to set.
      Returns:
      This builder for chaining.
    • getInstallSpec

      public HubConfig.InstallSpec getInstallSpec()
       The install_spec represents the intended state specified by the
       latest request that mutated install_spec in the feature spec,
       not the lifecycle state of the
       feature observed by the Hub feature controller
       that is reported in the feature state.
       
      .google.cloud.gkehub.policycontroller.v1beta.HubConfig.InstallSpec install_spec = 1;
      Specified by:
      getInstallSpec in interface HubConfigOrBuilder
      Returns:
      The installSpec.
    • setInstallSpec

      public HubConfig.Builder setInstallSpec(HubConfig.InstallSpec value)
       The install_spec represents the intended state specified by the
       latest request that mutated install_spec in the feature spec,
       not the lifecycle state of the
       feature observed by the Hub feature controller
       that is reported in the feature state.
       
      .google.cloud.gkehub.policycontroller.v1beta.HubConfig.InstallSpec install_spec = 1;
      Parameters:
      value - The installSpec to set.
      Returns:
      This builder for chaining.
    • clearInstallSpec

      public HubConfig.Builder clearInstallSpec()
       The install_spec represents the intended state specified by the
       latest request that mutated install_spec in the feature spec,
       not the lifecycle state of the
       feature observed by the Hub feature controller
       that is reported in the feature state.
       
      .google.cloud.gkehub.policycontroller.v1beta.HubConfig.InstallSpec install_spec = 1;
      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 = 2;
      Specified by:
      hasAuditIntervalSeconds in interface HubConfigOrBuilder
      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 = 2;
      Specified by:
      getAuditIntervalSeconds in interface HubConfigOrBuilder
      Returns:
      The auditIntervalSeconds.
    • setAuditIntervalSeconds

      public HubConfig.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 = 2;
      Parameters:
      value - The auditIntervalSeconds to set.
      Returns:
      This builder for chaining.
    • clearAuditIntervalSeconds

      public HubConfig.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 = 2;
      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 = 3;
      Specified by:
      getExemptableNamespacesList in interface HubConfigOrBuilder
      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 = 3;
      Specified by:
      getExemptableNamespacesCount in interface HubConfigOrBuilder
      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 = 3;
      Specified by:
      getExemptableNamespaces in interface HubConfigOrBuilder
      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 = 3;
      Specified by:
      getExemptableNamespacesBytes in interface HubConfigOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the exemptableNamespaces at the given index.
    • setExemptableNamespaces

      public HubConfig.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 = 3;
      Parameters:
      index - The index to set the value at.
      value - The exemptableNamespaces to set.
      Returns:
      This builder for chaining.
    • addExemptableNamespaces

      public HubConfig.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 = 3;
      Parameters:
      value - The exemptableNamespaces to add.
      Returns:
      This builder for chaining.
    • addAllExemptableNamespaces

      public HubConfig.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 = 3;
      Parameters:
      values - The exemptableNamespaces to add.
      Returns:
      This builder for chaining.
    • clearExemptableNamespaces

      public HubConfig.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 = 3;
      Returns:
      This builder for chaining.
    • addExemptableNamespacesBytes

      public HubConfig.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 = 3;
      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 = 4;
      Specified by:
      getReferentialRulesEnabled in interface HubConfigOrBuilder
      Returns:
      The referentialRulesEnabled.
    • setReferentialRulesEnabled

      public HubConfig.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 = 4;
      Parameters:
      value - The referentialRulesEnabled to set.
      Returns:
      This builder for chaining.
    • clearReferentialRulesEnabled

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

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

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

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

      public boolean getMutationEnabled()
       Enables the ability to mutate resources using Policy Controller.
       
      bool mutation_enabled = 6;
      Specified by:
      getMutationEnabled in interface HubConfigOrBuilder
      Returns:
      The mutationEnabled.
    • setMutationEnabled

      public HubConfig.Builder setMutationEnabled(boolean value)
       Enables the ability to mutate resources using Policy Controller.
       
      bool mutation_enabled = 6;
      Parameters:
      value - The mutationEnabled to set.
      Returns:
      This builder for chaining.
    • clearMutationEnabled

      public HubConfig.Builder clearMutationEnabled()
       Enables the ability to mutate resources using Policy Controller.
       
      bool mutation_enabled = 6;
      Returns:
      This builder for chaining.
    • hasMonitoring

      public boolean hasMonitoring()
       Monitoring specifies the configuration of monitoring.
       
      optional .google.cloud.gkehub.policycontroller.v1beta.MonitoringConfig monitoring = 8;
      Specified by:
      hasMonitoring in interface HubConfigOrBuilder
      Returns:
      Whether the monitoring field is set.
    • getMonitoring

      public MonitoringConfig getMonitoring()
       Monitoring specifies the configuration of monitoring.
       
      optional .google.cloud.gkehub.policycontroller.v1beta.MonitoringConfig monitoring = 8;
      Specified by:
      getMonitoring in interface HubConfigOrBuilder
      Returns:
      The monitoring.
    • setMonitoring

      public HubConfig.Builder setMonitoring(MonitoringConfig value)
       Monitoring specifies the configuration of monitoring.
       
      optional .google.cloud.gkehub.policycontroller.v1beta.MonitoringConfig monitoring = 8;
    • setMonitoring

      public HubConfig.Builder setMonitoring(MonitoringConfig.Builder builderForValue)
       Monitoring specifies the configuration of monitoring.
       
      optional .google.cloud.gkehub.policycontroller.v1beta.MonitoringConfig monitoring = 8;
    • mergeMonitoring

      public HubConfig.Builder mergeMonitoring(MonitoringConfig value)
       Monitoring specifies the configuration of monitoring.
       
      optional .google.cloud.gkehub.policycontroller.v1beta.MonitoringConfig monitoring = 8;
    • clearMonitoring

      public HubConfig.Builder clearMonitoring()
       Monitoring specifies the configuration of monitoring.
       
      optional .google.cloud.gkehub.policycontroller.v1beta.MonitoringConfig monitoring = 8;
    • getMonitoringBuilder

      public MonitoringConfig.Builder getMonitoringBuilder()
       Monitoring specifies the configuration of monitoring.
       
      optional .google.cloud.gkehub.policycontroller.v1beta.MonitoringConfig monitoring = 8;
    • getMonitoringOrBuilder

      public MonitoringConfigOrBuilder getMonitoringOrBuilder()
       Monitoring specifies the configuration of monitoring.
       
      optional .google.cloud.gkehub.policycontroller.v1beta.MonitoringConfig monitoring = 8;
      Specified by:
      getMonitoringOrBuilder in interface HubConfigOrBuilder
    • hasPolicyContent

      public boolean hasPolicyContent()
       Specifies the desired policy content on the cluster
       
      optional .google.cloud.gkehub.policycontroller.v1beta.PolicyContentSpec policy_content = 9;
      Specified by:
      hasPolicyContent in interface HubConfigOrBuilder
      Returns:
      Whether the policyContent field is set.
    • getPolicyContent

      public PolicyContentSpec getPolicyContent()
       Specifies the desired policy content on the cluster
       
      optional .google.cloud.gkehub.policycontroller.v1beta.PolicyContentSpec policy_content = 9;
      Specified by:
      getPolicyContent in interface HubConfigOrBuilder
      Returns:
      The policyContent.
    • setPolicyContent

      public HubConfig.Builder setPolicyContent(PolicyContentSpec value)
       Specifies the desired policy content on the cluster
       
      optional .google.cloud.gkehub.policycontroller.v1beta.PolicyContentSpec policy_content = 9;
    • setPolicyContent

      public HubConfig.Builder setPolicyContent(PolicyContentSpec.Builder builderForValue)
       Specifies the desired policy content on the cluster
       
      optional .google.cloud.gkehub.policycontroller.v1beta.PolicyContentSpec policy_content = 9;
    • mergePolicyContent

      public HubConfig.Builder mergePolicyContent(PolicyContentSpec value)
       Specifies the desired policy content on the cluster
       
      optional .google.cloud.gkehub.policycontroller.v1beta.PolicyContentSpec policy_content = 9;
    • clearPolicyContent

      public HubConfig.Builder clearPolicyContent()
       Specifies the desired policy content on the cluster
       
      optional .google.cloud.gkehub.policycontroller.v1beta.PolicyContentSpec policy_content = 9;
    • getPolicyContentBuilder

      public PolicyContentSpec.Builder getPolicyContentBuilder()
       Specifies the desired policy content on the cluster
       
      optional .google.cloud.gkehub.policycontroller.v1beta.PolicyContentSpec policy_content = 9;
    • getPolicyContentOrBuilder

      public PolicyContentSpecOrBuilder getPolicyContentOrBuilder()
       Specifies the desired policy content on the cluster
       
      optional .google.cloud.gkehub.policycontroller.v1beta.PolicyContentSpec policy_content = 9;
      Specified by:
      getPolicyContentOrBuilder in interface HubConfigOrBuilder
    • hasConstraintViolationLimit

      public boolean hasConstraintViolationLimit()
       The maximum number of audit violations to be stored in a constraint.
       If not set, the internal default (currently 20) will be used.
       
      optional int64 constraint_violation_limit = 10;
      Specified by:
      hasConstraintViolationLimit in interface HubConfigOrBuilder
      Returns:
      Whether the constraintViolationLimit field is set.
    • getConstraintViolationLimit

      public long getConstraintViolationLimit()
       The maximum number of audit violations to be stored in a constraint.
       If not set, the internal default (currently 20) will be used.
       
      optional int64 constraint_violation_limit = 10;
      Specified by:
      getConstraintViolationLimit in interface HubConfigOrBuilder
      Returns:
      The constraintViolationLimit.
    • setConstraintViolationLimit

      public HubConfig.Builder setConstraintViolationLimit(long value)
       The maximum number of audit violations to be stored in a constraint.
       If not set, the internal default (currently 20) will be used.
       
      optional int64 constraint_violation_limit = 10;
      Parameters:
      value - The constraintViolationLimit to set.
      Returns:
      This builder for chaining.
    • clearConstraintViolationLimit

      public HubConfig.Builder clearConstraintViolationLimit()
       The maximum number of audit violations to be stored in a constraint.
       If not set, the internal default (currently 20) will be used.
       
      optional int64 constraint_violation_limit = 10;
      Returns:
      This builder for chaining.
    • getDeploymentConfigsCount

      public int getDeploymentConfigsCount()
      Description copied from interface: HubConfigOrBuilder
       Map of deployment configs to deployments ("admission", "audit",
       "mutation').
       
      map<string, .google.cloud.gkehub.policycontroller.v1beta.PolicyControllerDeploymentConfig> deployment_configs = 11;
      Specified by:
      getDeploymentConfigsCount in interface HubConfigOrBuilder
    • containsDeploymentConfigs

      public boolean containsDeploymentConfigs(String key)
       Map of deployment configs to deployments ("admission", "audit",
       "mutation').
       
      map<string, .google.cloud.gkehub.policycontroller.v1beta.PolicyControllerDeploymentConfig> deployment_configs = 11;
      Specified by:
      containsDeploymentConfigs in interface HubConfigOrBuilder
    • getDeploymentConfigs

      @Deprecated public Map<String,PolicyControllerDeploymentConfig> getDeploymentConfigs()
      Deprecated.
      Specified by:
      getDeploymentConfigs in interface HubConfigOrBuilder
    • getDeploymentConfigsMap

      public Map<String,PolicyControllerDeploymentConfig> getDeploymentConfigsMap()
       Map of deployment configs to deployments ("admission", "audit",
       "mutation').
       
      map<string, .google.cloud.gkehub.policycontroller.v1beta.PolicyControllerDeploymentConfig> deployment_configs = 11;
      Specified by:
      getDeploymentConfigsMap in interface HubConfigOrBuilder
    • getDeploymentConfigsOrDefault

      public PolicyControllerDeploymentConfig getDeploymentConfigsOrDefault(String key, PolicyControllerDeploymentConfig defaultValue)
       Map of deployment configs to deployments ("admission", "audit",
       "mutation').
       
      map<string, .google.cloud.gkehub.policycontroller.v1beta.PolicyControllerDeploymentConfig> deployment_configs = 11;
      Specified by:
      getDeploymentConfigsOrDefault in interface HubConfigOrBuilder
    • getDeploymentConfigsOrThrow

      public PolicyControllerDeploymentConfig getDeploymentConfigsOrThrow(String key)
       Map of deployment configs to deployments ("admission", "audit",
       "mutation').
       
      map<string, .google.cloud.gkehub.policycontroller.v1beta.PolicyControllerDeploymentConfig> deployment_configs = 11;
      Specified by:
      getDeploymentConfigsOrThrow in interface HubConfigOrBuilder
    • clearDeploymentConfigs

      public HubConfig.Builder clearDeploymentConfigs()
    • removeDeploymentConfigs

      public HubConfig.Builder removeDeploymentConfigs(String key)
       Map of deployment configs to deployments ("admission", "audit",
       "mutation').
       
      map<string, .google.cloud.gkehub.policycontroller.v1beta.PolicyControllerDeploymentConfig> deployment_configs = 11;
    • getMutableDeploymentConfigs

      @Deprecated public Map<String,PolicyControllerDeploymentConfig> getMutableDeploymentConfigs()
      Deprecated.
      Use alternate mutation accessors instead.
    • putDeploymentConfigs

      public HubConfig.Builder putDeploymentConfigs(String key, PolicyControllerDeploymentConfig value)
       Map of deployment configs to deployments ("admission", "audit",
       "mutation').
       
      map<string, .google.cloud.gkehub.policycontroller.v1beta.PolicyControllerDeploymentConfig> deployment_configs = 11;
    • putAllDeploymentConfigs

      public HubConfig.Builder putAllDeploymentConfigs(Map<String,PolicyControllerDeploymentConfig> values)
       Map of deployment configs to deployments ("admission", "audit",
       "mutation').
       
      map<string, .google.cloud.gkehub.policycontroller.v1beta.PolicyControllerDeploymentConfig> deployment_configs = 11;
    • putDeploymentConfigsBuilderIfAbsent

      public PolicyControllerDeploymentConfig.Builder putDeploymentConfigsBuilderIfAbsent(String key)
       Map of deployment configs to deployments ("admission", "audit",
       "mutation').
       
      map<string, .google.cloud.gkehub.policycontroller.v1beta.PolicyControllerDeploymentConfig> deployment_configs = 11;