hunk.code_window: type WebSocketClient struct {
   	Url                string          // The location of the server like "ws://localhost:8065"
   	ApiUrl             string          // The api location of the server like "ws://localhost:8065/api/v3"
   	ConnectUrl         string          // The websocket URL to connect to like "ws://localhost:8065/api/v3/path/to/websocket"
   	Conn               *websocket.Conn // The WebSocket connection
   	AuthToken          string          // The token used to open the WebSocket
   	Sequence           int64           // The ever-incrementing sequence attached to each WebSocket action
   	PingTimeoutChannel chan bool       // The channel used to signal ping timeouts
   	EventChannel       chan *WebSocketEvent
   	ResponseChannel    chan *WebSocketResponse
   	ListenError        *AppError
   	pingTimeoutTimer   *time.Timer
   }
  
hunk.labels: keep replace replace replace replace replace replace replace replace replace replace keep keep keep
hunk.after_edit: 	Url                string                  // The location of the server like "ws://localhost:8065"
   	ApiUrl             string                  // The API location of the server like "ws://localhost:8065/api/v3"
   	ConnectUrl         string                  // The WebSocket URL to connect to like "ws://localhost:8065/api/v3/path/to/websocket"
   	Conn               *websocket.Conn         // The WebSocket connection
   	AuthToken          string                  // The token used to open the WebSocket connection
   	Sequence           int64                   // The ever-incrementing sequence attached to each WebSocket action
   	PingTimeoutChannel chan bool               // The channel used to signal ping timeouts
   	EventChannel       chan *WebSocketEvent    // The channel used to receive various events pushed from the server. For example: typing, posted
   	ResponseChannel    chan *WebSocketResponse // The channel used to receive responses for requests made to the server
   	ListenError        *AppError               // A field that is set if there was an abnormal closure of the WebSocket connection
  
hunk.file_path: model/websocket_client.go
hunk.type: replace
file: // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
  // See LICENSE.txt for license information.
  
  package model
  
  import (
  	"encoding/json"
  	"io"
  
  	goi18n "github.com/mattermost/go-i18n/i18n"
  )
  
  type WebSocketRequest struct {
  	// Client-provided fields
  	Seq    int64                  `json:"seq"`
  	Action string                 `json:"action"`
  	Data   map[string]interface{} `json:"data"`
  
  	// Server-provided fields
  	Session Session              `json:"-"`
  	T       goi18n.TranslateFunc `json:"-"`
  	Locale  string               `json:"-"`
  }
  
  func (o *WebSocketRequest) ToJson() string {
  	b, _ := json.Marshal(o)
  	return string(b)
  }
  
  func WebSocketRequestFromJson(data io.Reader) *WebSocketRequest {
  	var o *WebSocketRequest
  	json.NewDecoder(data).Decode(&o)
  	return o
  }
  