Class EventContext.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<EventContext.Builder>
com.buildless.telemetry.EventContext.Builder
All Implemented Interfaces:
EventContextOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
EventContext

public static final class EventContext.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<EventContext.Builder> implements EventContextOrBuilder
 ## Telemetry Context

 Describes reference structures which connect `TelemetryEvent` objects with other objects, either within the Buildless
 model, or externally, via integrations.

 ## Context type structure

 Telemetry context is typed. Each context record linkage has a required `type` field which maps to an implementation
 protocol message. Implementation messages may be private and may be defined in the modules to which they relate.
 
Protobuf type buildless.telemetry.EventContext
  • Method Details

    • 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<EventContext.Builder>
    • clear

      public EventContext.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<EventContext.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<EventContext.Builder>
    • getDefaultInstanceForType

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

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

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

      public EventContext.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<EventContext.Builder>
    • setField

      public EventContext.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<EventContext.Builder>
    • clearField

      public EventContext.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<EventContext.Builder>
    • clearOneof

      public EventContext.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<EventContext.Builder>
    • setRepeatedField

      public EventContext.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<EventContext.Builder>
    • addRepeatedField

      public EventContext.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<EventContext.Builder>
    • mergeFrom

      public EventContext.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<EventContext.Builder>
    • mergeFrom

      public EventContext.Builder mergeFrom(EventContext other)
    • isInitialized

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

      public EventContext.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<EventContext.Builder>
      Throws:
      IOException
    • getType

      public String getType()
       Type specification for this event context reference. This value should be a well-formed type URL which points to
       the protocol message implementing this context type.
       
      string type = 1 [json_name = "type", (.google.api.field_behavior) = REQUIRED, (.validate.rules) = { ... }
      Specified by:
      getType in interface EventContextOrBuilder
      Returns:
      The type.
    • getTypeBytes

      public com.google.protobuf.ByteString getTypeBytes()
       Type specification for this event context reference. This value should be a well-formed type URL which points to
       the protocol message implementing this context type.
       
      string type = 1 [json_name = "type", (.google.api.field_behavior) = REQUIRED, (.validate.rules) = { ... }
      Specified by:
      getTypeBytes in interface EventContextOrBuilder
      Returns:
      The bytes for type.
    • setType

      public EventContext.Builder setType(String value)
       Type specification for this event context reference. This value should be a well-formed type URL which points to
       the protocol message implementing this context type.
       
      string type = 1 [json_name = "type", (.google.api.field_behavior) = REQUIRED, (.validate.rules) = { ... }
      Parameters:
      value - The type to set.
      Returns:
      This builder for chaining.
    • clearType

      public EventContext.Builder clearType()
       Type specification for this event context reference. This value should be a well-formed type URL which points to
       the protocol message implementing this context type.
       
      string type = 1 [json_name = "type", (.google.api.field_behavior) = REQUIRED, (.validate.rules) = { ... }
      Returns:
      This builder for chaining.
    • setTypeBytes

      public EventContext.Builder setTypeBytes(com.google.protobuf.ByteString value)
       Type specification for this event context reference. This value should be a well-formed type URL which points to
       the protocol message implementing this context type.
       
      string type = 1 [json_name = "type", (.google.api.field_behavior) = REQUIRED, (.validate.rules) = { ... }
      Parameters:
      value - The bytes for type to set.
      Returns:
      This builder for chaining.
    • getResource

      public String getResource()
       Specifies a resource which this context relates to. Optional, and only specifies when a resource relates to an
       event context payload.
       
      string resource = 2 [json_name = "resource", (.google.api.field_behavior) = OPTIONAL, (.validate.rules) = { ... }
      Specified by:
      getResource in interface EventContextOrBuilder
      Returns:
      The resource.
    • getResourceBytes

      public com.google.protobuf.ByteString getResourceBytes()
       Specifies a resource which this context relates to. Optional, and only specifies when a resource relates to an
       event context payload.
       
      string resource = 2 [json_name = "resource", (.google.api.field_behavior) = OPTIONAL, (.validate.rules) = { ... }
      Specified by:
      getResourceBytes in interface EventContextOrBuilder
      Returns:
      The bytes for resource.
    • setResource

      public EventContext.Builder setResource(String value)
       Specifies a resource which this context relates to. Optional, and only specifies when a resource relates to an
       event context payload.
       
      string resource = 2 [json_name = "resource", (.google.api.field_behavior) = OPTIONAL, (.validate.rules) = { ... }
      Parameters:
      value - The resource to set.
      Returns:
      This builder for chaining.
    • clearResource

      public EventContext.Builder clearResource()
       Specifies a resource which this context relates to. Optional, and only specifies when a resource relates to an
       event context payload.
       
      string resource = 2 [json_name = "resource", (.google.api.field_behavior) = OPTIONAL, (.validate.rules) = { ... }
      Returns:
      This builder for chaining.
    • setResourceBytes

      public EventContext.Builder setResourceBytes(com.google.protobuf.ByteString value)
       Specifies a resource which this context relates to. Optional, and only specifies when a resource relates to an
       event context payload.
       
      string resource = 2 [json_name = "resource", (.google.api.field_behavior) = OPTIONAL, (.validate.rules) = { ... }
      Parameters:
      value - The bytes for resource to set.
      Returns:
      This builder for chaining.
    • getAction

      public String getAction()
       Action name that took place on the specified `resource`. Only allowed when a `resource` is specified, in which case
       `resource` is required.
       
      string action = 3 [json_name = "action", (.google.api.field_behavior) = OPTIONAL, (.validate.rules) = { ... }
      Specified by:
      getAction in interface EventContextOrBuilder
      Returns:
      The action.
    • getActionBytes

      public com.google.protobuf.ByteString getActionBytes()
       Action name that took place on the specified `resource`. Only allowed when a `resource` is specified, in which case
       `resource` is required.
       
      string action = 3 [json_name = "action", (.google.api.field_behavior) = OPTIONAL, (.validate.rules) = { ... }
      Specified by:
      getActionBytes in interface EventContextOrBuilder
      Returns:
      The bytes for action.
    • setAction

      public EventContext.Builder setAction(String value)
       Action name that took place on the specified `resource`. Only allowed when a `resource` is specified, in which case
       `resource` is required.
       
      string action = 3 [json_name = "action", (.google.api.field_behavior) = OPTIONAL, (.validate.rules) = { ... }
      Parameters:
      value - The action to set.
      Returns:
      This builder for chaining.
    • clearAction

      public EventContext.Builder clearAction()
       Action name that took place on the specified `resource`. Only allowed when a `resource` is specified, in which case
       `resource` is required.
       
      string action = 3 [json_name = "action", (.google.api.field_behavior) = OPTIONAL, (.validate.rules) = { ... }
      Returns:
      This builder for chaining.
    • setActionBytes

      public EventContext.Builder setActionBytes(com.google.protobuf.ByteString value)
       Action name that took place on the specified `resource`. Only allowed when a `resource` is specified, in which case
       `resource` is required.
       
      string action = 3 [json_name = "action", (.google.api.field_behavior) = OPTIONAL, (.validate.rules) = { ... }
      Parameters:
      value - The bytes for action to set.
      Returns:
      This builder for chaining.
    • getEvent

      public String getEvent()
       Event name or ID which occurred within the scope of this context type. This value is required for all context types
       and effectively describes available detail, or the event which triggered this context.
       
      string event = 4 [json_name = "event", (.google.api.field_behavior) = REQUIRED, (.validate.rules) = { ... }
      Specified by:
      getEvent in interface EventContextOrBuilder
      Returns:
      The event.
    • getEventBytes

      public com.google.protobuf.ByteString getEventBytes()
       Event name or ID which occurred within the scope of this context type. This value is required for all context types
       and effectively describes available detail, or the event which triggered this context.
       
      string event = 4 [json_name = "event", (.google.api.field_behavior) = REQUIRED, (.validate.rules) = { ... }
      Specified by:
      getEventBytes in interface EventContextOrBuilder
      Returns:
      The bytes for event.
    • setEvent

      public EventContext.Builder setEvent(String value)
       Event name or ID which occurred within the scope of this context type. This value is required for all context types
       and effectively describes available detail, or the event which triggered this context.
       
      string event = 4 [json_name = "event", (.google.api.field_behavior) = REQUIRED, (.validate.rules) = { ... }
      Parameters:
      value - The event to set.
      Returns:
      This builder for chaining.
    • clearEvent

      public EventContext.Builder clearEvent()
       Event name or ID which occurred within the scope of this context type. This value is required for all context types
       and effectively describes available detail, or the event which triggered this context.
       
      string event = 4 [json_name = "event", (.google.api.field_behavior) = REQUIRED, (.validate.rules) = { ... }
      Returns:
      This builder for chaining.
    • setEventBytes

      public EventContext.Builder setEventBytes(com.google.protobuf.ByteString value)
       Event name or ID which occurred within the scope of this context type. This value is required for all context types
       and effectively describes available detail, or the event which triggered this context.
       
      string event = 4 [json_name = "event", (.google.api.field_behavior) = REQUIRED, (.validate.rules) = { ... }
      Parameters:
      value - The bytes for event to set.
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final EventContext.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<EventContext.Builder>
    • mergeUnknownFields

      public final EventContext.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<EventContext.Builder>