Class ServiceContext.Builder (0.167.0-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
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ServiceContext build()
Returns
Type Description
ServiceContext

buildPartial()

public ServiceContext buildPartial()
Returns
Type Description
ServiceContext

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

public ServiceContext.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
ServiceContext.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public ServiceContext getDefaultInstanceForType()
Returns
Type Description
ServiceContext

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for version.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ServiceContext other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

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

public ServiceContext.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
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
Name Description
value String

The resourceType to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for resourceType to set.

Returns
Type Description
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
Name Description
value String

The service to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for service to set.

Returns
Type Description
ServiceContext.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final ServiceContext.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
value String

The version to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for version to set.

Returns
Type Description
ServiceContext.Builder

This builder for chaining.