Package io.vertx.ext.consul

## Class TxnServiceOperation

- java.lang.Object
- - io.vertx.ext.consul.TxnServiceOperation

- All Implemented Interfaces:
    `TxnOperation`

      public class TxnServiceOperation
      extends Object
      implements TxnOperation

  Holds the operation to apply to the service inside a transaction

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `TxnServiceOperation()` | Default constructor
    `TxnServiceOperation​(JsonObject json)` | Constructor from JSON

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `String` | `getNode()` | Get the node
    `TxnOperationType` | `getOperationType()` | Returns the type of operation in a transaction
    `ServiceOptions` | `getServiceOptions()` | Get the service
    `TxnServiceVerb` | `getType()` | Get the type of operation to perform
    `TxnServiceOperation` | `setNode​(String node)` | Set the node
    `TxnServiceOperation` | `setServiceOptions​(ServiceOptions serviceOptions)` | Set the service
    `TxnServiceOperation` | `setType​(TxnServiceVerb type)` | Set the type of operation to perform
    `JsonObject` | `toJson()` | Convert to JSON

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### TxnServiceOperation

          public TxnServiceOperation()

      Default constructor

    - #### TxnServiceOperation

          public TxnServiceOperation​(JsonObject json)

      Constructor from JSON
      Parameters:
        `json` - the JSON

  - ### Method Detail

    - #### toJson

          public JsonObject toJson()

      Convert to JSON
      Returns:
        the JSON

    - #### getType

          public TxnServiceVerb getType()

      Get the type of operation to perform
      Returns:
        the type of operation to perform

    - #### getNode

          public String getNode()

      Get the node
      Returns:
        the node name

    - #### getServiceOptions

          public ServiceOptions getServiceOptions()

      Get the service
      Returns:
        the service

    - #### setType

          public TxnServiceOperation setType​(TxnServiceVerb type)

      Set the type of operation to perform
      Parameters:
        `type` - the type of operation to perform
      Returns:
        reference to this, for fluency

    - #### setNode

          public TxnServiceOperation setNode​(String node)

      Set the node
      Parameters:
        `node` -
      Returns:
        reference to this, for fluency

    - #### setServiceOptions

          public TxnServiceOperation setServiceOptions​(ServiceOptions serviceOptions)

      Set the service
      Parameters:
        `serviceOptions` -
      Returns:
        reference to this, for fluency

    - #### getOperationType

          public TxnOperationType getOperationType()

      Description copied from interface: `TxnOperation`
      Returns the type of operation in a transaction
      Specified by:
        `getOperationType` in interface `TxnOperation`
      Returns:
        the type of operation in a transaction