Class MonitoringConfig.Builder

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

public static final class MonitoringConfig.Builder extends com.google.protobuf.GeneratedMessage.Builder<MonitoringConfig.Builder> implements MonitoringConfigOrBuilder
 MonitoringConfig specifies the backends Policy Controller should
 export metrics to. For example, to specify metrics should be exported to
 Cloud Monitoring and Prometheus, specify
 backends: ["cloudmonitoring", "prometheus"]
 
Protobuf type google.cloud.gkehub.policycontroller.v1beta.MonitoringConfig
  • 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<MonitoringConfig.Builder>
    • clear

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

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

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

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

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

      public MonitoringConfig.Builder mergeFrom(MonitoringConfig other)
    • isInitialized

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

      public MonitoringConfig.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<MonitoringConfig.Builder>
      Throws:
      IOException
    • getBackendsList

      public List<MonitoringConfig.MonitoringBackend> getBackendsList()
       Specifies the list of backends Policy Controller will export to.
       An empty list would effectively disable metrics export.
       
      repeated .google.cloud.gkehub.policycontroller.v1beta.MonitoringConfig.MonitoringBackend backends = 1;
      Specified by:
      getBackendsList in interface MonitoringConfigOrBuilder
      Returns:
      A list containing the backends.
    • getBackendsCount

      public int getBackendsCount()
       Specifies the list of backends Policy Controller will export to.
       An empty list would effectively disable metrics export.
       
      repeated .google.cloud.gkehub.policycontroller.v1beta.MonitoringConfig.MonitoringBackend backends = 1;
      Specified by:
      getBackendsCount in interface MonitoringConfigOrBuilder
      Returns:
      The count of backends.
    • getBackends

      public MonitoringConfig.MonitoringBackend getBackends(int index)
       Specifies the list of backends Policy Controller will export to.
       An empty list would effectively disable metrics export.
       
      repeated .google.cloud.gkehub.policycontroller.v1beta.MonitoringConfig.MonitoringBackend backends = 1;
      Specified by:
      getBackends in interface MonitoringConfigOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The backends at the given index.
    • setBackends

      public MonitoringConfig.Builder setBackends(int index, MonitoringConfig.MonitoringBackend value)
       Specifies the list of backends Policy Controller will export to.
       An empty list would effectively disable metrics export.
       
      repeated .google.cloud.gkehub.policycontroller.v1beta.MonitoringConfig.MonitoringBackend backends = 1;
      Parameters:
      index - The index to set the value at.
      value - The backends to set.
      Returns:
      This builder for chaining.
    • addBackends

       Specifies the list of backends Policy Controller will export to.
       An empty list would effectively disable metrics export.
       
      repeated .google.cloud.gkehub.policycontroller.v1beta.MonitoringConfig.MonitoringBackend backends = 1;
      Parameters:
      value - The backends to add.
      Returns:
      This builder for chaining.
    • addAllBackends

      public MonitoringConfig.Builder addAllBackends(Iterable<? extends MonitoringConfig.MonitoringBackend> values)
       Specifies the list of backends Policy Controller will export to.
       An empty list would effectively disable metrics export.
       
      repeated .google.cloud.gkehub.policycontroller.v1beta.MonitoringConfig.MonitoringBackend backends = 1;
      Parameters:
      values - The backends to add.
      Returns:
      This builder for chaining.
    • clearBackends

      public MonitoringConfig.Builder clearBackends()
       Specifies the list of backends Policy Controller will export to.
       An empty list would effectively disable metrics export.
       
      repeated .google.cloud.gkehub.policycontroller.v1beta.MonitoringConfig.MonitoringBackend backends = 1;
      Returns:
      This builder for chaining.
    • getBackendsValueList

      public List<Integer> getBackendsValueList()
       Specifies the list of backends Policy Controller will export to.
       An empty list would effectively disable metrics export.
       
      repeated .google.cloud.gkehub.policycontroller.v1beta.MonitoringConfig.MonitoringBackend backends = 1;
      Specified by:
      getBackendsValueList in interface MonitoringConfigOrBuilder
      Returns:
      A list containing the enum numeric values on the wire for backends.
    • getBackendsValue

      public int getBackendsValue(int index)
       Specifies the list of backends Policy Controller will export to.
       An empty list would effectively disable metrics export.
       
      repeated .google.cloud.gkehub.policycontroller.v1beta.MonitoringConfig.MonitoringBackend backends = 1;
      Specified by:
      getBackendsValue in interface MonitoringConfigOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The enum numeric value on the wire of backends at the given index.
    • setBackendsValue

      public MonitoringConfig.Builder setBackendsValue(int index, int value)
       Specifies the list of backends Policy Controller will export to.
       An empty list would effectively disable metrics export.
       
      repeated .google.cloud.gkehub.policycontroller.v1beta.MonitoringConfig.MonitoringBackend backends = 1;
      Parameters:
      index - The index to set the value at.
      value - The enum numeric value on the wire for backends to set.
      Returns:
      This builder for chaining.
    • addBackendsValue

      public MonitoringConfig.Builder addBackendsValue(int value)
       Specifies the list of backends Policy Controller will export to.
       An empty list would effectively disable metrics export.
       
      repeated .google.cloud.gkehub.policycontroller.v1beta.MonitoringConfig.MonitoringBackend backends = 1;
      Parameters:
      value - The enum numeric value on the wire for backends to add.
      Returns:
      This builder for chaining.
    • addAllBackendsValue

      public MonitoringConfig.Builder addAllBackendsValue(Iterable<Integer> values)
       Specifies the list of backends Policy Controller will export to.
       An empty list would effectively disable metrics export.
       
      repeated .google.cloud.gkehub.policycontroller.v1beta.MonitoringConfig.MonitoringBackend backends = 1;
      Parameters:
      values - The enum numeric values on the wire for backends to add.
      Returns:
      This builder for chaining.