Class ServiceContext.Builder

  • All Implemented Interfaces:
    ServiceContextOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    ServiceContext

    public static final class ServiceContext.Builder
    extends com.google.protobuf.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
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<ServiceContext.Builder>
      • clear

        public ServiceContext.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<ServiceContext.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<ServiceContext.Builder>
      • getDefaultInstanceForType

        public ServiceContext getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public ServiceContext build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public ServiceContext buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public ServiceContext.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<ServiceContext.Builder>
      • setField

        public ServiceContext.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                               Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<ServiceContext.Builder>
      • clearField

        public ServiceContext.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<ServiceContext.Builder>
      • clearOneof

        public ServiceContext.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<ServiceContext.Builder>
      • setRepeatedField

        public ServiceContext.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                       int index,
                                                       Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ServiceContext.Builder>
      • addRepeatedField

        public ServiceContext.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                       Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ServiceContext.Builder>
      • mergeFrom

        public ServiceContext.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ServiceContext.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<ServiceContext.Builder>
      • mergeFrom

        public ServiceContext.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                         throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ServiceContext.Builder>
        Throws:
        IOException
      • 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;
        Specified by:
        getService in interface ServiceContextOrBuilder
        Returns:
        The service.
      • getServiceBytes

        public com.google.protobuf.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;
        Specified by:
        getServiceBytes in interface ServiceContextOrBuilder
        Returns:
        The bytes for service.
      • setService

        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;
        Parameters:
        value - The service to set.
        Returns:
        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:
        This builder for chaining.
      • setServiceBytes

        public ServiceContext.Builder setServiceBytes​(com.google.protobuf.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;
        Parameters:
        value - The bytes for service to set.
        Returns:
        This builder for chaining.
      • 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;
        Specified by:
        getVersion in interface ServiceContextOrBuilder
        Returns:
        The version.
      • getVersionBytes

        public com.google.protobuf.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;
        Specified by:
        getVersionBytes in interface ServiceContextOrBuilder
        Returns:
        The bytes for version.
      • setVersion

        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;
        Parameters:
        value - The version to set.
        Returns:
        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:
        This builder for chaining.
      • setVersionBytes

        public ServiceContext.Builder setVersionBytes​(com.google.protobuf.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;
        Parameters:
        value - The bytes for version to set.
        Returns:
        This builder for chaining.
      • 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;
        Specified by:
        getResourceType in interface ServiceContextOrBuilder
        Returns:
        The resourceType.
      • getResourceTypeBytes

        public com.google.protobuf.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;
        Specified by:
        getResourceTypeBytes in interface ServiceContextOrBuilder
        Returns:
        The bytes for resourceType.
      • setResourceType

        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;
        Parameters:
        value - The resourceType to set.
        Returns:
        This builder for chaining.
      • 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:
        This builder for chaining.
      • setResourceTypeBytes

        public ServiceContext.Builder setResourceTypeBytes​(com.google.protobuf.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;
        Parameters:
        value - The bytes for resourceType to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final ServiceContext.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ServiceContext.Builder>
      • mergeUnknownFields

        public final ServiceContext.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ServiceContext.Builder>