Class Service (3.54.0)

public final class Service extends GeneratedMessageV3 implements ServiceOrBuilder

A Service is a discrete, autonomous, and network-accessible unit, designed to solve an individual concern (Wikipedia). In Cloud Monitoring, a Service acts as the root resource under which operational aspects of the service are accessible.

Protobuf type google.monitoring.v3.Service

Implements

ServiceOrBuilder

Static Fields

APP_ENGINE_FIELD_NUMBER

public static final int APP_ENGINE_FIELD_NUMBER
Field Value
Type Description
int

BASIC_SERVICE_FIELD_NUMBER

public static final int BASIC_SERVICE_FIELD_NUMBER
Field Value
Type Description
int

CLOUD_ENDPOINTS_FIELD_NUMBER

public static final int CLOUD_ENDPOINTS_FIELD_NUMBER
Field Value
Type Description
int

CLOUD_RUN_FIELD_NUMBER

public static final int CLOUD_RUN_FIELD_NUMBER
Field Value
Type Description
int

CLUSTER_ISTIO_FIELD_NUMBER

public static final int CLUSTER_ISTIO_FIELD_NUMBER
Field Value
Type Description
int

CUSTOM_FIELD_NUMBER

public static final int CUSTOM_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

GKE_NAMESPACE_FIELD_NUMBER

public static final int GKE_NAMESPACE_FIELD_NUMBER
Field Value
Type Description
int

GKE_SERVICE_FIELD_NUMBER

public static final int GKE_SERVICE_FIELD_NUMBER
Field Value
Type Description
int

GKE_WORKLOAD_FIELD_NUMBER

public static final int GKE_WORKLOAD_FIELD_NUMBER
Field Value
Type Description
int

ISTIO_CANONICAL_SERVICE_FIELD_NUMBER

public static final int ISTIO_CANONICAL_SERVICE_FIELD_NUMBER
Field Value
Type Description
int

MESH_ISTIO_FIELD_NUMBER

public static final int MESH_ISTIO_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

TELEMETRY_FIELD_NUMBER

public static final int TELEMETRY_FIELD_NUMBER
Field Value
Type Description
int

USER_LABELS_FIELD_NUMBER

public static final int USER_LABELS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Service getDefaultInstance()
Returns
Type Description
Service

getDescriptor()

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

newBuilder()

public static Service.Builder newBuilder()
Returns
Type Description
Service.Builder

newBuilder(Service prototype)

public static Service.Builder newBuilder(Service prototype)
Parameter
Name Description
prototype Service
Returns
Type Description
Service.Builder

parseDelimitedFrom(InputStream input)

public static Service parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Service
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Service parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Service
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Service parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Service
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Service parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Service
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Service parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Service
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Service parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Service
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Service parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Service
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Service parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Service
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Service parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Service
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Service parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Service
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Service parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Service
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Service parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Service
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Service> parser()
Returns
Type Description
Parser<Service>

Methods

containsUserLabels(String key)

public boolean containsUserLabels(String key)

Labels which have been used to annotate the service. Label keys must start with a letter. Label keys and values may contain lowercase letters, numbers, underscores, and dashes. Label keys and values have a maximum length of 63 characters, and must be less than 128 bytes in size. Up to 64 label entries may be stored. For labels which do not have a semantic value, the empty string may be supplied for the label value.

map<string, string> user_labels = 14;

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAppEngine()

public Service.AppEngine getAppEngine()

Type used for App Engine services.

.google.monitoring.v3.Service.AppEngine app_engine = 7;

Returns
Type Description
Service.AppEngine

The appEngine.

getAppEngineOrBuilder()

public Service.AppEngineOrBuilder getAppEngineOrBuilder()

Type used for App Engine services.

.google.monitoring.v3.Service.AppEngine app_engine = 7;

Returns
Type Description
Service.AppEngineOrBuilder

getBasicService()

public Service.BasicService getBasicService()

Message that contains the service type and service labels of this service if it is a basic service. Documentation and examples here.

.google.monitoring.v3.Service.BasicService basic_service = 19;

