mirror of https://github.com/vernonkeenan/lib
364 lines
12 KiB
Go
364 lines
12 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
// (c) 2012-2020 by Telnexus LLC
|
|
// All rights reserved worldwide.
|
|
// Proprietary product; unlicensed use is not allowed
|
|
|
|
package cors
|
|
|
|
// This file was generated by the swagger tool.
|
|
// Editing this file might prove futile when you re-run the swagger generate command
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/go-openapi/runtime"
|
|
"github.com/go-openapi/strfmt"
|
|
)
|
|
|
|
// New creates a new cors API client.
|
|
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
|
return &Client{transport: transport, formats: formats}
|
|
}
|
|
|
|
/*
|
|
Client for cors API
|
|
*/
|
|
type Client struct {
|
|
transport runtime.ClientTransport
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ClientOption is the option for Client methods
|
|
type ClientOption func(*runtime.ClientOperation)
|
|
|
|
// ClientService is the interface for Client methods
|
|
type ClientService interface {
|
|
AccountOptions(params *AccountOptionsParams, opts ...ClientOption) (*AccountOptionsOK, error)
|
|
|
|
AccountOptionsObservable(params *AccountOptionsObservableParams, opts ...ClientOption) (*AccountOptionsObservableOK, error)
|
|
|
|
CompanyObservableOptions(params *CompanyObservableOptionsParams, opts ...ClientOption) (*CompanyObservableOptionsOK, error)
|
|
|
|
CompanyOptions(params *CompanyOptionsParams, opts ...ClientOption) (*CompanyOptionsOK, error)
|
|
|
|
ContactOptions(params *ContactOptionsParams, opts ...ClientOption) (*ContactOptionsOK, error)
|
|
|
|
ContactOptionsObservable(params *ContactOptionsObservableParams, opts ...ClientOption) (*ContactOptionsObservableOK, error)
|
|
|
|
LeadOptions(params *LeadOptionsParams, opts ...ClientOption) (*LeadOptionsOK, error)
|
|
|
|
LeadOptionsObservable(params *LeadOptionsObservableParams, opts ...ClientOption) (*LeadOptionsObservableOK, error)
|
|
|
|
SetTransport(transport runtime.ClientTransport)
|
|
}
|
|
|
|
/*
|
|
AccountOptions CORS support
|
|
*/
|
|
func (a *Client) AccountOptions(params *AccountOptionsParams, opts ...ClientOption) (*AccountOptionsOK, error) {
|
|
// TODO: Validate the params before sending
|
|
if params == nil {
|
|
params = NewAccountOptionsParams()
|
|
}
|
|
op := &runtime.ClientOperation{
|
|
ID: "accountOptions",
|
|
Method: "OPTIONS",
|
|
PathPattern: "/accounts",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http"},
|
|
Params: params,
|
|
Reader: &AccountOptionsReader{formats: a.formats},
|
|
Context: params.Context,
|
|
Client: params.HTTPClient,
|
|
}
|
|
for _, opt := range opts {
|
|
opt(op)
|
|
}
|
|
|
|
result, err := a.transport.Submit(op)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
success, ok := result.(*AccountOptionsOK)
|
|
if ok {
|
|
return success, nil
|
|
}
|
|
// unexpected success response
|
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
|
msg := fmt.Sprintf("unexpected success response for accountOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
panic(msg)
|
|
}
|
|
|
|
/*
|
|
AccountOptionsObservable CORS support
|
|
*/
|
|
func (a *Client) AccountOptionsObservable(params *AccountOptionsObservableParams, opts ...ClientOption) (*AccountOptionsObservableOK, error) {
|
|
// TODO: Validate the params before sending
|
|
if params == nil {
|
|
params = NewAccountOptionsObservableParams()
|
|
}
|
|
op := &runtime.ClientOperation{
|
|
ID: "accountOptionsObservable",
|
|
Method: "OPTIONS",
|
|
PathPattern: "/accounts/observable",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http"},
|
|
Params: params,
|
|
Reader: &AccountOptionsObservableReader{formats: a.formats},
|
|
Context: params.Context,
|
|
Client: params.HTTPClient,
|
|
}
|
|
for _, opt := range opts {
|
|
opt(op)
|
|
}
|
|
|
|
result, err := a.transport.Submit(op)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
success, ok := result.(*AccountOptionsObservableOK)
|
|
if ok {
|
|
return success, nil
|
|
}
|
|
// unexpected success response
|
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
|
msg := fmt.Sprintf("unexpected success response for accountOptionsObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
panic(msg)
|
|
}
|
|
|
|
/*
|
|
CompanyObservableOptions CORS support
|
|
*/
|
|
func (a *Client) CompanyObservableOptions(params *CompanyObservableOptionsParams, opts ...ClientOption) (*CompanyObservableOptionsOK, error) {
|
|
// TODO: Validate the params before sending
|
|
if params == nil {
|
|
params = NewCompanyObservableOptionsParams()
|
|
}
|
|
op := &runtime.ClientOperation{
|
|
ID: "companyObservableOptions",
|
|
Method: "OPTIONS",
|
|
PathPattern: "/companies/observable",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http"},
|
|
Params: params,
|
|
Reader: &CompanyObservableOptionsReader{formats: a.formats},
|
|
Context: params.Context,
|
|
Client: params.HTTPClient,
|
|
}
|
|
for _, opt := range opts {
|
|
opt(op)
|
|
}
|
|
|
|
result, err := a.transport.Submit(op)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
success, ok := result.(*CompanyObservableOptionsOK)
|
|
if ok {
|
|
return success, nil
|
|
}
|
|
// unexpected success response
|
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
|
msg := fmt.Sprintf("unexpected success response for companyObservableOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
panic(msg)
|
|
}
|
|
|
|
/*
|
|
CompanyOptions CORS support
|
|
*/
|
|
func (a *Client) CompanyOptions(params *CompanyOptionsParams, opts ...ClientOption) (*CompanyOptionsOK, error) {
|
|
// TODO: Validate the params before sending
|
|
if params == nil {
|
|
params = NewCompanyOptionsParams()
|
|
}
|
|
op := &runtime.ClientOperation{
|
|
ID: "companyOptions",
|
|
Method: "OPTIONS",
|
|
PathPattern: "/companies",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http"},
|
|
Params: params,
|
|
Reader: &CompanyOptionsReader{formats: a.formats},
|
|
Context: params.Context,
|
|
Client: params.HTTPClient,
|
|
}
|
|
for _, opt := range opts {
|
|
opt(op)
|
|
}
|
|
|
|
result, err := a.transport.Submit(op)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
success, ok := result.(*CompanyOptionsOK)
|
|
if ok {
|
|
return success, nil
|
|
}
|
|
// unexpected success response
|
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
|
msg := fmt.Sprintf("unexpected success response for companyOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
panic(msg)
|
|
}
|
|
|
|
/*
|
|
ContactOptions CORS support
|
|
*/
|
|
func (a *Client) ContactOptions(params *ContactOptionsParams, opts ...ClientOption) (*ContactOptionsOK, error) {
|
|
// TODO: Validate the params before sending
|
|
if params == nil {
|
|
params = NewContactOptionsParams()
|
|
}
|
|
op := &runtime.ClientOperation{
|
|
ID: "contactOptions",
|
|
Method: "OPTIONS",
|
|
PathPattern: "/contacts",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http"},
|
|
Params: params,
|
|
Reader: &ContactOptionsReader{formats: a.formats},
|
|
Context: params.Context,
|
|
Client: params.HTTPClient,
|
|
}
|
|
for _, opt := range opts {
|
|
opt(op)
|
|
}
|
|
|
|
result, err := a.transport.Submit(op)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
success, ok := result.(*ContactOptionsOK)
|
|
if ok {
|
|
return success, nil
|
|
}
|
|
// unexpected success response
|
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
|
msg := fmt.Sprintf("unexpected success response for contactOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
panic(msg)
|
|
}
|
|
|
|
/*
|
|
ContactOptionsObservable CORS support
|
|
*/
|
|
func (a *Client) ContactOptionsObservable(params *ContactOptionsObservableParams, opts ...ClientOption) (*ContactOptionsObservableOK, error) {
|
|
// TODO: Validate the params before sending
|
|
if params == nil {
|
|
params = NewContactOptionsObservableParams()
|
|
}
|
|
op := &runtime.ClientOperation{
|
|
ID: "contactOptionsObservable",
|
|
Method: "OPTIONS",
|
|
PathPattern: "/contacts/observable",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http"},
|
|
Params: params,
|
|
Reader: &ContactOptionsObservableReader{formats: a.formats},
|
|
Context: params.Context,
|
|
Client: params.HTTPClient,
|
|
}
|
|
for _, opt := range opts {
|
|
opt(op)
|
|
}
|
|
|
|
result, err := a.transport.Submit(op)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
success, ok := result.(*ContactOptionsObservableOK)
|
|
if ok {
|
|
return success, nil
|
|
}
|
|
// unexpected success response
|
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
|
msg := fmt.Sprintf("unexpected success response for contactOptionsObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
panic(msg)
|
|
}
|
|
|
|
/*
|
|
LeadOptions CORS support
|
|
*/
|
|
func (a *Client) LeadOptions(params *LeadOptionsParams, opts ...ClientOption) (*LeadOptionsOK, error) {
|
|
// TODO: Validate the params before sending
|
|
if params == nil {
|
|
params = NewLeadOptionsParams()
|
|
}
|
|
op := &runtime.ClientOperation{
|
|
ID: "leadOptions",
|
|
Method: "OPTIONS",
|
|
PathPattern: "/leads",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http"},
|
|
Params: params,
|
|
Reader: &LeadOptionsReader{formats: a.formats},
|
|
Context: params.Context,
|
|
Client: params.HTTPClient,
|
|
}
|
|
for _, opt := range opts {
|
|
opt(op)
|
|
}
|
|
|
|
result, err := a.transport.Submit(op)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
success, ok := result.(*LeadOptionsOK)
|
|
if ok {
|
|
return success, nil
|
|
}
|
|
// unexpected success response
|
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
|
msg := fmt.Sprintf("unexpected success response for leadOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
panic(msg)
|
|
}
|
|
|
|
/*
|
|
LeadOptionsObservable CORS support
|
|
*/
|
|
func (a *Client) LeadOptionsObservable(params *LeadOptionsObservableParams, opts ...ClientOption) (*LeadOptionsObservableOK, error) {
|
|
// TODO: Validate the params before sending
|
|
if params == nil {
|
|
params = NewLeadOptionsObservableParams()
|
|
}
|
|
op := &runtime.ClientOperation{
|
|
ID: "leadOptionsObservable",
|
|
Method: "OPTIONS",
|
|
PathPattern: "/leads/observable",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http"},
|
|
Params: params,
|
|
Reader: &LeadOptionsObservableReader{formats: a.formats},
|
|
Context: params.Context,
|
|
Client: params.HTTPClient,
|
|
}
|
|
for _, opt := range opts {
|
|
opt(op)
|
|
}
|
|
|
|
result, err := a.transport.Submit(op)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
success, ok := result.(*LeadOptionsObservableOK)
|
|
if ok {
|
|
return success, nil
|
|
}
|
|
// unexpected success response
|
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
|
msg := fmt.Sprintf("unexpected success response for leadOptionsObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
panic(msg)
|
|
}
|
|
|
|
// SetTransport changes the transport on the client
|
|
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
|
a.transport = transport
|
|
}
|