2021-07-31 03:05:02 +00:00
// Code generated by go-swagger; DO NOT EDIT.
2021-08-05 19:37:53 +00:00
// (c) 2012-2020 by Taxnexus, Inc.
2021-07-31 03:05:02 +00:00
// 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 {
ClusterOptions ( params * ClusterOptionsParams , opts ... ClientOption ) ( * ClusterOptionsOK , error )
ClustersOptions ( params * ClustersOptionsParams , opts ... ClientOption ) ( * ClustersOptionsOK , error )
DatabaseOptions ( params * DatabaseOptionsParams , opts ... ClientOption ) ( * DatabaseOptionsOK , error )
DatabasesOptions ( params * DatabasesOptionsParams , opts ... ClientOption ) ( * DatabasesOptionsOK , error )
IngestOptions ( params * IngestOptionsParams , opts ... ClientOption ) ( * IngestOptionsOK , error )
IngestsOptions ( params * IngestsOptionsParams , opts ... ClientOption ) ( * IngestsOptionsOK , error )
JobOptions ( params * JobOptionsParams , opts ... ClientOption ) ( * JobOptionsOK , error )
JobsOptions ( params * JobsOptionsParams , opts ... ClientOption ) ( * JobsOptionsOK , error )
ServiceOptions ( params * ServiceOptionsParams , opts ... ClientOption ) ( * ServiceOptionsOK , error )
ServicesOptions ( params * ServicesOptionsParams , opts ... ClientOption ) ( * ServicesOptionsOK , error )
TemplateOptions ( params * TemplateOptionsParams , opts ... ClientOption ) ( * TemplateOptionsOK , error )
TemplatesOptions ( params * TemplatesOptionsParams , opts ... ClientOption ) ( * TemplatesOptionsOK , error )
TenantOptions ( params * TenantOptionsParams , opts ... ClientOption ) ( * TenantOptionsOK , error )
TenantsOptions ( params * TenantsOptionsParams , opts ... ClientOption ) ( * TenantsOptionsOK , error )
UserOptions ( params * UserOptionsParams , opts ... ClientOption ) ( * UserOptionsOK , error )
UsersOptions ( params * UsersOptionsParams , opts ... ClientOption ) ( * UsersOptionsOK , error )
SetTransport ( transport runtime . ClientTransport )
}
/ *
ClusterOptions CORS support
* /
func ( a * Client ) ClusterOptions ( params * ClusterOptionsParams , opts ... ClientOption ) ( * ClusterOptionsOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewClusterOptionsParams ( )
}
op := & runtime . ClientOperation {
ID : "clusterOptions" ,
Method : "OPTIONS" ,
PathPattern : "/clusters/observable" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & ClusterOptionsReader { 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 . ( * ClusterOptionsOK )
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 clusterOptions: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
ClustersOptions CORS support
* /
func ( a * Client ) ClustersOptions ( params * ClustersOptionsParams , opts ... ClientOption ) ( * ClustersOptionsOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewClustersOptionsParams ( )
}
op := & runtime . ClientOperation {
ID : "clustersOptions" ,
Method : "OPTIONS" ,
PathPattern : "/clusters" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & ClustersOptionsReader { 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 . ( * ClustersOptionsOK )
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 clustersOptions: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
DatabaseOptions CORS support
* /
func ( a * Client ) DatabaseOptions ( params * DatabaseOptionsParams , opts ... ClientOption ) ( * DatabaseOptionsOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewDatabaseOptionsParams ( )
}
op := & runtime . ClientOperation {
ID : "databaseOptions" ,
Method : "OPTIONS" ,
PathPattern : "/databases/observable" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & DatabaseOptionsReader { 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 . ( * DatabaseOptionsOK )
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 databaseOptions: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
DatabasesOptions CORS support
* /
func ( a * Client ) DatabasesOptions ( params * DatabasesOptionsParams , opts ... ClientOption ) ( * DatabasesOptionsOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewDatabasesOptionsParams ( )
}
op := & runtime . ClientOperation {
ID : "databasesOptions" ,
Method : "OPTIONS" ,
PathPattern : "/databases" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & DatabasesOptionsReader { 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 . ( * DatabasesOptionsOK )
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 databasesOptions: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
IngestOptions CORS support
* /
func ( a * Client ) IngestOptions ( params * IngestOptionsParams , opts ... ClientOption ) ( * IngestOptionsOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewIngestOptionsParams ( )
}
op := & runtime . ClientOperation {
ID : "ingestOptions" ,
Method : "OPTIONS" ,
PathPattern : "/ingests/observable" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & IngestOptionsReader { 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 . ( * IngestOptionsOK )
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 ingestOptions: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
IngestsOptions CORS support
* /
func ( a * Client ) IngestsOptions ( params * IngestsOptionsParams , opts ... ClientOption ) ( * IngestsOptionsOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewIngestsOptionsParams ( )
}
op := & runtime . ClientOperation {
ID : "ingestsOptions" ,
Method : "OPTIONS" ,
PathPattern : "/ingests" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & IngestsOptionsReader { 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 . ( * IngestsOptionsOK )
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 ingestsOptions: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
JobOptions CORS support
* /
func ( a * Client ) JobOptions ( params * JobOptionsParams , opts ... ClientOption ) ( * JobOptionsOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewJobOptionsParams ( )
}
op := & runtime . ClientOperation {
ID : "jobOptions" ,
Method : "OPTIONS" ,
PathPattern : "/jobs/observable" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & JobOptionsReader { 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 . ( * JobOptionsOK )
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 jobOptions: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
JobsOptions CORS support
* /
func ( a * Client ) JobsOptions ( params * JobsOptionsParams , opts ... ClientOption ) ( * JobsOptionsOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewJobsOptionsParams ( )
}
op := & runtime . ClientOperation {
ID : "jobsOptions" ,
Method : "OPTIONS" ,
PathPattern : "/jobs" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & JobsOptionsReader { 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 . ( * JobsOptionsOK )
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 jobsOptions: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
ServiceOptions CORS support
* /
func ( a * Client ) ServiceOptions ( params * ServiceOptionsParams , opts ... ClientOption ) ( * ServiceOptionsOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewServiceOptionsParams ( )
}
op := & runtime . ClientOperation {
ID : "serviceOptions" ,
Method : "OPTIONS" ,
PathPattern : "/services/observable" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & ServiceOptionsReader { 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 . ( * ServiceOptionsOK )
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 serviceOptions: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
ServicesOptions CORS support
* /
func ( a * Client ) ServicesOptions ( params * ServicesOptionsParams , opts ... ClientOption ) ( * ServicesOptionsOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewServicesOptionsParams ( )
}
op := & runtime . ClientOperation {
ID : "servicesOptions" ,
Method : "OPTIONS" ,
PathPattern : "/services" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & ServicesOptionsReader { 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 . ( * ServicesOptionsOK )
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 servicesOptions: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
TemplateOptions CORS support
* /
func ( a * Client ) TemplateOptions ( params * TemplateOptionsParams , opts ... ClientOption ) ( * TemplateOptionsOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewTemplateOptionsParams ( )
}
op := & runtime . ClientOperation {
ID : "templateOptions" ,
Method : "OPTIONS" ,
PathPattern : "/templates/observable" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & TemplateOptionsReader { 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 . ( * TemplateOptionsOK )
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 templateOptions: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
TemplatesOptions CORS support
* /
func ( a * Client ) TemplatesOptions ( params * TemplatesOptionsParams , opts ... ClientOption ) ( * TemplatesOptionsOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewTemplatesOptionsParams ( )
}
op := & runtime . ClientOperation {
ID : "templatesOptions" ,
Method : "OPTIONS" ,
PathPattern : "/templates" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & TemplatesOptionsReader { 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 . ( * TemplatesOptionsOK )
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 templatesOptions: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
TenantOptions CORS support
* /
func ( a * Client ) TenantOptions ( params * TenantOptionsParams , opts ... ClientOption ) ( * TenantOptionsOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewTenantOptionsParams ( )
}
op := & runtime . ClientOperation {
ID : "tenantOptions" ,
Method : "OPTIONS" ,
PathPattern : "/tenants/observable" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & TenantOptionsReader { 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 . ( * TenantOptionsOK )
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 tenantOptions: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
TenantsOptions CORS support
* /
func ( a * Client ) TenantsOptions ( params * TenantsOptionsParams , opts ... ClientOption ) ( * TenantsOptionsOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewTenantsOptionsParams ( )
}
op := & runtime . ClientOperation {
ID : "tenantsOptions" ,
Method : "OPTIONS" ,
PathPattern : "/tenants" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & TenantsOptionsReader { 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 . ( * TenantsOptionsOK )
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 tenantsOptions: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
UserOptions CORS support
* /
func ( a * Client ) UserOptions ( params * UserOptionsParams , opts ... ClientOption ) ( * UserOptionsOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewUserOptionsParams ( )
}
op := & runtime . ClientOperation {
ID : "userOptions" ,
Method : "OPTIONS" ,
PathPattern : "/users/observable" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & UserOptionsReader { 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 . ( * UserOptionsOK )
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 userOptions: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
UsersOptions CORS support
* /
func ( a * Client ) UsersOptions ( params * UsersOptionsParams , opts ... ClientOption ) ( * UsersOptionsOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewUsersOptionsParams ( )
}
op := & runtime . ClientOperation {
ID : "usersOptions" ,
Method : "OPTIONS" ,
PathPattern : "/users" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & UsersOptionsReader { 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 . ( * UsersOptionsOK )
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 usersOptions: 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
}