Returns
Type Description
Service.BasicService

The basicService.

getBasicServiceOrBuilder()

public Service.BasicServiceOrBuilder getBasicServiceOrBuilder()

Message that contains the service type and service labels of this service if it is a basic service. Documentation and examples here.

.google.monitoring.v3.Service.BasicService basic_service = 19;

Returns
Type Description
Service.BasicServiceOrBuilder

getCloudEndpoints()

public Service.CloudEndpoints getCloudEndpoints()

Type used for Cloud Endpoints services.

.google.monitoring.v3.Service.CloudEndpoints cloud_endpoints = 8;

Returns
Type Description
Service.CloudEndpoints

The cloudEndpoints.

getCloudEndpointsOrBuilder()

public Service.CloudEndpointsOrBuilder getCloudEndpointsOrBuilder()

Type used for Cloud Endpoints services.

.google.monitoring.v3.Service.CloudEndpoints cloud_endpoints = 8;

Returns
Type Description
Service.CloudEndpointsOrBuilder

getCloudRun()

public Service.CloudRun getCloudRun()

Type used for Cloud Run services.

.google.monitoring.v3.Service.CloudRun cloud_run = 12;

Returns
Type Description
Service.CloudRun

The cloudRun.

getCloudRunOrBuilder()

public Service.CloudRunOrBuilder getCloudRunOrBuilder()

Type used for Cloud Run services.

.google.monitoring.v3.Service.CloudRun cloud_run = 12;

Returns
Type Description
Service.CloudRunOrBuilder

getClusterIstio()

public Service.ClusterIstio getClusterIstio()

Type used for Istio services that live in a Kubernetes cluster.

.google.monitoring.v3.Service.ClusterIstio cluster_istio = 9;

Returns
Type Description
Service.ClusterIstio

The clusterIstio.

getClusterIstioOrBuilder()

public Service.ClusterIstioOrBuilder getClusterIstioOrBuilder()

Type used for Istio services that live in a Kubernetes cluster.

.google.monitoring.v3.Service.ClusterIstio cluster_istio = 9;

Returns
Type Description
Service.ClusterIstioOrBuilder

getCustom()

public Service.Custom getCustom()

Custom service type.

.google.monitoring.v3.Service.Custom custom = 6;

Returns
Type Description
Service.Custom

The custom.

getCustomOrBuilder()

public Service.CustomOrBuilder getCustomOrBuilder()

Custom service type.

.google.monitoring.v3.Service.Custom custom = 6;

Returns
Type Description
Service.CustomOrBuilder

getDefaultInstanceForType()

public Service getDefaultInstanceForType()
Returns
Type Description
Service

getDisplayName()

public String getDisplayName()

Name used for UI elements listing this Service.

string display_name = 2;

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Name used for UI elements listing this Service.

string display_name = 2;

Returns
Type Description
ByteString

The bytes for displayName.

getGkeNamespace()

public Service.GkeNamespace getGkeNamespace()

Type used for GKE Namespaces.

.google.monitoring.v3.Service.GkeNamespace gke_namespace = 15;

Returns
Type Description
Service.GkeNamespace

The gkeNamespace.

getGkeNamespaceOrBuilder()

public Service.GkeNamespaceOrBuilder getGkeNamespaceOrBuilder()

Type used for GKE Namespaces.

.google.monitoring.v3.Service.GkeNamespace gke_namespace = 15;

Returns
Type Description
Service.GkeNamespaceOrBuilder

getGkeService()

public Service.GkeService getGkeService()

Type used for GKE Services (the Kubernetes concept of a service).

.google.monitoring.v3.Service.GkeService gke_service = 17;

Returns
Type Description
Service.GkeService

The gkeService.

getGkeServiceOrBuilder()

public Service.GkeServiceOrBuilder getGkeServiceOrBuilder()

Type used for GKE Services (the Kubernetes concept of a service).

.google.monitoring.v3.Service.GkeService gke_service = 17;

Returns
Type Description
Service.GkeServiceOrBuilder

