Class Motor.IsPoweredResponse.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<Motor.IsPoweredResponse,Motor.IsPoweredResponse.Builder>
com.viam.component.motor.v1.Motor.IsPoweredResponse.Builder
All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, Motor.IsPoweredResponseOrBuilder, Cloneable
Enclosing class:
Motor.IsPoweredResponse

public static final class Motor.IsPoweredResponse.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<Motor.IsPoweredResponse,Motor.IsPoweredResponse.Builder> implements Motor.IsPoweredResponseOrBuilder
Protobuf type viam.component.motor.v1.IsPoweredResponse
  • Field Summary

    Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder

    instance
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns true if the motor is on
    Returns power percent (from 0 to 1, or from -1 to 1 for motors that support negative power), based on the last command sent to motor.
    boolean
    Returns true if the motor is on
    double
    Returns power percent (from 0 to 1, or from -1 to 1 for motors that support negative power), based on the last command sent to motor.
    setIsOn(boolean value)
    Returns true if the motor is on
    setPowerPct(double value)
    Returns power percent (from 0 to 1, or from -1 to 1 for motors that support negative power), based on the last command sent to motor.

    Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder

    build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFrom

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

    getDefaultInstanceForType, isInitialized
  • Method Details

    • getIsOn

      public boolean getIsOn()
       Returns true if the motor is on
       
      bool is_on = 1 [json_name = "isOn"];
      Specified by:
      getIsOn in interface Motor.IsPoweredResponseOrBuilder
      Returns:
      The isOn.
    • setIsOn

      public Motor.IsPoweredResponse.Builder setIsOn(boolean value)
       Returns true if the motor is on
       
      bool is_on = 1 [json_name = "isOn"];
      Parameters:
      value - The isOn to set.
      Returns:
      This builder for chaining.
    • clearIsOn

      public Motor.IsPoweredResponse.Builder clearIsOn()
       Returns true if the motor is on
       
      bool is_on = 1 [json_name = "isOn"];
      Returns:
      This builder for chaining.
    • getPowerPct

      public double getPowerPct()
       Returns power percent (from 0 to 1, or from -1 to 1 for motors that support negative power),
       based on the last command sent to motor. If the last command was a stop command, this value
       will be 0.
       
      double power_pct = 2 [json_name = "powerPct"];
      Specified by:
      getPowerPct in interface Motor.IsPoweredResponseOrBuilder
      Returns:
      The powerPct.
    • setPowerPct

      public Motor.IsPoweredResponse.Builder setPowerPct(double value)
       Returns power percent (from 0 to 1, or from -1 to 1 for motors that support negative power),
       based on the last command sent to motor. If the last command was a stop command, this value
       will be 0.
       
      double power_pct = 2 [json_name = "powerPct"];
      Parameters:
      value - The powerPct to set.
      Returns:
      This builder for chaining.
    • clearPowerPct

      public Motor.IsPoweredResponse.Builder clearPowerPct()
       Returns power percent (from 0 to 1, or from -1 to 1 for motors that support negative power),
       based on the last command sent to motor. If the last command was a stop command, this value
       will be 0.
       
      double power_pct = 2 [json_name = "powerPct"];
      Returns:
      This builder for chaining.