Class Service (2.29.0)

publicfinalclass ServiceextendsGeneratedMessageV3implementsServiceOrBuilder

A Service resource is a logical component of an application that can share state and communicate in a secure fashion with other services. For example, an application that handles customer requests might include separate services to handle tasks such as backend data analysis or API requests from mobile devices. Each service has a collection of versions that define a specific set of code used to implement the functionality of that service.

Protobuf type google.appengine.v1.Service

Implements

ServiceOrBuilder

Inherited Members

com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)

Static Fields

ID_FIELD_NUMBER

publicstaticfinalintID_FIELD_NUMBER
Field Value
Type Description
int

LABELS_FIELD_NUMBER

publicstaticfinalintLABELS_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

publicstaticfinalintNAME_FIELD_NUMBER
Field Value
Type Description
int

NETWORK_SETTINGS_FIELD_NUMBER

publicstaticfinalintNETWORK_SETTINGS_FIELD_NUMBER
Field Value
Type Description
int

SPLIT_FIELD_NUMBER

publicstaticfinalintSPLIT_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticServicegetDefaultInstance()
Returns
Type Description
Service

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticService.BuildernewBuilder()
Returns
Type Description
Service.Builder

newBuilder(Service prototype)

publicstaticService.BuildernewBuilder(Serviceprototype)
Parameter
Name Description
prototype Service
Returns
Type Description
Service.Builder

parseDelimitedFrom(InputStream input)

publicstaticServiceparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Service
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticServiceparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Service
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticServiceparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
Service
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticServiceparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Service
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticServiceparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
Service
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticServiceparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Service
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticServiceparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Service
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticServiceparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Service
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticServiceparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Service
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticServiceparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Service
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticServiceparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Service
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticServiceparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Service
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<Service>parser()
Returns
Type Description
Parser<Service>

Methods

containsLabels(String key)

publicbooleancontainsLabels(Stringkey)

A set of labels to apply to this service. Labels are key/value pairs that describe the service and all resources that belong to it (e.g., versions). The labels can be used to search and group resources, and are propagated to the usage and billing reports, enabling fine-grain analysis of costs. An example of using labels is to tag resources belonging to different environments (e.g., "env=prod", "env=qa").

<p>Label keys and values can be no longer than 63 characters and can only contain lowercase letters, numeric characters, underscores, dashes, and international characters. Label keys must start with a lowercase letter or an international character. Each service can have at most 32 labels.

map<string, string> labels = 4;

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

publicServicegetDefaultInstanceForType()
Returns
Type Description
Service

getId()

publicStringgetId()

Relative name of the service within the application. Example: default.

@OutputOnly

string id = 2;

Returns
Type Description
String

The id.

getIdBytes()

publicByteStringgetIdBytes()

Relative name of the service within the application. Example: default.

@OutputOnly

string id = 2;

Returns
Type Description
ByteString

The bytes for id.

getLabels()

publicMap<String,String>getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

publicintgetLabelsCount()

A set of labels to apply to this service. Labels are key/value pairs that describe the service and all resources that belong to it (e.g., versions). The labels can be used to search and group resources, and are propagated to the usage and billing reports, enabling fine-grain analysis of costs. An example of using labels is to tag resources belonging to different environments (e.g., "env=prod", "env=qa").

<p>Label keys and values can be no longer than 63 characters and can only contain lowercase letters, numeric characters, underscores, dashes, and international characters. Label keys must start with a lowercase letter or an international character. Each service can have at most 32 labels.

map<string, string> labels = 4;

Returns
Type Description
int

getLabelsMap()

publicMap<String,String>getLabelsMap()

A set of labels to apply to this service. Labels are key/value pairs that describe the service and all resources that belong to it (e.g., versions). The labels can be used to search and group resources, and are propagated to the usage and billing reports, enabling fine-grain analysis of costs. An example of using labels is to tag resources belonging to different environments (e.g., "env=prod", "env=qa").

<p>Label keys and values can be no longer than 63 characters and can only contain lowercase letters, numeric characters, underscores, dashes, and international characters. Label keys must start with a lowercase letter or an international character. Each service can have at most 32 labels.

map<string, string> labels = 4;

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

publicStringgetLabelsOrDefault(Stringkey,StringdefaultValue)

A set of labels to apply to this service. Labels are key/value pairs that describe the service and all resources that belong to it (e.g., versions). The labels can be used to search and group resources, and are propagated to the usage and billing reports, enabling fine-grain analysis of costs. An example of using labels is to tag resources belonging to different environments (e.g., "env=prod", "env=qa").

<p>Label keys and values can be no longer than 63 characters and can only contain lowercase letters, numeric characters, underscores, dashes, and international characters. Label keys must start with a lowercase letter or an international character. Each service can have at most 32 labels.

map<string, string> labels = 4;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

publicStringgetLabelsOrThrow(Stringkey)

A set of labels to apply to this service. Labels are key/value pairs that describe the service and all resources that belong to it (e.g., versions). The labels can be used to search and group resources, and are propagated to the usage and billing reports, enabling fine-grain analysis of costs. An example of using labels is to tag resources belonging to different environments (e.g., "env=prod", "env=qa").

<p>Label keys and values can be no longer than 63 characters and can only contain lowercase letters, numeric characters, underscores, dashes, and international characters. Label keys must start with a lowercase letter or an international character. Each service can have at most 32 labels.

map<string, string> labels = 4;

Parameter
Name Description
key String
Returns
Type Description
String

getName()

publicStringgetName()

Full path to the Service resource in the API. Example: apps/myapp/services/default.

@OutputOnly

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

publicByteStringgetNameBytes()

Full path to the Service resource in the API. Example: apps/myapp/services/default.

@OutputOnly

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getNetworkSettings()

publicNetworkSettingsgetNetworkSettings()

Ingress settings for this service. Will apply to all versions.

.google.appengine.v1.NetworkSettings network_settings = 6;

Returns
Type Description
NetworkSettings

The networkSettings.

getNetworkSettingsOrBuilder()

publicNetworkSettingsOrBuildergetNetworkSettingsOrBuilder()

Ingress settings for this service. Will apply to all versions.

.google.appengine.v1.NetworkSettings network_settings = 6;

Returns
Type Description
NetworkSettingsOrBuilder

getParserForType()

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

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

getSplit()

publicTrafficSplitgetSplit()

Mapping that defines fractional HTTP traffic diversion to different versions within the service.

.google.appengine.v1.TrafficSplit split = 3;

Returns
Type Description
TrafficSplit

The split.

getSplitOrBuilder()

publicTrafficSplitOrBuildergetSplitOrBuilder()

Mapping that defines fractional HTTP traffic diversion to different versions within the service.

.google.appengine.v1.TrafficSplit split = 3;

Returns
Type Description
TrafficSplitOrBuilder

hasNetworkSettings()

publicbooleanhasNetworkSettings()

Ingress settings for this service. Will apply to all versions.

.google.appengine.v1.NetworkSettings network_settings = 6;

Returns
Type Description
boolean

Whether the networkSettings field is set.

hasSplit()

publicbooleanhasSplit()

Mapping that defines fractional HTTP traffic diversion to different versions within the service.

.google.appengine.v1.TrafficSplit split = 3;

Returns
Type Description
boolean

Whether the split field is set.

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapField(int number)

protectedMapFieldinternalGetMapField(intnumber)
Parameter
Name Description
number int
Returns
Type Description
MapField
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicService.BuildernewBuilderForType()
Returns
Type Description
Service.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedService.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Service.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

publicService.BuildertoBuilder()
Returns
Type Description
Service.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.