getGkeWorkload()

public Service.GkeWorkload getGkeWorkload()

Type used for GKE Workloads.

.google.monitoring.v3.Service.GkeWorkload gke_workload = 16;

Returns
Type Description
Service.GkeWorkload

The gkeWorkload.

getGkeWorkloadOrBuilder()

public Service.GkeWorkloadOrBuilder getGkeWorkloadOrBuilder()

Type used for GKE Workloads.

.google.monitoring.v3.Service.GkeWorkload gke_workload = 16;

Returns
Type Description
Service.GkeWorkloadOrBuilder

getIdentifierCase()

public Service.IdentifierCase getIdentifierCase()
Returns
Type Description
Service.IdentifierCase

getIstioCanonicalService()

public Service.IstioCanonicalService getIstioCanonicalService()

Type used for canonical services scoped to an Istio mesh. Metrics for Istio are documented here

.google.monitoring.v3.Service.IstioCanonicalService istio_canonical_service = 11;

Returns
Type Description
Service.IstioCanonicalService

The istioCanonicalService.

getIstioCanonicalServiceOrBuilder()

public Service.IstioCanonicalServiceOrBuilder getIstioCanonicalServiceOrBuilder()

Type used for canonical services scoped to an Istio mesh. Metrics for Istio are documented here

.google.monitoring.v3.Service.IstioCanonicalService istio_canonical_service = 11;

Returns
Type Description
Service.IstioCanonicalServiceOrBuilder

getMeshIstio()

public Service.MeshIstio getMeshIstio()

Type used for Istio services scoped to an Istio mesh.

.google.monitoring.v3.Service.MeshIstio mesh_istio = 10;

Returns
Type Description
Service.MeshIstio

The meshIstio.

getMeshIstioOrBuilder()

public Service.MeshIstioOrBuilder getMeshIstioOrBuilder()

Type used for Istio services scoped to an Istio mesh.

.google.monitoring.v3.Service.MeshIstio mesh_istio = 10;

Returns
Type Description
Service.MeshIstioOrBuilder

getName()

public String getName()

Identifier. Resource name for this Service. The format is:

 projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. Resource name for this Service. The format is:

 projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<Service> getParserForType()
Returns
Type Description
Parser<Service>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getTelemetry()

public Service.Telemetry getTelemetry()

Configuration for how to query telemetry on a Service.

.google.monitoring.v3.Service.Telemetry telemetry = 13;

Returns
Type Description
Service.Telemetry

The telemetry.

getTelemetryOrBuilder()

public Service.TelemetryOrBuilder getTelemetryOrBuilder()

Configuration for how to query telemetry on a Service.

.google.monitoring.v3.Service.Telemetry telemetry = 13;

Returns
Type Description
Service.TelemetryOrBuilder

getUserLabels() (deprecated)

public Map<String,String> getUserLabels()

Use #getUserLabelsMap() instead.

Returns
Type Description
Map<String,String>

getUserLabelsCount()

public int getUserLabelsCount()

Labels which have been used to annotate the service. Label keys must start with a letter. Label keys and values may contain lowercase letters, numbers, underscores, and dashes. Label keys and values have a maximum length of 63 characters, and must be less than 128 bytes in size. Up to 64 label entries may be stored. For labels which do not have a semantic value, the empty string may be supplied for the label value.

map<string, string> user_labels = 14;

Returns
Type Description
int

getUserLabelsMap()

public Map<String,String> getUserLabelsMap()

Labels which have been used to annotate the service. Label keys must start with a letter. Label keys and values may contain lowercase letters, numbers, underscores, and dashes. Label keys and values have a maximum length of 63 characters, and must be less than 128 bytes in size. Up to 64 label entries may be stored. For labels which do not have a semantic value, the empty string may be supplied for the label value.

map<string, string> user_labels = 14;

Returns
Type Description
Map<String,String>

getUserLabelsOrDefault(String key, String defaultValue)

public String getUserLabelsOrDefault(String key, String defaultValue)

