# TargetStruct

    struct TargetStruct

A remote node and endpoint.
- `


  ### [node](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/BindingTrait/TargetStruct#/s:15GoogleHomeTypes6MatterO12BindingTraitV12TargetStructV4nodes6UInt64VSgvp)


  ` The remote target node ID.

  #### Declaration

  Swift

      let node: UInt64?

- `


  ### [group](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/BindingTrait/TargetStruct#/s:15GoogleHomeTypes6MatterO12BindingTraitV12TargetStructV5groups6UInt16VSgvp)


  ` The target group ID.

  #### Declaration

  Swift

      let group: UInt16?

- `


  ### [endpoint](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/BindingTrait/TargetStruct#/s:15GoogleHomeTypes6MatterO12BindingTraitV12TargetStructV8endpoints6UInt16VSgvp)


  ` The remote endpoint to which the local endpoint is bound.

  #### Declaration

  Swift

      let endpoint: UInt16?

- `


  ### [cluster](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/BindingTrait/TargetStruct#/s:15GoogleHomeTypes6MatterO12BindingTraitV12TargetStructV7clusters6UInt32VSgvp)


  ` The cluster ID for the client and server on the target endpoint.

  #### Declaration

  Swift

      let cluster: UInt32?

- `


  ### [fabricIndex](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/BindingTrait/TargetStruct#/s:15GoogleHomeTypes6MatterO12BindingTraitV12TargetStructV11fabricIndexs5UInt8Vvp)


  ` The identifier for the fabric where the target endpoint is located.

  #### Declaration

  Swift

      let fabricIndex: UInt8

- `


  ### [init(decoder:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/BindingTrait/TargetStruct#/s:15GoogleHomeTypes6MatterO12BindingTraitV12TargetStructV7decoderAG0aB3SDK0F7DecoderV_tKcfc)


  ` Creates a new Struct instance using data read from the given `TraitDecoder`.
  Throws
  `HomeError.parseError` when parsing fails.

  #### Declaration

  Swift

      init(decoder: TraitDecoder) throws

  #### Parameters

  |---|---|
  | ` decoder ` | The raw data representing this Struct. |

- `


  ### [encode(with:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/BindingTrait/TargetStruct#/s:15GoogleHomeTypes6MatterO12BindingTraitV12TargetStructV6encode4withy0aB3SDK0F7EncoderC_tKF)


  ` Writes this Struct to the given `TraitEncoder`.
  Throws `HomeError.parseError` if the data could not be encoded.

  #### Declaration

  Swift

      func encode(with encoder: TraitEncoder) throws

- `


  ### [structField(id:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Matter/BindingTrait/TargetStruct#/s:15GoogleHomeTypes6MatterO12BindingTraitV12TargetStructV11structField2id0aB3SDK0J0_pSgs6UInt32V_tFZ)


  ` Returns the field corresponding to the given field ID.

  #### Declaration

  Swift

      static func structField(id: UInt32) -> (any Field)?