// Code generated by go-swagger; DO NOT EDIT. package account_management // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "github.com/go-openapi/runtime" strfmt "github.com/go-openapi/strfmt" ) //go:generate mockery -name API -inpkg // API is the interface of the account management client type API interface { /* CreateAccount creates a new account in the system*/ CreateAccount(ctx context.Context, params *CreateAccountParams) (*CreateAccountCreated, error) /* DisableAccount disables the account with the id provided in the system*/ DisableAccount(ctx context.Context, params *DisableAccountParams) (*DisableAccountOK, error) /* EnableAccount enables the account with the id provided in the system*/ EnableAccount(ctx context.Context, params *EnableAccountParams) (*EnableAccountOK, error) /* GetAccountStatus basics status of the account with the id provided in the system*/ GetAccountStatus(ctx context.Context, params *GetAccountStatusParams) (*GetAccountStatusOK, error) /* ListAccounts lists of the accounts in the system*/ ListAccounts(ctx context.Context, params *ListAccountsParams) (*ListAccountsOK, error) } // New creates a new account management API client. func New(transport runtime.ClientTransport, formats strfmt.Registry, authInfo runtime.ClientAuthInfoWriter) *Client { return &Client{ transport: transport, formats: formats, authInfo: authInfo, } } /* Client for account management API */ type Client struct { transport runtime.ClientTransport formats strfmt.Registry authInfo runtime.ClientAuthInfoWriter } /* CreateAccount creates a new account in the system */ func (a *Client) CreateAccount(ctx context.Context, params *CreateAccountParams) (*CreateAccountCreated, error) { result, err := a.transport.Submit(&runtime.ClientOperation{ ID: "createAccount", Method: "GET", PathPattern: "/account/create/{id}", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, Params: params, Reader: &CreateAccountReader{formats: a.formats}, AuthInfo: a.authInfo, Context: ctx, Client: params.HTTPClient, }) if err != nil { return nil, err } return result.(*CreateAccountCreated), nil } /* DisableAccount disables the account with the id provided in the system */ func (a *Client) DisableAccount(ctx context.Context, params *DisableAccountParams) (*DisableAccountOK, error) { result, err := a.transport.Submit(&runtime.ClientOperation{ ID: "disableAccount", Method: "POST", PathPattern: "/account/disable/{id}", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, Params: params, Reader: &DisableAccountReader{formats: a.formats}, AuthInfo: a.authInfo, Context: ctx, Client: params.HTTPClient, }) if err != nil { return nil, err } return result.(*DisableAccountOK), nil } /* EnableAccount enables the account with the id provided in the system */ func (a *Client) EnableAccount(ctx context.Context, params *EnableAccountParams) (*EnableAccountOK, error) { result, err := a.transport.Submit(&runtime.ClientOperation{ ID: "enableAccount", Method: "POST", PathPattern: "/account/enable/{id}", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, Params: params, Reader: &EnableAccountReader{formats: a.formats}, AuthInfo: a.authInfo, Context: ctx, Client: params.HTTPClient, }) if err != nil { return nil, err } return result.(*EnableAccountOK), nil } /* GetAccountStatus basics status of the account with the id provided in the system */ func (a *Client) GetAccountStatus(ctx context.Context, params *GetAccountStatusParams) (*GetAccountStatusOK, error) { result, err := a.transport.Submit(&runtime.ClientOperation{ ID: "getAccountStatus", Method: "GET", PathPattern: "/account/status/{id}", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, Params: params, Reader: &GetAccountStatusReader{formats: a.formats}, AuthInfo: a.authInfo, Context: ctx, Client: params.HTTPClient, }) if err != nil { return nil, err } return result.(*GetAccountStatusOK), nil } /* ListAccounts lists of the accounts in the system */ func (a *Client) ListAccounts(ctx context.Context, params *ListAccountsParams) (*ListAccountsOK, error) { result, err := a.transport.Submit(&runtime.ClientOperation{ ID: "listAccounts", Method: "GET", PathPattern: "/account/list", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, Params: params, Reader: &ListAccountsReader{formats: a.formats}, AuthInfo: a.authInfo, Context: ctx, Client: params.HTTPClient, }) if err != nil { return nil, err } return result.(*ListAccountsOK), nil }