Class Service (3.4.4)

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
TypeDescription
int

CLOUD_ENDPOINTS_FIELD_NUMBER

public static final int CLOUD_ENDPOINTS_FIELD_NUMBER
Field Value
TypeDescription
int

CLUSTER_ISTIO_FIELD_NUMBER

public static final int CLUSTER_ISTIO_FIELD_NUMBER
Field Value
TypeDescription
int

CUSTOM_FIELD_NUMBER

public static final int CUSTOM_FIELD_NUMBER
Field Value
TypeDescription
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

ISTIO_CANONICAL_SERVICE_FIELD_NUMBER

public static final int ISTIO_CANONICAL_SERVICE_FIELD_NUMBER
Field Value
TypeDescription
int

MESH_ISTIO_FIELD_NUMBER

public static final int MESH_ISTIO_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

TELEMETRY_FIELD_NUMBER

public static final int TELEMETRY_FIELD_NUMBER
Field Value
TypeDescription
int

USER_LABELS_FIELD_NUMBER

public static final int USER_LABELS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Service getDefaultInstance()
Returns
TypeDescription
Service

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Service.Builder newBuilder()
Returns
TypeDescription
Service.Builder

newBuilder(Service prototype)

public static Service.Builder newBuilder(Service prototype)
Parameter
NameDescription
prototypeService
Returns
TypeDescription
Service.Builder

parseDelimitedFrom(InputStream input)

public static Service parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Service
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Service parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Service
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Service parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Service
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Service parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Service
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Service parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Service
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Service parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Service
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Service parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Service
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Service parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Service
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Service parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Service
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Service parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Service
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Service parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Service
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Service parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Service
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Service> parser()
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAppEngine()

public Service.AppEngine getAppEngine()

Type used for App Engine services.

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

Returns
TypeDescription
Service.AppEngine

The appEngine.

getAppEngineOrBuilder()

public Service.AppEngineOrBuilder getAppEngineOrBuilder()

Type used for App Engine services.

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

Returns
TypeDescription
Service.AppEngineOrBuilder

getCloudEndpoints()

public Service.CloudEndpoints getCloudEndpoints()

Type used for Cloud Endpoints services.

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

Returns
TypeDescription
Service.CloudEndpoints

The cloudEndpoints.

getCloudEndpointsOrBuilder()

public Service.CloudEndpointsOrBuilder getCloudEndpointsOrBuilder()

Type used for Cloud Endpoints services.

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

Returns
TypeDescription
Service.CloudEndpointsOrBuilder

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
TypeDescription
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
TypeDescription
Service.ClusterIstioOrBuilder

getCustom()

public Service.Custom getCustom()

Custom service type.

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

Returns
TypeDescription
Service.Custom

The custom.

getCustomOrBuilder()

public Service.CustomOrBuilder getCustomOrBuilder()

Custom service type.

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

Returns
TypeDescription
Service.CustomOrBuilder

getDefaultInstanceForType()

public Service getDefaultInstanceForType()
Returns
TypeDescription
Service

getDisplayName()

public String getDisplayName()

Name used for UI elements listing this Service.

string display_name = 2;

Returns
TypeDescription
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Name used for UI elements listing this Service.

string display_name = 2;

Returns
TypeDescription
ByteString

The bytes for displayName.

getIdentifierCase()

public Service.IdentifierCase getIdentifierCase()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
Service.MeshIstioOrBuilder

getName()

public String getName()

Resource name for this Service. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Resource name for this Service. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getParserForType()

public Parser<Service> getParserForType()
Returns
TypeDescription
Parser<Service>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getTelemetry()

public Service.Telemetry getTelemetry()

Configuration for how to query telemetry on a Service.

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

Returns
TypeDescription
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
TypeDescription
Service.TelemetryOrBuilder

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

getUserLabels()

public Map<String,String> getUserLabels()

Use #getUserLabelsMap() instead.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
keyString
defaultValueString
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
String

hasAppEngine()

public boolean hasAppEngine()

Type used for App Engine services.

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

Returns
TypeDescription
boolean

Whether the appEngine field is set.

hasCloudEndpoints()

public boolean hasCloudEndpoints()

Type used for Cloud Endpoints services.

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

Returns
TypeDescription
boolean

Whether the cloudEndpoints 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
TypeDescription
boolean

Whether the clusterIstio field is set.

hasCustom()

public boolean hasCustom()

Custom service type.

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

Returns
TypeDescription
boolean

Whether the custom 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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the telemetry field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Service.Builder newBuilderForType()
Returns
TypeDescription
Service.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Service.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Service.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Service.Builder toBuilder()
Returns
TypeDescription
Service.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException