Class ServiceContext.Builder (0.124.3-beta)

public static final class ServiceContext.Builder extends GeneratedMessageV3.Builder<ServiceContext.Builder> implements ServiceContextOrBuilder

Describes a running service that sends errors. Its version changes over time and multiple versions can run in parallel.

Protobuf type google.devtools.clouderrorreporting.v1beta1.ServiceContext

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ServiceContext.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ServiceContext.Builder
Overrides

build()

public ServiceContext build()
Returns
TypeDescription
ServiceContext

buildPartial()

public ServiceContext buildPartial()
Returns
TypeDescription
ServiceContext

clear()

public ServiceContext.Builder clear()
Returns
TypeDescription
ServiceContext.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public ServiceContext.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
ServiceContext.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public ServiceContext.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
ServiceContext.Builder
Overrides

clearResourceType()

public ServiceContext.Builder clearResourceType()

Type of the MonitoredResource. List of possible values: https://cloud.google.com/monitoring/api/resources Value is set automatically for incoming errors and must not be set when reporting errors.

string resource_type = 4;

Returns
TypeDescription
ServiceContext.Builder

This builder for chaining.

clearService()

public ServiceContext.Builder clearService()

An identifier of the service, such as the name of the executable, job, or Google App Engine service name. This field is expected to have a low number of values that are relatively stable over time, as opposed to version, which can be changed whenever new code is deployed. Contains the service name for error reports extracted from Google App Engine logs or default if the App Engine default service is used.

string service = 2;

Returns
TypeDescription
ServiceContext.Builder

This builder for chaining.

clearVersion()

public ServiceContext.Builder clearVersion()

Represents the source code version that the developer provided, which could represent a version label or a Git SHA-1 hash, for example. For App Engine standard environment, the version is set to the version of the app.

string version = 3;

Returns
TypeDescription
ServiceContext.Builder

This builder for chaining.

clone()

public ServiceContext.Builder clone()
Returns
TypeDescription
ServiceContext.Builder
Overrides

getDefaultInstanceForType()

public ServiceContext getDefaultInstanceForType()
Returns
TypeDescription
ServiceContext

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getResourceType()

public String getResourceType()

Type of the MonitoredResource. List of possible values: https://cloud.google.com/monitoring/api/resources Value is set automatically for incoming errors and must not be set when reporting errors.

string resource_type = 4;

Returns
TypeDescription
String

The resourceType.

getResourceTypeBytes()

public ByteString getResourceTypeBytes()

Type of the MonitoredResource. List of possible values: https://cloud.google.com/monitoring/api/resources Value is set automatically for incoming errors and must not be set when reporting errors.

string resource_type = 4;

Returns
TypeDescription
ByteString

The bytes for resourceType.

getService()

public String getService()

An identifier of the service, such as the name of the executable, job, or Google App Engine service name. This field is expected to have a low number of values that are relatively stable over time, as opposed to version, which can be changed whenever new code is deployed. Contains the service name for error reports extracted from Google App Engine logs or default if the App Engine default service is used.

string service = 2;

Returns
TypeDescription
String

The service.

getServiceBytes()

public ByteString getServiceBytes()

An identifier of the service, such as the name of the executable, job, or Google App Engine service name. This field is expected to have a low number of values that are relatively stable over time, as opposed to version, which can be changed whenever new code is deployed. Contains the service name for error reports extracted from Google App Engine logs or default if the App Engine default service is used.

string service = 2;

Returns
TypeDescription
ByteString

The bytes for service.

getVersion()

public String getVersion()

Represents the source code version that the developer provided, which could represent a version label or a Git SHA-1 hash, for example. For App Engine standard environment, the version is set to the version of the app.

string version = 3;

Returns
TypeDescription
String

The version.

getVersionBytes()

public ByteString getVersionBytes()

Represents the source code version that the developer provided, which could represent a version label or a Git SHA-1 hash, for example. For App Engine standard environment, the version is set to the version of the app.

string version = 3;

Returns
TypeDescription
ByteString

The bytes for version.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ServiceContext other)

public ServiceContext.Builder mergeFrom(ServiceContext other)
Parameter
NameDescription
otherServiceContext
Returns
TypeDescription
ServiceContext.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ServiceContext.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ServiceContext.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public ServiceContext.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
ServiceContext.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ServiceContext.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ServiceContext.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public ServiceContext.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ServiceContext.Builder
Overrides

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

public ServiceContext.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
ServiceContext.Builder
Overrides

setResourceType(String value)

public ServiceContext.Builder setResourceType(String value)

Type of the MonitoredResource. List of possible values: https://cloud.google.com/monitoring/api/resources Value is set automatically for incoming errors and must not be set when reporting errors.

string resource_type = 4;

Parameter
NameDescription
valueString

The resourceType to set.

Returns
TypeDescription
ServiceContext.Builder

This builder for chaining.

setResourceTypeBytes(ByteString value)

public ServiceContext.Builder setResourceTypeBytes(ByteString value)

Type of the MonitoredResource. List of possible values: https://cloud.google.com/monitoring/api/resources Value is set automatically for incoming errors and must not be set when reporting errors.

string resource_type = 4;

Parameter
NameDescription
valueByteString

The bytes for resourceType to set.

Returns
TypeDescription
ServiceContext.Builder

This builder for chaining.

setService(String value)

public ServiceContext.Builder setService(String value)

An identifier of the service, such as the name of the executable, job, or Google App Engine service name. This field is expected to have a low number of values that are relatively stable over time, as opposed to version, which can be changed whenever new code is deployed. Contains the service name for error reports extracted from Google App Engine logs or default if the App Engine default service is used.

string service = 2;

Parameter
NameDescription
valueString

The service to set.

Returns
TypeDescription
ServiceContext.Builder

This builder for chaining.

setServiceBytes(ByteString value)

public ServiceContext.Builder setServiceBytes(ByteString value)

An identifier of the service, such as the name of the executable, job, or Google App Engine service name. This field is expected to have a low number of values that are relatively stable over time, as opposed to version, which can be changed whenever new code is deployed. Contains the service name for error reports extracted from Google App Engine logs or default if the App Engine default service is used.

string service = 2;

Parameter
NameDescription
valueByteString

The bytes for service to set.

Returns
TypeDescription
ServiceContext.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final ServiceContext.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ServiceContext.Builder
Overrides

setVersion(String value)

public ServiceContext.Builder setVersion(String value)

Represents the source code version that the developer provided, which could represent a version label or a Git SHA-1 hash, for example. For App Engine standard environment, the version is set to the version of the app.

string version = 3;

Parameter
NameDescription
valueString

The version to set.

Returns
TypeDescription
ServiceContext.Builder

This builder for chaining.

setVersionBytes(ByteString value)

public ServiceContext.Builder setVersionBytes(ByteString value)

Represents the source code version that the developer provided, which could represent a version label or a Git SHA-1 hash, for example. For App Engine standard environment, the version is set to the version of the app.

string version = 3;

Parameter
NameDescription
valueByteString

The bytes for version to set.

Returns
TypeDescription
ServiceContext.Builder

This builder for chaining.