Class MonitoringConfig.Builder (1.53.0)

public static final class MonitoringConfig.Builder extends GeneratedMessageV3.Builder<MonitoringConfig.Builder> implements MonitoringConfigOrBuilder

This field informs Fleet-based applications/services/UIs with the necessary information for where each underlying Cluster reports its metrics.

Protobuf type google.cloud.gkehub.v1.MonitoringConfig

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public MonitoringConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
MonitoringConfig.Builder
Overrides

build()

public MonitoringConfig build()
Returns
Type Description
MonitoringConfig

buildPartial()

public MonitoringConfig buildPartial()
Returns
Type Description
MonitoringConfig

clear()

public MonitoringConfig.Builder clear()
Returns
Type Description
MonitoringConfig.Builder
Overrides

clearCluster()

public MonitoringConfig.Builder clearCluster()

Immutable. Cluster name used to report metrics. For Anthos on VMWare/Baremetal, it would be in format memberClusters/cluster_name; And for Anthos on MultiCloud, it would be in format {azureClusters, awsClusters}/cluster_name.

string cluster = 3 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
MonitoringConfig.Builder

This builder for chaining.

clearClusterHash()

public MonitoringConfig.Builder clearClusterHash()

Immutable. Cluster hash, this is a unique string generated by google code, which does not contain any PII, which we can use to reference the cluster. This is expected to be created by the monitoring stack and persisted into the Cluster object as well as to GKE-Hub.

string cluster_hash = 5 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
MonitoringConfig.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public MonitoringConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
MonitoringConfig.Builder
Overrides

clearKubernetesMetricsPrefix()

public MonitoringConfig.Builder clearKubernetesMetricsPrefix()

Kubernetes system metrics, if available, are written to this prefix. This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos eventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today but will migration to be under kubernetes.io/anthos

string kubernetes_metrics_prefix = 4;

Returns
Type Description
MonitoringConfig.Builder

This builder for chaining.

clearLocation()

public MonitoringConfig.Builder clearLocation()

Immutable. Location used to report Metrics

string location = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
MonitoringConfig.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public MonitoringConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
MonitoringConfig.Builder
Overrides

clearProjectId()

public MonitoringConfig.Builder clearProjectId()

Immutable. Project used to report Metrics

string project_id = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
MonitoringConfig.Builder

This builder for chaining.

clone()

public MonitoringConfig.Builder clone()
Returns
Type Description
MonitoringConfig.Builder
Overrides

getCluster()

public String getCluster()

Immutable. Cluster name used to report metrics. For Anthos on VMWare/Baremetal, it would be in format memberClusters/cluster_name; And for Anthos on MultiCloud, it would be in format {azureClusters, awsClusters}/cluster_name.

string cluster = 3 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The cluster.

getClusterBytes()

public ByteString getClusterBytes()

Immutable. Cluster name used to report metrics. For Anthos on VMWare/Baremetal, it would be in format memberClusters/cluster_name; And for Anthos on MultiCloud, it would be in format {azureClusters, awsClusters}/cluster_name.

string cluster = 3 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for cluster.

getClusterHash()

public String getClusterHash()

Immutable. Cluster hash, this is a unique string generated by google code, which does not contain any PII, which we can use to reference the cluster. This is expected to be created by the monitoring stack and persisted into the Cluster object as well as to GKE-Hub.

string cluster_hash = 5 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The clusterHash.

getClusterHashBytes()

public ByteString getClusterHashBytes()

Immutable. Cluster hash, this is a unique string generated by google code, which does not contain any PII, which we can use to reference the cluster. This is expected to be created by the monitoring stack and persisted into the Cluster object as well as to GKE-Hub.

string cluster_hash = 5 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for clusterHash.

getDefaultInstanceForType()

public MonitoringConfig getDefaultInstanceForType()
Returns
Type Description
MonitoringConfig

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getKubernetesMetricsPrefix()

public String getKubernetesMetricsPrefix()

Kubernetes system metrics, if available, are written to this prefix. This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos eventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today but will migration to be under kubernetes.io/anthos

string kubernetes_metrics_prefix = 4;

Returns
Type Description
String

The kubernetesMetricsPrefix.

getKubernetesMetricsPrefixBytes()

public ByteString getKubernetesMetricsPrefixBytes()

Kubernetes system metrics, if available, are written to this prefix. This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos eventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today but will migration to be under kubernetes.io/anthos

string kubernetes_metrics_prefix = 4;

Returns
Type Description
ByteString

The bytes for kubernetesMetricsPrefix.

getLocation()

public String getLocation()

Immutable. Location used to report Metrics

