// Code generated by go-swagger; DO NOT EDIT.

package operators

// 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 operators client
type API interface {
	/*
	   V2ListOfClusterOperators Lists operators to be monitored for a cluster.*/
	V2ListOfClusterOperators(ctx context.Context, params *V2ListOfClusterOperatorsParams) (*V2ListOfClusterOperatorsOK, error)
	/*
	   V2ListOperatorProperties Lists properties for an operator.*/
	V2ListOperatorProperties(ctx context.Context, params *V2ListOperatorPropertiesParams) (*V2ListOperatorPropertiesOK, error)
	/*
	   V2ListSupportedOperators Retrieves the list of supported operators.*/
	V2ListSupportedOperators(ctx context.Context, params *V2ListSupportedOperatorsParams) (*V2ListSupportedOperatorsOK, error)
	/*
	   V2ReportMonitoredOperatorStatus Controller API to report of monitored operators.*/
	V2ReportMonitoredOperatorStatus(ctx context.Context, params *V2ReportMonitoredOperatorStatusParams) (*V2ReportMonitoredOperatorStatusOK, error)
}

// New creates a new operators API client.
func New(transport runtime.ClientTransport, formats strfmt.Registry, authInfo runtime.ClientAuthInfoWriter) *Client {
	return &Client{
		transport: transport,
		formats:   formats,
		authInfo:  authInfo,
	}
}

/*
Client for operators API
*/
type Client struct {
	transport runtime.ClientTransport
	formats   strfmt.Registry
	authInfo  runtime.ClientAuthInfoWriter
}

/*
V2ListOfClusterOperators Lists operators to be monitored for a cluster.
*/
func (a *Client) V2ListOfClusterOperators(ctx context.Context, params *V2ListOfClusterOperatorsParams) (*V2ListOfClusterOperatorsOK, error) {

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "V2ListOfClusterOperators",
		Method:             "GET",
		PathPattern:        "/v2/clusters/{cluster_id}/monitored-operators",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http", "https"},
		Params:             params,
		Reader:             &V2ListOfClusterOperatorsReader{formats: a.formats},
		AuthInfo:           a.authInfo,
		Context:            ctx,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	return result.(*V2ListOfClusterOperatorsOK), nil

}

/*
V2ListOperatorProperties Lists properties for an operator.
*/
func (a *Client) V2ListOperatorProperties(ctx context.Context, params *V2ListOperatorPropertiesParams) (*V2ListOperatorPropertiesOK, error) {

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "V2ListOperatorProperties",
		Method:             "GET",
		PathPattern:        "/v2/supported-operators/{operator_name}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http", "https"},
		Params:             params,
		Reader:             &V2ListOperatorPropertiesReader{formats: a.formats},
		AuthInfo:           a.authInfo,
		Context:            ctx,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	return result.(*V2ListOperatorPropertiesOK), nil

}

/*
V2ListSupportedOperators Retrieves the list of supported operators.
*/
func (a *Client) V2ListSupportedOperators(ctx context.Context, params *V2ListSupportedOperatorsParams) (*V2ListSupportedOperatorsOK, error) {

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "V2ListSupportedOperators",
		Method:             "GET",
		PathPattern:        "/v2/supported-operators",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http", "https"},
		Params:             params,
		Reader:             &V2ListSupportedOperatorsReader{formats: a.formats},
		AuthInfo:           a.authInfo,
		Context:            ctx,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	return result.(*V2ListSupportedOperatorsOK), nil

}

/*
V2ReportMonitoredOperatorStatus Controller API to report of monitored operators.
*/
func (a *Client) V2ReportMonitoredOperatorStatus(ctx context.Context, params *V2ReportMonitoredOperatorStatusParams) (*V2ReportMonitoredOperatorStatusOK, error) {

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "v2ReportMonitoredOperatorStatus",
		Method:             "PUT",
		PathPattern:        "/v2/clusters/{cluster_id}/monitored-operators",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http", "https"},
		Params:             params,
		Reader:             &V2ReportMonitoredOperatorStatusReader{formats: a.formats},
		AuthInfo:           a.authInfo,
		Context:            ctx,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	return result.(*V2ReportMonitoredOperatorStatusOK), nil

}
