%%%-------------------------------------------------------------------
  @doc Behaviour to implement for eectd  . Election 
  @private 
%%  All detail documents please visit -io/etcd/blob/master/Documentation/dev-guide/api_reference_v3.md
%% @end
%%%-------------------------------------------------------------------

  This module was generated on 2020 - 04 - 02T02:00:46 + 00:00 and should not be modified manually 

-module(eetcd_election_gen).

-export([campaign/1]).
-export([proclaim/1]).
-export([leader/1]).
-export([observe/1]).
-export([resign/1]).

%% @doc Unary RPC for service at path "/v3electionpb.Election/Campaign" 
-spec campaign(router_pb:'Etcd.CampaignRequest'()) ->
    {ok, router_pb:'Etcd.CampaignResponse'()}|{error,eetcd:eetcd_error()}.
campaign(Request) ->
    eetcd_stream:unary(Request, 'Etcd.CampaignRequest', <<"/v3electionpb.Election/Campaign">>, 'Etcd.CampaignResponse').

%% @doc Unary RPC for service at path "/v3electionpb.Election/Proclaim" 
-spec proclaim(router_pb:'Etcd.ProclaimRequest'()) ->
    {ok, router_pb:'Etcd.ProclaimResponse'()}|{error,eetcd:eetcd_error()}.
proclaim(Request) ->
    eetcd_stream:unary(Request, 'Etcd.ProclaimRequest', <<"/v3electionpb.Election/Proclaim">>, 'Etcd.ProclaimResponse').

%% @doc Unary RPC for service at path "/v3electionpb.Election/Leader" 
-spec leader(router_pb:'Etcd.LeaderRequest'()) ->
    {ok, router_pb:'Etcd.LeaderResponse'()}|{error,eetcd:eetcd_error()}.
leader(Request) ->
    eetcd_stream:unary(Request, 'Etcd.LeaderRequest', <<"/v3electionpb.Election/Leader">>, 'Etcd.LeaderResponse').

%% @doc Stream RPC 
-spec observe(router_pb:'Etcd.LeaderRequest'()) ->
    reference()|{error,eetcd:eetcd_error()}.
observe(Request) ->
    eetcd_stream:new(Request, <<"/v3electionpb.Election/Observe">>).

%% @doc Unary RPC for service at path "/v3electionpb.Election/Resign" 
-spec resign(router_pb:'Etcd.ResignRequest'()) ->
    {ok, router_pb:'Etcd.ResignResponse'()}|{error,eetcd:eetcd_error()}.
resign(Request) ->
    eetcd_stream:unary(Request, 'Etcd.ResignRequest', <<"/v3electionpb.Election/Resign">>, 'Etcd.ResignResponse').


-------------------------------------------------------------------
  All detail documents please visit -io/etcd/blob/master/Documentation/dev-guide/api_reference_v3.md
 @end
-------------------------------------------------------------------
 @doc Unary RPC for service at path "/v3electionpb.Election/Campaign" 
 @doc Unary RPC for service at path "/v3electionpb.Election/Proclaim" 
 @doc Unary RPC for service at path "/v3electionpb.Election/Leader" 
 @doc Stream RPC 
 @doc Unary RPC for service at path "/v3electionpb.Election/Resign" 

  @doc Behaviour to implement for eectd  . Election 
  @private 

  This module was generated on 2020 - 04 - 02T02:00:46 + 00:00 and should not be modified manually 

-module(eetcd_election_gen).

-export([campaign/1]).
-export([proclaim/1]).
-export([leader/1]).
-export([observe/1]).
-export([resign/1]).

-spec campaign(router_pb:'Etcd.CampaignRequest'()) ->
    {ok, router_pb:'Etcd.CampaignResponse'()}|{error,eetcd:eetcd_error()}.
campaign(Request) ->
    eetcd_stream:unary(Request, 'Etcd.CampaignRequest', <<"/v3electionpb.Election/Campaign">>, 'Etcd.CampaignResponse').

-spec proclaim(router_pb:'Etcd.ProclaimRequest'()) ->
    {ok, router_pb:'Etcd.ProclaimResponse'()}|{error,eetcd:eetcd_error()}.
proclaim(Request) ->
    eetcd_stream:unary(Request, 'Etcd.ProclaimRequest', <<"/v3electionpb.Election/Proclaim">>, 'Etcd.ProclaimResponse').

-spec leader(router_pb:'Etcd.LeaderRequest'()) ->
    {ok, router_pb:'Etcd.LeaderResponse'()}|{error,eetcd:eetcd_error()}.
leader(Request) ->
    eetcd_stream:unary(Request, 'Etcd.LeaderRequest', <<"/v3electionpb.Election/Leader">>, 'Etcd.LeaderResponse').

-spec observe(router_pb:'Etcd.LeaderRequest'()) ->
    reference()|{error,eetcd:eetcd_error()}.
observe(Request) ->
    eetcd_stream:new(Request, <<"/v3electionpb.Election/Observe">>).

-spec resign(router_pb:'Etcd.ResignRequest'()) ->
    {ok, router_pb:'Etcd.ResignResponse'()}|{error,eetcd:eetcd_error()}.
resign(Request) ->
    eetcd_stream:unary(Request, 'Etcd.ResignRequest', <<"/v3electionpb.Election/Resign">>, 'Etcd.ResignResponse').

