Class Navigation.GoalStatus.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<Navigation.GoalStatus,Navigation.GoalStatus.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<Navigation.GoalStatus,Navigation.GoalStatus.Builder>
com.viam.service.navigation.v1.Navigation.GoalStatus.Builder
All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, Navigation.GoalStatusOrBuilder, Cloneable
Enclosing class:
Navigation.GoalStatus

public static final class Navigation.GoalStatus.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<Navigation.GoalStatus,Navigation.GoalStatus.Builder> implements Navigation.GoalStatusOrBuilder
 GoalStatus is one goal and its lifecycle. Returned (embedded in Status) by
 every method that starts, suspends, resumes, or cancels motion, and embedded
 in Status from GetNavigationStatus. Only the latest goal is kept. SUCCEEDED, FAILED,
 and CANCELED are terminal.
 
Protobuf type viam.service.navigation.v1.GoalStatus
  • Method Details

    • getStateValue

      public int getStateValue()
      .viam.service.navigation.v1.GoalState state = 1 [json_name = "state"];
      Specified by:
      getStateValue in interface Navigation.GoalStatusOrBuilder
      Returns:
      The enum numeric value on the wire for state.
    • setStateValue

      public Navigation.GoalStatus.Builder setStateValue(int value)
      .viam.service.navigation.v1.GoalState state = 1 [json_name = "state"];
      Parameters:
      value - The state to set.
      Returns:
      This builder for chaining.
    • getState

      public Navigation.GoalState getState()
      .viam.service.navigation.v1.GoalState state = 1 [json_name = "state"];
      Specified by:
      getState in interface Navigation.GoalStatusOrBuilder
      Returns:
      The state.
    • setState

      .viam.service.navigation.v1.GoalState state = 1 [json_name = "state"];
      Parameters:
      value - The enum numeric value on the wire for state to set.
      Returns:
      This builder for chaining.
      Throws:
      IllegalArgumentException - if UNRECOGNIZED is provided.
    • clearState

      public Navigation.GoalStatus.Builder clearState()
      .viam.service.navigation.v1.GoalState state = 1 [json_name = "state"];
      Returns:
      This builder for chaining.
    • getModeValue

      public int getModeValue()
      .viam.service.navigation.v1.NavMode mode = 2 [json_name = "mode"];
      Specified by:
      getModeValue in interface Navigation.GoalStatusOrBuilder
      Returns:
      The enum numeric value on the wire for mode.
    • setModeValue

      public Navigation.GoalStatus.Builder setModeValue(int value)
      .viam.service.navigation.v1.NavMode mode = 2 [json_name = "mode"];
      Parameters:
      value - The mode to set.
      Returns:
      This builder for chaining.
    • getMode

      public Navigation.NavMode getMode()
      .viam.service.navigation.v1.NavMode mode = 2 [json_name = "mode"];
      Specified by:
      getMode in interface Navigation.GoalStatusOrBuilder
      Returns:
      The mode.
    • setMode

      .viam.service.navigation.v1.NavMode mode = 2 [json_name = "mode"];
      Parameters:
      value - The enum numeric value on the wire for mode to set.
      Returns:
      This builder for chaining.
      Throws:
      IllegalArgumentException - if UNRECOGNIZED is provided.
    • clearMode

      public Navigation.GoalStatus.Builder clearMode()
      .viam.service.navigation.v1.NavMode mode = 2 [json_name = "mode"];
      Returns:
      This builder for chaining.
    • hasTarget

      public boolean hasTarget()
       For a route, the current waypoint
       
      .viam.service.navigation.v1.Position target = 3 [json_name = "target"];
      Specified by:
      hasTarget in interface Navigation.GoalStatusOrBuilder
      Returns:
      Whether the target field is set.
    • getTarget

      public Navigation.Position getTarget()
       For a route, the current waypoint
       
      .viam.service.navigation.v1.Position target = 3 [json_name = "target"];
      Specified by:
      getTarget in interface Navigation.GoalStatusOrBuilder
      Returns:
      The target.
    • setTarget

       For a route, the current waypoint
       
      .viam.service.navigation.v1.Position target = 3 [json_name = "target"];
    • setTarget

      public Navigation.GoalStatus.Builder setTarget(Navigation.Position.Builder builderForValue)
       For a route, the current waypoint
       
      .viam.service.navigation.v1.Position target = 3 [json_name = "target"];
    • mergeTarget

       For a route, the current waypoint
       
      .viam.service.navigation.v1.Position target = 3 [json_name = "target"];
    • clearTarget

      public Navigation.GoalStatus.Builder clearTarget()
       For a route, the current waypoint
       
      .viam.service.navigation.v1.Position target = 3 [json_name = "target"];
    • hasLocation

      public boolean hasLocation()
       Set when the target is a saved location
       
      optional string location = 4 [json_name = "location"];
      Specified by:
      hasLocation in interface Navigation.GoalStatusOrBuilder
      Returns:
      Whether the location field is set.
    • getLocation

      public String getLocation()
       Set when the target is a saved location
       
      optional string location = 4 [json_name = "location"];
      Specified by:
      getLocation in interface Navigation.GoalStatusOrBuilder
      Returns:
      The location.
    • getLocationBytes

      public com.google.protobuf.ByteString getLocationBytes()
       Set when the target is a saved location
       
      optional string location = 4 [json_name = "location"];
      Specified by:
      getLocationBytes in interface Navigation.GoalStatusOrBuilder
      Returns:
      The bytes for location.
    • setLocation

      public Navigation.GoalStatus.Builder setLocation(String value)
       Set when the target is a saved location
       
      optional string location = 4 [json_name = "location"];
      Parameters:
      value - The location to set.
      Returns:
      This builder for chaining.
    • clearLocation

      public Navigation.GoalStatus.Builder clearLocation()
       Set when the target is a saved location
       
      optional string location = 4 [json_name = "location"];
      Returns:
      This builder for chaining.
    • setLocationBytes

      public Navigation.GoalStatus.Builder setLocationBytes(com.google.protobuf.ByteString value)
       Set when the target is a saved location
       
      optional string location = 4 [json_name = "location"];
      Parameters:
      value - The bytes for location to set.
      Returns:
      This builder for chaining.
    • hasProgress

      public boolean hasProgress()
       While ACTIVE
       
      optional .viam.service.navigation.v1.Progress progress = 5 [json_name = "progress"];
      Specified by:
      hasProgress in interface Navigation.GoalStatusOrBuilder
      Returns:
      Whether the progress field is set.
    • getProgress

      public Navigation.Progress getProgress()
       While ACTIVE
       
      optional .viam.service.navigation.v1.Progress progress = 5 [json_name = "progress"];
      Specified by:
      getProgress in interface Navigation.GoalStatusOrBuilder
      Returns:
      The progress.
    • setProgress

       While ACTIVE
       
      optional .viam.service.navigation.v1.Progress progress = 5 [json_name = "progress"];
    • setProgress

      public Navigation.GoalStatus.Builder setProgress(Navigation.Progress.Builder builderForValue)
       While ACTIVE
       
      optional .viam.service.navigation.v1.Progress progress = 5 [json_name = "progress"];
    • mergeProgress

      public Navigation.GoalStatus.Builder mergeProgress(Navigation.Progress value)
       While ACTIVE
       
      optional .viam.service.navigation.v1.Progress progress = 5 [json_name = "progress"];
    • clearProgress

      public Navigation.GoalStatus.Builder clearProgress()
       While ACTIVE
       
      optional .viam.service.navigation.v1.Progress progress = 5 [json_name = "progress"];
    • hasRoute

      public boolean hasRoute()
       When mode == NAV_MODE_ROUTE
       
      optional .viam.service.navigation.v1.RouteProgress route = 6 [json_name = "route"];
      Specified by:
      hasRoute in interface Navigation.GoalStatusOrBuilder
      Returns:
      Whether the route field is set.
    • getRoute

      public Navigation.RouteProgress getRoute()
       When mode == NAV_MODE_ROUTE
       
      optional .viam.service.navigation.v1.RouteProgress route = 6 [json_name = "route"];
      Specified by:
      getRoute in interface Navigation.GoalStatusOrBuilder
      Returns:
      The route.
    • setRoute

       When mode == NAV_MODE_ROUTE
       
      optional .viam.service.navigation.v1.RouteProgress route = 6 [json_name = "route"];
    • setRoute

       When mode == NAV_MODE_ROUTE
       
      optional .viam.service.navigation.v1.RouteProgress route = 6 [json_name = "route"];
    • mergeRoute

       When mode == NAV_MODE_ROUTE
       
      optional .viam.service.navigation.v1.RouteProgress route = 6 [json_name = "route"];
    • clearRoute

      public Navigation.GoalStatus.Builder clearRoute()
       When mode == NAV_MODE_ROUTE
       
      optional .viam.service.navigation.v1.RouteProgress route = 6 [json_name = "route"];
    • hasSuspendReason

      public boolean hasSuspendReason()
       When SUSPENDED
       
      optional string suspend_reason = 7 [json_name = "suspendReason"];
      Specified by:
      hasSuspendReason in interface Navigation.GoalStatusOrBuilder
      Returns:
      Whether the suspendReason field is set.
    • getSuspendReason

      public String getSuspendReason()
       When SUSPENDED
       
      optional string suspend_reason = 7 [json_name = "suspendReason"];
      Specified by:
      getSuspendReason in interface Navigation.GoalStatusOrBuilder
      Returns:
      The suspendReason.
    • getSuspendReasonBytes

      public com.google.protobuf.ByteString getSuspendReasonBytes()
       When SUSPENDED
       
      optional string suspend_reason = 7 [json_name = "suspendReason"];
      Specified by:
      getSuspendReasonBytes in interface Navigation.GoalStatusOrBuilder
      Returns:
      The bytes for suspendReason.
    • setSuspendReason

      public Navigation.GoalStatus.Builder setSuspendReason(String value)
       When SUSPENDED
       
      optional string suspend_reason = 7 [json_name = "suspendReason"];
      Parameters:
      value - The suspendReason to set.
      Returns:
      This builder for chaining.
    • clearSuspendReason

      public Navigation.GoalStatus.Builder clearSuspendReason()
       When SUSPENDED
       
      optional string suspend_reason = 7 [json_name = "suspendReason"];
      Returns:
      This builder for chaining.
    • setSuspendReasonBytes

      public Navigation.GoalStatus.Builder setSuspendReasonBytes(com.google.protobuf.ByteString value)
       When SUSPENDED
       
      optional string suspend_reason = 7 [json_name = "suspendReason"];
      Parameters:
      value - The bytes for suspendReason to set.
      Returns:
      This builder for chaining.
    • hasError

      public boolean hasError()
       When FAILED
       
      optional .viam.service.navigation.v1.NavError error = 8 [json_name = "error"];
      Specified by:
      hasError in interface Navigation.GoalStatusOrBuilder
      Returns:
      Whether the error field is set.
    • getError

      public Navigation.NavError getError()
       When FAILED
       
      optional .viam.service.navigation.v1.NavError error = 8 [json_name = "error"];
      Specified by:
      getError in interface Navigation.GoalStatusOrBuilder
      Returns:
      The error.
    • setError

       When FAILED
       
      optional .viam.service.navigation.v1.NavError error = 8 [json_name = "error"];
    • setError

       When FAILED
       
      optional .viam.service.navigation.v1.NavError error = 8 [json_name = "error"];
    • mergeError

       When FAILED
       
      optional .viam.service.navigation.v1.NavError error = 8 [json_name = "error"];
    • clearError

      public Navigation.GoalStatus.Builder clearError()
       When FAILED
       
      optional .viam.service.navigation.v1.NavError error = 8 [json_name = "error"];
    • hasStartedAt

      public boolean hasStartedAt()
      .google.protobuf.Timestamp started_at = 9 [json_name = "startedAt"];
      Specified by:
      hasStartedAt in interface Navigation.GoalStatusOrBuilder
      Returns:
      Whether the startedAt field is set.
    • getStartedAt

      public com.google.protobuf.Timestamp getStartedAt()
      .google.protobuf.Timestamp started_at = 9 [json_name = "startedAt"];
      Specified by:
      getStartedAt in interface Navigation.GoalStatusOrBuilder
      Returns:
      The startedAt.
    • setStartedAt

      public Navigation.GoalStatus.Builder setStartedAt(com.google.protobuf.Timestamp value)
      .google.protobuf.Timestamp started_at = 9 [json_name = "startedAt"];
    • setStartedAt

      public Navigation.GoalStatus.Builder setStartedAt(com.google.protobuf.Timestamp.Builder builderForValue)
      .google.protobuf.Timestamp started_at = 9 [json_name = "startedAt"];
    • mergeStartedAt

      public Navigation.GoalStatus.Builder mergeStartedAt(com.google.protobuf.Timestamp value)
      .google.protobuf.Timestamp started_at = 9 [json_name = "startedAt"];
    • clearStartedAt

      public Navigation.GoalStatus.Builder clearStartedAt()
      .google.protobuf.Timestamp started_at = 9 [json_name = "startedAt"];
    • hasFinishedAt

      public boolean hasFinishedAt()
       Set once terminal
       
      optional .google.protobuf.Timestamp finished_at = 10 [json_name = "finishedAt"];
      Specified by:
      hasFinishedAt in interface Navigation.GoalStatusOrBuilder
      Returns:
      Whether the finishedAt field is set.
    • getFinishedAt

      public com.google.protobuf.Timestamp getFinishedAt()
       Set once terminal
       
      optional .google.protobuf.Timestamp finished_at = 10 [json_name = "finishedAt"];
      Specified by:
      getFinishedAt in interface Navigation.GoalStatusOrBuilder
      Returns:
      The finishedAt.
    • setFinishedAt

      public Navigation.GoalStatus.Builder setFinishedAt(com.google.protobuf.Timestamp value)
       Set once terminal
       
      optional .google.protobuf.Timestamp finished_at = 10 [json_name = "finishedAt"];
    • setFinishedAt

      public Navigation.GoalStatus.Builder setFinishedAt(com.google.protobuf.Timestamp.Builder builderForValue)
       Set once terminal
       
      optional .google.protobuf.Timestamp finished_at = 10 [json_name = "finishedAt"];
    • mergeFinishedAt

      public Navigation.GoalStatus.Builder mergeFinishedAt(com.google.protobuf.Timestamp value)
       Set once terminal
       
      optional .google.protobuf.Timestamp finished_at = 10 [json_name = "finishedAt"];
    • clearFinishedAt

      public Navigation.GoalStatus.Builder clearFinishedAt()
       Set once terminal
       
      optional .google.protobuf.Timestamp finished_at = 10 [json_name = "finishedAt"];