Labels which have been used to annotate the service. Label keys must start with a letter. Label keys and values may contain lowercase letters, numbers, underscores, and dashes. Label keys and values have a maximum length of 63 characters, and must be less than 128 bytes in size. Up to 64 label entries may be stored. For labels which do not have a semantic value, the empty string may be supplied for the label value.

map<string, string> user_labels = 14;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getUserLabelsOrThrow(String key)

public String getUserLabelsOrThrow(String key)

Labels which have been used to annotate the service. Label keys must start with a letter. Label keys and values may contain lowercase letters, numbers, underscores, and dashes. Label keys and values have a maximum length of 63 characters, and must be less than 128 bytes in size. Up to 64 label entries may be stored. For labels which do not have a semantic value, the empty string may be supplied for the label value.

map<string, string> user_labels = 14;

Parameter
Name Description
key String
Returns
Type Description
String

hasAppEngine()

public boolean hasAppEngine()

Type used for App Engine services.

.google.monitoring.v3.Service.AppEngine app_engine = 7;

Returns
Type Description
boolean

Whether the appEngine field is set.

hasBasicService()

public boolean hasBasicService()

Message that contains the service type and service labels of this service if it is a basic service. Documentation and examples here.

.google.monitoring.v3.Service.BasicService basic_service = 19;

Returns
Type Description
boolean

Whether the basicService field is set.

hasCloudEndpoints()

public boolean hasCloudEndpoints()

Type used for Cloud Endpoints services.

.google.monitoring.v3.Service.CloudEndpoints cloud_endpoints = 8;

Returns
Type Description
boolean

Whether the cloudEndpoints field is set.

hasCloudRun()

public boolean hasCloudRun()

Type used for Cloud Run services.

.google.monitoring.v3.Service.CloudRun cloud_run = 12;

Returns
Type Description
boolean

Whether the cloudRun field is set.

hasClusterIstio()

public boolean hasClusterIstio()

Type used for Istio services that live in a Kubernetes cluster.

.google.monitoring.v3.Service.ClusterIstio cluster_istio = 9;

Returns
Type Description
boolean

Whether the clusterIstio field is set.

hasCustom()

public boolean hasCustom()

Custom service type.

.google.monitoring.v3.Service.Custom custom = 6;

Returns
Type Description
boolean

Whether the custom field is set.

hasGkeNamespace()

public boolean hasGkeNamespace()

Type used for GKE Namespaces.

.google.monitoring.v3.Service.GkeNamespace gke_namespace = 15;

Returns
Type Description
boolean

Whether the gkeNamespace field is set.

hasGkeService()

public boolean hasGkeService()

Type used for GKE Services (the Kubernetes concept of a service).

.google.monitoring.v3.Service.GkeService gke_service = 17;

Returns
Type Description
boolean

Whether the gkeService field is set.

hasGkeWorkload()

public boolean hasGkeWorkload()

Type used for GKE Workloads.

.google.monitoring.v3.Service.GkeWorkload gke_workload = 16;

Returns
Type Description
boolean

Whether the gkeWorkload field is set.

hasIstioCanonicalService()

public boolean hasIstioCanonicalService()

Type used for canonical services scoped to an Istio mesh. Metrics for Istio are documented here

.google.monitoring.v3.Service.IstioCanonicalService istio_canonical_service = 11;

Returns
Type Description
boolean

Whether the istioCanonicalService field is set.

hasMeshIstio()

public boolean hasMeshIstio()

Type used for Istio services scoped to an Istio mesh.

.google.monitoring.v3.Service.MeshIstio mesh_istio = 10;

Returns
Type Description
boolean

Whether the meshIstio field is set.

hasTelemetry()

public boolean hasTelemetry()

Configuration for how to query telemetry on a Service.

.google.monitoring.v3.Service.Telemetry telemetry = 13;

Returns
Type Description
boolean

Whether the telemetry field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Service.Builder newBuilderForType()
Returns
Type Description
Service.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Service.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Service.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Service.Builder toBuilder()
Returns
Type Description
Service.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException