Class ConfigSync.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ConfigSync.Builder>
com.google.cloud.gkehub.configmanagement.v1.ConfigSync.Builder
All Implemented Interfaces:
ConfigSyncOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
ConfigSync

public static final class ConfigSync.Builder extends com.google.protobuf.GeneratedMessage.Builder<ConfigSync.Builder> implements ConfigSyncOrBuilder
 Configuration for Config Sync
 
Protobuf type google.cloud.gkehub.configmanagement.v1.ConfigSync
  • Method Details

    • getDescriptor

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

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

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

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

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

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

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

      public ConfigSync.Builder mergeFrom(ConfigSync other)
    • isInitialized

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

      public ConfigSync.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<ConfigSync.Builder>
      Throws:
      IOException
    • hasGit

      public boolean hasGit()
       Git repo configuration for the cluster.
       
      .google.cloud.gkehub.configmanagement.v1.GitConfig git = 7;
      Specified by:
      hasGit in interface ConfigSyncOrBuilder
      Returns:
      Whether the git field is set.
    • getGit

      public GitConfig getGit()
       Git repo configuration for the cluster.
       
      .google.cloud.gkehub.configmanagement.v1.GitConfig git = 7;
      Specified by:
      getGit in interface ConfigSyncOrBuilder
      Returns:
      The git.
    • setGit

      public ConfigSync.Builder setGit(GitConfig value)
       Git repo configuration for the cluster.
       
      .google.cloud.gkehub.configmanagement.v1.GitConfig git = 7;
    • setGit

      public ConfigSync.Builder setGit(GitConfig.Builder builderForValue)
       Git repo configuration for the cluster.
       
      .google.cloud.gkehub.configmanagement.v1.GitConfig git = 7;
    • mergeGit

      public ConfigSync.Builder mergeGit(GitConfig value)
       Git repo configuration for the cluster.
       
      .google.cloud.gkehub.configmanagement.v1.GitConfig git = 7;
    • clearGit

      public ConfigSync.Builder clearGit()
       Git repo configuration for the cluster.
       
      .google.cloud.gkehub.configmanagement.v1.GitConfig git = 7;
    • getGitBuilder

      public GitConfig.Builder getGitBuilder()
       Git repo configuration for the cluster.
       
      .google.cloud.gkehub.configmanagement.v1.GitConfig git = 7;
    • getGitOrBuilder

      public GitConfigOrBuilder getGitOrBuilder()
       Git repo configuration for the cluster.
       
      .google.cloud.gkehub.configmanagement.v1.GitConfig git = 7;
      Specified by:
      getGitOrBuilder in interface ConfigSyncOrBuilder
    • getSourceFormat

      public String getSourceFormat()
       Specifies whether the Config Sync Repo is
       in "hierarchical" or "unstructured" mode.
       
      string source_format = 8;
      Specified by:
      getSourceFormat in interface ConfigSyncOrBuilder
      Returns:
      The sourceFormat.
    • getSourceFormatBytes

      public com.google.protobuf.ByteString getSourceFormatBytes()
       Specifies whether the Config Sync Repo is
       in "hierarchical" or "unstructured" mode.
       
      string source_format = 8;
      Specified by:
      getSourceFormatBytes in interface ConfigSyncOrBuilder
      Returns:
      The bytes for sourceFormat.
    • setSourceFormat

      public ConfigSync.Builder setSourceFormat(String value)
       Specifies whether the Config Sync Repo is
       in "hierarchical" or "unstructured" mode.
       
      string source_format = 8;
      Parameters:
      value - The sourceFormat to set.
      Returns:
      This builder for chaining.
    • clearSourceFormat

      public ConfigSync.Builder clearSourceFormat()
       Specifies whether the Config Sync Repo is
       in "hierarchical" or "unstructured" mode.
       
      string source_format = 8;
      Returns:
      This builder for chaining.
    • setSourceFormatBytes

      public ConfigSync.Builder setSourceFormatBytes(com.google.protobuf.ByteString value)
       Specifies whether the Config Sync Repo is
       in "hierarchical" or "unstructured" mode.
       
      string source_format = 8;
      Parameters:
      value - The bytes for sourceFormat to set.
      Returns:
      This builder for chaining.
    • hasEnabled

      public boolean hasEnabled()
       Enables the installation of ConfigSync.
       If set to true, ConfigSync resources will be created and the other
       ConfigSync fields will be applied if exist.
       If set to false, all other ConfigSync fields will be ignored, ConfigSync
       resources will be deleted.
       If omitted, ConfigSync resources will be managed depends on the presence
       of the git or oci field.
       
      optional bool enabled = 10;
      Specified by:
      hasEnabled in interface ConfigSyncOrBuilder
      Returns:
      Whether the enabled field is set.
    • getEnabled

      public boolean getEnabled()
       Enables the installation of ConfigSync.
       If set to true, ConfigSync resources will be created and the other
       ConfigSync fields will be applied if exist.
       If set to false, all other ConfigSync fields will be ignored, ConfigSync
       resources will be deleted.
       If omitted, ConfigSync resources will be managed depends on the presence
       of the git or oci field.
       
      optional bool enabled = 10;
      Specified by:
      getEnabled in interface ConfigSyncOrBuilder
      Returns:
      The enabled.
    • setEnabled

      public ConfigSync.Builder setEnabled(boolean value)
       Enables the installation of ConfigSync.
       If set to true, ConfigSync resources will be created and the other
       ConfigSync fields will be applied if exist.
       If set to false, all other ConfigSync fields will be ignored, ConfigSync
       resources will be deleted.
       If omitted, ConfigSync resources will be managed depends on the presence
       of the git or oci field.
       
      optional bool enabled = 10;
      Parameters:
      value - The enabled to set.
      Returns:
      This builder for chaining.
    • clearEnabled

      public ConfigSync.Builder clearEnabled()
       Enables the installation of ConfigSync.
       If set to true, ConfigSync resources will be created and the other
       ConfigSync fields will be applied if exist.
       If set to false, all other ConfigSync fields will be ignored, ConfigSync
       resources will be deleted.
       If omitted, ConfigSync resources will be managed depends on the presence
       of the git or oci field.
       
      optional bool enabled = 10;
      Returns:
      This builder for chaining.
    • getPreventDrift

      public boolean getPreventDrift()
       Set to true to enable the Config Sync admission webhook to prevent drifts.
       If set to `false`, disables the Config Sync admission webhook and does not
       prevent drifts.
       
      bool prevent_drift = 11;
      Specified by:
      getPreventDrift in interface ConfigSyncOrBuilder
      Returns:
      The preventDrift.
    • setPreventDrift

      public ConfigSync.Builder setPreventDrift(boolean value)
       Set to true to enable the Config Sync admission webhook to prevent drifts.
       If set to `false`, disables the Config Sync admission webhook and does not
       prevent drifts.
       
      bool prevent_drift = 11;
      Parameters:
      value - The preventDrift to set.
      Returns:
      This builder for chaining.
    • clearPreventDrift

      public ConfigSync.Builder clearPreventDrift()
       Set to true to enable the Config Sync admission webhook to prevent drifts.
       If set to `false`, disables the Config Sync admission webhook and does not
       prevent drifts.
       
      bool prevent_drift = 11;
      Returns:
      This builder for chaining.
    • hasOci

      public boolean hasOci()
       OCI repo configuration for the cluster
       
      .google.cloud.gkehub.configmanagement.v1.OciConfig oci = 12;
      Specified by:
      hasOci in interface ConfigSyncOrBuilder
      Returns:
      Whether the oci field is set.
    • getOci

      public OciConfig getOci()
       OCI repo configuration for the cluster
       
      .google.cloud.gkehub.configmanagement.v1.OciConfig oci = 12;
      Specified by:
      getOci in interface ConfigSyncOrBuilder
      Returns:
      The oci.
    • setOci

      public ConfigSync.Builder setOci(OciConfig value)
       OCI repo configuration for the cluster
       
      .google.cloud.gkehub.configmanagement.v1.OciConfig oci = 12;
    • setOci

      public ConfigSync.Builder setOci(OciConfig.Builder builderForValue)
       OCI repo configuration for the cluster
       
      .google.cloud.gkehub.configmanagement.v1.OciConfig oci = 12;
    • mergeOci

      public ConfigSync.Builder mergeOci(OciConfig value)
       OCI repo configuration for the cluster
       
      .google.cloud.gkehub.configmanagement.v1.OciConfig oci = 12;
    • clearOci

      public ConfigSync.Builder clearOci()
       OCI repo configuration for the cluster
       
      .google.cloud.gkehub.configmanagement.v1.OciConfig oci = 12;
    • getOciBuilder

      public OciConfig.Builder getOciBuilder()
       OCI repo configuration for the cluster
       
      .google.cloud.gkehub.configmanagement.v1.OciConfig oci = 12;
    • getOciOrBuilder

      public OciConfigOrBuilder getOciOrBuilder()
       OCI repo configuration for the cluster
       
      .google.cloud.gkehub.configmanagement.v1.OciConfig oci = 12;
      Specified by:
      getOciOrBuilder in interface ConfigSyncOrBuilder
    • getMetricsGcpServiceAccountEmail

      public String getMetricsGcpServiceAccountEmail()
       The Email of the Google Cloud Service Account (GSA) used for exporting
       Config Sync metrics to Cloud Monitoring when Workload Identity is enabled.
       The GSA should have the Monitoring Metric Writer
       (roles/monitoring.metricWriter) IAM role.
       The Kubernetes ServiceAccount `default` in the namespace
       `config-management-monitoring` should be bound to the GSA.
       
      string metrics_gcp_service_account_email = 15;
      Specified by:
      getMetricsGcpServiceAccountEmail in interface ConfigSyncOrBuilder
      Returns:
      The metricsGcpServiceAccountEmail.
    • getMetricsGcpServiceAccountEmailBytes

      public com.google.protobuf.ByteString getMetricsGcpServiceAccountEmailBytes()
       The Email of the Google Cloud Service Account (GSA) used for exporting
       Config Sync metrics to Cloud Monitoring when Workload Identity is enabled.
       The GSA should have the Monitoring Metric Writer
       (roles/monitoring.metricWriter) IAM role.
       The Kubernetes ServiceAccount `default` in the namespace
       `config-management-monitoring` should be bound to the GSA.
       
      string metrics_gcp_service_account_email = 15;
      Specified by:
      getMetricsGcpServiceAccountEmailBytes in interface ConfigSyncOrBuilder
      Returns:
      The bytes for metricsGcpServiceAccountEmail.
    • setMetricsGcpServiceAccountEmail

      public ConfigSync.Builder setMetricsGcpServiceAccountEmail(String value)
       The Email of the Google Cloud Service Account (GSA) used for exporting
       Config Sync metrics to Cloud Monitoring when Workload Identity is enabled.
       The GSA should have the Monitoring Metric Writer
       (roles/monitoring.metricWriter) IAM role.
       The Kubernetes ServiceAccount `default` in the namespace
       `config-management-monitoring` should be bound to the GSA.
       
      string metrics_gcp_service_account_email = 15;
      Parameters:
      value - The metricsGcpServiceAccountEmail to set.
      Returns:
      This builder for chaining.
    • clearMetricsGcpServiceAccountEmail

      public ConfigSync.Builder clearMetricsGcpServiceAccountEmail()
       The Email of the Google Cloud Service Account (GSA) used for exporting
       Config Sync metrics to Cloud Monitoring when Workload Identity is enabled.
       The GSA should have the Monitoring Metric Writer
       (roles/monitoring.metricWriter) IAM role.
       The Kubernetes ServiceAccount `default` in the namespace
       `config-management-monitoring` should be bound to the GSA.
       
      string metrics_gcp_service_account_email = 15;
      Returns:
      This builder for chaining.
    • setMetricsGcpServiceAccountEmailBytes

      public ConfigSync.Builder setMetricsGcpServiceAccountEmailBytes(com.google.protobuf.ByteString value)
       The Email of the Google Cloud Service Account (GSA) used for exporting
       Config Sync metrics to Cloud Monitoring when Workload Identity is enabled.
       The GSA should have the Monitoring Metric Writer
       (roles/monitoring.metricWriter) IAM role.
       The Kubernetes ServiceAccount `default` in the namespace
       `config-management-monitoring` should be bound to the GSA.
       
      string metrics_gcp_service_account_email = 15;
      Parameters:
      value - The bytes for metricsGcpServiceAccountEmail to set.
      Returns:
      This builder for chaining.