github.com/trigonella/mattermost-server@v5.11.1+incompatible/plugin/client_rpc_generated.go (about)

     1  // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
     2  // See LICENSE.txt for license information.
     3  
     4  // Code generated by "make pluginapi"
     5  // DO NOT EDIT
     6  
     7  package plugin
     8  
     9  import (
    10  	"fmt"
    11  	"log"
    12  
    13  	"github.com/mattermost/mattermost-server/mlog"
    14  	"github.com/mattermost/mattermost-server/model"
    15  )
    16  
    17  func init() {
    18  	hookNameToId["OnDeactivate"] = OnDeactivateId
    19  }
    20  
    21  type Z_OnDeactivateArgs struct {
    22  }
    23  
    24  type Z_OnDeactivateReturns struct {
    25  	A error
    26  }
    27  
    28  func (g *hooksRPCClient) OnDeactivate() error {
    29  	_args := &Z_OnDeactivateArgs{}
    30  	_returns := &Z_OnDeactivateReturns{}
    31  	if g.implemented[OnDeactivateId] {
    32  		if err := g.client.Call("Plugin.OnDeactivate", _args, _returns); err != nil {
    33  			g.log.Error("RPC call OnDeactivate to plugin failed.", mlog.Err(err))
    34  		}
    35  	}
    36  	return _returns.A
    37  }
    38  
    39  func (s *hooksRPCServer) OnDeactivate(args *Z_OnDeactivateArgs, returns *Z_OnDeactivateReturns) error {
    40  	if hook, ok := s.impl.(interface {
    41  		OnDeactivate() error
    42  	}); ok {
    43  		returns.A = hook.OnDeactivate()
    44  		returns.A = encodableError(returns.A)
    45  	} else {
    46  		return encodableError(fmt.Errorf("Hook OnDeactivate called but not implemented."))
    47  	}
    48  	return nil
    49  }
    50  
    51  func init() {
    52  	hookNameToId["OnConfigurationChange"] = OnConfigurationChangeId
    53  }
    54  
    55  type Z_OnConfigurationChangeArgs struct {
    56  }
    57  
    58  type Z_OnConfigurationChangeReturns struct {
    59  	A error
    60  }
    61  
    62  func (g *hooksRPCClient) OnConfigurationChange() error {
    63  	_args := &Z_OnConfigurationChangeArgs{}
    64  	_returns := &Z_OnConfigurationChangeReturns{}
    65  	if g.implemented[OnConfigurationChangeId] {
    66  		if err := g.client.Call("Plugin.OnConfigurationChange", _args, _returns); err != nil {
    67  			g.log.Error("RPC call OnConfigurationChange to plugin failed.", mlog.Err(err))
    68  		}
    69  	}
    70  	return _returns.A
    71  }
    72  
    73  func (s *hooksRPCServer) OnConfigurationChange(args *Z_OnConfigurationChangeArgs, returns *Z_OnConfigurationChangeReturns) error {
    74  	if hook, ok := s.impl.(interface {
    75  		OnConfigurationChange() error
    76  	}); ok {
    77  		returns.A = hook.OnConfigurationChange()
    78  		returns.A = encodableError(returns.A)
    79  	} else {
    80  		return encodableError(fmt.Errorf("Hook OnConfigurationChange called but not implemented."))
    81  	}
    82  	return nil
    83  }
    84  
    85  func init() {
    86  	hookNameToId["ExecuteCommand"] = ExecuteCommandId
    87  }
    88  
    89  type Z_ExecuteCommandArgs struct {
    90  	A *Context
    91  	B *model.CommandArgs
    92  }
    93  
    94  type Z_ExecuteCommandReturns struct {
    95  	A *model.CommandResponse
    96  	B *model.AppError
    97  }
    98  
    99  func (g *hooksRPCClient) ExecuteCommand(c *Context, args *model.CommandArgs) (*model.CommandResponse, *model.AppError) {
   100  	_args := &Z_ExecuteCommandArgs{c, args}
   101  	_returns := &Z_ExecuteCommandReturns{}
   102  	if g.implemented[ExecuteCommandId] {
   103  		if err := g.client.Call("Plugin.ExecuteCommand", _args, _returns); err != nil {
   104  			g.log.Error("RPC call ExecuteCommand to plugin failed.", mlog.Err(err))
   105  		}
   106  	}
   107  	return _returns.A, _returns.B
   108  }
   109  
   110  func (s *hooksRPCServer) ExecuteCommand(args *Z_ExecuteCommandArgs, returns *Z_ExecuteCommandReturns) error {
   111  	if hook, ok := s.impl.(interface {
   112  		ExecuteCommand(c *Context, args *model.CommandArgs) (*model.CommandResponse, *model.AppError)
   113  	}); ok {
   114  		returns.A, returns.B = hook.ExecuteCommand(args.A, args.B)
   115  
   116  	} else {
   117  		return encodableError(fmt.Errorf("Hook ExecuteCommand called but not implemented."))
   118  	}
   119  	return nil
   120  }
   121  
   122  func init() {
   123  	hookNameToId["UserHasBeenCreated"] = UserHasBeenCreatedId
   124  }
   125  
   126  type Z_UserHasBeenCreatedArgs struct {
   127  	A *Context
   128  	B *model.User
   129  }
   130  
   131  type Z_UserHasBeenCreatedReturns struct {
   132  }
   133  
   134  func (g *hooksRPCClient) UserHasBeenCreated(c *Context, user *model.User) {
   135  	_args := &Z_UserHasBeenCreatedArgs{c, user}
   136  	_returns := &Z_UserHasBeenCreatedReturns{}
   137  	if g.implemented[UserHasBeenCreatedId] {
   138  		if err := g.client.Call("Plugin.UserHasBeenCreated", _args, _returns); err != nil {
   139  			g.log.Error("RPC call UserHasBeenCreated to plugin failed.", mlog.Err(err))
   140  		}
   141  	}
   142  
   143  }
   144  
   145  func (s *hooksRPCServer) UserHasBeenCreated(args *Z_UserHasBeenCreatedArgs, returns *Z_UserHasBeenCreatedReturns) error {
   146  	if hook, ok := s.impl.(interface {
   147  		UserHasBeenCreated(c *Context, user *model.User)
   148  	}); ok {
   149  		hook.UserHasBeenCreated(args.A, args.B)
   150  
   151  	} else {
   152  		return encodableError(fmt.Errorf("Hook UserHasBeenCreated called but not implemented."))
   153  	}
   154  	return nil
   155  }
   156  
   157  func init() {
   158  	hookNameToId["UserWillLogIn"] = UserWillLogInId
   159  }
   160  
   161  type Z_UserWillLogInArgs struct {
   162  	A *Context
   163  	B *model.User
   164  }
   165  
   166  type Z_UserWillLogInReturns struct {
   167  	A string
   168  }
   169  
   170  func (g *hooksRPCClient) UserWillLogIn(c *Context, user *model.User) string {
   171  	_args := &Z_UserWillLogInArgs{c, user}
   172  	_returns := &Z_UserWillLogInReturns{}
   173  	if g.implemented[UserWillLogInId] {
   174  		if err := g.client.Call("Plugin.UserWillLogIn", _args, _returns); err != nil {
   175  			g.log.Error("RPC call UserWillLogIn to plugin failed.", mlog.Err(err))
   176  		}
   177  	}
   178  	return _returns.A
   179  }
   180  
   181  func (s *hooksRPCServer) UserWillLogIn(args *Z_UserWillLogInArgs, returns *Z_UserWillLogInReturns) error {
   182  	if hook, ok := s.impl.(interface {
   183  		UserWillLogIn(c *Context, user *model.User) string
   184  	}); ok {
   185  		returns.A = hook.UserWillLogIn(args.A, args.B)
   186  
   187  	} else {
   188  		return encodableError(fmt.Errorf("Hook UserWillLogIn called but not implemented."))
   189  	}
   190  	return nil
   191  }
   192  
   193  func init() {
   194  	hookNameToId["UserHasLoggedIn"] = UserHasLoggedInId
   195  }
   196  
   197  type Z_UserHasLoggedInArgs struct {
   198  	A *Context
   199  	B *model.User
   200  }
   201  
   202  type Z_UserHasLoggedInReturns struct {
   203  }
   204  
   205  func (g *hooksRPCClient) UserHasLoggedIn(c *Context, user *model.User) {
   206  	_args := &Z_UserHasLoggedInArgs{c, user}
   207  	_returns := &Z_UserHasLoggedInReturns{}
   208  	if g.implemented[UserHasLoggedInId] {
   209  		if err := g.client.Call("Plugin.UserHasLoggedIn", _args, _returns); err != nil {
   210  			g.log.Error("RPC call UserHasLoggedIn to plugin failed.", mlog.Err(err))
   211  		}
   212  	}
   213  
   214  }
   215  
   216  func (s *hooksRPCServer) UserHasLoggedIn(args *Z_UserHasLoggedInArgs, returns *Z_UserHasLoggedInReturns) error {
   217  	if hook, ok := s.impl.(interface {
   218  		UserHasLoggedIn(c *Context, user *model.User)
   219  	}); ok {
   220  		hook.UserHasLoggedIn(args.A, args.B)
   221  
   222  	} else {
   223  		return encodableError(fmt.Errorf("Hook UserHasLoggedIn called but not implemented."))
   224  	}
   225  	return nil
   226  }
   227  
   228  func init() {
   229  	hookNameToId["MessageHasBeenPosted"] = MessageHasBeenPostedId
   230  }
   231  
   232  type Z_MessageHasBeenPostedArgs struct {
   233  	A *Context
   234  	B *model.Post
   235  }
   236  
   237  type Z_MessageHasBeenPostedReturns struct {
   238  }
   239  
   240  func (g *hooksRPCClient) MessageHasBeenPosted(c *Context, post *model.Post) {
   241  	_args := &Z_MessageHasBeenPostedArgs{c, post}
   242  	_returns := &Z_MessageHasBeenPostedReturns{}
   243  	if g.implemented[MessageHasBeenPostedId] {
   244  		if err := g.client.Call("Plugin.MessageHasBeenPosted", _args, _returns); err != nil {
   245  			g.log.Error("RPC call MessageHasBeenPosted to plugin failed.", mlog.Err(err))
   246  		}
   247  	}
   248  
   249  }
   250  
   251  func (s *hooksRPCServer) MessageHasBeenPosted(args *Z_MessageHasBeenPostedArgs, returns *Z_MessageHasBeenPostedReturns) error {
   252  	if hook, ok := s.impl.(interface {
   253  		MessageHasBeenPosted(c *Context, post *model.Post)
   254  	}); ok {
   255  		hook.MessageHasBeenPosted(args.A, args.B)
   256  
   257  	} else {
   258  		return encodableError(fmt.Errorf("Hook MessageHasBeenPosted called but not implemented."))
   259  	}
   260  	return nil
   261  }
   262  
   263  func init() {
   264  	hookNameToId["MessageHasBeenUpdated"] = MessageHasBeenUpdatedId
   265  }
   266  
   267  type Z_MessageHasBeenUpdatedArgs struct {
   268  	A *Context
   269  	B *model.Post
   270  	C *model.Post
   271  }
   272  
   273  type Z_MessageHasBeenUpdatedReturns struct {
   274  }
   275  
   276  func (g *hooksRPCClient) MessageHasBeenUpdated(c *Context, newPost, oldPost *model.Post) {
   277  	_args := &Z_MessageHasBeenUpdatedArgs{c, newPost, oldPost}
   278  	_returns := &Z_MessageHasBeenUpdatedReturns{}
   279  	if g.implemented[MessageHasBeenUpdatedId] {
   280  		if err := g.client.Call("Plugin.MessageHasBeenUpdated", _args, _returns); err != nil {
   281  			g.log.Error("RPC call MessageHasBeenUpdated to plugin failed.", mlog.Err(err))
   282  		}
   283  	}
   284  
   285  }
   286  
   287  func (s *hooksRPCServer) MessageHasBeenUpdated(args *Z_MessageHasBeenUpdatedArgs, returns *Z_MessageHasBeenUpdatedReturns) error {
   288  	if hook, ok := s.impl.(interface {
   289  		MessageHasBeenUpdated(c *Context, newPost, oldPost *model.Post)
   290  	}); ok {
   291  		hook.MessageHasBeenUpdated(args.A, args.B, args.C)
   292  
   293  	} else {
   294  		return encodableError(fmt.Errorf("Hook MessageHasBeenUpdated called but not implemented."))
   295  	}
   296  	return nil
   297  }
   298  
   299  func init() {
   300  	hookNameToId["ChannelHasBeenCreated"] = ChannelHasBeenCreatedId
   301  }
   302  
   303  type Z_ChannelHasBeenCreatedArgs struct {
   304  	A *Context
   305  	B *model.Channel
   306  }
   307  
   308  type Z_ChannelHasBeenCreatedReturns struct {
   309  }
   310  
   311  func (g *hooksRPCClient) ChannelHasBeenCreated(c *Context, channel *model.Channel) {
   312  	_args := &Z_ChannelHasBeenCreatedArgs{c, channel}
   313  	_returns := &Z_ChannelHasBeenCreatedReturns{}
   314  	if g.implemented[ChannelHasBeenCreatedId] {
   315  		if err := g.client.Call("Plugin.ChannelHasBeenCreated", _args, _returns); err != nil {
   316  			g.log.Error("RPC call ChannelHasBeenCreated to plugin failed.", mlog.Err(err))
   317  		}
   318  	}
   319  
   320  }
   321  
   322  func (s *hooksRPCServer) ChannelHasBeenCreated(args *Z_ChannelHasBeenCreatedArgs, returns *Z_ChannelHasBeenCreatedReturns) error {
   323  	if hook, ok := s.impl.(interface {
   324  		ChannelHasBeenCreated(c *Context, channel *model.Channel)
   325  	}); ok {
   326  		hook.ChannelHasBeenCreated(args.A, args.B)
   327  
   328  	} else {
   329  		return encodableError(fmt.Errorf("Hook ChannelHasBeenCreated called but not implemented."))
   330  	}
   331  	return nil
   332  }
   333  
   334  func init() {
   335  	hookNameToId["UserHasJoinedChannel"] = UserHasJoinedChannelId
   336  }
   337  
   338  type Z_UserHasJoinedChannelArgs struct {
   339  	A *Context
   340  	B *model.ChannelMember
   341  	C *model.User
   342  }
   343  
   344  type Z_UserHasJoinedChannelReturns struct {
   345  }
   346  
   347  func (g *hooksRPCClient) UserHasJoinedChannel(c *Context, channelMember *model.ChannelMember, actor *model.User) {
   348  	_args := &Z_UserHasJoinedChannelArgs{c, channelMember, actor}
   349  	_returns := &Z_UserHasJoinedChannelReturns{}
   350  	if g.implemented[UserHasJoinedChannelId] {
   351  		if err := g.client.Call("Plugin.UserHasJoinedChannel", _args, _returns); err != nil {
   352  			g.log.Error("RPC call UserHasJoinedChannel to plugin failed.", mlog.Err(err))
   353  		}
   354  	}
   355  
   356  }
   357  
   358  func (s *hooksRPCServer) UserHasJoinedChannel(args *Z_UserHasJoinedChannelArgs, returns *Z_UserHasJoinedChannelReturns) error {
   359  	if hook, ok := s.impl.(interface {
   360  		UserHasJoinedChannel(c *Context, channelMember *model.ChannelMember, actor *model.User)
   361  	}); ok {
   362  		hook.UserHasJoinedChannel(args.A, args.B, args.C)
   363  
   364  	} else {
   365  		return encodableError(fmt.Errorf("Hook UserHasJoinedChannel called but not implemented."))
   366  	}
   367  	return nil
   368  }
   369  
   370  func init() {
   371  	hookNameToId["UserHasLeftChannel"] = UserHasLeftChannelId
   372  }
   373  
   374  type Z_UserHasLeftChannelArgs struct {
   375  	A *Context
   376  	B *model.ChannelMember
   377  	C *model.User
   378  }
   379  
   380  type Z_UserHasLeftChannelReturns struct {
   381  }
   382  
   383  func (g *hooksRPCClient) UserHasLeftChannel(c *Context, channelMember *model.ChannelMember, actor *model.User) {
   384  	_args := &Z_UserHasLeftChannelArgs{c, channelMember, actor}
   385  	_returns := &Z_UserHasLeftChannelReturns{}
   386  	if g.implemented[UserHasLeftChannelId] {
   387  		if err := g.client.Call("Plugin.UserHasLeftChannel", _args, _returns); err != nil {
   388  			g.log.Error("RPC call UserHasLeftChannel to plugin failed.", mlog.Err(err))
   389  		}
   390  	}
   391  
   392  }
   393  
   394  func (s *hooksRPCServer) UserHasLeftChannel(args *Z_UserHasLeftChannelArgs, returns *Z_UserHasLeftChannelReturns) error {
   395  	if hook, ok := s.impl.(interface {
   396  		UserHasLeftChannel(c *Context, channelMember *model.ChannelMember, actor *model.User)
   397  	}); ok {
   398  		hook.UserHasLeftChannel(args.A, args.B, args.C)
   399  
   400  	} else {
   401  		return encodableError(fmt.Errorf("Hook UserHasLeftChannel called but not implemented."))
   402  	}
   403  	return nil
   404  }
   405  
   406  func init() {
   407  	hookNameToId["UserHasJoinedTeam"] = UserHasJoinedTeamId
   408  }
   409  
   410  type Z_UserHasJoinedTeamArgs struct {
   411  	A *Context
   412  	B *model.TeamMember
   413  	C *model.User
   414  }
   415  
   416  type Z_UserHasJoinedTeamReturns struct {
   417  }
   418  
   419  func (g *hooksRPCClient) UserHasJoinedTeam(c *Context, teamMember *model.TeamMember, actor *model.User) {
   420  	_args := &Z_UserHasJoinedTeamArgs{c, teamMember, actor}
   421  	_returns := &Z_UserHasJoinedTeamReturns{}
   422  	if g.implemented[UserHasJoinedTeamId] {
   423  		if err := g.client.Call("Plugin.UserHasJoinedTeam", _args, _returns); err != nil {
   424  			g.log.Error("RPC call UserHasJoinedTeam to plugin failed.", mlog.Err(err))
   425  		}
   426  	}
   427  
   428  }
   429  
   430  func (s *hooksRPCServer) UserHasJoinedTeam(args *Z_UserHasJoinedTeamArgs, returns *Z_UserHasJoinedTeamReturns) error {
   431  	if hook, ok := s.impl.(interface {
   432  		UserHasJoinedTeam(c *Context, teamMember *model.TeamMember, actor *model.User)
   433  	}); ok {
   434  		hook.UserHasJoinedTeam(args.A, args.B, args.C)
   435  
   436  	} else {
   437  		return encodableError(fmt.Errorf("Hook UserHasJoinedTeam called but not implemented."))
   438  	}
   439  	return nil
   440  }
   441  
   442  func init() {
   443  	hookNameToId["UserHasLeftTeam"] = UserHasLeftTeamId
   444  }
   445  
   446  type Z_UserHasLeftTeamArgs struct {
   447  	A *Context
   448  	B *model.TeamMember
   449  	C *model.User
   450  }
   451  
   452  type Z_UserHasLeftTeamReturns struct {
   453  }
   454  
   455  func (g *hooksRPCClient) UserHasLeftTeam(c *Context, teamMember *model.TeamMember, actor *model.User) {
   456  	_args := &Z_UserHasLeftTeamArgs{c, teamMember, actor}
   457  	_returns := &Z_UserHasLeftTeamReturns{}
   458  	if g.implemented[UserHasLeftTeamId] {
   459  		if err := g.client.Call("Plugin.UserHasLeftTeam", _args, _returns); err != nil {
   460  			g.log.Error("RPC call UserHasLeftTeam to plugin failed.", mlog.Err(err))
   461  		}
   462  	}
   463  
   464  }
   465  
   466  func (s *hooksRPCServer) UserHasLeftTeam(args *Z_UserHasLeftTeamArgs, returns *Z_UserHasLeftTeamReturns) error {
   467  	if hook, ok := s.impl.(interface {
   468  		UserHasLeftTeam(c *Context, teamMember *model.TeamMember, actor *model.User)
   469  	}); ok {
   470  		hook.UserHasLeftTeam(args.A, args.B, args.C)
   471  
   472  	} else {
   473  		return encodableError(fmt.Errorf("Hook UserHasLeftTeam called but not implemented."))
   474  	}
   475  	return nil
   476  }
   477  
   478  type Z_RegisterCommandArgs struct {
   479  	A *model.Command
   480  }
   481  
   482  type Z_RegisterCommandReturns struct {
   483  	A error
   484  }
   485  
   486  func (g *apiRPCClient) RegisterCommand(command *model.Command) error {
   487  	_args := &Z_RegisterCommandArgs{command}
   488  	_returns := &Z_RegisterCommandReturns{}
   489  	if err := g.client.Call("Plugin.RegisterCommand", _args, _returns); err != nil {
   490  		log.Printf("RPC call to RegisterCommand API failed: %s", err.Error())
   491  	}
   492  	return _returns.A
   493  }
   494  
   495  func (s *apiRPCServer) RegisterCommand(args *Z_RegisterCommandArgs, returns *Z_RegisterCommandReturns) error {
   496  	if hook, ok := s.impl.(interface {
   497  		RegisterCommand(command *model.Command) error
   498  	}); ok {
   499  		returns.A = hook.RegisterCommand(args.A)
   500  	} else {
   501  		return encodableError(fmt.Errorf("API RegisterCommand called but not implemented."))
   502  	}
   503  	return nil
   504  }
   505  
   506  type Z_UnregisterCommandArgs struct {
   507  	A string
   508  	B string
   509  }
   510  
   511  type Z_UnregisterCommandReturns struct {
   512  	A error
   513  }
   514  
   515  func (g *apiRPCClient) UnregisterCommand(teamId, trigger string) error {
   516  	_args := &Z_UnregisterCommandArgs{teamId, trigger}
   517  	_returns := &Z_UnregisterCommandReturns{}
   518  	if err := g.client.Call("Plugin.UnregisterCommand", _args, _returns); err != nil {
   519  		log.Printf("RPC call to UnregisterCommand API failed: %s", err.Error())
   520  	}
   521  	return _returns.A
   522  }
   523  
   524  func (s *apiRPCServer) UnregisterCommand(args *Z_UnregisterCommandArgs, returns *Z_UnregisterCommandReturns) error {
   525  	if hook, ok := s.impl.(interface {
   526  		UnregisterCommand(teamId, trigger string) error
   527  	}); ok {
   528  		returns.A = hook.UnregisterCommand(args.A, args.B)
   529  	} else {
   530  		return encodableError(fmt.Errorf("API UnregisterCommand called but not implemented."))
   531  	}
   532  	return nil
   533  }
   534  
   535  type Z_GetSessionArgs struct {
   536  	A string
   537  }
   538  
   539  type Z_GetSessionReturns struct {
   540  	A *model.Session
   541  	B *model.AppError
   542  }
   543  
   544  func (g *apiRPCClient) GetSession(sessionId string) (*model.Session, *model.AppError) {
   545  	_args := &Z_GetSessionArgs{sessionId}
   546  	_returns := &Z_GetSessionReturns{}
   547  	if err := g.client.Call("Plugin.GetSession", _args, _returns); err != nil {
   548  		log.Printf("RPC call to GetSession API failed: %s", err.Error())
   549  	}
   550  	return _returns.A, _returns.B
   551  }
   552  
   553  func (s *apiRPCServer) GetSession(args *Z_GetSessionArgs, returns *Z_GetSessionReturns) error {
   554  	if hook, ok := s.impl.(interface {
   555  		GetSession(sessionId string) (*model.Session, *model.AppError)
   556  	}); ok {
   557  		returns.A, returns.B = hook.GetSession(args.A)
   558  	} else {
   559  		return encodableError(fmt.Errorf("API GetSession called but not implemented."))
   560  	}
   561  	return nil
   562  }
   563  
   564  type Z_GetConfigArgs struct {
   565  }
   566  
   567  type Z_GetConfigReturns struct {
   568  	A *model.Config
   569  }
   570  
   571  func (g *apiRPCClient) GetConfig() *model.Config {
   572  	_args := &Z_GetConfigArgs{}
   573  	_returns := &Z_GetConfigReturns{}
   574  	if err := g.client.Call("Plugin.GetConfig", _args, _returns); err != nil {
   575  		log.Printf("RPC call to GetConfig API failed: %s", err.Error())
   576  	}
   577  	return _returns.A
   578  }
   579  
   580  func (s *apiRPCServer) GetConfig(args *Z_GetConfigArgs, returns *Z_GetConfigReturns) error {
   581  	if hook, ok := s.impl.(interface {
   582  		GetConfig() *model.Config
   583  	}); ok {
   584  		returns.A = hook.GetConfig()
   585  	} else {
   586  		return encodableError(fmt.Errorf("API GetConfig called but not implemented."))
   587  	}
   588  	return nil
   589  }
   590  
   591  type Z_SaveConfigArgs struct {
   592  	A *model.Config
   593  }
   594  
   595  type Z_SaveConfigReturns struct {
   596  	A *model.AppError
   597  }
   598  
   599  func (g *apiRPCClient) SaveConfig(config *model.Config) *model.AppError {
   600  	_args := &Z_SaveConfigArgs{config}
   601  	_returns := &Z_SaveConfigReturns{}
   602  	if err := g.client.Call("Plugin.SaveConfig", _args, _returns); err != nil {
   603  		log.Printf("RPC call to SaveConfig API failed: %s", err.Error())
   604  	}
   605  	return _returns.A
   606  }
   607  
   608  func (s *apiRPCServer) SaveConfig(args *Z_SaveConfigArgs, returns *Z_SaveConfigReturns) error {
   609  	if hook, ok := s.impl.(interface {
   610  		SaveConfig(config *model.Config) *model.AppError
   611  	}); ok {
   612  		returns.A = hook.SaveConfig(args.A)
   613  	} else {
   614  		return encodableError(fmt.Errorf("API SaveConfig called but not implemented."))
   615  	}
   616  	return nil
   617  }
   618  
   619  type Z_GetPluginConfigArgs struct {
   620  }
   621  
   622  type Z_GetPluginConfigReturns struct {
   623  	A map[string]interface{}
   624  }
   625  
   626  func (g *apiRPCClient) GetPluginConfig() map[string]interface{} {
   627  	_args := &Z_GetPluginConfigArgs{}
   628  	_returns := &Z_GetPluginConfigReturns{}
   629  	if err := g.client.Call("Plugin.GetPluginConfig", _args, _returns); err != nil {
   630  		log.Printf("RPC call to GetPluginConfig API failed: %s", err.Error())
   631  	}
   632  	return _returns.A
   633  }
   634  
   635  func (s *apiRPCServer) GetPluginConfig(args *Z_GetPluginConfigArgs, returns *Z_GetPluginConfigReturns) error {
   636  	if hook, ok := s.impl.(interface {
   637  		GetPluginConfig() map[string]interface{}
   638  	}); ok {
   639  		returns.A = hook.GetPluginConfig()
   640  	} else {
   641  		return encodableError(fmt.Errorf("API GetPluginConfig called but not implemented."))
   642  	}
   643  	return nil
   644  }
   645  
   646  type Z_SavePluginConfigArgs struct {
   647  	A map[string]interface{}
   648  }
   649  
   650  type Z_SavePluginConfigReturns struct {
   651  	A *model.AppError
   652  }
   653  
   654  func (g *apiRPCClient) SavePluginConfig(config map[string]interface{}) *model.AppError {
   655  	_args := &Z_SavePluginConfigArgs{config}
   656  	_returns := &Z_SavePluginConfigReturns{}
   657  	if err := g.client.Call("Plugin.SavePluginConfig", _args, _returns); err != nil {
   658  		log.Printf("RPC call to SavePluginConfig API failed: %s", err.Error())
   659  	}
   660  	return _returns.A
   661  }
   662  
   663  func (s *apiRPCServer) SavePluginConfig(args *Z_SavePluginConfigArgs, returns *Z_SavePluginConfigReturns) error {
   664  	if hook, ok := s.impl.(interface {
   665  		SavePluginConfig(config map[string]interface{}) *model.AppError
   666  	}); ok {
   667  		returns.A = hook.SavePluginConfig(args.A)
   668  	} else {
   669  		return encodableError(fmt.Errorf("API SavePluginConfig called but not implemented."))
   670  	}
   671  	return nil
   672  }
   673  
   674  type Z_GetBundlePathArgs struct {
   675  }
   676  
   677  type Z_GetBundlePathReturns struct {
   678  	A string
   679  	B error
   680  }
   681  
   682  func (g *apiRPCClient) GetBundlePath() (string, error) {
   683  	_args := &Z_GetBundlePathArgs{}
   684  	_returns := &Z_GetBundlePathReturns{}
   685  	if err := g.client.Call("Plugin.GetBundlePath", _args, _returns); err != nil {
   686  		log.Printf("RPC call to GetBundlePath API failed: %s", err.Error())
   687  	}
   688  	return _returns.A, _returns.B
   689  }
   690  
   691  func (s *apiRPCServer) GetBundlePath(args *Z_GetBundlePathArgs, returns *Z_GetBundlePathReturns) error {
   692  	if hook, ok := s.impl.(interface {
   693  		GetBundlePath() (string, error)
   694  	}); ok {
   695  		returns.A, returns.B = hook.GetBundlePath()
   696  	} else {
   697  		return encodableError(fmt.Errorf("API GetBundlePath called but not implemented."))
   698  	}
   699  	return nil
   700  }
   701  
   702  type Z_GetLicenseArgs struct {
   703  }
   704  
   705  type Z_GetLicenseReturns struct {
   706  	A *model.License
   707  }
   708  
   709  func (g *apiRPCClient) GetLicense() *model.License {
   710  	_args := &Z_GetLicenseArgs{}
   711  	_returns := &Z_GetLicenseReturns{}
   712  	if err := g.client.Call("Plugin.GetLicense", _args, _returns); err != nil {
   713  		log.Printf("RPC call to GetLicense API failed: %s", err.Error())
   714  	}
   715  	return _returns.A
   716  }
   717  
   718  func (s *apiRPCServer) GetLicense(args *Z_GetLicenseArgs, returns *Z_GetLicenseReturns) error {
   719  	if hook, ok := s.impl.(interface {
   720  		GetLicense() *model.License
   721  	}); ok {
   722  		returns.A = hook.GetLicense()
   723  	} else {
   724  		return encodableError(fmt.Errorf("API GetLicense called but not implemented."))
   725  	}
   726  	return nil
   727  }
   728  
   729  type Z_GetServerVersionArgs struct {
   730  }
   731  
   732  type Z_GetServerVersionReturns struct {
   733  	A string
   734  }
   735  
   736  func (g *apiRPCClient) GetServerVersion() string {
   737  	_args := &Z_GetServerVersionArgs{}
   738  	_returns := &Z_GetServerVersionReturns{}
   739  	if err := g.client.Call("Plugin.GetServerVersion", _args, _returns); err != nil {
   740  		log.Printf("RPC call to GetServerVersion API failed: %s", err.Error())
   741  	}
   742  	return _returns.A
   743  }
   744  
   745  func (s *apiRPCServer) GetServerVersion(args *Z_GetServerVersionArgs, returns *Z_GetServerVersionReturns) error {
   746  	if hook, ok := s.impl.(interface {
   747  		GetServerVersion() string
   748  	}); ok {
   749  		returns.A = hook.GetServerVersion()
   750  	} else {
   751  		return encodableError(fmt.Errorf("API GetServerVersion called but not implemented."))
   752  	}
   753  	return nil
   754  }
   755  
   756  type Z_GetSystemInstallDateArgs struct {
   757  }
   758  
   759  type Z_GetSystemInstallDateReturns struct {
   760  	A int64
   761  	B *model.AppError
   762  }
   763  
   764  func (g *apiRPCClient) GetSystemInstallDate() (int64, *model.AppError) {
   765  	_args := &Z_GetSystemInstallDateArgs{}
   766  	_returns := &Z_GetSystemInstallDateReturns{}
   767  	if err := g.client.Call("Plugin.GetSystemInstallDate", _args, _returns); err != nil {
   768  		log.Printf("RPC call to GetSystemInstallDate API failed: %s", err.Error())
   769  	}
   770  	return _returns.A, _returns.B
   771  }
   772  
   773  func (s *apiRPCServer) GetSystemInstallDate(args *Z_GetSystemInstallDateArgs, returns *Z_GetSystemInstallDateReturns) error {
   774  	if hook, ok := s.impl.(interface {
   775  		GetSystemInstallDate() (int64, *model.AppError)
   776  	}); ok {
   777  		returns.A, returns.B = hook.GetSystemInstallDate()
   778  	} else {
   779  		return encodableError(fmt.Errorf("API GetSystemInstallDate called but not implemented."))
   780  	}
   781  	return nil
   782  }
   783  
   784  type Z_GetDiagnosticIdArgs struct {
   785  }
   786  
   787  type Z_GetDiagnosticIdReturns struct {
   788  	A string
   789  }
   790  
   791  func (g *apiRPCClient) GetDiagnosticId() string {
   792  	_args := &Z_GetDiagnosticIdArgs{}
   793  	_returns := &Z_GetDiagnosticIdReturns{}
   794  	if err := g.client.Call("Plugin.GetDiagnosticId", _args, _returns); err != nil {
   795  		log.Printf("RPC call to GetDiagnosticId API failed: %s", err.Error())
   796  	}
   797  	return _returns.A
   798  }
   799  
   800  func (s *apiRPCServer) GetDiagnosticId(args *Z_GetDiagnosticIdArgs, returns *Z_GetDiagnosticIdReturns) error {
   801  	if hook, ok := s.impl.(interface {
   802  		GetDiagnosticId() string
   803  	}); ok {
   804  		returns.A = hook.GetDiagnosticId()
   805  	} else {
   806  		return encodableError(fmt.Errorf("API GetDiagnosticId called but not implemented."))
   807  	}
   808  	return nil
   809  }
   810  
   811  type Z_CreateUserArgs struct {
   812  	A *model.User
   813  }
   814  
   815  type Z_CreateUserReturns struct {
   816  	A *model.User
   817  	B *model.AppError
   818  }
   819  
   820  func (g *apiRPCClient) CreateUser(user *model.User) (*model.User, *model.AppError) {
   821  	_args := &Z_CreateUserArgs{user}
   822  	_returns := &Z_CreateUserReturns{}
   823  	if err := g.client.Call("Plugin.CreateUser", _args, _returns); err != nil {
   824  		log.Printf("RPC call to CreateUser API failed: %s", err.Error())
   825  	}
   826  	return _returns.A, _returns.B
   827  }
   828  
   829  func (s *apiRPCServer) CreateUser(args *Z_CreateUserArgs, returns *Z_CreateUserReturns) error {
   830  	if hook, ok := s.impl.(interface {
   831  		CreateUser(user *model.User) (*model.User, *model.AppError)
   832  	}); ok {
   833  		returns.A, returns.B = hook.CreateUser(args.A)
   834  	} else {
   835  		return encodableError(fmt.Errorf("API CreateUser called but not implemented."))
   836  	}
   837  	return nil
   838  }
   839  
   840  type Z_DeleteUserArgs struct {
   841  	A string
   842  }
   843  
   844  type Z_DeleteUserReturns struct {
   845  	A *model.AppError
   846  }
   847  
   848  func (g *apiRPCClient) DeleteUser(userId string) *model.AppError {
   849  	_args := &Z_DeleteUserArgs{userId}
   850  	_returns := &Z_DeleteUserReturns{}
   851  	if err := g.client.Call("Plugin.DeleteUser", _args, _returns); err != nil {
   852  		log.Printf("RPC call to DeleteUser API failed: %s", err.Error())
   853  	}
   854  	return _returns.A
   855  }
   856  
   857  func (s *apiRPCServer) DeleteUser(args *Z_DeleteUserArgs, returns *Z_DeleteUserReturns) error {
   858  	if hook, ok := s.impl.(interface {
   859  		DeleteUser(userId string) *model.AppError
   860  	}); ok {
   861  		returns.A = hook.DeleteUser(args.A)
   862  	} else {
   863  		return encodableError(fmt.Errorf("API DeleteUser called but not implemented."))
   864  	}
   865  	return nil
   866  }
   867  
   868  type Z_GetUsersArgs struct {
   869  	A *model.UserGetOptions
   870  }
   871  
   872  type Z_GetUsersReturns struct {
   873  	A []*model.User
   874  	B *model.AppError
   875  }
   876  
   877  func (g *apiRPCClient) GetUsers(options *model.UserGetOptions) ([]*model.User, *model.AppError) {
   878  	_args := &Z_GetUsersArgs{options}
   879  	_returns := &Z_GetUsersReturns{}
   880  	if err := g.client.Call("Plugin.GetUsers", _args, _returns); err != nil {
   881  		log.Printf("RPC call to GetUsers API failed: %s", err.Error())
   882  	}
   883  	return _returns.A, _returns.B
   884  }
   885  
   886  func (s *apiRPCServer) GetUsers(args *Z_GetUsersArgs, returns *Z_GetUsersReturns) error {
   887  	if hook, ok := s.impl.(interface {
   888  		GetUsers(options *model.UserGetOptions) ([]*model.User, *model.AppError)
   889  	}); ok {
   890  		returns.A, returns.B = hook.GetUsers(args.A)
   891  	} else {
   892  		return encodableError(fmt.Errorf("API GetUsers called but not implemented."))
   893  	}
   894  	return nil
   895  }
   896  
   897  type Z_GetUserArgs struct {
   898  	A string
   899  }
   900  
   901  type Z_GetUserReturns struct {
   902  	A *model.User
   903  	B *model.AppError
   904  }
   905  
   906  func (g *apiRPCClient) GetUser(userId string) (*model.User, *model.AppError) {
   907  	_args := &Z_GetUserArgs{userId}
   908  	_returns := &Z_GetUserReturns{}
   909  	if err := g.client.Call("Plugin.GetUser", _args, _returns); err != nil {
   910  		log.Printf("RPC call to GetUser API failed: %s", err.Error())
   911  	}
   912  	return _returns.A, _returns.B
   913  }
   914  
   915  func (s *apiRPCServer) GetUser(args *Z_GetUserArgs, returns *Z_GetUserReturns) error {
   916  	if hook, ok := s.impl.(interface {
   917  		GetUser(userId string) (*model.User, *model.AppError)
   918  	}); ok {
   919  		returns.A, returns.B = hook.GetUser(args.A)
   920  	} else {
   921  		return encodableError(fmt.Errorf("API GetUser called but not implemented."))
   922  	}
   923  	return nil
   924  }
   925  
   926  type Z_GetUserByEmailArgs struct {
   927  	A string
   928  }
   929  
   930  type Z_GetUserByEmailReturns struct {
   931  	A *model.User
   932  	B *model.AppError
   933  }
   934  
   935  func (g *apiRPCClient) GetUserByEmail(email string) (*model.User, *model.AppError) {
   936  	_args := &Z_GetUserByEmailArgs{email}
   937  	_returns := &Z_GetUserByEmailReturns{}
   938  	if err := g.client.Call("Plugin.GetUserByEmail", _args, _returns); err != nil {
   939  		log.Printf("RPC call to GetUserByEmail API failed: %s", err.Error())
   940  	}
   941  	return _returns.A, _returns.B
   942  }
   943  
   944  func (s *apiRPCServer) GetUserByEmail(args *Z_GetUserByEmailArgs, returns *Z_GetUserByEmailReturns) error {
   945  	if hook, ok := s.impl.(interface {
   946  		GetUserByEmail(email string) (*model.User, *model.AppError)
   947  	}); ok {
   948  		returns.A, returns.B = hook.GetUserByEmail(args.A)
   949  	} else {
   950  		return encodableError(fmt.Errorf("API GetUserByEmail called but not implemented."))
   951  	}
   952  	return nil
   953  }
   954  
   955  type Z_GetUserByUsernameArgs struct {
   956  	A string
   957  }
   958  
   959  type Z_GetUserByUsernameReturns struct {
   960  	A *model.User
   961  	B *model.AppError
   962  }
   963  
   964  func (g *apiRPCClient) GetUserByUsername(name string) (*model.User, *model.AppError) {
   965  	_args := &Z_GetUserByUsernameArgs{name}
   966  	_returns := &Z_GetUserByUsernameReturns{}
   967  	if err := g.client.Call("Plugin.GetUserByUsername", _args, _returns); err != nil {
   968  		log.Printf("RPC call to GetUserByUsername API failed: %s", err.Error())
   969  	}
   970  	return _returns.A, _returns.B
   971  }
   972  
   973  func (s *apiRPCServer) GetUserByUsername(args *Z_GetUserByUsernameArgs, returns *Z_GetUserByUsernameReturns) error {
   974  	if hook, ok := s.impl.(interface {
   975  		GetUserByUsername(name string) (*model.User, *model.AppError)
   976  	}); ok {
   977  		returns.A, returns.B = hook.GetUserByUsername(args.A)
   978  	} else {
   979  		return encodableError(fmt.Errorf("API GetUserByUsername called but not implemented."))
   980  	}
   981  	return nil
   982  }
   983  
   984  type Z_GetUsersByUsernamesArgs struct {
   985  	A []string
   986  }
   987  
   988  type Z_GetUsersByUsernamesReturns struct {
   989  	A []*model.User
   990  	B *model.AppError
   991  }
   992  
   993  func (g *apiRPCClient) GetUsersByUsernames(usernames []string) ([]*model.User, *model.AppError) {
   994  	_args := &Z_GetUsersByUsernamesArgs{usernames}
   995  	_returns := &Z_GetUsersByUsernamesReturns{}
   996  	if err := g.client.Call("Plugin.GetUsersByUsernames", _args, _returns); err != nil {
   997  		log.Printf("RPC call to GetUsersByUsernames API failed: %s", err.Error())
   998  	}
   999  	return _returns.A, _returns.B
  1000  }
  1001  
  1002  func (s *apiRPCServer) GetUsersByUsernames(args *Z_GetUsersByUsernamesArgs, returns *Z_GetUsersByUsernamesReturns) error {
  1003  	if hook, ok := s.impl.(interface {
  1004  		GetUsersByUsernames(usernames []string) ([]*model.User, *model.AppError)
  1005  	}); ok {
  1006  		returns.A, returns.B = hook.GetUsersByUsernames(args.A)
  1007  	} else {
  1008  		return encodableError(fmt.Errorf("API GetUsersByUsernames called but not implemented."))
  1009  	}
  1010  	return nil
  1011  }
  1012  
  1013  type Z_GetUsersInTeamArgs struct {
  1014  	A string
  1015  	B int
  1016  	C int
  1017  }
  1018  
  1019  type Z_GetUsersInTeamReturns struct {
  1020  	A []*model.User
  1021  	B *model.AppError
  1022  }
  1023  
  1024  func (g *apiRPCClient) GetUsersInTeam(teamId string, page int, perPage int) ([]*model.User, *model.AppError) {
  1025  	_args := &Z_GetUsersInTeamArgs{teamId, page, perPage}
  1026  	_returns := &Z_GetUsersInTeamReturns{}
  1027  	if err := g.client.Call("Plugin.GetUsersInTeam", _args, _returns); err != nil {
  1028  		log.Printf("RPC call to GetUsersInTeam API failed: %s", err.Error())
  1029  	}
  1030  	return _returns.A, _returns.B
  1031  }
  1032  
  1033  func (s *apiRPCServer) GetUsersInTeam(args *Z_GetUsersInTeamArgs, returns *Z_GetUsersInTeamReturns) error {
  1034  	if hook, ok := s.impl.(interface {
  1035  		GetUsersInTeam(teamId string, page int, perPage int) ([]*model.User, *model.AppError)
  1036  	}); ok {
  1037  		returns.A, returns.B = hook.GetUsersInTeam(args.A, args.B, args.C)
  1038  	} else {
  1039  		return encodableError(fmt.Errorf("API GetUsersInTeam called but not implemented."))
  1040  	}
  1041  	return nil
  1042  }
  1043  
  1044  type Z_GetTeamIconArgs struct {
  1045  	A string
  1046  }
  1047  
  1048  type Z_GetTeamIconReturns struct {
  1049  	A []byte
  1050  	B *model.AppError
  1051  }
  1052  
  1053  func (g *apiRPCClient) GetTeamIcon(teamId string) ([]byte, *model.AppError) {
  1054  	_args := &Z_GetTeamIconArgs{teamId}
  1055  	_returns := &Z_GetTeamIconReturns{}
  1056  	if err := g.client.Call("Plugin.GetTeamIcon", _args, _returns); err != nil {
  1057  		log.Printf("RPC call to GetTeamIcon API failed: %s", err.Error())
  1058  	}
  1059  	return _returns.A, _returns.B
  1060  }
  1061  
  1062  func (s *apiRPCServer) GetTeamIcon(args *Z_GetTeamIconArgs, returns *Z_GetTeamIconReturns) error {
  1063  	if hook, ok := s.impl.(interface {
  1064  		GetTeamIcon(teamId string) ([]byte, *model.AppError)
  1065  	}); ok {
  1066  		returns.A, returns.B = hook.GetTeamIcon(args.A)
  1067  	} else {
  1068  		return encodableError(fmt.Errorf("API GetTeamIcon called but not implemented."))
  1069  	}
  1070  	return nil
  1071  }
  1072  
  1073  type Z_SetTeamIconArgs struct {
  1074  	A string
  1075  	B []byte
  1076  }
  1077  
  1078  type Z_SetTeamIconReturns struct {
  1079  	A *model.AppError
  1080  }
  1081  
  1082  func (g *apiRPCClient) SetTeamIcon(teamId string, data []byte) *model.AppError {
  1083  	_args := &Z_SetTeamIconArgs{teamId, data}
  1084  	_returns := &Z_SetTeamIconReturns{}
  1085  	if err := g.client.Call("Plugin.SetTeamIcon", _args, _returns); err != nil {
  1086  		log.Printf("RPC call to SetTeamIcon API failed: %s", err.Error())
  1087  	}
  1088  	return _returns.A
  1089  }
  1090  
  1091  func (s *apiRPCServer) SetTeamIcon(args *Z_SetTeamIconArgs, returns *Z_SetTeamIconReturns) error {
  1092  	if hook, ok := s.impl.(interface {
  1093  		SetTeamIcon(teamId string, data []byte) *model.AppError
  1094  	}); ok {
  1095  		returns.A = hook.SetTeamIcon(args.A, args.B)
  1096  	} else {
  1097  		return encodableError(fmt.Errorf("API SetTeamIcon called but not implemented."))
  1098  	}
  1099  	return nil
  1100  }
  1101  
  1102  type Z_RemoveTeamIconArgs struct {
  1103  	A string
  1104  }
  1105  
  1106  type Z_RemoveTeamIconReturns struct {
  1107  	A *model.AppError
  1108  }
  1109  
  1110  func (g *apiRPCClient) RemoveTeamIcon(teamId string) *model.AppError {
  1111  	_args := &Z_RemoveTeamIconArgs{teamId}
  1112  	_returns := &Z_RemoveTeamIconReturns{}
  1113  	if err := g.client.Call("Plugin.RemoveTeamIcon", _args, _returns); err != nil {
  1114  		log.Printf("RPC call to RemoveTeamIcon API failed: %s", err.Error())
  1115  	}
  1116  	return _returns.A
  1117  }
  1118  
  1119  func (s *apiRPCServer) RemoveTeamIcon(args *Z_RemoveTeamIconArgs, returns *Z_RemoveTeamIconReturns) error {
  1120  	if hook, ok := s.impl.(interface {
  1121  		RemoveTeamIcon(teamId string) *model.AppError
  1122  	}); ok {
  1123  		returns.A = hook.RemoveTeamIcon(args.A)
  1124  	} else {
  1125  		return encodableError(fmt.Errorf("API RemoveTeamIcon called but not implemented."))
  1126  	}
  1127  	return nil
  1128  }
  1129  
  1130  type Z_UpdateUserArgs struct {
  1131  	A *model.User
  1132  }
  1133  
  1134  type Z_UpdateUserReturns struct {
  1135  	A *model.User
  1136  	B *model.AppError
  1137  }
  1138  
  1139  func (g *apiRPCClient) UpdateUser(user *model.User) (*model.User, *model.AppError) {
  1140  	_args := &Z_UpdateUserArgs{user}
  1141  	_returns := &Z_UpdateUserReturns{}
  1142  	if err := g.client.Call("Plugin.UpdateUser", _args, _returns); err != nil {
  1143  		log.Printf("RPC call to UpdateUser API failed: %s", err.Error())
  1144  	}
  1145  	return _returns.A, _returns.B
  1146  }
  1147  
  1148  func (s *apiRPCServer) UpdateUser(args *Z_UpdateUserArgs, returns *Z_UpdateUserReturns) error {
  1149  	if hook, ok := s.impl.(interface {
  1150  		UpdateUser(user *model.User) (*model.User, *model.AppError)
  1151  	}); ok {
  1152  		returns.A, returns.B = hook.UpdateUser(args.A)
  1153  	} else {
  1154  		return encodableError(fmt.Errorf("API UpdateUser called but not implemented."))
  1155  	}
  1156  	return nil
  1157  }
  1158  
  1159  type Z_GetUserStatusArgs struct {
  1160  	A string
  1161  }
  1162  
  1163  type Z_GetUserStatusReturns struct {
  1164  	A *model.Status
  1165  	B *model.AppError
  1166  }
  1167  
  1168  func (g *apiRPCClient) GetUserStatus(userId string) (*model.Status, *model.AppError) {
  1169  	_args := &Z_GetUserStatusArgs{userId}
  1170  	_returns := &Z_GetUserStatusReturns{}
  1171  	if err := g.client.Call("Plugin.GetUserStatus", _args, _returns); err != nil {
  1172  		log.Printf("RPC call to GetUserStatus API failed: %s", err.Error())
  1173  	}
  1174  	return _returns.A, _returns.B
  1175  }
  1176  
  1177  func (s *apiRPCServer) GetUserStatus(args *Z_GetUserStatusArgs, returns *Z_GetUserStatusReturns) error {
  1178  	if hook, ok := s.impl.(interface {
  1179  		GetUserStatus(userId string) (*model.Status, *model.AppError)
  1180  	}); ok {
  1181  		returns.A, returns.B = hook.GetUserStatus(args.A)
  1182  	} else {
  1183  		return encodableError(fmt.Errorf("API GetUserStatus called but not implemented."))
  1184  	}
  1185  	return nil
  1186  }
  1187  
  1188  type Z_GetUserStatusesByIdsArgs struct {
  1189  	A []string
  1190  }
  1191  
  1192  type Z_GetUserStatusesByIdsReturns struct {
  1193  	A []*model.Status
  1194  	B *model.AppError
  1195  }
  1196  
  1197  func (g *apiRPCClient) GetUserStatusesByIds(userIds []string) ([]*model.Status, *model.AppError) {
  1198  	_args := &Z_GetUserStatusesByIdsArgs{userIds}
  1199  	_returns := &Z_GetUserStatusesByIdsReturns{}
  1200  	if err := g.client.Call("Plugin.GetUserStatusesByIds", _args, _returns); err != nil {
  1201  		log.Printf("RPC call to GetUserStatusesByIds API failed: %s", err.Error())
  1202  	}
  1203  	return _returns.A, _returns.B
  1204  }
  1205  
  1206  func (s *apiRPCServer) GetUserStatusesByIds(args *Z_GetUserStatusesByIdsArgs, returns *Z_GetUserStatusesByIdsReturns) error {
  1207  	if hook, ok := s.impl.(interface {
  1208  		GetUserStatusesByIds(userIds []string) ([]*model.Status, *model.AppError)
  1209  	}); ok {
  1210  		returns.A, returns.B = hook.GetUserStatusesByIds(args.A)
  1211  	} else {
  1212  		return encodableError(fmt.Errorf("API GetUserStatusesByIds called but not implemented."))
  1213  	}
  1214  	return nil
  1215  }
  1216  
  1217  type Z_UpdateUserStatusArgs struct {
  1218  	A string
  1219  	B string
  1220  }
  1221  
  1222  type Z_UpdateUserStatusReturns struct {
  1223  	A *model.Status
  1224  	B *model.AppError
  1225  }
  1226  
  1227  func (g *apiRPCClient) UpdateUserStatus(userId, status string) (*model.Status, *model.AppError) {
  1228  	_args := &Z_UpdateUserStatusArgs{userId, status}
  1229  	_returns := &Z_UpdateUserStatusReturns{}
  1230  	if err := g.client.Call("Plugin.UpdateUserStatus", _args, _returns); err != nil {
  1231  		log.Printf("RPC call to UpdateUserStatus API failed: %s", err.Error())
  1232  	}
  1233  	return _returns.A, _returns.B
  1234  }
  1235  
  1236  func (s *apiRPCServer) UpdateUserStatus(args *Z_UpdateUserStatusArgs, returns *Z_UpdateUserStatusReturns) error {
  1237  	if hook, ok := s.impl.(interface {
  1238  		UpdateUserStatus(userId, status string) (*model.Status, *model.AppError)
  1239  	}); ok {
  1240  		returns.A, returns.B = hook.UpdateUserStatus(args.A, args.B)
  1241  	} else {
  1242  		return encodableError(fmt.Errorf("API UpdateUserStatus called but not implemented."))
  1243  	}
  1244  	return nil
  1245  }
  1246  
  1247  type Z_UpdateUserActiveArgs struct {
  1248  	A string
  1249  	B bool
  1250  }
  1251  
  1252  type Z_UpdateUserActiveReturns struct {
  1253  	A *model.AppError
  1254  }
  1255  
  1256  func (g *apiRPCClient) UpdateUserActive(userId string, active bool) *model.AppError {
  1257  	_args := &Z_UpdateUserActiveArgs{userId, active}
  1258  	_returns := &Z_UpdateUserActiveReturns{}
  1259  	if err := g.client.Call("Plugin.UpdateUserActive", _args, _returns); err != nil {
  1260  		log.Printf("RPC call to UpdateUserActive API failed: %s", err.Error())
  1261  	}
  1262  	return _returns.A
  1263  }
  1264  
  1265  func (s *apiRPCServer) UpdateUserActive(args *Z_UpdateUserActiveArgs, returns *Z_UpdateUserActiveReturns) error {
  1266  	if hook, ok := s.impl.(interface {
  1267  		UpdateUserActive(userId string, active bool) *model.AppError
  1268  	}); ok {
  1269  		returns.A = hook.UpdateUserActive(args.A, args.B)
  1270  	} else {
  1271  		return encodableError(fmt.Errorf("API UpdateUserActive called but not implemented."))
  1272  	}
  1273  	return nil
  1274  }
  1275  
  1276  type Z_GetUsersInChannelArgs struct {
  1277  	A string
  1278  	B string
  1279  	C int
  1280  	D int
  1281  }
  1282  
  1283  type Z_GetUsersInChannelReturns struct {
  1284  	A []*model.User
  1285  	B *model.AppError
  1286  }
  1287  
  1288  func (g *apiRPCClient) GetUsersInChannel(channelId, sortBy string, page, perPage int) ([]*model.User, *model.AppError) {
  1289  	_args := &Z_GetUsersInChannelArgs{channelId, sortBy, page, perPage}
  1290  	_returns := &Z_GetUsersInChannelReturns{}
  1291  	if err := g.client.Call("Plugin.GetUsersInChannel", _args, _returns); err != nil {
  1292  		log.Printf("RPC call to GetUsersInChannel API failed: %s", err.Error())
  1293  	}
  1294  	return _returns.A, _returns.B
  1295  }
  1296  
  1297  func (s *apiRPCServer) GetUsersInChannel(args *Z_GetUsersInChannelArgs, returns *Z_GetUsersInChannelReturns) error {
  1298  	if hook, ok := s.impl.(interface {
  1299  		GetUsersInChannel(channelId, sortBy string, page, perPage int) ([]*model.User, *model.AppError)
  1300  	}); ok {
  1301  		returns.A, returns.B = hook.GetUsersInChannel(args.A, args.B, args.C, args.D)
  1302  	} else {
  1303  		return encodableError(fmt.Errorf("API GetUsersInChannel called but not implemented."))
  1304  	}
  1305  	return nil
  1306  }
  1307  
  1308  type Z_GetLDAPUserAttributesArgs struct {
  1309  	A string
  1310  	B []string
  1311  }
  1312  
  1313  type Z_GetLDAPUserAttributesReturns struct {
  1314  	A map[string]string
  1315  	B *model.AppError
  1316  }
  1317  
  1318  func (g *apiRPCClient) GetLDAPUserAttributes(userId string, attributes []string) (map[string]string, *model.AppError) {
  1319  	_args := &Z_GetLDAPUserAttributesArgs{userId, attributes}
  1320  	_returns := &Z_GetLDAPUserAttributesReturns{}
  1321  	if err := g.client.Call("Plugin.GetLDAPUserAttributes", _args, _returns); err != nil {
  1322  		log.Printf("RPC call to GetLDAPUserAttributes API failed: %s", err.Error())
  1323  	}
  1324  	return _returns.A, _returns.B
  1325  }
  1326  
  1327  func (s *apiRPCServer) GetLDAPUserAttributes(args *Z_GetLDAPUserAttributesArgs, returns *Z_GetLDAPUserAttributesReturns) error {
  1328  	if hook, ok := s.impl.(interface {
  1329  		GetLDAPUserAttributes(userId string, attributes []string) (map[string]string, *model.AppError)
  1330  	}); ok {
  1331  		returns.A, returns.B = hook.GetLDAPUserAttributes(args.A, args.B)
  1332  	} else {
  1333  		return encodableError(fmt.Errorf("API GetLDAPUserAttributes called but not implemented."))
  1334  	}
  1335  	return nil
  1336  }
  1337  
  1338  type Z_CreateTeamArgs struct {
  1339  	A *model.Team
  1340  }
  1341  
  1342  type Z_CreateTeamReturns struct {
  1343  	A *model.Team
  1344  	B *model.AppError
  1345  }
  1346  
  1347  func (g *apiRPCClient) CreateTeam(team *model.Team) (*model.Team, *model.AppError) {
  1348  	_args := &Z_CreateTeamArgs{team}
  1349  	_returns := &Z_CreateTeamReturns{}
  1350  	if err := g.client.Call("Plugin.CreateTeam", _args, _returns); err != nil {
  1351  		log.Printf("RPC call to CreateTeam API failed: %s", err.Error())
  1352  	}
  1353  	return _returns.A, _returns.B
  1354  }
  1355  
  1356  func (s *apiRPCServer) CreateTeam(args *Z_CreateTeamArgs, returns *Z_CreateTeamReturns) error {
  1357  	if hook, ok := s.impl.(interface {
  1358  		CreateTeam(team *model.Team) (*model.Team, *model.AppError)
  1359  	}); ok {
  1360  		returns.A, returns.B = hook.CreateTeam(args.A)
  1361  	} else {
  1362  		return encodableError(fmt.Errorf("API CreateTeam called but not implemented."))
  1363  	}
  1364  	return nil
  1365  }
  1366  
  1367  type Z_DeleteTeamArgs struct {
  1368  	A string
  1369  }
  1370  
  1371  type Z_DeleteTeamReturns struct {
  1372  	A *model.AppError
  1373  }
  1374  
  1375  func (g *apiRPCClient) DeleteTeam(teamId string) *model.AppError {
  1376  	_args := &Z_DeleteTeamArgs{teamId}
  1377  	_returns := &Z_DeleteTeamReturns{}
  1378  	if err := g.client.Call("Plugin.DeleteTeam", _args, _returns); err != nil {
  1379  		log.Printf("RPC call to DeleteTeam API failed: %s", err.Error())
  1380  	}
  1381  	return _returns.A
  1382  }
  1383  
  1384  func (s *apiRPCServer) DeleteTeam(args *Z_DeleteTeamArgs, returns *Z_DeleteTeamReturns) error {
  1385  	if hook, ok := s.impl.(interface {
  1386  		DeleteTeam(teamId string) *model.AppError
  1387  	}); ok {
  1388  		returns.A = hook.DeleteTeam(args.A)
  1389  	} else {
  1390  		return encodableError(fmt.Errorf("API DeleteTeam called but not implemented."))
  1391  	}
  1392  	return nil
  1393  }
  1394  
  1395  type Z_GetTeamsArgs struct {
  1396  }
  1397  
  1398  type Z_GetTeamsReturns struct {
  1399  	A []*model.Team
  1400  	B *model.AppError
  1401  }
  1402  
  1403  func (g *apiRPCClient) GetTeams() ([]*model.Team, *model.AppError) {
  1404  	_args := &Z_GetTeamsArgs{}
  1405  	_returns := &Z_GetTeamsReturns{}
  1406  	if err := g.client.Call("Plugin.GetTeams", _args, _returns); err != nil {
  1407  		log.Printf("RPC call to GetTeams API failed: %s", err.Error())
  1408  	}
  1409  	return _returns.A, _returns.B
  1410  }
  1411  
  1412  func (s *apiRPCServer) GetTeams(args *Z_GetTeamsArgs, returns *Z_GetTeamsReturns) error {
  1413  	if hook, ok := s.impl.(interface {
  1414  		GetTeams() ([]*model.Team, *model.AppError)
  1415  	}); ok {
  1416  		returns.A, returns.B = hook.GetTeams()
  1417  	} else {
  1418  		return encodableError(fmt.Errorf("API GetTeams called but not implemented."))
  1419  	}
  1420  	return nil
  1421  }
  1422  
  1423  type Z_GetTeamArgs struct {
  1424  	A string
  1425  }
  1426  
  1427  type Z_GetTeamReturns struct {
  1428  	A *model.Team
  1429  	B *model.AppError
  1430  }
  1431  
  1432  func (g *apiRPCClient) GetTeam(teamId string) (*model.Team, *model.AppError) {
  1433  	_args := &Z_GetTeamArgs{teamId}
  1434  	_returns := &Z_GetTeamReturns{}
  1435  	if err := g.client.Call("Plugin.GetTeam", _args, _returns); err != nil {
  1436  		log.Printf("RPC call to GetTeam API failed: %s", err.Error())
  1437  	}
  1438  	return _returns.A, _returns.B
  1439  }
  1440  
  1441  func (s *apiRPCServer) GetTeam(args *Z_GetTeamArgs, returns *Z_GetTeamReturns) error {
  1442  	if hook, ok := s.impl.(interface {
  1443  		GetTeam(teamId string) (*model.Team, *model.AppError)
  1444  	}); ok {
  1445  		returns.A, returns.B = hook.GetTeam(args.A)
  1446  	} else {
  1447  		return encodableError(fmt.Errorf("API GetTeam called but not implemented."))
  1448  	}
  1449  	return nil
  1450  }
  1451  
  1452  type Z_GetTeamByNameArgs struct {
  1453  	A string
  1454  }
  1455  
  1456  type Z_GetTeamByNameReturns struct {
  1457  	A *model.Team
  1458  	B *model.AppError
  1459  }
  1460  
  1461  func (g *apiRPCClient) GetTeamByName(name string) (*model.Team, *model.AppError) {
  1462  	_args := &Z_GetTeamByNameArgs{name}
  1463  	_returns := &Z_GetTeamByNameReturns{}
  1464  	if err := g.client.Call("Plugin.GetTeamByName", _args, _returns); err != nil {
  1465  		log.Printf("RPC call to GetTeamByName API failed: %s", err.Error())
  1466  	}
  1467  	return _returns.A, _returns.B
  1468  }
  1469  
  1470  func (s *apiRPCServer) GetTeamByName(args *Z_GetTeamByNameArgs, returns *Z_GetTeamByNameReturns) error {
  1471  	if hook, ok := s.impl.(interface {
  1472  		GetTeamByName(name string) (*model.Team, *model.AppError)
  1473  	}); ok {
  1474  		returns.A, returns.B = hook.GetTeamByName(args.A)
  1475  	} else {
  1476  		return encodableError(fmt.Errorf("API GetTeamByName called but not implemented."))
  1477  	}
  1478  	return nil
  1479  }
  1480  
  1481  type Z_GetTeamsUnreadForUserArgs struct {
  1482  	A string
  1483  }
  1484  
  1485  type Z_GetTeamsUnreadForUserReturns struct {
  1486  	A []*model.TeamUnread
  1487  	B *model.AppError
  1488  }
  1489  
  1490  func (g *apiRPCClient) GetTeamsUnreadForUser(userId string) ([]*model.TeamUnread, *model.AppError) {
  1491  	_args := &Z_GetTeamsUnreadForUserArgs{userId}
  1492  	_returns := &Z_GetTeamsUnreadForUserReturns{}
  1493  	if err := g.client.Call("Plugin.GetTeamsUnreadForUser", _args, _returns); err != nil {
  1494  		log.Printf("RPC call to GetTeamsUnreadForUser API failed: %s", err.Error())
  1495  	}
  1496  	return _returns.A, _returns.B
  1497  }
  1498  
  1499  func (s *apiRPCServer) GetTeamsUnreadForUser(args *Z_GetTeamsUnreadForUserArgs, returns *Z_GetTeamsUnreadForUserReturns) error {
  1500  	if hook, ok := s.impl.(interface {
  1501  		GetTeamsUnreadForUser(userId string) ([]*model.TeamUnread, *model.AppError)
  1502  	}); ok {
  1503  		returns.A, returns.B = hook.GetTeamsUnreadForUser(args.A)
  1504  	} else {
  1505  		return encodableError(fmt.Errorf("API GetTeamsUnreadForUser called but not implemented."))
  1506  	}
  1507  	return nil
  1508  }
  1509  
  1510  type Z_UpdateTeamArgs struct {
  1511  	A *model.Team
  1512  }
  1513  
  1514  type Z_UpdateTeamReturns struct {
  1515  	A *model.Team
  1516  	B *model.AppError
  1517  }
  1518  
  1519  func (g *apiRPCClient) UpdateTeam(team *model.Team) (*model.Team, *model.AppError) {
  1520  	_args := &Z_UpdateTeamArgs{team}
  1521  	_returns := &Z_UpdateTeamReturns{}
  1522  	if err := g.client.Call("Plugin.UpdateTeam", _args, _returns); err != nil {
  1523  		log.Printf("RPC call to UpdateTeam API failed: %s", err.Error())
  1524  	}
  1525  	return _returns.A, _returns.B
  1526  }
  1527  
  1528  func (s *apiRPCServer) UpdateTeam(args *Z_UpdateTeamArgs, returns *Z_UpdateTeamReturns) error {
  1529  	if hook, ok := s.impl.(interface {
  1530  		UpdateTeam(team *model.Team) (*model.Team, *model.AppError)
  1531  	}); ok {
  1532  		returns.A, returns.B = hook.UpdateTeam(args.A)
  1533  	} else {
  1534  		return encodableError(fmt.Errorf("API UpdateTeam called but not implemented."))
  1535  	}
  1536  	return nil
  1537  }
  1538  
  1539  type Z_SearchTeamsArgs struct {
  1540  	A string
  1541  }
  1542  
  1543  type Z_SearchTeamsReturns struct {
  1544  	A []*model.Team
  1545  	B *model.AppError
  1546  }
  1547  
  1548  func (g *apiRPCClient) SearchTeams(term string) ([]*model.Team, *model.AppError) {
  1549  	_args := &Z_SearchTeamsArgs{term}
  1550  	_returns := &Z_SearchTeamsReturns{}
  1551  	if err := g.client.Call("Plugin.SearchTeams", _args, _returns); err != nil {
  1552  		log.Printf("RPC call to SearchTeams API failed: %s", err.Error())
  1553  	}
  1554  	return _returns.A, _returns.B
  1555  }
  1556  
  1557  func (s *apiRPCServer) SearchTeams(args *Z_SearchTeamsArgs, returns *Z_SearchTeamsReturns) error {
  1558  	if hook, ok := s.impl.(interface {
  1559  		SearchTeams(term string) ([]*model.Team, *model.AppError)
  1560  	}); ok {
  1561  		returns.A, returns.B = hook.SearchTeams(args.A)
  1562  	} else {
  1563  		return encodableError(fmt.Errorf("API SearchTeams called but not implemented."))
  1564  	}
  1565  	return nil
  1566  }
  1567  
  1568  type Z_GetTeamsForUserArgs struct {
  1569  	A string
  1570  }
  1571  
  1572  type Z_GetTeamsForUserReturns struct {
  1573  	A []*model.Team
  1574  	B *model.AppError
  1575  }
  1576  
  1577  func (g *apiRPCClient) GetTeamsForUser(userId string) ([]*model.Team, *model.AppError) {
  1578  	_args := &Z_GetTeamsForUserArgs{userId}
  1579  	_returns := &Z_GetTeamsForUserReturns{}
  1580  	if err := g.client.Call("Plugin.GetTeamsForUser", _args, _returns); err != nil {
  1581  		log.Printf("RPC call to GetTeamsForUser API failed: %s", err.Error())
  1582  	}
  1583  	return _returns.A, _returns.B
  1584  }
  1585  
  1586  func (s *apiRPCServer) GetTeamsForUser(args *Z_GetTeamsForUserArgs, returns *Z_GetTeamsForUserReturns) error {
  1587  	if hook, ok := s.impl.(interface {
  1588  		GetTeamsForUser(userId string) ([]*model.Team, *model.AppError)
  1589  	}); ok {
  1590  		returns.A, returns.B = hook.GetTeamsForUser(args.A)
  1591  	} else {
  1592  		return encodableError(fmt.Errorf("API GetTeamsForUser called but not implemented."))
  1593  	}
  1594  	return nil
  1595  }
  1596  
  1597  type Z_CreateTeamMemberArgs struct {
  1598  	A string
  1599  	B string
  1600  }
  1601  
  1602  type Z_CreateTeamMemberReturns struct {
  1603  	A *model.TeamMember
  1604  	B *model.AppError
  1605  }
  1606  
  1607  func (g *apiRPCClient) CreateTeamMember(teamId, userId string) (*model.TeamMember, *model.AppError) {
  1608  	_args := &Z_CreateTeamMemberArgs{teamId, userId}
  1609  	_returns := &Z_CreateTeamMemberReturns{}
  1610  	if err := g.client.Call("Plugin.CreateTeamMember", _args, _returns); err != nil {
  1611  		log.Printf("RPC call to CreateTeamMember API failed: %s", err.Error())
  1612  	}
  1613  	return _returns.A, _returns.B
  1614  }
  1615  
  1616  func (s *apiRPCServer) CreateTeamMember(args *Z_CreateTeamMemberArgs, returns *Z_CreateTeamMemberReturns) error {
  1617  	if hook, ok := s.impl.(interface {
  1618  		CreateTeamMember(teamId, userId string) (*model.TeamMember, *model.AppError)
  1619  	}); ok {
  1620  		returns.A, returns.B = hook.CreateTeamMember(args.A, args.B)
  1621  	} else {
  1622  		return encodableError(fmt.Errorf("API CreateTeamMember called but not implemented."))
  1623  	}
  1624  	return nil
  1625  }
  1626  
  1627  type Z_CreateTeamMembersArgs struct {
  1628  	A string
  1629  	B []string
  1630  	C string
  1631  }
  1632  
  1633  type Z_CreateTeamMembersReturns struct {
  1634  	A []*model.TeamMember
  1635  	B *model.AppError
  1636  }
  1637  
  1638  func (g *apiRPCClient) CreateTeamMembers(teamId string, userIds []string, requestorId string) ([]*model.TeamMember, *model.AppError) {
  1639  	_args := &Z_CreateTeamMembersArgs{teamId, userIds, requestorId}
  1640  	_returns := &Z_CreateTeamMembersReturns{}
  1641  	if err := g.client.Call("Plugin.CreateTeamMembers", _args, _returns); err != nil {
  1642  		log.Printf("RPC call to CreateTeamMembers API failed: %s", err.Error())
  1643  	}
  1644  	return _returns.A, _returns.B
  1645  }
  1646  
  1647  func (s *apiRPCServer) CreateTeamMembers(args *Z_CreateTeamMembersArgs, returns *Z_CreateTeamMembersReturns) error {
  1648  	if hook, ok := s.impl.(interface {
  1649  		CreateTeamMembers(teamId string, userIds []string, requestorId string) ([]*model.TeamMember, *model.AppError)
  1650  	}); ok {
  1651  		returns.A, returns.B = hook.CreateTeamMembers(args.A, args.B, args.C)
  1652  	} else {
  1653  		return encodableError(fmt.Errorf("API CreateTeamMembers called but not implemented."))
  1654  	}
  1655  	return nil
  1656  }
  1657  
  1658  type Z_DeleteTeamMemberArgs struct {
  1659  	A string
  1660  	B string
  1661  	C string
  1662  }
  1663  
  1664  type Z_DeleteTeamMemberReturns struct {
  1665  	A *model.AppError
  1666  }
  1667  
  1668  func (g *apiRPCClient) DeleteTeamMember(teamId, userId, requestorId string) *model.AppError {
  1669  	_args := &Z_DeleteTeamMemberArgs{teamId, userId, requestorId}
  1670  	_returns := &Z_DeleteTeamMemberReturns{}
  1671  	if err := g.client.Call("Plugin.DeleteTeamMember", _args, _returns); err != nil {
  1672  		log.Printf("RPC call to DeleteTeamMember API failed: %s", err.Error())
  1673  	}
  1674  	return _returns.A
  1675  }
  1676  
  1677  func (s *apiRPCServer) DeleteTeamMember(args *Z_DeleteTeamMemberArgs, returns *Z_DeleteTeamMemberReturns) error {
  1678  	if hook, ok := s.impl.(interface {
  1679  		DeleteTeamMember(teamId, userId, requestorId string) *model.AppError
  1680  	}); ok {
  1681  		returns.A = hook.DeleteTeamMember(args.A, args.B, args.C)
  1682  	} else {
  1683  		return encodableError(fmt.Errorf("API DeleteTeamMember called but not implemented."))
  1684  	}
  1685  	return nil
  1686  }
  1687  
  1688  type Z_GetTeamMembersArgs struct {
  1689  	A string
  1690  	B int
  1691  	C int
  1692  }
  1693  
  1694  type Z_GetTeamMembersReturns struct {
  1695  	A []*model.TeamMember
  1696  	B *model.AppError
  1697  }
  1698  
  1699  func (g *apiRPCClient) GetTeamMembers(teamId string, page, perPage int) ([]*model.TeamMember, *model.AppError) {
  1700  	_args := &Z_GetTeamMembersArgs{teamId, page, perPage}
  1701  	_returns := &Z_GetTeamMembersReturns{}
  1702  	if err := g.client.Call("Plugin.GetTeamMembers", _args, _returns); err != nil {
  1703  		log.Printf("RPC call to GetTeamMembers API failed: %s", err.Error())
  1704  	}
  1705  	return _returns.A, _returns.B
  1706  }
  1707  
  1708  func (s *apiRPCServer) GetTeamMembers(args *Z_GetTeamMembersArgs, returns *Z_GetTeamMembersReturns) error {
  1709  	if hook, ok := s.impl.(interface {
  1710  		GetTeamMembers(teamId string, page, perPage int) ([]*model.TeamMember, *model.AppError)
  1711  	}); ok {
  1712  		returns.A, returns.B = hook.GetTeamMembers(args.A, args.B, args.C)
  1713  	} else {
  1714  		return encodableError(fmt.Errorf("API GetTeamMembers called but not implemented."))
  1715  	}
  1716  	return nil
  1717  }
  1718  
  1719  type Z_GetTeamMemberArgs struct {
  1720  	A string
  1721  	B string
  1722  }
  1723  
  1724  type Z_GetTeamMemberReturns struct {
  1725  	A *model.TeamMember
  1726  	B *model.AppError
  1727  }
  1728  
  1729  func (g *apiRPCClient) GetTeamMember(teamId, userId string) (*model.TeamMember, *model.AppError) {
  1730  	_args := &Z_GetTeamMemberArgs{teamId, userId}
  1731  	_returns := &Z_GetTeamMemberReturns{}
  1732  	if err := g.client.Call("Plugin.GetTeamMember", _args, _returns); err != nil {
  1733  		log.Printf("RPC call to GetTeamMember API failed: %s", err.Error())
  1734  	}
  1735  	return _returns.A, _returns.B
  1736  }
  1737  
  1738  func (s *apiRPCServer) GetTeamMember(args *Z_GetTeamMemberArgs, returns *Z_GetTeamMemberReturns) error {
  1739  	if hook, ok := s.impl.(interface {
  1740  		GetTeamMember(teamId, userId string) (*model.TeamMember, *model.AppError)
  1741  	}); ok {
  1742  		returns.A, returns.B = hook.GetTeamMember(args.A, args.B)
  1743  	} else {
  1744  		return encodableError(fmt.Errorf("API GetTeamMember called but not implemented."))
  1745  	}
  1746  	return nil
  1747  }
  1748  
  1749  type Z_GetTeamMembersForUserArgs struct {
  1750  	A string
  1751  	B int
  1752  	C int
  1753  }
  1754  
  1755  type Z_GetTeamMembersForUserReturns struct {
  1756  	A []*model.TeamMember
  1757  	B *model.AppError
  1758  }
  1759  
  1760  func (g *apiRPCClient) GetTeamMembersForUser(userId string, page int, perPage int) ([]*model.TeamMember, *model.AppError) {
  1761  	_args := &Z_GetTeamMembersForUserArgs{userId, page, perPage}
  1762  	_returns := &Z_GetTeamMembersForUserReturns{}
  1763  	if err := g.client.Call("Plugin.GetTeamMembersForUser", _args, _returns); err != nil {
  1764  		log.Printf("RPC call to GetTeamMembersForUser API failed: %s", err.Error())
  1765  	}
  1766  	return _returns.A, _returns.B
  1767  }
  1768  
  1769  func (s *apiRPCServer) GetTeamMembersForUser(args *Z_GetTeamMembersForUserArgs, returns *Z_GetTeamMembersForUserReturns) error {
  1770  	if hook, ok := s.impl.(interface {
  1771  		GetTeamMembersForUser(userId string, page int, perPage int) ([]*model.TeamMember, *model.AppError)
  1772  	}); ok {
  1773  		returns.A, returns.B = hook.GetTeamMembersForUser(args.A, args.B, args.C)
  1774  	} else {
  1775  		return encodableError(fmt.Errorf("API GetTeamMembersForUser called but not implemented."))
  1776  	}
  1777  	return nil
  1778  }
  1779  
  1780  type Z_UpdateTeamMemberRolesArgs struct {
  1781  	A string
  1782  	B string
  1783  	C string
  1784  }
  1785  
  1786  type Z_UpdateTeamMemberRolesReturns struct {
  1787  	A *model.TeamMember
  1788  	B *model.AppError
  1789  }
  1790  
  1791  func (g *apiRPCClient) UpdateTeamMemberRoles(teamId, userId, newRoles string) (*model.TeamMember, *model.AppError) {
  1792  	_args := &Z_UpdateTeamMemberRolesArgs{teamId, userId, newRoles}
  1793  	_returns := &Z_UpdateTeamMemberRolesReturns{}
  1794  	if err := g.client.Call("Plugin.UpdateTeamMemberRoles", _args, _returns); err != nil {
  1795  		log.Printf("RPC call to UpdateTeamMemberRoles API failed: %s", err.Error())
  1796  	}
  1797  	return _returns.A, _returns.B
  1798  }
  1799  
  1800  func (s *apiRPCServer) UpdateTeamMemberRoles(args *Z_UpdateTeamMemberRolesArgs, returns *Z_UpdateTeamMemberRolesReturns) error {
  1801  	if hook, ok := s.impl.(interface {
  1802  		UpdateTeamMemberRoles(teamId, userId, newRoles string) (*model.TeamMember, *model.AppError)
  1803  	}); ok {
  1804  		returns.A, returns.B = hook.UpdateTeamMemberRoles(args.A, args.B, args.C)
  1805  	} else {
  1806  		return encodableError(fmt.Errorf("API UpdateTeamMemberRoles called but not implemented."))
  1807  	}
  1808  	return nil
  1809  }
  1810  
  1811  type Z_CreateChannelArgs struct {
  1812  	A *model.Channel
  1813  }
  1814  
  1815  type Z_CreateChannelReturns struct {
  1816  	A *model.Channel
  1817  	B *model.AppError
  1818  }
  1819  
  1820  func (g *apiRPCClient) CreateChannel(channel *model.Channel) (*model.Channel, *model.AppError) {
  1821  	_args := &Z_CreateChannelArgs{channel}
  1822  	_returns := &Z_CreateChannelReturns{}
  1823  	if err := g.client.Call("Plugin.CreateChannel", _args, _returns); err != nil {
  1824  		log.Printf("RPC call to CreateChannel API failed: %s", err.Error())
  1825  	}
  1826  	return _returns.A, _returns.B
  1827  }
  1828  
  1829  func (s *apiRPCServer) CreateChannel(args *Z_CreateChannelArgs, returns *Z_CreateChannelReturns) error {
  1830  	if hook, ok := s.impl.(interface {
  1831  		CreateChannel(channel *model.Channel) (*model.Channel, *model.AppError)
  1832  	}); ok {
  1833  		returns.A, returns.B = hook.CreateChannel(args.A)
  1834  	} else {
  1835  		return encodableError(fmt.Errorf("API CreateChannel called but not implemented."))
  1836  	}
  1837  	return nil
  1838  }
  1839  
  1840  type Z_DeleteChannelArgs struct {
  1841  	A string
  1842  }
  1843  
  1844  type Z_DeleteChannelReturns struct {
  1845  	A *model.AppError
  1846  }
  1847  
  1848  func (g *apiRPCClient) DeleteChannel(channelId string) *model.AppError {
  1849  	_args := &Z_DeleteChannelArgs{channelId}
  1850  	_returns := &Z_DeleteChannelReturns{}
  1851  	if err := g.client.Call("Plugin.DeleteChannel", _args, _returns); err != nil {
  1852  		log.Printf("RPC call to DeleteChannel API failed: %s", err.Error())
  1853  	}
  1854  	return _returns.A
  1855  }
  1856  
  1857  func (s *apiRPCServer) DeleteChannel(args *Z_DeleteChannelArgs, returns *Z_DeleteChannelReturns) error {
  1858  	if hook, ok := s.impl.(interface {
  1859  		DeleteChannel(channelId string) *model.AppError
  1860  	}); ok {
  1861  		returns.A = hook.DeleteChannel(args.A)
  1862  	} else {
  1863  		return encodableError(fmt.Errorf("API DeleteChannel called but not implemented."))
  1864  	}
  1865  	return nil
  1866  }
  1867  
  1868  type Z_GetPublicChannelsForTeamArgs struct {
  1869  	A string
  1870  	B int
  1871  	C int
  1872  }
  1873  
  1874  type Z_GetPublicChannelsForTeamReturns struct {
  1875  	A []*model.Channel
  1876  	B *model.AppError
  1877  }
  1878  
  1879  func (g *apiRPCClient) GetPublicChannelsForTeam(teamId string, page, perPage int) ([]*model.Channel, *model.AppError) {
  1880  	_args := &Z_GetPublicChannelsForTeamArgs{teamId, page, perPage}
  1881  	_returns := &Z_GetPublicChannelsForTeamReturns{}
  1882  	if err := g.client.Call("Plugin.GetPublicChannelsForTeam", _args, _returns); err != nil {
  1883  		log.Printf("RPC call to GetPublicChannelsForTeam API failed: %s", err.Error())
  1884  	}
  1885  	return _returns.A, _returns.B
  1886  }
  1887  
  1888  func (s *apiRPCServer) GetPublicChannelsForTeam(args *Z_GetPublicChannelsForTeamArgs, returns *Z_GetPublicChannelsForTeamReturns) error {
  1889  	if hook, ok := s.impl.(interface {
  1890  		GetPublicChannelsForTeam(teamId string, page, perPage int) ([]*model.Channel, *model.AppError)
  1891  	}); ok {
  1892  		returns.A, returns.B = hook.GetPublicChannelsForTeam(args.A, args.B, args.C)
  1893  	} else {
  1894  		return encodableError(fmt.Errorf("API GetPublicChannelsForTeam called but not implemented."))
  1895  	}
  1896  	return nil
  1897  }
  1898  
  1899  type Z_GetChannelArgs struct {
  1900  	A string
  1901  }
  1902  
  1903  type Z_GetChannelReturns struct {
  1904  	A *model.Channel
  1905  	B *model.AppError
  1906  }
  1907  
  1908  func (g *apiRPCClient) GetChannel(channelId string) (*model.Channel, *model.AppError) {
  1909  	_args := &Z_GetChannelArgs{channelId}
  1910  	_returns := &Z_GetChannelReturns{}
  1911  	if err := g.client.Call("Plugin.GetChannel", _args, _returns); err != nil {
  1912  		log.Printf("RPC call to GetChannel API failed: %s", err.Error())
  1913  	}
  1914  	return _returns.A, _returns.B
  1915  }
  1916  
  1917  func (s *apiRPCServer) GetChannel(args *Z_GetChannelArgs, returns *Z_GetChannelReturns) error {
  1918  	if hook, ok := s.impl.(interface {
  1919  		GetChannel(channelId string) (*model.Channel, *model.AppError)
  1920  	}); ok {
  1921  		returns.A, returns.B = hook.GetChannel(args.A)
  1922  	} else {
  1923  		return encodableError(fmt.Errorf("API GetChannel called but not implemented."))
  1924  	}
  1925  	return nil
  1926  }
  1927  
  1928  type Z_GetChannelByNameArgs struct {
  1929  	A string
  1930  	B string
  1931  	C bool
  1932  }
  1933  
  1934  type Z_GetChannelByNameReturns struct {
  1935  	A *model.Channel
  1936  	B *model.AppError
  1937  }
  1938  
  1939  func (g *apiRPCClient) GetChannelByName(teamId, name string, includeDeleted bool) (*model.Channel, *model.AppError) {
  1940  	_args := &Z_GetChannelByNameArgs{teamId, name, includeDeleted}
  1941  	_returns := &Z_GetChannelByNameReturns{}
  1942  	if err := g.client.Call("Plugin.GetChannelByName", _args, _returns); err != nil {
  1943  		log.Printf("RPC call to GetChannelByName API failed: %s", err.Error())
  1944  	}
  1945  	return _returns.A, _returns.B
  1946  }
  1947  
  1948  func (s *apiRPCServer) GetChannelByName(args *Z_GetChannelByNameArgs, returns *Z_GetChannelByNameReturns) error {
  1949  	if hook, ok := s.impl.(interface {
  1950  		GetChannelByName(teamId, name string, includeDeleted bool) (*model.Channel, *model.AppError)
  1951  	}); ok {
  1952  		returns.A, returns.B = hook.GetChannelByName(args.A, args.B, args.C)
  1953  	} else {
  1954  		return encodableError(fmt.Errorf("API GetChannelByName called but not implemented."))
  1955  	}
  1956  	return nil
  1957  }
  1958  
  1959  type Z_GetChannelByNameForTeamNameArgs struct {
  1960  	A string
  1961  	B string
  1962  	C bool
  1963  }
  1964  
  1965  type Z_GetChannelByNameForTeamNameReturns struct {
  1966  	A *model.Channel
  1967  	B *model.AppError
  1968  }
  1969  
  1970  func (g *apiRPCClient) GetChannelByNameForTeamName(teamName, channelName string, includeDeleted bool) (*model.Channel, *model.AppError) {
  1971  	_args := &Z_GetChannelByNameForTeamNameArgs{teamName, channelName, includeDeleted}
  1972  	_returns := &Z_GetChannelByNameForTeamNameReturns{}
  1973  	if err := g.client.Call("Plugin.GetChannelByNameForTeamName", _args, _returns); err != nil {
  1974  		log.Printf("RPC call to GetChannelByNameForTeamName API failed: %s", err.Error())
  1975  	}
  1976  	return _returns.A, _returns.B
  1977  }
  1978  
  1979  func (s *apiRPCServer) GetChannelByNameForTeamName(args *Z_GetChannelByNameForTeamNameArgs, returns *Z_GetChannelByNameForTeamNameReturns) error {
  1980  	if hook, ok := s.impl.(interface {
  1981  		GetChannelByNameForTeamName(teamName, channelName string, includeDeleted bool) (*model.Channel, *model.AppError)
  1982  	}); ok {
  1983  		returns.A, returns.B = hook.GetChannelByNameForTeamName(args.A, args.B, args.C)
  1984  	} else {
  1985  		return encodableError(fmt.Errorf("API GetChannelByNameForTeamName called but not implemented."))
  1986  	}
  1987  	return nil
  1988  }
  1989  
  1990  type Z_GetChannelsForTeamForUserArgs struct {
  1991  	A string
  1992  	B string
  1993  	C bool
  1994  }
  1995  
  1996  type Z_GetChannelsForTeamForUserReturns struct {
  1997  	A []*model.Channel
  1998  	B *model.AppError
  1999  }
  2000  
  2001  func (g *apiRPCClient) GetChannelsForTeamForUser(teamId, userId string, includeDeleted bool) ([]*model.Channel, *model.AppError) {
  2002  	_args := &Z_GetChannelsForTeamForUserArgs{teamId, userId, includeDeleted}
  2003  	_returns := &Z_GetChannelsForTeamForUserReturns{}
  2004  	if err := g.client.Call("Plugin.GetChannelsForTeamForUser", _args, _returns); err != nil {
  2005  		log.Printf("RPC call to GetChannelsForTeamForUser API failed: %s", err.Error())
  2006  	}
  2007  	return _returns.A, _returns.B
  2008  }
  2009  
  2010  func (s *apiRPCServer) GetChannelsForTeamForUser(args *Z_GetChannelsForTeamForUserArgs, returns *Z_GetChannelsForTeamForUserReturns) error {
  2011  	if hook, ok := s.impl.(interface {
  2012  		GetChannelsForTeamForUser(teamId, userId string, includeDeleted bool) ([]*model.Channel, *model.AppError)
  2013  	}); ok {
  2014  		returns.A, returns.B = hook.GetChannelsForTeamForUser(args.A, args.B, args.C)
  2015  	} else {
  2016  		return encodableError(fmt.Errorf("API GetChannelsForTeamForUser called but not implemented."))
  2017  	}
  2018  	return nil
  2019  }
  2020  
  2021  type Z_GetChannelStatsArgs struct {
  2022  	A string
  2023  }
  2024  
  2025  type Z_GetChannelStatsReturns struct {
  2026  	A *model.ChannelStats
  2027  	B *model.AppError
  2028  }
  2029  
  2030  func (g *apiRPCClient) GetChannelStats(channelId string) (*model.ChannelStats, *model.AppError) {
  2031  	_args := &Z_GetChannelStatsArgs{channelId}
  2032  	_returns := &Z_GetChannelStatsReturns{}
  2033  	if err := g.client.Call("Plugin.GetChannelStats", _args, _returns); err != nil {
  2034  		log.Printf("RPC call to GetChannelStats API failed: %s", err.Error())
  2035  	}
  2036  	return _returns.A, _returns.B
  2037  }
  2038  
  2039  func (s *apiRPCServer) GetChannelStats(args *Z_GetChannelStatsArgs, returns *Z_GetChannelStatsReturns) error {
  2040  	if hook, ok := s.impl.(interface {
  2041  		GetChannelStats(channelId string) (*model.ChannelStats, *model.AppError)
  2042  	}); ok {
  2043  		returns.A, returns.B = hook.GetChannelStats(args.A)
  2044  	} else {
  2045  		return encodableError(fmt.Errorf("API GetChannelStats called but not implemented."))
  2046  	}
  2047  	return nil
  2048  }
  2049  
  2050  type Z_GetDirectChannelArgs struct {
  2051  	A string
  2052  	B string
  2053  }
  2054  
  2055  type Z_GetDirectChannelReturns struct {
  2056  	A *model.Channel
  2057  	B *model.AppError
  2058  }
  2059  
  2060  func (g *apiRPCClient) GetDirectChannel(userId1, userId2 string) (*model.Channel, *model.AppError) {
  2061  	_args := &Z_GetDirectChannelArgs{userId1, userId2}
  2062  	_returns := &Z_GetDirectChannelReturns{}
  2063  	if err := g.client.Call("Plugin.GetDirectChannel", _args, _returns); err != nil {
  2064  		log.Printf("RPC call to GetDirectChannel API failed: %s", err.Error())
  2065  	}
  2066  	return _returns.A, _returns.B
  2067  }
  2068  
  2069  func (s *apiRPCServer) GetDirectChannel(args *Z_GetDirectChannelArgs, returns *Z_GetDirectChannelReturns) error {
  2070  	if hook, ok := s.impl.(interface {
  2071  		GetDirectChannel(userId1, userId2 string) (*model.Channel, *model.AppError)
  2072  	}); ok {
  2073  		returns.A, returns.B = hook.GetDirectChannel(args.A, args.B)
  2074  	} else {
  2075  		return encodableError(fmt.Errorf("API GetDirectChannel called but not implemented."))
  2076  	}
  2077  	return nil
  2078  }
  2079  
  2080  type Z_GetGroupChannelArgs struct {
  2081  	A []string
  2082  }
  2083  
  2084  type Z_GetGroupChannelReturns struct {
  2085  	A *model.Channel
  2086  	B *model.AppError
  2087  }
  2088  
  2089  func (g *apiRPCClient) GetGroupChannel(userIds []string) (*model.Channel, *model.AppError) {
  2090  	_args := &Z_GetGroupChannelArgs{userIds}
  2091  	_returns := &Z_GetGroupChannelReturns{}
  2092  	if err := g.client.Call("Plugin.GetGroupChannel", _args, _returns); err != nil {
  2093  		log.Printf("RPC call to GetGroupChannel API failed: %s", err.Error())
  2094  	}
  2095  	return _returns.A, _returns.B
  2096  }
  2097  
  2098  func (s *apiRPCServer) GetGroupChannel(args *Z_GetGroupChannelArgs, returns *Z_GetGroupChannelReturns) error {
  2099  	if hook, ok := s.impl.(interface {
  2100  		GetGroupChannel(userIds []string) (*model.Channel, *model.AppError)
  2101  	}); ok {
  2102  		returns.A, returns.B = hook.GetGroupChannel(args.A)
  2103  	} else {
  2104  		return encodableError(fmt.Errorf("API GetGroupChannel called but not implemented."))
  2105  	}
  2106  	return nil
  2107  }
  2108  
  2109  type Z_UpdateChannelArgs struct {
  2110  	A *model.Channel
  2111  }
  2112  
  2113  type Z_UpdateChannelReturns struct {
  2114  	A *model.Channel
  2115  	B *model.AppError
  2116  }
  2117  
  2118  func (g *apiRPCClient) UpdateChannel(channel *model.Channel) (*model.Channel, *model.AppError) {
  2119  	_args := &Z_UpdateChannelArgs{channel}
  2120  	_returns := &Z_UpdateChannelReturns{}
  2121  	if err := g.client.Call("Plugin.UpdateChannel", _args, _returns); err != nil {
  2122  		log.Printf("RPC call to UpdateChannel API failed: %s", err.Error())
  2123  	}
  2124  	return _returns.A, _returns.B
  2125  }
  2126  
  2127  func (s *apiRPCServer) UpdateChannel(args *Z_UpdateChannelArgs, returns *Z_UpdateChannelReturns) error {
  2128  	if hook, ok := s.impl.(interface {
  2129  		UpdateChannel(channel *model.Channel) (*model.Channel, *model.AppError)
  2130  	}); ok {
  2131  		returns.A, returns.B = hook.UpdateChannel(args.A)
  2132  	} else {
  2133  		return encodableError(fmt.Errorf("API UpdateChannel called but not implemented."))
  2134  	}
  2135  	return nil
  2136  }
  2137  
  2138  type Z_SearchChannelsArgs struct {
  2139  	A string
  2140  	B string
  2141  }
  2142  
  2143  type Z_SearchChannelsReturns struct {
  2144  	A []*model.Channel
  2145  	B *model.AppError
  2146  }
  2147  
  2148  func (g *apiRPCClient) SearchChannels(teamId string, term string) ([]*model.Channel, *model.AppError) {
  2149  	_args := &Z_SearchChannelsArgs{teamId, term}
  2150  	_returns := &Z_SearchChannelsReturns{}
  2151  	if err := g.client.Call("Plugin.SearchChannels", _args, _returns); err != nil {
  2152  		log.Printf("RPC call to SearchChannels API failed: %s", err.Error())
  2153  	}
  2154  	return _returns.A, _returns.B
  2155  }
  2156  
  2157  func (s *apiRPCServer) SearchChannels(args *Z_SearchChannelsArgs, returns *Z_SearchChannelsReturns) error {
  2158  	if hook, ok := s.impl.(interface {
  2159  		SearchChannels(teamId string, term string) ([]*model.Channel, *model.AppError)
  2160  	}); ok {
  2161  		returns.A, returns.B = hook.SearchChannels(args.A, args.B)
  2162  	} else {
  2163  		return encodableError(fmt.Errorf("API SearchChannels called but not implemented."))
  2164  	}
  2165  	return nil
  2166  }
  2167  
  2168  type Z_SearchUsersArgs struct {
  2169  	A *model.UserSearch
  2170  }
  2171  
  2172  type Z_SearchUsersReturns struct {
  2173  	A []*model.User
  2174  	B *model.AppError
  2175  }
  2176  
  2177  func (g *apiRPCClient) SearchUsers(search *model.UserSearch) ([]*model.User, *model.AppError) {
  2178  	_args := &Z_SearchUsersArgs{search}
  2179  	_returns := &Z_SearchUsersReturns{}
  2180  	if err := g.client.Call("Plugin.SearchUsers", _args, _returns); err != nil {
  2181  		log.Printf("RPC call to SearchUsers API failed: %s", err.Error())
  2182  	}
  2183  	return _returns.A, _returns.B
  2184  }
  2185  
  2186  func (s *apiRPCServer) SearchUsers(args *Z_SearchUsersArgs, returns *Z_SearchUsersReturns) error {
  2187  	if hook, ok := s.impl.(interface {
  2188  		SearchUsers(search *model.UserSearch) ([]*model.User, *model.AppError)
  2189  	}); ok {
  2190  		returns.A, returns.B = hook.SearchUsers(args.A)
  2191  	} else {
  2192  		return encodableError(fmt.Errorf("API SearchUsers called but not implemented."))
  2193  	}
  2194  	return nil
  2195  }
  2196  
  2197  type Z_SearchPostsInTeamArgs struct {
  2198  	A string
  2199  	B []*model.SearchParams
  2200  }
  2201  
  2202  type Z_SearchPostsInTeamReturns struct {
  2203  	A []*model.Post
  2204  	B *model.AppError
  2205  }
  2206  
  2207  func (g *apiRPCClient) SearchPostsInTeam(teamId string, paramsList []*model.SearchParams) ([]*model.Post, *model.AppError) {
  2208  	_args := &Z_SearchPostsInTeamArgs{teamId, paramsList}
  2209  	_returns := &Z_SearchPostsInTeamReturns{}
  2210  	if err := g.client.Call("Plugin.SearchPostsInTeam", _args, _returns); err != nil {
  2211  		log.Printf("RPC call to SearchPostsInTeam API failed: %s", err.Error())
  2212  	}
  2213  	return _returns.A, _returns.B
  2214  }
  2215  
  2216  func (s *apiRPCServer) SearchPostsInTeam(args *Z_SearchPostsInTeamArgs, returns *Z_SearchPostsInTeamReturns) error {
  2217  	if hook, ok := s.impl.(interface {
  2218  		SearchPostsInTeam(teamId string, paramsList []*model.SearchParams) ([]*model.Post, *model.AppError)
  2219  	}); ok {
  2220  		returns.A, returns.B = hook.SearchPostsInTeam(args.A, args.B)
  2221  	} else {
  2222  		return encodableError(fmt.Errorf("API SearchPostsInTeam called but not implemented."))
  2223  	}
  2224  	return nil
  2225  }
  2226  
  2227  type Z_AddChannelMemberArgs struct {
  2228  	A string
  2229  	B string
  2230  }
  2231  
  2232  type Z_AddChannelMemberReturns struct {
  2233  	A *model.ChannelMember
  2234  	B *model.AppError
  2235  }
  2236  
  2237  func (g *apiRPCClient) AddChannelMember(channelId, userId string) (*model.ChannelMember, *model.AppError) {
  2238  	_args := &Z_AddChannelMemberArgs{channelId, userId}
  2239  	_returns := &Z_AddChannelMemberReturns{}
  2240  	if err := g.client.Call("Plugin.AddChannelMember", _args, _returns); err != nil {
  2241  		log.Printf("RPC call to AddChannelMember API failed: %s", err.Error())
  2242  	}
  2243  	return _returns.A, _returns.B
  2244  }
  2245  
  2246  func (s *apiRPCServer) AddChannelMember(args *Z_AddChannelMemberArgs, returns *Z_AddChannelMemberReturns) error {
  2247  	if hook, ok := s.impl.(interface {
  2248  		AddChannelMember(channelId, userId string) (*model.ChannelMember, *model.AppError)
  2249  	}); ok {
  2250  		returns.A, returns.B = hook.AddChannelMember(args.A, args.B)
  2251  	} else {
  2252  		return encodableError(fmt.Errorf("API AddChannelMember called but not implemented."))
  2253  	}
  2254  	return nil
  2255  }
  2256  
  2257  type Z_GetChannelMemberArgs struct {
  2258  	A string
  2259  	B string
  2260  }
  2261  
  2262  type Z_GetChannelMemberReturns struct {
  2263  	A *model.ChannelMember
  2264  	B *model.AppError
  2265  }
  2266  
  2267  func (g *apiRPCClient) GetChannelMember(channelId, userId string) (*model.ChannelMember, *model.AppError) {
  2268  	_args := &Z_GetChannelMemberArgs{channelId, userId}
  2269  	_returns := &Z_GetChannelMemberReturns{}
  2270  	if err := g.client.Call("Plugin.GetChannelMember", _args, _returns); err != nil {
  2271  		log.Printf("RPC call to GetChannelMember API failed: %s", err.Error())
  2272  	}
  2273  	return _returns.A, _returns.B
  2274  }
  2275  
  2276  func (s *apiRPCServer) GetChannelMember(args *Z_GetChannelMemberArgs, returns *Z_GetChannelMemberReturns) error {
  2277  	if hook, ok := s.impl.(interface {
  2278  		GetChannelMember(channelId, userId string) (*model.ChannelMember, *model.AppError)
  2279  	}); ok {
  2280  		returns.A, returns.B = hook.GetChannelMember(args.A, args.B)
  2281  	} else {
  2282  		return encodableError(fmt.Errorf("API GetChannelMember called but not implemented."))
  2283  	}
  2284  	return nil
  2285  }
  2286  
  2287  type Z_GetChannelMembersArgs struct {
  2288  	A string
  2289  	B int
  2290  	C int
  2291  }
  2292  
  2293  type Z_GetChannelMembersReturns struct {
  2294  	A *model.ChannelMembers
  2295  	B *model.AppError
  2296  }
  2297  
  2298  func (g *apiRPCClient) GetChannelMembers(channelId string, page, perPage int) (*model.ChannelMembers, *model.AppError) {
  2299  	_args := &Z_GetChannelMembersArgs{channelId, page, perPage}
  2300  	_returns := &Z_GetChannelMembersReturns{}
  2301  	if err := g.client.Call("Plugin.GetChannelMembers", _args, _returns); err != nil {
  2302  		log.Printf("RPC call to GetChannelMembers API failed: %s", err.Error())
  2303  	}
  2304  	return _returns.A, _returns.B
  2305  }
  2306  
  2307  func (s *apiRPCServer) GetChannelMembers(args *Z_GetChannelMembersArgs, returns *Z_GetChannelMembersReturns) error {
  2308  	if hook, ok := s.impl.(interface {
  2309  		GetChannelMembers(channelId string, page, perPage int) (*model.ChannelMembers, *model.AppError)
  2310  	}); ok {
  2311  		returns.A, returns.B = hook.GetChannelMembers(args.A, args.B, args.C)
  2312  	} else {
  2313  		return encodableError(fmt.Errorf("API GetChannelMembers called but not implemented."))
  2314  	}
  2315  	return nil
  2316  }
  2317  
  2318  type Z_GetChannelMembersByIdsArgs struct {
  2319  	A string
  2320  	B []string
  2321  }
  2322  
  2323  type Z_GetChannelMembersByIdsReturns struct {
  2324  	A *model.ChannelMembers
  2325  	B *model.AppError
  2326  }
  2327  
  2328  func (g *apiRPCClient) GetChannelMembersByIds(channelId string, userIds []string) (*model.ChannelMembers, *model.AppError) {
  2329  	_args := &Z_GetChannelMembersByIdsArgs{channelId, userIds}
  2330  	_returns := &Z_GetChannelMembersByIdsReturns{}
  2331  	if err := g.client.Call("Plugin.GetChannelMembersByIds", _args, _returns); err != nil {
  2332  		log.Printf("RPC call to GetChannelMembersByIds API failed: %s", err.Error())
  2333  	}
  2334  	return _returns.A, _returns.B
  2335  }
  2336  
  2337  func (s *apiRPCServer) GetChannelMembersByIds(args *Z_GetChannelMembersByIdsArgs, returns *Z_GetChannelMembersByIdsReturns) error {
  2338  	if hook, ok := s.impl.(interface {
  2339  		GetChannelMembersByIds(channelId string, userIds []string) (*model.ChannelMembers, *model.AppError)
  2340  	}); ok {
  2341  		returns.A, returns.B = hook.GetChannelMembersByIds(args.A, args.B)
  2342  	} else {
  2343  		return encodableError(fmt.Errorf("API GetChannelMembersByIds called but not implemented."))
  2344  	}
  2345  	return nil
  2346  }
  2347  
  2348  type Z_GetChannelMembersForUserArgs struct {
  2349  	A string
  2350  	B string
  2351  	C int
  2352  	D int
  2353  }
  2354  
  2355  type Z_GetChannelMembersForUserReturns struct {
  2356  	A []*model.ChannelMember
  2357  	B *model.AppError
  2358  }
  2359  
  2360  func (g *apiRPCClient) GetChannelMembersForUser(teamId, userId string, page, perPage int) ([]*model.ChannelMember, *model.AppError) {
  2361  	_args := &Z_GetChannelMembersForUserArgs{teamId, userId, page, perPage}
  2362  	_returns := &Z_GetChannelMembersForUserReturns{}
  2363  	if err := g.client.Call("Plugin.GetChannelMembersForUser", _args, _returns); err != nil {
  2364  		log.Printf("RPC call to GetChannelMembersForUser API failed: %s", err.Error())
  2365  	}
  2366  	return _returns.A, _returns.B
  2367  }
  2368  
  2369  func (s *apiRPCServer) GetChannelMembersForUser(args *Z_GetChannelMembersForUserArgs, returns *Z_GetChannelMembersForUserReturns) error {
  2370  	if hook, ok := s.impl.(interface {
  2371  		GetChannelMembersForUser(teamId, userId string, page, perPage int) ([]*model.ChannelMember, *model.AppError)
  2372  	}); ok {
  2373  		returns.A, returns.B = hook.GetChannelMembersForUser(args.A, args.B, args.C, args.D)
  2374  	} else {
  2375  		return encodableError(fmt.Errorf("API GetChannelMembersForUser called but not implemented."))
  2376  	}
  2377  	return nil
  2378  }
  2379  
  2380  type Z_UpdateChannelMemberRolesArgs struct {
  2381  	A string
  2382  	B string
  2383  	C string
  2384  }
  2385  
  2386  type Z_UpdateChannelMemberRolesReturns struct {
  2387  	A *model.ChannelMember
  2388  	B *model.AppError
  2389  }
  2390  
  2391  func (g *apiRPCClient) UpdateChannelMemberRoles(channelId, userId, newRoles string) (*model.ChannelMember, *model.AppError) {
  2392  	_args := &Z_UpdateChannelMemberRolesArgs{channelId, userId, newRoles}
  2393  	_returns := &Z_UpdateChannelMemberRolesReturns{}
  2394  	if err := g.client.Call("Plugin.UpdateChannelMemberRoles", _args, _returns); err != nil {
  2395  		log.Printf("RPC call to UpdateChannelMemberRoles API failed: %s", err.Error())
  2396  	}
  2397  	return _returns.A, _returns.B
  2398  }
  2399  
  2400  func (s *apiRPCServer) UpdateChannelMemberRoles(args *Z_UpdateChannelMemberRolesArgs, returns *Z_UpdateChannelMemberRolesReturns) error {
  2401  	if hook, ok := s.impl.(interface {
  2402  		UpdateChannelMemberRoles(channelId, userId, newRoles string) (*model.ChannelMember, *model.AppError)
  2403  	}); ok {
  2404  		returns.A, returns.B = hook.UpdateChannelMemberRoles(args.A, args.B, args.C)
  2405  	} else {
  2406  		return encodableError(fmt.Errorf("API UpdateChannelMemberRoles called but not implemented."))
  2407  	}
  2408  	return nil
  2409  }
  2410  
  2411  type Z_UpdateChannelMemberNotificationsArgs struct {
  2412  	A string
  2413  	B string
  2414  	C map[string]string
  2415  }
  2416  
  2417  type Z_UpdateChannelMemberNotificationsReturns struct {
  2418  	A *model.ChannelMember
  2419  	B *model.AppError
  2420  }
  2421  
  2422  func (g *apiRPCClient) UpdateChannelMemberNotifications(channelId, userId string, notifications map[string]string) (*model.ChannelMember, *model.AppError) {
  2423  	_args := &Z_UpdateChannelMemberNotificationsArgs{channelId, userId, notifications}
  2424  	_returns := &Z_UpdateChannelMemberNotificationsReturns{}
  2425  	if err := g.client.Call("Plugin.UpdateChannelMemberNotifications", _args, _returns); err != nil {
  2426  		log.Printf("RPC call to UpdateChannelMemberNotifications API failed: %s", err.Error())
  2427  	}
  2428  	return _returns.A, _returns.B
  2429  }
  2430  
  2431  func (s *apiRPCServer) UpdateChannelMemberNotifications(args *Z_UpdateChannelMemberNotificationsArgs, returns *Z_UpdateChannelMemberNotificationsReturns) error {
  2432  	if hook, ok := s.impl.(interface {
  2433  		UpdateChannelMemberNotifications(channelId, userId string, notifications map[string]string) (*model.ChannelMember, *model.AppError)
  2434  	}); ok {
  2435  		returns.A, returns.B = hook.UpdateChannelMemberNotifications(args.A, args.B, args.C)
  2436  	} else {
  2437  		return encodableError(fmt.Errorf("API UpdateChannelMemberNotifications called but not implemented."))
  2438  	}
  2439  	return nil
  2440  }
  2441  
  2442  type Z_DeleteChannelMemberArgs struct {
  2443  	A string
  2444  	B string
  2445  }
  2446  
  2447  type Z_DeleteChannelMemberReturns struct {
  2448  	A *model.AppError
  2449  }
  2450  
  2451  func (g *apiRPCClient) DeleteChannelMember(channelId, userId string) *model.AppError {
  2452  	_args := &Z_DeleteChannelMemberArgs{channelId, userId}
  2453  	_returns := &Z_DeleteChannelMemberReturns{}
  2454  	if err := g.client.Call("Plugin.DeleteChannelMember", _args, _returns); err != nil {
  2455  		log.Printf("RPC call to DeleteChannelMember API failed: %s", err.Error())
  2456  	}
  2457  	return _returns.A
  2458  }
  2459  
  2460  func (s *apiRPCServer) DeleteChannelMember(args *Z_DeleteChannelMemberArgs, returns *Z_DeleteChannelMemberReturns) error {
  2461  	if hook, ok := s.impl.(interface {
  2462  		DeleteChannelMember(channelId, userId string) *model.AppError
  2463  	}); ok {
  2464  		returns.A = hook.DeleteChannelMember(args.A, args.B)
  2465  	} else {
  2466  		return encodableError(fmt.Errorf("API DeleteChannelMember called but not implemented."))
  2467  	}
  2468  	return nil
  2469  }
  2470  
  2471  type Z_CreatePostArgs struct {
  2472  	A *model.Post
  2473  }
  2474  
  2475  type Z_CreatePostReturns struct {
  2476  	A *model.Post
  2477  	B *model.AppError
  2478  }
  2479  
  2480  func (g *apiRPCClient) CreatePost(post *model.Post) (*model.Post, *model.AppError) {
  2481  	_args := &Z_CreatePostArgs{post}
  2482  	_returns := &Z_CreatePostReturns{}
  2483  	if err := g.client.Call("Plugin.CreatePost", _args, _returns); err != nil {
  2484  		log.Printf("RPC call to CreatePost API failed: %s", err.Error())
  2485  	}
  2486  	return _returns.A, _returns.B
  2487  }
  2488  
  2489  func (s *apiRPCServer) CreatePost(args *Z_CreatePostArgs, returns *Z_CreatePostReturns) error {
  2490  	if hook, ok := s.impl.(interface {
  2491  		CreatePost(post *model.Post) (*model.Post, *model.AppError)
  2492  	}); ok {
  2493  		returns.A, returns.B = hook.CreatePost(args.A)
  2494  	} else {
  2495  		return encodableError(fmt.Errorf("API CreatePost called but not implemented."))
  2496  	}
  2497  	return nil
  2498  }
  2499  
  2500  type Z_AddReactionArgs struct {
  2501  	A *model.Reaction
  2502  }
  2503  
  2504  type Z_AddReactionReturns struct {
  2505  	A *model.Reaction
  2506  	B *model.AppError
  2507  }
  2508  
  2509  func (g *apiRPCClient) AddReaction(reaction *model.Reaction) (*model.Reaction, *model.AppError) {
  2510  	_args := &Z_AddReactionArgs{reaction}
  2511  	_returns := &Z_AddReactionReturns{}
  2512  	if err := g.client.Call("Plugin.AddReaction", _args, _returns); err != nil {
  2513  		log.Printf("RPC call to AddReaction API failed: %s", err.Error())
  2514  	}
  2515  	return _returns.A, _returns.B
  2516  }
  2517  
  2518  func (s *apiRPCServer) AddReaction(args *Z_AddReactionArgs, returns *Z_AddReactionReturns) error {
  2519  	if hook, ok := s.impl.(interface {
  2520  		AddReaction(reaction *model.Reaction) (*model.Reaction, *model.AppError)
  2521  	}); ok {
  2522  		returns.A, returns.B = hook.AddReaction(args.A)
  2523  	} else {
  2524  		return encodableError(fmt.Errorf("API AddReaction called but not implemented."))
  2525  	}
  2526  	return nil
  2527  }
  2528  
  2529  type Z_RemoveReactionArgs struct {
  2530  	A *model.Reaction
  2531  }
  2532  
  2533  type Z_RemoveReactionReturns struct {
  2534  	A *model.AppError
  2535  }
  2536  
  2537  func (g *apiRPCClient) RemoveReaction(reaction *model.Reaction) *model.AppError {
  2538  	_args := &Z_RemoveReactionArgs{reaction}
  2539  	_returns := &Z_RemoveReactionReturns{}
  2540  	if err := g.client.Call("Plugin.RemoveReaction", _args, _returns); err != nil {
  2541  		log.Printf("RPC call to RemoveReaction API failed: %s", err.Error())
  2542  	}
  2543  	return _returns.A
  2544  }
  2545  
  2546  func (s *apiRPCServer) RemoveReaction(args *Z_RemoveReactionArgs, returns *Z_RemoveReactionReturns) error {
  2547  	if hook, ok := s.impl.(interface {
  2548  		RemoveReaction(reaction *model.Reaction) *model.AppError
  2549  	}); ok {
  2550  		returns.A = hook.RemoveReaction(args.A)
  2551  	} else {
  2552  		return encodableError(fmt.Errorf("API RemoveReaction called but not implemented."))
  2553  	}
  2554  	return nil
  2555  }
  2556  
  2557  type Z_GetReactionsArgs struct {
  2558  	A string
  2559  }
  2560  
  2561  type Z_GetReactionsReturns struct {
  2562  	A []*model.Reaction
  2563  	B *model.AppError
  2564  }
  2565  
  2566  func (g *apiRPCClient) GetReactions(postId string) ([]*model.Reaction, *model.AppError) {
  2567  	_args := &Z_GetReactionsArgs{postId}
  2568  	_returns := &Z_GetReactionsReturns{}
  2569  	if err := g.client.Call("Plugin.GetReactions", _args, _returns); err != nil {
  2570  		log.Printf("RPC call to GetReactions API failed: %s", err.Error())
  2571  	}
  2572  	return _returns.A, _returns.B
  2573  }
  2574  
  2575  func (s *apiRPCServer) GetReactions(args *Z_GetReactionsArgs, returns *Z_GetReactionsReturns) error {
  2576  	if hook, ok := s.impl.(interface {
  2577  		GetReactions(postId string) ([]*model.Reaction, *model.AppError)
  2578  	}); ok {
  2579  		returns.A, returns.B = hook.GetReactions(args.A)
  2580  	} else {
  2581  		return encodableError(fmt.Errorf("API GetReactions called but not implemented."))
  2582  	}
  2583  	return nil
  2584  }
  2585  
  2586  type Z_SendEphemeralPostArgs struct {
  2587  	A string
  2588  	B *model.Post
  2589  }
  2590  
  2591  type Z_SendEphemeralPostReturns struct {
  2592  	A *model.Post
  2593  }
  2594  
  2595  func (g *apiRPCClient) SendEphemeralPost(userId string, post *model.Post) *model.Post {
  2596  	_args := &Z_SendEphemeralPostArgs{userId, post}
  2597  	_returns := &Z_SendEphemeralPostReturns{}
  2598  	if err := g.client.Call("Plugin.SendEphemeralPost", _args, _returns); err != nil {
  2599  		log.Printf("RPC call to SendEphemeralPost API failed: %s", err.Error())
  2600  	}
  2601  	return _returns.A
  2602  }
  2603  
  2604  func (s *apiRPCServer) SendEphemeralPost(args *Z_SendEphemeralPostArgs, returns *Z_SendEphemeralPostReturns) error {
  2605  	if hook, ok := s.impl.(interface {
  2606  		SendEphemeralPost(userId string, post *model.Post) *model.Post
  2607  	}); ok {
  2608  		returns.A = hook.SendEphemeralPost(args.A, args.B)
  2609  	} else {
  2610  		return encodableError(fmt.Errorf("API SendEphemeralPost called but not implemented."))
  2611  	}
  2612  	return nil
  2613  }
  2614  
  2615  type Z_UpdateEphemeralPostArgs struct {
  2616  	A string
  2617  	B *model.Post
  2618  }
  2619  
  2620  type Z_UpdateEphemeralPostReturns struct {
  2621  	A *model.Post
  2622  }
  2623  
  2624  func (g *apiRPCClient) UpdateEphemeralPost(userId string, post *model.Post) *model.Post {
  2625  	_args := &Z_UpdateEphemeralPostArgs{userId, post}
  2626  	_returns := &Z_UpdateEphemeralPostReturns{}
  2627  	if err := g.client.Call("Plugin.UpdateEphemeralPost", _args, _returns); err != nil {
  2628  		log.Printf("RPC call to UpdateEphemeralPost API failed: %s", err.Error())
  2629  	}
  2630  	return _returns.A
  2631  }
  2632  
  2633  func (s *apiRPCServer) UpdateEphemeralPost(args *Z_UpdateEphemeralPostArgs, returns *Z_UpdateEphemeralPostReturns) error {
  2634  	if hook, ok := s.impl.(interface {
  2635  		UpdateEphemeralPost(userId string, post *model.Post) *model.Post
  2636  	}); ok {
  2637  		returns.A = hook.UpdateEphemeralPost(args.A, args.B)
  2638  	} else {
  2639  		return encodableError(fmt.Errorf("API UpdateEphemeralPost called but not implemented."))
  2640  	}
  2641  	return nil
  2642  }
  2643  
  2644  type Z_DeleteEphemeralPostArgs struct {
  2645  	A string
  2646  	B *model.Post
  2647  }
  2648  
  2649  type Z_DeleteEphemeralPostReturns struct {
  2650  }
  2651  
  2652  func (g *apiRPCClient) DeleteEphemeralPost(userId string, post *model.Post) {
  2653  	_args := &Z_DeleteEphemeralPostArgs{userId, post}
  2654  	_returns := &Z_DeleteEphemeralPostReturns{}
  2655  	if err := g.client.Call("Plugin.DeleteEphemeralPost", _args, _returns); err != nil {
  2656  		log.Printf("RPC call to DeleteEphemeralPost API failed: %s", err.Error())
  2657  	}
  2658  
  2659  }
  2660  
  2661  func (s *apiRPCServer) DeleteEphemeralPost(args *Z_DeleteEphemeralPostArgs, returns *Z_DeleteEphemeralPostReturns) error {
  2662  	if hook, ok := s.impl.(interface {
  2663  		DeleteEphemeralPost(userId string, post *model.Post)
  2664  	}); ok {
  2665  		hook.DeleteEphemeralPost(args.A, args.B)
  2666  	} else {
  2667  		return encodableError(fmt.Errorf("API DeleteEphemeralPost called but not implemented."))
  2668  	}
  2669  	return nil
  2670  }
  2671  
  2672  type Z_DeletePostArgs struct {
  2673  	A string
  2674  }
  2675  
  2676  type Z_DeletePostReturns struct {
  2677  	A *model.AppError
  2678  }
  2679  
  2680  func (g *apiRPCClient) DeletePost(postId string) *model.AppError {
  2681  	_args := &Z_DeletePostArgs{postId}
  2682  	_returns := &Z_DeletePostReturns{}
  2683  	if err := g.client.Call("Plugin.DeletePost", _args, _returns); err != nil {
  2684  		log.Printf("RPC call to DeletePost API failed: %s", err.Error())
  2685  	}
  2686  	return _returns.A
  2687  }
  2688  
  2689  func (s *apiRPCServer) DeletePost(args *Z_DeletePostArgs, returns *Z_DeletePostReturns) error {
  2690  	if hook, ok := s.impl.(interface {
  2691  		DeletePost(postId string) *model.AppError
  2692  	}); ok {
  2693  		returns.A = hook.DeletePost(args.A)
  2694  	} else {
  2695  		return encodableError(fmt.Errorf("API DeletePost called but not implemented."))
  2696  	}
  2697  	return nil
  2698  }
  2699  
  2700  type Z_GetPostThreadArgs struct {
  2701  	A string
  2702  }
  2703  
  2704  type Z_GetPostThreadReturns struct {
  2705  	A *model.PostList
  2706  	B *model.AppError
  2707  }
  2708  
  2709  func (g *apiRPCClient) GetPostThread(postId string) (*model.PostList, *model.AppError) {
  2710  	_args := &Z_GetPostThreadArgs{postId}
  2711  	_returns := &Z_GetPostThreadReturns{}
  2712  	if err := g.client.Call("Plugin.GetPostThread", _args, _returns); err != nil {
  2713  		log.Printf("RPC call to GetPostThread API failed: %s", err.Error())
  2714  	}
  2715  	return _returns.A, _returns.B
  2716  }
  2717  
  2718  func (s *apiRPCServer) GetPostThread(args *Z_GetPostThreadArgs, returns *Z_GetPostThreadReturns) error {
  2719  	if hook, ok := s.impl.(interface {
  2720  		GetPostThread(postId string) (*model.PostList, *model.AppError)
  2721  	}); ok {
  2722  		returns.A, returns.B = hook.GetPostThread(args.A)
  2723  	} else {
  2724  		return encodableError(fmt.Errorf("API GetPostThread called but not implemented."))
  2725  	}
  2726  	return nil
  2727  }
  2728  
  2729  type Z_GetPostArgs struct {
  2730  	A string
  2731  }
  2732  
  2733  type Z_GetPostReturns struct {
  2734  	A *model.Post
  2735  	B *model.AppError
  2736  }
  2737  
  2738  func (g *apiRPCClient) GetPost(postId string) (*model.Post, *model.AppError) {
  2739  	_args := &Z_GetPostArgs{postId}
  2740  	_returns := &Z_GetPostReturns{}
  2741  	if err := g.client.Call("Plugin.GetPost", _args, _returns); err != nil {
  2742  		log.Printf("RPC call to GetPost API failed: %s", err.Error())
  2743  	}
  2744  	return _returns.A, _returns.B
  2745  }
  2746  
  2747  func (s *apiRPCServer) GetPost(args *Z_GetPostArgs, returns *Z_GetPostReturns) error {
  2748  	if hook, ok := s.impl.(interface {
  2749  		GetPost(postId string) (*model.Post, *model.AppError)
  2750  	}); ok {
  2751  		returns.A, returns.B = hook.GetPost(args.A)
  2752  	} else {
  2753  		return encodableError(fmt.Errorf("API GetPost called but not implemented."))
  2754  	}
  2755  	return nil
  2756  }
  2757  
  2758  type Z_GetPostsSinceArgs struct {
  2759  	A string
  2760  	B int64
  2761  }
  2762  
  2763  type Z_GetPostsSinceReturns struct {
  2764  	A *model.PostList
  2765  	B *model.AppError
  2766  }
  2767  
  2768  func (g *apiRPCClient) GetPostsSince(channelId string, time int64) (*model.PostList, *model.AppError) {
  2769  	_args := &Z_GetPostsSinceArgs{channelId, time}
  2770  	_returns := &Z_GetPostsSinceReturns{}
  2771  	if err := g.client.Call("Plugin.GetPostsSince", _args, _returns); err != nil {
  2772  		log.Printf("RPC call to GetPostsSince API failed: %s", err.Error())
  2773  	}
  2774  	return _returns.A, _returns.B
  2775  }
  2776  
  2777  func (s *apiRPCServer) GetPostsSince(args *Z_GetPostsSinceArgs, returns *Z_GetPostsSinceReturns) error {
  2778  	if hook, ok := s.impl.(interface {
  2779  		GetPostsSince(channelId string, time int64) (*model.PostList, *model.AppError)
  2780  	}); ok {
  2781  		returns.A, returns.B = hook.GetPostsSince(args.A, args.B)
  2782  	} else {
  2783  		return encodableError(fmt.Errorf("API GetPostsSince called but not implemented."))
  2784  	}
  2785  	return nil
  2786  }
  2787  
  2788  type Z_GetPostsAfterArgs struct {
  2789  	A string
  2790  	B string
  2791  	C int
  2792  	D int
  2793  }
  2794  
  2795  type Z_GetPostsAfterReturns struct {
  2796  	A *model.PostList
  2797  	B *model.AppError
  2798  }
  2799  
  2800  func (g *apiRPCClient) GetPostsAfter(channelId, postId string, page, perPage int) (*model.PostList, *model.AppError) {
  2801  	_args := &Z_GetPostsAfterArgs{channelId, postId, page, perPage}
  2802  	_returns := &Z_GetPostsAfterReturns{}
  2803  	if err := g.client.Call("Plugin.GetPostsAfter", _args, _returns); err != nil {
  2804  		log.Printf("RPC call to GetPostsAfter API failed: %s", err.Error())
  2805  	}
  2806  	return _returns.A, _returns.B
  2807  }
  2808  
  2809  func (s *apiRPCServer) GetPostsAfter(args *Z_GetPostsAfterArgs, returns *Z_GetPostsAfterReturns) error {
  2810  	if hook, ok := s.impl.(interface {
  2811  		GetPostsAfter(channelId, postId string, page, perPage int) (*model.PostList, *model.AppError)
  2812  	}); ok {
  2813  		returns.A, returns.B = hook.GetPostsAfter(args.A, args.B, args.C, args.D)
  2814  	} else {
  2815  		return encodableError(fmt.Errorf("API GetPostsAfter called but not implemented."))
  2816  	}
  2817  	return nil
  2818  }
  2819  
  2820  type Z_GetPostsBeforeArgs struct {
  2821  	A string
  2822  	B string
  2823  	C int
  2824  	D int
  2825  }
  2826  
  2827  type Z_GetPostsBeforeReturns struct {
  2828  	A *model.PostList
  2829  	B *model.AppError
  2830  }
  2831  
  2832  func (g *apiRPCClient) GetPostsBefore(channelId, postId string, page, perPage int) (*model.PostList, *model.AppError) {
  2833  	_args := &Z_GetPostsBeforeArgs{channelId, postId, page, perPage}
  2834  	_returns := &Z_GetPostsBeforeReturns{}
  2835  	if err := g.client.Call("Plugin.GetPostsBefore", _args, _returns); err != nil {
  2836  		log.Printf("RPC call to GetPostsBefore API failed: %s", err.Error())
  2837  	}
  2838  	return _returns.A, _returns.B
  2839  }
  2840  
  2841  func (s *apiRPCServer) GetPostsBefore(args *Z_GetPostsBeforeArgs, returns *Z_GetPostsBeforeReturns) error {
  2842  	if hook, ok := s.impl.(interface {
  2843  		GetPostsBefore(channelId, postId string, page, perPage int) (*model.PostList, *model.AppError)
  2844  	}); ok {
  2845  		returns.A, returns.B = hook.GetPostsBefore(args.A, args.B, args.C, args.D)
  2846  	} else {
  2847  		return encodableError(fmt.Errorf("API GetPostsBefore called but not implemented."))
  2848  	}
  2849  	return nil
  2850  }
  2851  
  2852  type Z_GetPostsForChannelArgs struct {
  2853  	A string
  2854  	B int
  2855  	C int
  2856  }
  2857  
  2858  type Z_GetPostsForChannelReturns struct {
  2859  	A *model.PostList
  2860  	B *model.AppError
  2861  }
  2862  
  2863  func (g *apiRPCClient) GetPostsForChannel(channelId string, page, perPage int) (*model.PostList, *model.AppError) {
  2864  	_args := &Z_GetPostsForChannelArgs{channelId, page, perPage}
  2865  	_returns := &Z_GetPostsForChannelReturns{}
  2866  	if err := g.client.Call("Plugin.GetPostsForChannel", _args, _returns); err != nil {
  2867  		log.Printf("RPC call to GetPostsForChannel API failed: %s", err.Error())
  2868  	}
  2869  	return _returns.A, _returns.B
  2870  }
  2871  
  2872  func (s *apiRPCServer) GetPostsForChannel(args *Z_GetPostsForChannelArgs, returns *Z_GetPostsForChannelReturns) error {
  2873  	if hook, ok := s.impl.(interface {
  2874  		GetPostsForChannel(channelId string, page, perPage int) (*model.PostList, *model.AppError)
  2875  	}); ok {
  2876  		returns.A, returns.B = hook.GetPostsForChannel(args.A, args.B, args.C)
  2877  	} else {
  2878  		return encodableError(fmt.Errorf("API GetPostsForChannel called but not implemented."))
  2879  	}
  2880  	return nil
  2881  }
  2882  
  2883  type Z_GetTeamStatsArgs struct {
  2884  	A string
  2885  }
  2886  
  2887  type Z_GetTeamStatsReturns struct {
  2888  	A *model.TeamStats
  2889  	B *model.AppError
  2890  }
  2891  
  2892  func (g *apiRPCClient) GetTeamStats(teamId string) (*model.TeamStats, *model.AppError) {
  2893  	_args := &Z_GetTeamStatsArgs{teamId}
  2894  	_returns := &Z_GetTeamStatsReturns{}
  2895  	if err := g.client.Call("Plugin.GetTeamStats", _args, _returns); err != nil {
  2896  		log.Printf("RPC call to GetTeamStats API failed: %s", err.Error())
  2897  	}
  2898  	return _returns.A, _returns.B
  2899  }
  2900  
  2901  func (s *apiRPCServer) GetTeamStats(args *Z_GetTeamStatsArgs, returns *Z_GetTeamStatsReturns) error {
  2902  	if hook, ok := s.impl.(interface {
  2903  		GetTeamStats(teamId string) (*model.TeamStats, *model.AppError)
  2904  	}); ok {
  2905  		returns.A, returns.B = hook.GetTeamStats(args.A)
  2906  	} else {
  2907  		return encodableError(fmt.Errorf("API GetTeamStats called but not implemented."))
  2908  	}
  2909  	return nil
  2910  }
  2911  
  2912  type Z_UpdatePostArgs struct {
  2913  	A *model.Post
  2914  }
  2915  
  2916  type Z_UpdatePostReturns struct {
  2917  	A *model.Post
  2918  	B *model.AppError
  2919  }
  2920  
  2921  func (g *apiRPCClient) UpdatePost(post *model.Post) (*model.Post, *model.AppError) {
  2922  	_args := &Z_UpdatePostArgs{post}
  2923  	_returns := &Z_UpdatePostReturns{}
  2924  	if err := g.client.Call("Plugin.UpdatePost", _args, _returns); err != nil {
  2925  		log.Printf("RPC call to UpdatePost API failed: %s", err.Error())
  2926  	}
  2927  	return _returns.A, _returns.B
  2928  }
  2929  
  2930  func (s *apiRPCServer) UpdatePost(args *Z_UpdatePostArgs, returns *Z_UpdatePostReturns) error {
  2931  	if hook, ok := s.impl.(interface {
  2932  		UpdatePost(post *model.Post) (*model.Post, *model.AppError)
  2933  	}); ok {
  2934  		returns.A, returns.B = hook.UpdatePost(args.A)
  2935  	} else {
  2936  		return encodableError(fmt.Errorf("API UpdatePost called but not implemented."))
  2937  	}
  2938  	return nil
  2939  }
  2940  
  2941  type Z_GetProfileImageArgs struct {
  2942  	A string
  2943  }
  2944  
  2945  type Z_GetProfileImageReturns struct {
  2946  	A []byte
  2947  	B *model.AppError
  2948  }
  2949  
  2950  func (g *apiRPCClient) GetProfileImage(userId string) ([]byte, *model.AppError) {
  2951  	_args := &Z_GetProfileImageArgs{userId}
  2952  	_returns := &Z_GetProfileImageReturns{}
  2953  	if err := g.client.Call("Plugin.GetProfileImage", _args, _returns); err != nil {
  2954  		log.Printf("RPC call to GetProfileImage API failed: %s", err.Error())
  2955  	}
  2956  	return _returns.A, _returns.B
  2957  }
  2958  
  2959  func (s *apiRPCServer) GetProfileImage(args *Z_GetProfileImageArgs, returns *Z_GetProfileImageReturns) error {
  2960  	if hook, ok := s.impl.(interface {
  2961  		GetProfileImage(userId string) ([]byte, *model.AppError)
  2962  	}); ok {
  2963  		returns.A, returns.B = hook.GetProfileImage(args.A)
  2964  	} else {
  2965  		return encodableError(fmt.Errorf("API GetProfileImage called but not implemented."))
  2966  	}
  2967  	return nil
  2968  }
  2969  
  2970  type Z_SetProfileImageArgs struct {
  2971  	A string
  2972  	B []byte
  2973  }
  2974  
  2975  type Z_SetProfileImageReturns struct {
  2976  	A *model.AppError
  2977  }
  2978  
  2979  func (g *apiRPCClient) SetProfileImage(userId string, data []byte) *model.AppError {
  2980  	_args := &Z_SetProfileImageArgs{userId, data}
  2981  	_returns := &Z_SetProfileImageReturns{}
  2982  	if err := g.client.Call("Plugin.SetProfileImage", _args, _returns); err != nil {
  2983  		log.Printf("RPC call to SetProfileImage API failed: %s", err.Error())
  2984  	}
  2985  	return _returns.A
  2986  }
  2987  
  2988  func (s *apiRPCServer) SetProfileImage(args *Z_SetProfileImageArgs, returns *Z_SetProfileImageReturns) error {
  2989  	if hook, ok := s.impl.(interface {
  2990  		SetProfileImage(userId string, data []byte) *model.AppError
  2991  	}); ok {
  2992  		returns.A = hook.SetProfileImage(args.A, args.B)
  2993  	} else {
  2994  		return encodableError(fmt.Errorf("API SetProfileImage called but not implemented."))
  2995  	}
  2996  	return nil
  2997  }
  2998  
  2999  type Z_GetEmojiListArgs struct {
  3000  	A string
  3001  	B int
  3002  	C int
  3003  }
  3004  
  3005  type Z_GetEmojiListReturns struct {
  3006  	A []*model.Emoji
  3007  	B *model.AppError
  3008  }
  3009  
  3010  func (g *apiRPCClient) GetEmojiList(sortBy string, page, perPage int) ([]*model.Emoji, *model.AppError) {
  3011  	_args := &Z_GetEmojiListArgs{sortBy, page, perPage}
  3012  	_returns := &Z_GetEmojiListReturns{}
  3013  	if err := g.client.Call("Plugin.GetEmojiList", _args, _returns); err != nil {
  3014  		log.Printf("RPC call to GetEmojiList API failed: %s", err.Error())
  3015  	}
  3016  	return _returns.A, _returns.B
  3017  }
  3018  
  3019  func (s *apiRPCServer) GetEmojiList(args *Z_GetEmojiListArgs, returns *Z_GetEmojiListReturns) error {
  3020  	if hook, ok := s.impl.(interface {
  3021  		GetEmojiList(sortBy string, page, perPage int) ([]*model.Emoji, *model.AppError)
  3022  	}); ok {
  3023  		returns.A, returns.B = hook.GetEmojiList(args.A, args.B, args.C)
  3024  	} else {
  3025  		return encodableError(fmt.Errorf("API GetEmojiList called but not implemented."))
  3026  	}
  3027  	return nil
  3028  }
  3029  
  3030  type Z_GetEmojiByNameArgs struct {
  3031  	A string
  3032  }
  3033  
  3034  type Z_GetEmojiByNameReturns struct {
  3035  	A *model.Emoji
  3036  	B *model.AppError
  3037  }
  3038  
  3039  func (g *apiRPCClient) GetEmojiByName(name string) (*model.Emoji, *model.AppError) {
  3040  	_args := &Z_GetEmojiByNameArgs{name}
  3041  	_returns := &Z_GetEmojiByNameReturns{}
  3042  	if err := g.client.Call("Plugin.GetEmojiByName", _args, _returns); err != nil {
  3043  		log.Printf("RPC call to GetEmojiByName API failed: %s", err.Error())
  3044  	}
  3045  	return _returns.A, _returns.B
  3046  }
  3047  
  3048  func (s *apiRPCServer) GetEmojiByName(args *Z_GetEmojiByNameArgs, returns *Z_GetEmojiByNameReturns) error {
  3049  	if hook, ok := s.impl.(interface {
  3050  		GetEmojiByName(name string) (*model.Emoji, *model.AppError)
  3051  	}); ok {
  3052  		returns.A, returns.B = hook.GetEmojiByName(args.A)
  3053  	} else {
  3054  		return encodableError(fmt.Errorf("API GetEmojiByName called but not implemented."))
  3055  	}
  3056  	return nil
  3057  }
  3058  
  3059  type Z_GetEmojiArgs struct {
  3060  	A string
  3061  }
  3062  
  3063  type Z_GetEmojiReturns struct {
  3064  	A *model.Emoji
  3065  	B *model.AppError
  3066  }
  3067  
  3068  func (g *apiRPCClient) GetEmoji(emojiId string) (*model.Emoji, *model.AppError) {
  3069  	_args := &Z_GetEmojiArgs{emojiId}
  3070  	_returns := &Z_GetEmojiReturns{}
  3071  	if err := g.client.Call("Plugin.GetEmoji", _args, _returns); err != nil {
  3072  		log.Printf("RPC call to GetEmoji API failed: %s", err.Error())
  3073  	}
  3074  	return _returns.A, _returns.B
  3075  }
  3076  
  3077  func (s *apiRPCServer) GetEmoji(args *Z_GetEmojiArgs, returns *Z_GetEmojiReturns) error {
  3078  	if hook, ok := s.impl.(interface {
  3079  		GetEmoji(emojiId string) (*model.Emoji, *model.AppError)
  3080  	}); ok {
  3081  		returns.A, returns.B = hook.GetEmoji(args.A)
  3082  	} else {
  3083  		return encodableError(fmt.Errorf("API GetEmoji called but not implemented."))
  3084  	}
  3085  	return nil
  3086  }
  3087  
  3088  type Z_CopyFileInfosArgs struct {
  3089  	A string
  3090  	B []string
  3091  }
  3092  
  3093  type Z_CopyFileInfosReturns struct {
  3094  	A []string
  3095  	B *model.AppError
  3096  }
  3097  
  3098  func (g *apiRPCClient) CopyFileInfos(userId string, fileIds []string) ([]string, *model.AppError) {
  3099  	_args := &Z_CopyFileInfosArgs{userId, fileIds}
  3100  	_returns := &Z_CopyFileInfosReturns{}
  3101  	if err := g.client.Call("Plugin.CopyFileInfos", _args, _returns); err != nil {
  3102  		log.Printf("RPC call to CopyFileInfos API failed: %s", err.Error())
  3103  	}
  3104  	return _returns.A, _returns.B
  3105  }
  3106  
  3107  func (s *apiRPCServer) CopyFileInfos(args *Z_CopyFileInfosArgs, returns *Z_CopyFileInfosReturns) error {
  3108  	if hook, ok := s.impl.(interface {
  3109  		CopyFileInfos(userId string, fileIds []string) ([]string, *model.AppError)
  3110  	}); ok {
  3111  		returns.A, returns.B = hook.CopyFileInfos(args.A, args.B)
  3112  	} else {
  3113  		return encodableError(fmt.Errorf("API CopyFileInfos called but not implemented."))
  3114  	}
  3115  	return nil
  3116  }
  3117  
  3118  type Z_GetFileInfoArgs struct {
  3119  	A string
  3120  }
  3121  
  3122  type Z_GetFileInfoReturns struct {
  3123  	A *model.FileInfo
  3124  	B *model.AppError
  3125  }
  3126  
  3127  func (g *apiRPCClient) GetFileInfo(fileId string) (*model.FileInfo, *model.AppError) {
  3128  	_args := &Z_GetFileInfoArgs{fileId}
  3129  	_returns := &Z_GetFileInfoReturns{}
  3130  	if err := g.client.Call("Plugin.GetFileInfo", _args, _returns); err != nil {
  3131  		log.Printf("RPC call to GetFileInfo API failed: %s", err.Error())
  3132  	}
  3133  	return _returns.A, _returns.B
  3134  }
  3135  
  3136  func (s *apiRPCServer) GetFileInfo(args *Z_GetFileInfoArgs, returns *Z_GetFileInfoReturns) error {
  3137  	if hook, ok := s.impl.(interface {
  3138  		GetFileInfo(fileId string) (*model.FileInfo, *model.AppError)
  3139  	}); ok {
  3140  		returns.A, returns.B = hook.GetFileInfo(args.A)
  3141  	} else {
  3142  		return encodableError(fmt.Errorf("API GetFileInfo called but not implemented."))
  3143  	}
  3144  	return nil
  3145  }
  3146  
  3147  type Z_GetFileArgs struct {
  3148  	A string
  3149  }
  3150  
  3151  type Z_GetFileReturns struct {
  3152  	A []byte
  3153  	B *model.AppError
  3154  }
  3155  
  3156  func (g *apiRPCClient) GetFile(fileId string) ([]byte, *model.AppError) {
  3157  	_args := &Z_GetFileArgs{fileId}
  3158  	_returns := &Z_GetFileReturns{}
  3159  	if err := g.client.Call("Plugin.GetFile", _args, _returns); err != nil {
  3160  		log.Printf("RPC call to GetFile API failed: %s", err.Error())
  3161  	}
  3162  	return _returns.A, _returns.B
  3163  }
  3164  
  3165  func (s *apiRPCServer) GetFile(args *Z_GetFileArgs, returns *Z_GetFileReturns) error {
  3166  	if hook, ok := s.impl.(interface {
  3167  		GetFile(fileId string) ([]byte, *model.AppError)
  3168  	}); ok {
  3169  		returns.A, returns.B = hook.GetFile(args.A)
  3170  	} else {
  3171  		return encodableError(fmt.Errorf("API GetFile called but not implemented."))
  3172  	}
  3173  	return nil
  3174  }
  3175  
  3176  type Z_GetFileLinkArgs struct {
  3177  	A string
  3178  }
  3179  
  3180  type Z_GetFileLinkReturns struct {
  3181  	A string
  3182  	B *model.AppError
  3183  }
  3184  
  3185  func (g *apiRPCClient) GetFileLink(fileId string) (string, *model.AppError) {
  3186  	_args := &Z_GetFileLinkArgs{fileId}
  3187  	_returns := &Z_GetFileLinkReturns{}
  3188  	if err := g.client.Call("Plugin.GetFileLink", _args, _returns); err != nil {
  3189  		log.Printf("RPC call to GetFileLink API failed: %s", err.Error())
  3190  	}
  3191  	return _returns.A, _returns.B
  3192  }
  3193  
  3194  func (s *apiRPCServer) GetFileLink(args *Z_GetFileLinkArgs, returns *Z_GetFileLinkReturns) error {
  3195  	if hook, ok := s.impl.(interface {
  3196  		GetFileLink(fileId string) (string, *model.AppError)
  3197  	}); ok {
  3198  		returns.A, returns.B = hook.GetFileLink(args.A)
  3199  	} else {
  3200  		return encodableError(fmt.Errorf("API GetFileLink called but not implemented."))
  3201  	}
  3202  	return nil
  3203  }
  3204  
  3205  type Z_ReadFileArgs struct {
  3206  	A string
  3207  }
  3208  
  3209  type Z_ReadFileReturns struct {
  3210  	A []byte
  3211  	B *model.AppError
  3212  }
  3213  
  3214  func (g *apiRPCClient) ReadFile(path string) ([]byte, *model.AppError) {
  3215  	_args := &Z_ReadFileArgs{path}
  3216  	_returns := &Z_ReadFileReturns{}
  3217  	if err := g.client.Call("Plugin.ReadFile", _args, _returns); err != nil {
  3218  		log.Printf("RPC call to ReadFile API failed: %s", err.Error())
  3219  	}
  3220  	return _returns.A, _returns.B
  3221  }
  3222  
  3223  func (s *apiRPCServer) ReadFile(args *Z_ReadFileArgs, returns *Z_ReadFileReturns) error {
  3224  	if hook, ok := s.impl.(interface {
  3225  		ReadFile(path string) ([]byte, *model.AppError)
  3226  	}); ok {
  3227  		returns.A, returns.B = hook.ReadFile(args.A)
  3228  	} else {
  3229  		return encodableError(fmt.Errorf("API ReadFile called but not implemented."))
  3230  	}
  3231  	return nil
  3232  }
  3233  
  3234  type Z_GetEmojiImageArgs struct {
  3235  	A string
  3236  }
  3237  
  3238  type Z_GetEmojiImageReturns struct {
  3239  	A []byte
  3240  	B string
  3241  	C *model.AppError
  3242  }
  3243  
  3244  func (g *apiRPCClient) GetEmojiImage(emojiId string) ([]byte, string, *model.AppError) {
  3245  	_args := &Z_GetEmojiImageArgs{emojiId}
  3246  	_returns := &Z_GetEmojiImageReturns{}
  3247  	if err := g.client.Call("Plugin.GetEmojiImage", _args, _returns); err != nil {
  3248  		log.Printf("RPC call to GetEmojiImage API failed: %s", err.Error())
  3249  	}
  3250  	return _returns.A, _returns.B, _returns.C
  3251  }
  3252  
  3253  func (s *apiRPCServer) GetEmojiImage(args *Z_GetEmojiImageArgs, returns *Z_GetEmojiImageReturns) error {
  3254  	if hook, ok := s.impl.(interface {
  3255  		GetEmojiImage(emojiId string) ([]byte, string, *model.AppError)
  3256  	}); ok {
  3257  		returns.A, returns.B, returns.C = hook.GetEmojiImage(args.A)
  3258  	} else {
  3259  		return encodableError(fmt.Errorf("API GetEmojiImage called but not implemented."))
  3260  	}
  3261  	return nil
  3262  }
  3263  
  3264  type Z_UploadFileArgs struct {
  3265  	A []byte
  3266  	B string
  3267  	C string
  3268  }
  3269  
  3270  type Z_UploadFileReturns struct {
  3271  	A *model.FileInfo
  3272  	B *model.AppError
  3273  }
  3274  
  3275  func (g *apiRPCClient) UploadFile(data []byte, channelId string, filename string) (*model.FileInfo, *model.AppError) {
  3276  	_args := &Z_UploadFileArgs{data, channelId, filename}
  3277  	_returns := &Z_UploadFileReturns{}
  3278  	if err := g.client.Call("Plugin.UploadFile", _args, _returns); err != nil {
  3279  		log.Printf("RPC call to UploadFile API failed: %s", err.Error())
  3280  	}
  3281  	return _returns.A, _returns.B
  3282  }
  3283  
  3284  func (s *apiRPCServer) UploadFile(args *Z_UploadFileArgs, returns *Z_UploadFileReturns) error {
  3285  	if hook, ok := s.impl.(interface {
  3286  		UploadFile(data []byte, channelId string, filename string) (*model.FileInfo, *model.AppError)
  3287  	}); ok {
  3288  		returns.A, returns.B = hook.UploadFile(args.A, args.B, args.C)
  3289  	} else {
  3290  		return encodableError(fmt.Errorf("API UploadFile called but not implemented."))
  3291  	}
  3292  	return nil
  3293  }
  3294  
  3295  type Z_OpenInteractiveDialogArgs struct {
  3296  	A model.OpenDialogRequest
  3297  }
  3298  
  3299  type Z_OpenInteractiveDialogReturns struct {
  3300  	A *model.AppError
  3301  }
  3302  
  3303  func (g *apiRPCClient) OpenInteractiveDialog(dialog model.OpenDialogRequest) *model.AppError {
  3304  	_args := &Z_OpenInteractiveDialogArgs{dialog}
  3305  	_returns := &Z_OpenInteractiveDialogReturns{}
  3306  	if err := g.client.Call("Plugin.OpenInteractiveDialog", _args, _returns); err != nil {
  3307  		log.Printf("RPC call to OpenInteractiveDialog API failed: %s", err.Error())
  3308  	}
  3309  	return _returns.A
  3310  }
  3311  
  3312  func (s *apiRPCServer) OpenInteractiveDialog(args *Z_OpenInteractiveDialogArgs, returns *Z_OpenInteractiveDialogReturns) error {
  3313  	if hook, ok := s.impl.(interface {
  3314  		OpenInteractiveDialog(dialog model.OpenDialogRequest) *model.AppError
  3315  	}); ok {
  3316  		returns.A = hook.OpenInteractiveDialog(args.A)
  3317  	} else {
  3318  		return encodableError(fmt.Errorf("API OpenInteractiveDialog called but not implemented."))
  3319  	}
  3320  	return nil
  3321  }
  3322  
  3323  type Z_GetPluginsArgs struct {
  3324  }
  3325  
  3326  type Z_GetPluginsReturns struct {
  3327  	A []*model.Manifest
  3328  	B *model.AppError
  3329  }
  3330  
  3331  func (g *apiRPCClient) GetPlugins() ([]*model.Manifest, *model.AppError) {
  3332  	_args := &Z_GetPluginsArgs{}
  3333  	_returns := &Z_GetPluginsReturns{}
  3334  	if err := g.client.Call("Plugin.GetPlugins", _args, _returns); err != nil {
  3335  		log.Printf("RPC call to GetPlugins API failed: %s", err.Error())
  3336  	}
  3337  	return _returns.A, _returns.B
  3338  }
  3339  
  3340  func (s *apiRPCServer) GetPlugins(args *Z_GetPluginsArgs, returns *Z_GetPluginsReturns) error {
  3341  	if hook, ok := s.impl.(interface {
  3342  		GetPlugins() ([]*model.Manifest, *model.AppError)
  3343  	}); ok {
  3344  		returns.A, returns.B = hook.GetPlugins()
  3345  	} else {
  3346  		return encodableError(fmt.Errorf("API GetPlugins called but not implemented."))
  3347  	}
  3348  	return nil
  3349  }
  3350  
  3351  type Z_EnablePluginArgs struct {
  3352  	A string
  3353  }
  3354  
  3355  type Z_EnablePluginReturns struct {
  3356  	A *model.AppError
  3357  }
  3358  
  3359  func (g *apiRPCClient) EnablePlugin(id string) *model.AppError {
  3360  	_args := &Z_EnablePluginArgs{id}
  3361  	_returns := &Z_EnablePluginReturns{}
  3362  	if err := g.client.Call("Plugin.EnablePlugin", _args, _returns); err != nil {
  3363  		log.Printf("RPC call to EnablePlugin API failed: %s", err.Error())
  3364  	}
  3365  	return _returns.A
  3366  }
  3367  
  3368  func (s *apiRPCServer) EnablePlugin(args *Z_EnablePluginArgs, returns *Z_EnablePluginReturns) error {
  3369  	if hook, ok := s.impl.(interface {
  3370  		EnablePlugin(id string) *model.AppError
  3371  	}); ok {
  3372  		returns.A = hook.EnablePlugin(args.A)
  3373  	} else {
  3374  		return encodableError(fmt.Errorf("API EnablePlugin called but not implemented."))
  3375  	}
  3376  	return nil
  3377  }
  3378  
  3379  type Z_DisablePluginArgs struct {
  3380  	A string
  3381  }
  3382  
  3383  type Z_DisablePluginReturns struct {
  3384  	A *model.AppError
  3385  }
  3386  
  3387  func (g *apiRPCClient) DisablePlugin(id string) *model.AppError {
  3388  	_args := &Z_DisablePluginArgs{id}
  3389  	_returns := &Z_DisablePluginReturns{}
  3390  	if err := g.client.Call("Plugin.DisablePlugin", _args, _returns); err != nil {
  3391  		log.Printf("RPC call to DisablePlugin API failed: %s", err.Error())
  3392  	}
  3393  	return _returns.A
  3394  }
  3395  
  3396  func (s *apiRPCServer) DisablePlugin(args *Z_DisablePluginArgs, returns *Z_DisablePluginReturns) error {
  3397  	if hook, ok := s.impl.(interface {
  3398  		DisablePlugin(id string) *model.AppError
  3399  	}); ok {
  3400  		returns.A = hook.DisablePlugin(args.A)
  3401  	} else {
  3402  		return encodableError(fmt.Errorf("API DisablePlugin called but not implemented."))
  3403  	}
  3404  	return nil
  3405  }
  3406  
  3407  type Z_RemovePluginArgs struct {
  3408  	A string
  3409  }
  3410  
  3411  type Z_RemovePluginReturns struct {
  3412  	A *model.AppError
  3413  }
  3414  
  3415  func (g *apiRPCClient) RemovePlugin(id string) *model.AppError {
  3416  	_args := &Z_RemovePluginArgs{id}
  3417  	_returns := &Z_RemovePluginReturns{}
  3418  	if err := g.client.Call("Plugin.RemovePlugin", _args, _returns); err != nil {
  3419  		log.Printf("RPC call to RemovePlugin API failed: %s", err.Error())
  3420  	}
  3421  	return _returns.A
  3422  }
  3423  
  3424  func (s *apiRPCServer) RemovePlugin(args *Z_RemovePluginArgs, returns *Z_RemovePluginReturns) error {
  3425  	if hook, ok := s.impl.(interface {
  3426  		RemovePlugin(id string) *model.AppError
  3427  	}); ok {
  3428  		returns.A = hook.RemovePlugin(args.A)
  3429  	} else {
  3430  		return encodableError(fmt.Errorf("API RemovePlugin called but not implemented."))
  3431  	}
  3432  	return nil
  3433  }
  3434  
  3435  type Z_GetPluginStatusArgs struct {
  3436  	A string
  3437  }
  3438  
  3439  type Z_GetPluginStatusReturns struct {
  3440  	A *model.PluginStatus
  3441  	B *model.AppError
  3442  }
  3443  
  3444  func (g *apiRPCClient) GetPluginStatus(id string) (*model.PluginStatus, *model.AppError) {
  3445  	_args := &Z_GetPluginStatusArgs{id}
  3446  	_returns := &Z_GetPluginStatusReturns{}
  3447  	if err := g.client.Call("Plugin.GetPluginStatus", _args, _returns); err != nil {
  3448  		log.Printf("RPC call to GetPluginStatus API failed: %s", err.Error())
  3449  	}
  3450  	return _returns.A, _returns.B
  3451  }
  3452  
  3453  func (s *apiRPCServer) GetPluginStatus(args *Z_GetPluginStatusArgs, returns *Z_GetPluginStatusReturns) error {
  3454  	if hook, ok := s.impl.(interface {
  3455  		GetPluginStatus(id string) (*model.PluginStatus, *model.AppError)
  3456  	}); ok {
  3457  		returns.A, returns.B = hook.GetPluginStatus(args.A)
  3458  	} else {
  3459  		return encodableError(fmt.Errorf("API GetPluginStatus called but not implemented."))
  3460  	}
  3461  	return nil
  3462  }
  3463  
  3464  type Z_KVSetArgs struct {
  3465  	A string
  3466  	B []byte
  3467  }
  3468  
  3469  type Z_KVSetReturns struct {
  3470  	A *model.AppError
  3471  }
  3472  
  3473  func (g *apiRPCClient) KVSet(key string, value []byte) *model.AppError {
  3474  	_args := &Z_KVSetArgs{key, value}
  3475  	_returns := &Z_KVSetReturns{}
  3476  	if err := g.client.Call("Plugin.KVSet", _args, _returns); err != nil {
  3477  		log.Printf("RPC call to KVSet API failed: %s", err.Error())
  3478  	}
  3479  	return _returns.A
  3480  }
  3481  
  3482  func (s *apiRPCServer) KVSet(args *Z_KVSetArgs, returns *Z_KVSetReturns) error {
  3483  	if hook, ok := s.impl.(interface {
  3484  		KVSet(key string, value []byte) *model.AppError
  3485  	}); ok {
  3486  		returns.A = hook.KVSet(args.A, args.B)
  3487  	} else {
  3488  		return encodableError(fmt.Errorf("API KVSet called but not implemented."))
  3489  	}
  3490  	return nil
  3491  }
  3492  
  3493  type Z_KVSetWithExpiryArgs struct {
  3494  	A string
  3495  	B []byte
  3496  	C int64
  3497  }
  3498  
  3499  type Z_KVSetWithExpiryReturns struct {
  3500  	A *model.AppError
  3501  }
  3502  
  3503  func (g *apiRPCClient) KVSetWithExpiry(key string, value []byte, expireInSeconds int64) *model.AppError {
  3504  	_args := &Z_KVSetWithExpiryArgs{key, value, expireInSeconds}
  3505  	_returns := &Z_KVSetWithExpiryReturns{}
  3506  	if err := g.client.Call("Plugin.KVSetWithExpiry", _args, _returns); err != nil {
  3507  		log.Printf("RPC call to KVSetWithExpiry API failed: %s", err.Error())
  3508  	}
  3509  	return _returns.A
  3510  }
  3511  
  3512  func (s *apiRPCServer) KVSetWithExpiry(args *Z_KVSetWithExpiryArgs, returns *Z_KVSetWithExpiryReturns) error {
  3513  	if hook, ok := s.impl.(interface {
  3514  		KVSetWithExpiry(key string, value []byte, expireInSeconds int64) *model.AppError
  3515  	}); ok {
  3516  		returns.A = hook.KVSetWithExpiry(args.A, args.B, args.C)
  3517  	} else {
  3518  		return encodableError(fmt.Errorf("API KVSetWithExpiry called but not implemented."))
  3519  	}
  3520  	return nil
  3521  }
  3522  
  3523  type Z_KVGetArgs struct {
  3524  	A string
  3525  }
  3526  
  3527  type Z_KVGetReturns struct {
  3528  	A []byte
  3529  	B *model.AppError
  3530  }
  3531  
  3532  func (g *apiRPCClient) KVGet(key string) ([]byte, *model.AppError) {
  3533  	_args := &Z_KVGetArgs{key}
  3534  	_returns := &Z_KVGetReturns{}
  3535  	if err := g.client.Call("Plugin.KVGet", _args, _returns); err != nil {
  3536  		log.Printf("RPC call to KVGet API failed: %s", err.Error())
  3537  	}
  3538  	return _returns.A, _returns.B
  3539  }
  3540  
  3541  func (s *apiRPCServer) KVGet(args *Z_KVGetArgs, returns *Z_KVGetReturns) error {
  3542  	if hook, ok := s.impl.(interface {
  3543  		KVGet(key string) ([]byte, *model.AppError)
  3544  	}); ok {
  3545  		returns.A, returns.B = hook.KVGet(args.A)
  3546  	} else {
  3547  		return encodableError(fmt.Errorf("API KVGet called but not implemented."))
  3548  	}
  3549  	return nil
  3550  }
  3551  
  3552  type Z_KVDeleteArgs struct {
  3553  	A string
  3554  }
  3555  
  3556  type Z_KVDeleteReturns struct {
  3557  	A *model.AppError
  3558  }
  3559  
  3560  func (g *apiRPCClient) KVDelete(key string) *model.AppError {
  3561  	_args := &Z_KVDeleteArgs{key}
  3562  	_returns := &Z_KVDeleteReturns{}
  3563  	if err := g.client.Call("Plugin.KVDelete", _args, _returns); err != nil {
  3564  		log.Printf("RPC call to KVDelete API failed: %s", err.Error())
  3565  	}
  3566  	return _returns.A
  3567  }
  3568  
  3569  func (s *apiRPCServer) KVDelete(args *Z_KVDeleteArgs, returns *Z_KVDeleteReturns) error {
  3570  	if hook, ok := s.impl.(interface {
  3571  		KVDelete(key string) *model.AppError
  3572  	}); ok {
  3573  		returns.A = hook.KVDelete(args.A)
  3574  	} else {
  3575  		return encodableError(fmt.Errorf("API KVDelete called but not implemented."))
  3576  	}
  3577  	return nil
  3578  }
  3579  
  3580  type Z_KVDeleteAllArgs struct {
  3581  }
  3582  
  3583  type Z_KVDeleteAllReturns struct {
  3584  	A *model.AppError
  3585  }
  3586  
  3587  func (g *apiRPCClient) KVDeleteAll() *model.AppError {
  3588  	_args := &Z_KVDeleteAllArgs{}
  3589  	_returns := &Z_KVDeleteAllReturns{}
  3590  	if err := g.client.Call("Plugin.KVDeleteAll", _args, _returns); err != nil {
  3591  		log.Printf("RPC call to KVDeleteAll API failed: %s", err.Error())
  3592  	}
  3593  	return _returns.A
  3594  }
  3595  
  3596  func (s *apiRPCServer) KVDeleteAll(args *Z_KVDeleteAllArgs, returns *Z_KVDeleteAllReturns) error {
  3597  	if hook, ok := s.impl.(interface {
  3598  		KVDeleteAll() *model.AppError
  3599  	}); ok {
  3600  		returns.A = hook.KVDeleteAll()
  3601  	} else {
  3602  		return encodableError(fmt.Errorf("API KVDeleteAll called but not implemented."))
  3603  	}
  3604  	return nil
  3605  }
  3606  
  3607  type Z_KVListArgs struct {
  3608  	A int
  3609  	B int
  3610  }
  3611  
  3612  type Z_KVListReturns struct {
  3613  	A []string
  3614  	B *model.AppError
  3615  }
  3616  
  3617  func (g *apiRPCClient) KVList(page, perPage int) ([]string, *model.AppError) {
  3618  	_args := &Z_KVListArgs{page, perPage}
  3619  	_returns := &Z_KVListReturns{}
  3620  	if err := g.client.Call("Plugin.KVList", _args, _returns); err != nil {
  3621  		log.Printf("RPC call to KVList API failed: %s", err.Error())
  3622  	}
  3623  	return _returns.A, _returns.B
  3624  }
  3625  
  3626  func (s *apiRPCServer) KVList(args *Z_KVListArgs, returns *Z_KVListReturns) error {
  3627  	if hook, ok := s.impl.(interface {
  3628  		KVList(page, perPage int) ([]string, *model.AppError)
  3629  	}); ok {
  3630  		returns.A, returns.B = hook.KVList(args.A, args.B)
  3631  	} else {
  3632  		return encodableError(fmt.Errorf("API KVList called but not implemented."))
  3633  	}
  3634  	return nil
  3635  }
  3636  
  3637  type Z_PublishWebSocketEventArgs struct {
  3638  	A string
  3639  	B map[string]interface{}
  3640  	C *model.WebsocketBroadcast
  3641  }
  3642  
  3643  type Z_PublishWebSocketEventReturns struct {
  3644  }
  3645  
  3646  func (g *apiRPCClient) PublishWebSocketEvent(event string, payload map[string]interface{}, broadcast *model.WebsocketBroadcast) {
  3647  	_args := &Z_PublishWebSocketEventArgs{event, payload, broadcast}
  3648  	_returns := &Z_PublishWebSocketEventReturns{}
  3649  	if err := g.client.Call("Plugin.PublishWebSocketEvent", _args, _returns); err != nil {
  3650  		log.Printf("RPC call to PublishWebSocketEvent API failed: %s", err.Error())
  3651  	}
  3652  
  3653  }
  3654  
  3655  func (s *apiRPCServer) PublishWebSocketEvent(args *Z_PublishWebSocketEventArgs, returns *Z_PublishWebSocketEventReturns) error {
  3656  	if hook, ok := s.impl.(interface {
  3657  		PublishWebSocketEvent(event string, payload map[string]interface{}, broadcast *model.WebsocketBroadcast)
  3658  	}); ok {
  3659  		hook.PublishWebSocketEvent(args.A, args.B, args.C)
  3660  	} else {
  3661  		return encodableError(fmt.Errorf("API PublishWebSocketEvent called but not implemented."))
  3662  	}
  3663  	return nil
  3664  }
  3665  
  3666  type Z_HasPermissionToArgs struct {
  3667  	A string
  3668  	B *model.Permission
  3669  }
  3670  
  3671  type Z_HasPermissionToReturns struct {
  3672  	A bool
  3673  }
  3674  
  3675  func (g *apiRPCClient) HasPermissionTo(userId string, permission *model.Permission) bool {
  3676  	_args := &Z_HasPermissionToArgs{userId, permission}
  3677  	_returns := &Z_HasPermissionToReturns{}
  3678  	if err := g.client.Call("Plugin.HasPermissionTo", _args, _returns); err != nil {
  3679  		log.Printf("RPC call to HasPermissionTo API failed: %s", err.Error())
  3680  	}
  3681  	return _returns.A
  3682  }
  3683  
  3684  func (s *apiRPCServer) HasPermissionTo(args *Z_HasPermissionToArgs, returns *Z_HasPermissionToReturns) error {
  3685  	if hook, ok := s.impl.(interface {
  3686  		HasPermissionTo(userId string, permission *model.Permission) bool
  3687  	}); ok {
  3688  		returns.A = hook.HasPermissionTo(args.A, args.B)
  3689  	} else {
  3690  		return encodableError(fmt.Errorf("API HasPermissionTo called but not implemented."))
  3691  	}
  3692  	return nil
  3693  }
  3694  
  3695  type Z_HasPermissionToTeamArgs struct {
  3696  	A string
  3697  	B string
  3698  	C *model.Permission
  3699  }
  3700  
  3701  type Z_HasPermissionToTeamReturns struct {
  3702  	A bool
  3703  }
  3704  
  3705  func (g *apiRPCClient) HasPermissionToTeam(userId, teamId string, permission *model.Permission) bool {
  3706  	_args := &Z_HasPermissionToTeamArgs{userId, teamId, permission}
  3707  	_returns := &Z_HasPermissionToTeamReturns{}
  3708  	if err := g.client.Call("Plugin.HasPermissionToTeam", _args, _returns); err != nil {
  3709  		log.Printf("RPC call to HasPermissionToTeam API failed: %s", err.Error())
  3710  	}
  3711  	return _returns.A
  3712  }
  3713  
  3714  func (s *apiRPCServer) HasPermissionToTeam(args *Z_HasPermissionToTeamArgs, returns *Z_HasPermissionToTeamReturns) error {
  3715  	if hook, ok := s.impl.(interface {
  3716  		HasPermissionToTeam(userId, teamId string, permission *model.Permission) bool
  3717  	}); ok {
  3718  		returns.A = hook.HasPermissionToTeam(args.A, args.B, args.C)
  3719  	} else {
  3720  		return encodableError(fmt.Errorf("API HasPermissionToTeam called but not implemented."))
  3721  	}
  3722  	return nil
  3723  }
  3724  
  3725  type Z_HasPermissionToChannelArgs struct {
  3726  	A string
  3727  	B string
  3728  	C *model.Permission
  3729  }
  3730  
  3731  type Z_HasPermissionToChannelReturns struct {
  3732  	A bool
  3733  }
  3734  
  3735  func (g *apiRPCClient) HasPermissionToChannel(userId, channelId string, permission *model.Permission) bool {
  3736  	_args := &Z_HasPermissionToChannelArgs{userId, channelId, permission}
  3737  	_returns := &Z_HasPermissionToChannelReturns{}
  3738  	if err := g.client.Call("Plugin.HasPermissionToChannel", _args, _returns); err != nil {
  3739  		log.Printf("RPC call to HasPermissionToChannel API failed: %s", err.Error())
  3740  	}
  3741  	return _returns.A
  3742  }
  3743  
  3744  func (s *apiRPCServer) HasPermissionToChannel(args *Z_HasPermissionToChannelArgs, returns *Z_HasPermissionToChannelReturns) error {
  3745  	if hook, ok := s.impl.(interface {
  3746  		HasPermissionToChannel(userId, channelId string, permission *model.Permission) bool
  3747  	}); ok {
  3748  		returns.A = hook.HasPermissionToChannel(args.A, args.B, args.C)
  3749  	} else {
  3750  		return encodableError(fmt.Errorf("API HasPermissionToChannel called but not implemented."))
  3751  	}
  3752  	return nil
  3753  }
  3754  
  3755  type Z_LogDebugArgs struct {
  3756  	A string
  3757  	B []interface{}
  3758  }
  3759  
  3760  type Z_LogDebugReturns struct {
  3761  }
  3762  
  3763  func (g *apiRPCClient) LogDebug(msg string, keyValuePairs ...interface{}) {
  3764  	_args := &Z_LogDebugArgs{msg, keyValuePairs}
  3765  	_returns := &Z_LogDebugReturns{}
  3766  	if err := g.client.Call("Plugin.LogDebug", _args, _returns); err != nil {
  3767  		log.Printf("RPC call to LogDebug API failed: %s", err.Error())
  3768  	}
  3769  
  3770  }
  3771  
  3772  func (s *apiRPCServer) LogDebug(args *Z_LogDebugArgs, returns *Z_LogDebugReturns) error {
  3773  	if hook, ok := s.impl.(interface {
  3774  		LogDebug(msg string, keyValuePairs ...interface{})
  3775  	}); ok {
  3776  		hook.LogDebug(args.A, args.B...)
  3777  	} else {
  3778  		return encodableError(fmt.Errorf("API LogDebug called but not implemented."))
  3779  	}
  3780  	return nil
  3781  }
  3782  
  3783  type Z_LogInfoArgs struct {
  3784  	A string
  3785  	B []interface{}
  3786  }
  3787  
  3788  type Z_LogInfoReturns struct {
  3789  }
  3790  
  3791  func (g *apiRPCClient) LogInfo(msg string, keyValuePairs ...interface{}) {
  3792  	_args := &Z_LogInfoArgs{msg, keyValuePairs}
  3793  	_returns := &Z_LogInfoReturns{}
  3794  	if err := g.client.Call("Plugin.LogInfo", _args, _returns); err != nil {
  3795  		log.Printf("RPC call to LogInfo API failed: %s", err.Error())
  3796  	}
  3797  
  3798  }
  3799  
  3800  func (s *apiRPCServer) LogInfo(args *Z_LogInfoArgs, returns *Z_LogInfoReturns) error {
  3801  	if hook, ok := s.impl.(interface {
  3802  		LogInfo(msg string, keyValuePairs ...interface{})
  3803  	}); ok {
  3804  		hook.LogInfo(args.A, args.B...)
  3805  	} else {
  3806  		return encodableError(fmt.Errorf("API LogInfo called but not implemented."))
  3807  	}
  3808  	return nil
  3809  }
  3810  
  3811  type Z_LogErrorArgs struct {
  3812  	A string
  3813  	B []interface{}
  3814  }
  3815  
  3816  type Z_LogErrorReturns struct {
  3817  }
  3818  
  3819  func (g *apiRPCClient) LogError(msg string, keyValuePairs ...interface{}) {
  3820  	_args := &Z_LogErrorArgs{msg, keyValuePairs}
  3821  	_returns := &Z_LogErrorReturns{}
  3822  	if err := g.client.Call("Plugin.LogError", _args, _returns); err != nil {
  3823  		log.Printf("RPC call to LogError API failed: %s", err.Error())
  3824  	}
  3825  
  3826  }
  3827  
  3828  func (s *apiRPCServer) LogError(args *Z_LogErrorArgs, returns *Z_LogErrorReturns) error {
  3829  	if hook, ok := s.impl.(interface {
  3830  		LogError(msg string, keyValuePairs ...interface{})
  3831  	}); ok {
  3832  		hook.LogError(args.A, args.B...)
  3833  	} else {
  3834  		return encodableError(fmt.Errorf("API LogError called but not implemented."))
  3835  	}
  3836  	return nil
  3837  }
  3838  
  3839  type Z_LogWarnArgs struct {
  3840  	A string
  3841  	B []interface{}
  3842  }
  3843  
  3844  type Z_LogWarnReturns struct {
  3845  }
  3846  
  3847  func (g *apiRPCClient) LogWarn(msg string, keyValuePairs ...interface{}) {
  3848  	_args := &Z_LogWarnArgs{msg, keyValuePairs}
  3849  	_returns := &Z_LogWarnReturns{}
  3850  	if err := g.client.Call("Plugin.LogWarn", _args, _returns); err != nil {
  3851  		log.Printf("RPC call to LogWarn API failed: %s", err.Error())
  3852  	}
  3853  
  3854  }
  3855  
  3856  func (s *apiRPCServer) LogWarn(args *Z_LogWarnArgs, returns *Z_LogWarnReturns) error {
  3857  	if hook, ok := s.impl.(interface {
  3858  		LogWarn(msg string, keyValuePairs ...interface{})
  3859  	}); ok {
  3860  		hook.LogWarn(args.A, args.B...)
  3861  	} else {
  3862  		return encodableError(fmt.Errorf("API LogWarn called but not implemented."))
  3863  	}
  3864  	return nil
  3865  }
  3866  
  3867  type Z_SendMailArgs struct {
  3868  	A string
  3869  	B string
  3870  	C string
  3871  }
  3872  
  3873  type Z_SendMailReturns struct {
  3874  	A *model.AppError
  3875  }
  3876  
  3877  func (g *apiRPCClient) SendMail(to, subject, htmlBody string) *model.AppError {
  3878  	_args := &Z_SendMailArgs{to, subject, htmlBody}
  3879  	_returns := &Z_SendMailReturns{}
  3880  	if err := g.client.Call("Plugin.SendMail", _args, _returns); err != nil {
  3881  		log.Printf("RPC call to SendMail API failed: %s", err.Error())
  3882  	}
  3883  	return _returns.A
  3884  }
  3885  
  3886  func (s *apiRPCServer) SendMail(args *Z_SendMailArgs, returns *Z_SendMailReturns) error {
  3887  	if hook, ok := s.impl.(interface {
  3888  		SendMail(to, subject, htmlBody string) *model.AppError
  3889  	}); ok {
  3890  		returns.A = hook.SendMail(args.A, args.B, args.C)
  3891  	} else {
  3892  		return encodableError(fmt.Errorf("API SendMail called but not implemented."))
  3893  	}
  3894  	return nil
  3895  }
  3896  
  3897  type Z_CreateBotArgs struct {
  3898  	A *model.Bot
  3899  }
  3900  
  3901  type Z_CreateBotReturns struct {
  3902  	A *model.Bot
  3903  	B *model.AppError
  3904  }
  3905  
  3906  func (g *apiRPCClient) CreateBot(bot *model.Bot) (*model.Bot, *model.AppError) {
  3907  	_args := &Z_CreateBotArgs{bot}
  3908  	_returns := &Z_CreateBotReturns{}
  3909  	if err := g.client.Call("Plugin.CreateBot", _args, _returns); err != nil {
  3910  		log.Printf("RPC call to CreateBot API failed: %s", err.Error())
  3911  	}
  3912  	return _returns.A, _returns.B
  3913  }
  3914  
  3915  func (s *apiRPCServer) CreateBot(args *Z_CreateBotArgs, returns *Z_CreateBotReturns) error {
  3916  	if hook, ok := s.impl.(interface {
  3917  		CreateBot(bot *model.Bot) (*model.Bot, *model.AppError)
  3918  	}); ok {
  3919  		returns.A, returns.B = hook.CreateBot(args.A)
  3920  	} else {
  3921  		return encodableError(fmt.Errorf("API CreateBot called but not implemented."))
  3922  	}
  3923  	return nil
  3924  }
  3925  
  3926  type Z_PatchBotArgs struct {
  3927  	A string
  3928  	B *model.BotPatch
  3929  }
  3930  
  3931  type Z_PatchBotReturns struct {
  3932  	A *model.Bot
  3933  	B *model.AppError
  3934  }
  3935  
  3936  func (g *apiRPCClient) PatchBot(botUserId string, botPatch *model.BotPatch) (*model.Bot, *model.AppError) {
  3937  	_args := &Z_PatchBotArgs{botUserId, botPatch}
  3938  	_returns := &Z_PatchBotReturns{}
  3939  	if err := g.client.Call("Plugin.PatchBot", _args, _returns); err != nil {
  3940  		log.Printf("RPC call to PatchBot API failed: %s", err.Error())
  3941  	}
  3942  	return _returns.A, _returns.B
  3943  }
  3944  
  3945  func (s *apiRPCServer) PatchBot(args *Z_PatchBotArgs, returns *Z_PatchBotReturns) error {
  3946  	if hook, ok := s.impl.(interface {
  3947  		PatchBot(botUserId string, botPatch *model.BotPatch) (*model.Bot, *model.AppError)
  3948  	}); ok {
  3949  		returns.A, returns.B = hook.PatchBot(args.A, args.B)
  3950  	} else {
  3951  		return encodableError(fmt.Errorf("API PatchBot called but not implemented."))
  3952  	}
  3953  	return nil
  3954  }
  3955  
  3956  type Z_GetBotArgs struct {
  3957  	A string
  3958  	B bool
  3959  }
  3960  
  3961  type Z_GetBotReturns struct {
  3962  	A *model.Bot
  3963  	B *model.AppError
  3964  }
  3965  
  3966  func (g *apiRPCClient) GetBot(botUserId string, includeDeleted bool) (*model.Bot, *model.AppError) {
  3967  	_args := &Z_GetBotArgs{botUserId, includeDeleted}
  3968  	_returns := &Z_GetBotReturns{}
  3969  	if err := g.client.Call("Plugin.GetBot", _args, _returns); err != nil {
  3970  		log.Printf("RPC call to GetBot API failed: %s", err.Error())
  3971  	}
  3972  	return _returns.A, _returns.B
  3973  }
  3974  
  3975  func (s *apiRPCServer) GetBot(args *Z_GetBotArgs, returns *Z_GetBotReturns) error {
  3976  	if hook, ok := s.impl.(interface {
  3977  		GetBot(botUserId string, includeDeleted bool) (*model.Bot, *model.AppError)
  3978  	}); ok {
  3979  		returns.A, returns.B = hook.GetBot(args.A, args.B)
  3980  	} else {
  3981  		return encodableError(fmt.Errorf("API GetBot called but not implemented."))
  3982  	}
  3983  	return nil
  3984  }
  3985  
  3986  type Z_GetBotsArgs struct {
  3987  	A *model.BotGetOptions
  3988  }
  3989  
  3990  type Z_GetBotsReturns struct {
  3991  	A []*model.Bot
  3992  	B *model.AppError
  3993  }
  3994  
  3995  func (g *apiRPCClient) GetBots(options *model.BotGetOptions) ([]*model.Bot, *model.AppError) {
  3996  	_args := &Z_GetBotsArgs{options}
  3997  	_returns := &Z_GetBotsReturns{}
  3998  	if err := g.client.Call("Plugin.GetBots", _args, _returns); err != nil {
  3999  		log.Printf("RPC call to GetBots API failed: %s", err.Error())
  4000  	}
  4001  	return _returns.A, _returns.B
  4002  }
  4003  
  4004  func (s *apiRPCServer) GetBots(args *Z_GetBotsArgs, returns *Z_GetBotsReturns) error {
  4005  	if hook, ok := s.impl.(interface {
  4006  		GetBots(options *model.BotGetOptions) ([]*model.Bot, *model.AppError)
  4007  	}); ok {
  4008  		returns.A, returns.B = hook.GetBots(args.A)
  4009  	} else {
  4010  		return encodableError(fmt.Errorf("API GetBots called but not implemented."))
  4011  	}
  4012  	return nil
  4013  }
  4014  
  4015  type Z_UpdateBotActiveArgs struct {
  4016  	A string
  4017  	B bool
  4018  }
  4019  
  4020  type Z_UpdateBotActiveReturns struct {
  4021  	A *model.Bot
  4022  	B *model.AppError
  4023  }
  4024  
  4025  func (g *apiRPCClient) UpdateBotActive(botUserId string, active bool) (*model.Bot, *model.AppError) {
  4026  	_args := &Z_UpdateBotActiveArgs{botUserId, active}
  4027  	_returns := &Z_UpdateBotActiveReturns{}
  4028  	if err := g.client.Call("Plugin.UpdateBotActive", _args, _returns); err != nil {
  4029  		log.Printf("RPC call to UpdateBotActive API failed: %s", err.Error())
  4030  	}
  4031  	return _returns.A, _returns.B
  4032  }
  4033  
  4034  func (s *apiRPCServer) UpdateBotActive(args *Z_UpdateBotActiveArgs, returns *Z_UpdateBotActiveReturns) error {
  4035  	if hook, ok := s.impl.(interface {
  4036  		UpdateBotActive(botUserId string, active bool) (*model.Bot, *model.AppError)
  4037  	}); ok {
  4038  		returns.A, returns.B = hook.UpdateBotActive(args.A, args.B)
  4039  	} else {
  4040  		return encodableError(fmt.Errorf("API UpdateBotActive called but not implemented."))
  4041  	}
  4042  	return nil
  4043  }
  4044  
  4045  type Z_PermanentDeleteBotArgs struct {
  4046  	A string
  4047  }
  4048  
  4049  type Z_PermanentDeleteBotReturns struct {
  4050  	A *model.AppError
  4051  }
  4052  
  4053  func (g *apiRPCClient) PermanentDeleteBot(botUserId string) *model.AppError {
  4054  	_args := &Z_PermanentDeleteBotArgs{botUserId}
  4055  	_returns := &Z_PermanentDeleteBotReturns{}
  4056  	if err := g.client.Call("Plugin.PermanentDeleteBot", _args, _returns); err != nil {
  4057  		log.Printf("RPC call to PermanentDeleteBot API failed: %s", err.Error())
  4058  	}
  4059  	return _returns.A
  4060  }
  4061  
  4062  func (s *apiRPCServer) PermanentDeleteBot(args *Z_PermanentDeleteBotArgs, returns *Z_PermanentDeleteBotReturns) error {
  4063  	if hook, ok := s.impl.(interface {
  4064  		PermanentDeleteBot(botUserId string) *model.AppError
  4065  	}); ok {
  4066  		returns.A = hook.PermanentDeleteBot(args.A)
  4067  	} else {
  4068  		return encodableError(fmt.Errorf("API PermanentDeleteBot called but not implemented."))
  4069  	}
  4070  	return nil
  4071  }