string location = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The location.

getLocationBytes()

public ByteString getLocationBytes()

Immutable. Location used to report Metrics

string location = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for location.

getProjectId()

public String getProjectId()

Immutable. Project used to report Metrics

string project_id = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The projectId.

getProjectIdBytes()

public ByteString getProjectIdBytes()

Immutable. Project used to report Metrics

string project_id = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for projectId.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(MonitoringConfig other)

public MonitoringConfig.Builder mergeFrom(MonitoringConfig other)
Parameter
Name Description
other MonitoringConfig
Returns
Type Description
MonitoringConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public MonitoringConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
MonitoringConfig.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public MonitoringConfig.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
MonitoringConfig.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final MonitoringConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
MonitoringConfig.Builder
Overrides

setCluster(String value)

public MonitoringConfig.Builder setCluster(String value)

Immutable. Cluster name used to report metrics. For Anthos on VMWare/Baremetal, it would be in format memberClusters/cluster_name; And for Anthos on MultiCloud, it would be in format {azureClusters, awsClusters}/cluster_name.

string cluster = 3 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The cluster to set.

Returns
Type Description
MonitoringConfig.Builder

This builder for chaining.

setClusterBytes(ByteString value)

public MonitoringConfig.Builder setClusterBytes(ByteString value)

Immutable. Cluster name used to report metrics. For Anthos on VMWare/Baremetal, it would be in format memberClusters/cluster_name; And for Anthos on MultiCloud, it would be in format {azureClusters, awsClusters}/cluster_name.

string cluster = 3 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for cluster to set.

Returns
Type Description
MonitoringConfig.Builder

This builder for chaining.

setClusterHash(String value)

public MonitoringConfig.Builder setClusterHash(String value)

Immutable. Cluster hash, this is a unique string generated by google code, which does not contain any PII, which we can use to reference the cluster. This is expected to be created by the monitoring stack and persisted into the Cluster object as well as to GKE-Hub.

string cluster_hash = 5 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The clusterHash to set.

Returns
Type Description
MonitoringConfig.Builder

This builder for chaining.

setClusterHashBytes(ByteString value)

public MonitoringConfig.Builder setClusterHashBytes(ByteString value)

Immutable. Cluster hash, this is a unique string generated by google code, which does not contain any PII, which we can use to reference the cluster. This is expected to be created by the monitoring stack and persisted into the Cluster object as well as to GKE-Hub.

string cluster_hash = 5 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for clusterHash to set.

Returns
Type Description
MonitoringConfig.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public MonitoringConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
MonitoringConfig.Builder
Overrides

setKubernetesMetricsPrefix(String value)

public MonitoringConfig.Builder setKubernetesMetricsPrefix(String value)

Kubernetes system metrics, if available, are written to this prefix. This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos eventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today but will migration to be under kubernetes.io/anthos

string kubernetes_metrics_prefix = 4;

Parameter
Name Description
value String

The kubernetesMetricsPrefix to set.

Returns
Type Description
MonitoringConfig.Builder

This builder for chaining.

setKubernetesMetricsPrefixBytes(ByteString value)

public MonitoringConfig.Builder setKubernetesMetricsPrefixBytes(ByteString value)

Kubernetes system metrics, if available, are written to this prefix. This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos eventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today but will migration to be under kubernetes.io/anthos

string kubernetes_metrics_prefix = 4;

Parameter
Name Description
value ByteString

The bytes for kubernetesMetricsPrefix to set.

Returns
Type Description
MonitoringConfig.Builder

This builder for chaining.

setLocation(String value)

public MonitoringConfig.Builder setLocation(String value)

Immutable. Location used to report Metrics

string location = 2 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The location to set.

Returns
Type Description
MonitoringConfig.Builder

This builder for chaining.

setLocationBytes(ByteString value)

public MonitoringConfig.Builder setLocationBytes(ByteString value)

Immutable. Location used to report Metrics

string location = 2 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for location to set.

Returns
Type Description
MonitoringConfig.Builder

This builder for chaining.

setProjectId(String value)

public MonitoringConfig.Builder setProjectId(String value)

Immutable. Project used to report Metrics

string project_id = 1 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The projectId to set.

Returns
Type Description
MonitoringConfig.Builder

This builder for chaining.

setProjectIdBytes(ByteString value)

public MonitoringConfig.Builder setProjectIdBytes(ByteString value)

Immutable. Project used to report Metrics

string project_id = 1 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for projectId to set.

Returns
Type Description
MonitoringConfig.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public MonitoringConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
MonitoringConfig.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final MonitoringConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
MonitoringConfig.Builder
Overrides