mirror of https://github.com/vernonkeenan/lib
1392 lines
56 KiB
Go
1392 lines
56 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
// (c) 2012-2020 by Taxnexus, Inc.
|
|
// All rights reserved worldwide.
|
|
// Proprietary product; unlicensed use is not allowed
|
|
|
|
package research_projects
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"time"
|
|
|
|
"github.com/go-openapi/runtime"
|
|
httptransport "github.com/go-openapi/runtime/client"
|
|
"github.com/go-openapi/strfmt"
|
|
)
|
|
|
|
// New creates a new research projects API client.
|
|
func New(transport runtime.ContextualTransport, formats strfmt.Registry) ClientService {
|
|
return &Client{transport: transport, formats: formats}
|
|
}
|
|
|
|
// New creates a new research projects API client with basic auth credentials.
|
|
//
|
|
// It takes the following parameters:
|
|
// - host: http host (github.com).
|
|
// - basePath: any base path for the API client ("/v1", "/v3").
|
|
// - scheme: http scheme ("http", "https").
|
|
// - user: user for basic authentication header.
|
|
// - password: password for basic authentication header.
|
|
func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService {
|
|
transport := httptransport.New(host, basePath, []string{scheme})
|
|
transport.DefaultAuthentication = httptransport.BasicAuth(user, password)
|
|
return &Client{transport: transport, formats: strfmt.Default}
|
|
}
|
|
|
|
// New creates a new research projects API client with a bearer token for authentication.
|
|
//
|
|
// It takes the following parameters:
|
|
// - host: http host (github.com).
|
|
// - basePath: any base path for the API client ("/v1", "/v3").
|
|
// - scheme: http scheme ("http", "https").
|
|
// - bearerToken: bearer token for Bearer authentication header.
|
|
func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService {
|
|
transport := httptransport.New(host, basePath, []string{scheme})
|
|
transport.DefaultAuthentication = httptransport.BearerToken(bearerToken)
|
|
return &Client{transport: transport, formats: strfmt.Default}
|
|
}
|
|
|
|
// Client for research projects API.
|
|
type Client struct {
|
|
transport runtime.ContextualTransport
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ClientOption may be used to customize the behavior of Client methods.
|
|
type ClientOption func(*runtime.ClientOperation)
|
|
|
|
// ClientService is the interface for Client methods.
|
|
type ClientService interface {
|
|
|
|
// GetResearchProjectCompanies get a list of research project companies.
|
|
GetResearchProjectCompanies(params *GetResearchProjectCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectCompaniesOK, error)
|
|
|
|
// GetResearchProjectCompaniesContext get a list of research project companies.
|
|
GetResearchProjectCompaniesContext(ctx context.Context, params *GetResearchProjectCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectCompaniesOK, error)
|
|
|
|
// GetResearchProjectDocuments get a list of research project documents.
|
|
GetResearchProjectDocuments(params *GetResearchProjectDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectDocumentsOK, error)
|
|
|
|
// GetResearchProjectDocumentsContext get a list of research project documents.
|
|
GetResearchProjectDocumentsContext(ctx context.Context, params *GetResearchProjectDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectDocumentsOK, error)
|
|
|
|
// GetResearchProjectProducts get a list of research project products.
|
|
GetResearchProjectProducts(params *GetResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectProductsOK, error)
|
|
|
|
// GetResearchProjectProductsContext get a list of research project products.
|
|
GetResearchProjectProductsContext(ctx context.Context, params *GetResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectProductsOK, error)
|
|
|
|
// GetResearchProjectServices get a list of research project services.
|
|
GetResearchProjectServices(params *GetResearchProjectServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectServicesOK, error)
|
|
|
|
// GetResearchProjectServicesContext get a list of research project services.
|
|
GetResearchProjectServicesContext(ctx context.Context, params *GetResearchProjectServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectServicesOK, error)
|
|
|
|
// GetResearchProjectTopics get a list of research project topics.
|
|
GetResearchProjectTopics(params *GetResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectTopicsOK, error)
|
|
|
|
// GetResearchProjectTopicsContext get a list of research project topics.
|
|
GetResearchProjectTopicsContext(ctx context.Context, params *GetResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectTopicsOK, error)
|
|
|
|
// GetResearchProjects get a list of research projects.
|
|
GetResearchProjects(params *GetResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectsOK, error)
|
|
|
|
// GetResearchProjectsContext get a list of research projects.
|
|
GetResearchProjectsContext(ctx context.Context, params *GetResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectsOK, error)
|
|
|
|
// PostResearchProjectCompanies create new research project companies.
|
|
PostResearchProjectCompanies(params *PostResearchProjectCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectCompaniesOK, error)
|
|
|
|
// PostResearchProjectCompaniesContext create new research project companies.
|
|
PostResearchProjectCompaniesContext(ctx context.Context, params *PostResearchProjectCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectCompaniesOK, error)
|
|
|
|
// PostResearchProjectDocuments create new research project documents.
|
|
PostResearchProjectDocuments(params *PostResearchProjectDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectDocumentsOK, error)
|
|
|
|
// PostResearchProjectDocumentsContext create new research project documents.
|
|
PostResearchProjectDocumentsContext(ctx context.Context, params *PostResearchProjectDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectDocumentsOK, error)
|
|
|
|
// PostResearchProjectProducts create new research project products.
|
|
PostResearchProjectProducts(params *PostResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectProductsOK, error)
|
|
|
|
// PostResearchProjectProductsContext create new research project products.
|
|
PostResearchProjectProductsContext(ctx context.Context, params *PostResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectProductsOK, error)
|
|
|
|
// PostResearchProjectServices create new research project services.
|
|
PostResearchProjectServices(params *PostResearchProjectServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectServicesOK, *PostResearchProjectServicesCreated, error)
|
|
|
|
// PostResearchProjectServicesContext create new research project services.
|
|
PostResearchProjectServicesContext(ctx context.Context, params *PostResearchProjectServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectServicesOK, *PostResearchProjectServicesCreated, error)
|
|
|
|
// PostResearchProjectTopics create new research project topics.
|
|
PostResearchProjectTopics(params *PostResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectTopicsOK, error)
|
|
|
|
// PostResearchProjectTopicsContext create new research project topics.
|
|
PostResearchProjectTopicsContext(ctx context.Context, params *PostResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectTopicsOK, error)
|
|
|
|
// PostResearchProjects create new research projects.
|
|
PostResearchProjects(params *PostResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectsOK, error)
|
|
|
|
// PostResearchProjectsContext create new research projects.
|
|
PostResearchProjectsContext(ctx context.Context, params *PostResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectsOK, error)
|
|
|
|
// PutResearchProjectCompanies update research project companies.
|
|
PutResearchProjectCompanies(params *PutResearchProjectCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectCompaniesOK, error)
|
|
|
|
// PutResearchProjectCompaniesContext update research project companies.
|
|
PutResearchProjectCompaniesContext(ctx context.Context, params *PutResearchProjectCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectCompaniesOK, error)
|
|
|
|
// PutResearchProjectDocuments update research project documents.
|
|
PutResearchProjectDocuments(params *PutResearchProjectDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectDocumentsOK, error)
|
|
|
|
// PutResearchProjectDocumentsContext update research project documents.
|
|
PutResearchProjectDocumentsContext(ctx context.Context, params *PutResearchProjectDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectDocumentsOK, error)
|
|
|
|
// PutResearchProjectProducts update research project products.
|
|
PutResearchProjectProducts(params *PutResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectProductsOK, error)
|
|
|
|
// PutResearchProjectProductsContext update research project products.
|
|
PutResearchProjectProductsContext(ctx context.Context, params *PutResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectProductsOK, error)
|
|
|
|
// PutResearchProjectServices update research project services.
|
|
PutResearchProjectServices(params *PutResearchProjectServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectServicesOK, *PutResearchProjectServicesCreated, error)
|
|
|
|
// PutResearchProjectServicesContext update research project services.
|
|
PutResearchProjectServicesContext(ctx context.Context, params *PutResearchProjectServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectServicesOK, *PutResearchProjectServicesCreated, error)
|
|
|
|
// PutResearchProjectTopics update research project topics.
|
|
PutResearchProjectTopics(params *PutResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectTopicsOK, error)
|
|
|
|
// PutResearchProjectTopicsContext update research project topics.
|
|
PutResearchProjectTopicsContext(ctx context.Context, params *PutResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectTopicsOK, error)
|
|
|
|
// PutResearchProjects update research projects.
|
|
PutResearchProjects(params *PutResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectsOK, error)
|
|
|
|
// PutResearchProjectsContext update research projects.
|
|
PutResearchProjectsContext(ctx context.Context, params *PutResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectsOK, error)
|
|
|
|
SetTransport(transport runtime.ContextualTransport)
|
|
}
|
|
|
|
// GetResearchProjectCompanies gets a list of research project companies.
|
|
//
|
|
// Return a list of ResearchProjectCompany records from the datastore.
|
|
//
|
|
// This method does not support injected context.
|
|
// However, timeout and opentracing contexts are honored whenever enabled.
|
|
//
|
|
// If you need to pass a specific context, use [Client.GetResearchProjectCompaniesContext] instead.
|
|
func (a *Client) GetResearchProjectCompanies(params *GetResearchProjectCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectCompaniesOK, error) {
|
|
var ctx context.Context
|
|
if params.inner.ctx != nil {
|
|
ctx = params.inner.ctx
|
|
} else {
|
|
ctx = context.Background()
|
|
}
|
|
|
|
return a.GetResearchProjectCompaniesContext(ctx, params, authInfo, opts...)
|
|
}
|
|
|
|
// GetResearchProjectCompaniesContext gets a list of research project companies.
|
|
//
|
|
// Return a list of ResearchProjectCompany records from the datastore.
|
|
//
|
|
// Do not use the deprecated [GetResearchProjectCompaniesParams.Context] with this method: it would be ignored.
|
|
func (a *Client) GetResearchProjectCompaniesContext(ctx context.Context, params *GetResearchProjectCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectCompaniesOK, error) {
|
|
// NOTE: parameters are not validated before sending
|
|
if params == nil {
|
|
params = NewGetResearchProjectCompaniesParams()
|
|
}
|
|
|
|
op := &runtime.ClientOperation{
|
|
ID: "getResearchProjectCompanies",
|
|
Method: "GET",
|
|
PathPattern: "/researchprojectcompanies",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http"},
|
|
Params: params,
|
|
Reader: &GetResearchProjectCompaniesReader{formats: a.formats},
|
|
AuthInfo: authInfo,
|
|
Client: params.HTTPClient,
|
|
}
|
|
|
|
for _, opt := range opts {
|
|
opt(op)
|
|
}
|
|
|
|
result, err := a.transport.SubmitContext(ctx, op)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
// only one success response has to be checked
|
|
success, ok := result.(*GetResearchProjectCompaniesOK)
|
|
if ok {
|
|
return success, nil
|
|
}
|
|
|
|
// unexpected success response.
|
|
|
|
// no default response is defined.
|
|
//
|
|
// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
|
|
msg := fmt.Sprintf("unexpected success response for getResearchProjectCompanies: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
panic(msg)
|
|
}
|
|
|
|
// GetResearchProjectDocuments gets a list of research project documents.
|
|
//
|
|
// Return a list of ResearchProjectDocument records from the datastore.
|
|
//
|
|
// This method does not support injected context.
|
|
// However, timeout and opentracing contexts are honored whenever enabled.
|
|
//
|
|
// If you need to pass a specific context, use [Client.GetResearchProjectDocumentsContext] instead.
|
|
func (a *Client) GetResearchProjectDocuments(params *GetResearchProjectDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectDocumentsOK, error) {
|
|
var ctx context.Context
|
|
if params.inner.ctx != nil {
|
|
ctx = params.inner.ctx
|
|
} else {
|
|
ctx = context.Background()
|
|
}
|
|
|
|
return a.GetResearchProjectDocumentsContext(ctx, params, authInfo, opts...)
|
|
}
|
|
|
|
// GetResearchProjectDocumentsContext gets a list of research project documents.
|
|
//
|
|
// Return a list of ResearchProjectDocument records from the datastore.
|
|
//
|
|
// Do not use the deprecated [GetResearchProjectDocumentsParams.Context] with this method: it would be ignored.
|
|
func (a *Client) GetResearchProjectDocumentsContext(ctx context.Context, params *GetResearchProjectDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectDocumentsOK, error) {
|
|
// NOTE: parameters are not validated before sending
|
|
if params == nil {
|
|
params = NewGetResearchProjectDocumentsParams()
|
|
}
|
|
|
|
op := &runtime.ClientOperation{
|
|
ID: "getResearchProjectDocuments",
|
|
Method: "GET",
|
|
PathPattern: "/researchprojectdocuments",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http"},
|
|
Params: params,
|
|
Reader: &GetResearchProjectDocumentsReader{formats: a.formats},
|
|
AuthInfo: authInfo,
|
|
Client: params.HTTPClient,
|
|
}
|
|
|
|
for _, opt := range opts {
|
|
opt(op)
|
|
}
|
|
|
|
result, err := a.transport.SubmitContext(ctx, op)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
// only one success response has to be checked
|
|
success, ok := result.(*GetResearchProjectDocumentsOK)
|
|
if ok {
|
|
return success, nil
|
|
}
|
|
|
|
// unexpected success response.
|
|
|
|
// no default response is defined.
|
|
//
|
|
// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
|
|
msg := fmt.Sprintf("unexpected success response for getResearchProjectDocuments: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
panic(msg)
|
|
}
|
|
|
|
// GetResearchProjectProducts gets a list of research project products.
|
|
//
|
|
// Return a list of ResearchProjectProduct records from the datastore.
|
|
//
|
|
// This method does not support injected context.
|
|
// However, timeout and opentracing contexts are honored whenever enabled.
|
|
//
|
|
// If you need to pass a specific context, use [Client.GetResearchProjectProductsContext] instead.
|
|
func (a *Client) GetResearchProjectProducts(params *GetResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectProductsOK, error) {
|
|
var ctx context.Context
|
|
if params.inner.ctx != nil {
|
|
ctx = params.inner.ctx
|
|
} else {
|
|
ctx = context.Background()
|
|
}
|
|
|
|
return a.GetResearchProjectProductsContext(ctx, params, authInfo, opts...)
|
|
}
|
|
|
|
// GetResearchProjectProductsContext gets a list of research project products.
|
|
//
|
|
// Return a list of ResearchProjectProduct records from the datastore.
|
|
//
|
|
// Do not use the deprecated [GetResearchProjectProductsParams.Context] with this method: it would be ignored.
|
|
func (a *Client) GetResearchProjectProductsContext(ctx context.Context, params *GetResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectProductsOK, error) {
|
|
// NOTE: parameters are not validated before sending
|
|
if params == nil {
|
|
params = NewGetResearchProjectProductsParams()
|
|
}
|
|
|
|
op := &runtime.ClientOperation{
|
|
ID: "getResearchProjectProducts",
|
|
Method: "GET",
|
|
PathPattern: "/researchprojectproducts",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http"},
|
|
Params: params,
|
|
Reader: &GetResearchProjectProductsReader{formats: a.formats},
|
|
AuthInfo: authInfo,
|
|
Client: params.HTTPClient,
|
|
}
|
|
|
|
for _, opt := range opts {
|
|
opt(op)
|
|
}
|
|
|
|
result, err := a.transport.SubmitContext(ctx, op)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
// only one success response has to be checked
|
|
success, ok := result.(*GetResearchProjectProductsOK)
|
|
if ok {
|
|
return success, nil
|
|
}
|
|
|
|
// unexpected success response.
|
|
|
|
// no default response is defined.
|
|
//
|
|
// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
|
|
msg := fmt.Sprintf("unexpected success response for getResearchProjectProducts: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
panic(msg)
|
|
}
|
|
|
|
// GetResearchProjectServices gets a list of research project services.
|
|
//
|
|
// Return a list of ResearchProjectService records from the datastore.
|
|
//
|
|
// This method does not support injected context.
|
|
// However, timeout and opentracing contexts are honored whenever enabled.
|
|
//
|
|
// If you need to pass a specific context, use [Client.GetResearchProjectServicesContext] instead.
|
|
func (a *Client) GetResearchProjectServices(params *GetResearchProjectServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectServicesOK, error) {
|
|
var ctx context.Context
|
|
if params.inner.ctx != nil {
|
|
ctx = params.inner.ctx
|
|
} else {
|
|
ctx = context.Background()
|
|
}
|
|
|
|
return a.GetResearchProjectServicesContext(ctx, params, authInfo, opts...)
|
|
}
|
|
|
|
// GetResearchProjectServicesContext gets a list of research project services.
|
|
//
|
|
// Return a list of ResearchProjectService records from the datastore.
|
|
//
|
|
// Do not use the deprecated [GetResearchProjectServicesParams.Context] with this method: it would be ignored.
|
|
func (a *Client) GetResearchProjectServicesContext(ctx context.Context, params *GetResearchProjectServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectServicesOK, error) {
|
|
// NOTE: parameters are not validated before sending
|
|
if params == nil {
|
|
params = NewGetResearchProjectServicesParams()
|
|
}
|
|
|
|
op := &runtime.ClientOperation{
|
|
ID: "getResearchProjectServices",
|
|
Method: "GET",
|
|
PathPattern: "/researchprojectservices",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http"},
|
|
Params: params,
|
|
Reader: &GetResearchProjectServicesReader{formats: a.formats},
|
|
AuthInfo: authInfo,
|
|
Client: params.HTTPClient,
|
|
}
|
|
|
|
for _, opt := range opts {
|
|
opt(op)
|
|
}
|
|
|
|
result, err := a.transport.SubmitContext(ctx, op)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
// only one success response has to be checked
|
|
success, ok := result.(*GetResearchProjectServicesOK)
|
|
if ok {
|
|
return success, nil
|
|
}
|
|
|
|
// unexpected success response.
|
|
|
|
// no default response is defined.
|
|
//
|
|
// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
|
|
msg := fmt.Sprintf("unexpected success response for getResearchProjectServices: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
panic(msg)
|
|
}
|
|
|
|
// GetResearchProjectTopics gets a list of research project topics.
|
|
//
|
|
// Return a list of ResearchProjectTopic records from the datastore.
|
|
//
|
|
// This method does not support injected context.
|
|
// However, timeout and opentracing contexts are honored whenever enabled.
|
|
//
|
|
// If you need to pass a specific context, use [Client.GetResearchProjectTopicsContext] instead.
|
|
func (a *Client) GetResearchProjectTopics(params *GetResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectTopicsOK, error) {
|
|
var ctx context.Context
|
|
if params.inner.ctx != nil {
|
|
ctx = params.inner.ctx
|
|
} else {
|
|
ctx = context.Background()
|
|
}
|
|
|
|
return a.GetResearchProjectTopicsContext(ctx, params, authInfo, opts...)
|
|
}
|
|
|
|
// GetResearchProjectTopicsContext gets a list of research project topics.
|
|
//
|
|
// Return a list of ResearchProjectTopic records from the datastore.
|
|
//
|
|
// Do not use the deprecated [GetResearchProjectTopicsParams.Context] with this method: it would be ignored.
|
|
func (a *Client) GetResearchProjectTopicsContext(ctx context.Context, params *GetResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectTopicsOK, error) {
|
|
// NOTE: parameters are not validated before sending
|
|
if params == nil {
|
|
params = NewGetResearchProjectTopicsParams()
|
|
}
|
|
|
|
op := &runtime.ClientOperation{
|
|
ID: "getResearchProjectTopics",
|
|
Method: "GET",
|
|
PathPattern: "/researchprojecttopics",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http"},
|
|
Params: params,
|
|
Reader: &GetResearchProjectTopicsReader{formats: a.formats},
|
|
AuthInfo: authInfo,
|
|
Client: params.HTTPClient,
|
|
}
|
|
|
|
for _, opt := range opts {
|
|
opt(op)
|
|
}
|
|
|
|
result, err := a.transport.SubmitContext(ctx, op)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
// only one success response has to be checked
|
|
success, ok := result.(*GetResearchProjectTopicsOK)
|
|
if ok {
|
|
return success, nil
|
|
}
|
|
|
|
// unexpected success response.
|
|
|
|
// no default response is defined.
|
|
//
|
|
// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
|
|
msg := fmt.Sprintf("unexpected success response for getResearchProjectTopics: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
panic(msg)
|
|
}
|
|
|
|
// GetResearchProjects gets a list of research projects.
|
|
//
|
|
// Return a list of ResearchProject records from the datastore.
|
|
//
|
|
// This method does not support injected context.
|
|
// However, timeout and opentracing contexts are honored whenever enabled.
|
|
//
|
|
// If you need to pass a specific context, use [Client.GetResearchProjectsContext] instead.
|
|
func (a *Client) GetResearchProjects(params *GetResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectsOK, error) {
|
|
var ctx context.Context
|
|
if params.inner.ctx != nil {
|
|
ctx = params.inner.ctx
|
|
} else {
|
|
ctx = context.Background()
|
|
}
|
|
|
|
return a.GetResearchProjectsContext(ctx, params, authInfo, opts...)
|
|
}
|
|
|
|
// GetResearchProjectsContext gets a list of research projects.
|
|
//
|
|
// Return a list of ResearchProject records from the datastore.
|
|
//
|
|
// Do not use the deprecated [GetResearchProjectsParams.Context] with this method: it would be ignored.
|
|
func (a *Client) GetResearchProjectsContext(ctx context.Context, params *GetResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectsOK, error) {
|
|
// NOTE: parameters are not validated before sending
|
|
if params == nil {
|
|
params = NewGetResearchProjectsParams()
|
|
}
|
|
|
|
op := &runtime.ClientOperation{
|
|
ID: "getResearchProjects",
|
|
Method: "GET",
|
|
PathPattern: "/researchprojects",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http"},
|
|
Params: params,
|
|
Reader: &GetResearchProjectsReader{formats: a.formats},
|
|
AuthInfo: authInfo,
|
|
Client: params.HTTPClient,
|
|
}
|
|
|
|
for _, opt := range opts {
|
|
opt(op)
|
|
}
|
|
|
|
result, err := a.transport.SubmitContext(ctx, op)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
// only one success response has to be checked
|
|
success, ok := result.(*GetResearchProjectsOK)
|
|
if ok {
|
|
return success, nil
|
|
}
|
|
|
|
// unexpected success response.
|
|
|
|
// no default response is defined.
|
|
//
|
|
// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
|
|
msg := fmt.Sprintf("unexpected success response for getResearchProjects: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
panic(msg)
|
|
}
|
|
|
|
// PostResearchProjectCompanies creates new research project companies.
|
|
//
|
|
// Create ResearchProjectCompanies in the system.
|
|
//
|
|
// This method does not support injected context.
|
|
// However, timeout and opentracing contexts are honored whenever enabled.
|
|
//
|
|
// If you need to pass a specific context, use [Client.PostResearchProjectCompaniesContext] instead.
|
|
func (a *Client) PostResearchProjectCompanies(params *PostResearchProjectCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectCompaniesOK, error) {
|
|
var ctx context.Context
|
|
if params.inner.ctx != nil {
|
|
ctx = params.inner.ctx
|
|
} else {
|
|
ctx = context.Background()
|
|
}
|
|
|
|
return a.PostResearchProjectCompaniesContext(ctx, params, authInfo, opts...)
|
|
}
|
|
|
|
// PostResearchProjectCompaniesContext creates new research project companies.
|
|
//
|
|
// Create ResearchProjectCompanies in the system.
|
|
//
|
|
// Do not use the deprecated [PostResearchProjectCompaniesParams.Context] with this method: it would be ignored.
|
|
func (a *Client) PostResearchProjectCompaniesContext(ctx context.Context, params *PostResearchProjectCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectCompaniesOK, error) {
|
|
// NOTE: parameters are not validated before sending
|
|
if params == nil {
|
|
params = NewPostResearchProjectCompaniesParams()
|
|
}
|
|
|
|
op := &runtime.ClientOperation{
|
|
ID: "postResearchProjectCompanies",
|
|
Method: "POST",
|
|
PathPattern: "/researchprojectcompanies",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http"},
|
|
Params: params,
|
|
Reader: &PostResearchProjectCompaniesReader{formats: a.formats},
|
|
AuthInfo: authInfo,
|
|
Client: params.HTTPClient,
|
|
}
|
|
|
|
for _, opt := range opts {
|
|
opt(op)
|
|
}
|
|
|
|
result, err := a.transport.SubmitContext(ctx, op)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
// only one success response has to be checked
|
|
success, ok := result.(*PostResearchProjectCompaniesOK)
|
|
if ok {
|
|
return success, nil
|
|
}
|
|
|
|
// unexpected success response.
|
|
|
|
// no default response is defined.
|
|
//
|
|
// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
|
|
msg := fmt.Sprintf("unexpected success response for postResearchProjectCompanies: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
panic(msg)
|
|
}
|
|
|
|
// PostResearchProjectDocuments creates new research project documents.
|
|
//
|
|
// Create ResearchProjectDocuments in the system.
|
|
//
|
|
// This method does not support injected context.
|
|
// However, timeout and opentracing contexts are honored whenever enabled.
|
|
//
|
|
// If you need to pass a specific context, use [Client.PostResearchProjectDocumentsContext] instead.
|
|
func (a *Client) PostResearchProjectDocuments(params *PostResearchProjectDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectDocumentsOK, error) {
|
|
var ctx context.Context
|
|
if params.inner.ctx != nil {
|
|
ctx = params.inner.ctx
|
|
} else {
|
|
ctx = context.Background()
|
|
}
|
|
|
|
return a.PostResearchProjectDocumentsContext(ctx, params, authInfo, opts...)
|
|
}
|
|
|
|
// PostResearchProjectDocumentsContext creates new research project documents.
|
|
//
|
|
// Create ResearchProjectDocuments in the system.
|
|
//
|
|
// Do not use the deprecated [PostResearchProjectDocumentsParams.Context] with this method: it would be ignored.
|
|
func (a *Client) PostResearchProjectDocumentsContext(ctx context.Context, params *PostResearchProjectDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectDocumentsOK, error) {
|
|
// NOTE: parameters are not validated before sending
|
|
if params == nil {
|
|
params = NewPostResearchProjectDocumentsParams()
|
|
}
|
|
|
|
op := &runtime.ClientOperation{
|
|
ID: "postResearchProjectDocuments",
|
|
Method: "POST",
|
|
PathPattern: "/researchprojectdocuments",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http"},
|
|
Params: params,
|
|
Reader: &PostResearchProjectDocumentsReader{formats: a.formats},
|
|
AuthInfo: authInfo,
|
|
Client: params.HTTPClient,
|
|
}
|
|
|
|
for _, opt := range opts {
|
|
opt(op)
|
|
}
|
|
|
|
result, err := a.transport.SubmitContext(ctx, op)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
// only one success response has to be checked
|
|
success, ok := result.(*PostResearchProjectDocumentsOK)
|
|
if ok {
|
|
return success, nil
|
|
}
|
|
|
|
// unexpected success response.
|
|
|
|
// no default response is defined.
|
|
//
|
|
// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
|
|
msg := fmt.Sprintf("unexpected success response for postResearchProjectDocuments: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
panic(msg)
|
|
}
|
|
|
|
// PostResearchProjectProducts creates new research project products.
|
|
//
|
|
// Create ResearchProjectProducts in the system.
|
|
//
|
|
// This method does not support injected context.
|
|
// However, timeout and opentracing contexts are honored whenever enabled.
|
|
//
|
|
// If you need to pass a specific context, use [Client.PostResearchProjectProductsContext] instead.
|
|
func (a *Client) PostResearchProjectProducts(params *PostResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectProductsOK, error) {
|
|
var ctx context.Context
|
|
if params.inner.ctx != nil {
|
|
ctx = params.inner.ctx
|
|
} else {
|
|
ctx = context.Background()
|
|
}
|
|
|
|
return a.PostResearchProjectProductsContext(ctx, params, authInfo, opts...)
|
|
}
|
|
|
|
// PostResearchProjectProductsContext creates new research project products.
|
|
//
|
|
// Create ResearchProjectProducts in the system.
|
|
//
|
|
// Do not use the deprecated [PostResearchProjectProductsParams.Context] with this method: it would be ignored.
|
|
func (a *Client) PostResearchProjectProductsContext(ctx context.Context, params *PostResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectProductsOK, error) {
|
|
// NOTE: parameters are not validated before sending
|
|
if params == nil {
|
|
params = NewPostResearchProjectProductsParams()
|
|
}
|
|
|
|
op := &runtime.ClientOperation{
|
|
ID: "postResearchProjectProducts",
|
|
Method: "POST",
|
|
PathPattern: "/researchprojectproducts",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http"},
|
|
Params: params,
|
|
Reader: &PostResearchProjectProductsReader{formats: a.formats},
|
|
AuthInfo: authInfo,
|
|
Client: params.HTTPClient,
|
|
}
|
|
|
|
for _, opt := range opts {
|
|
opt(op)
|
|
}
|
|
|
|
result, err := a.transport.SubmitContext(ctx, op)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
// only one success response has to be checked
|
|
success, ok := result.(*PostResearchProjectProductsOK)
|
|
if ok {
|
|
return success, nil
|
|
}
|
|
|
|
// unexpected success response.
|
|
|
|
// no default response is defined.
|
|
//
|
|
// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
|
|
msg := fmt.Sprintf("unexpected success response for postResearchProjectProducts: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
panic(msg)
|
|
}
|
|
|
|
// PostResearchProjectServices creates new research project services.
|
|
//
|
|
// Create ResearchProjectServices in the system.
|
|
//
|
|
// This method does not support injected context.
|
|
// However, timeout and opentracing contexts are honored whenever enabled.
|
|
//
|
|
// If you need to pass a specific context, use [Client.PostResearchProjectServicesContext] instead.
|
|
func (a *Client) PostResearchProjectServices(params *PostResearchProjectServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectServicesOK, *PostResearchProjectServicesCreated, error) {
|
|
var ctx context.Context
|
|
if params.inner.ctx != nil {
|
|
ctx = params.inner.ctx
|
|
} else {
|
|
ctx = context.Background()
|
|
}
|
|
|
|
return a.PostResearchProjectServicesContext(ctx, params, authInfo, opts...)
|
|
}
|
|
|
|
// PostResearchProjectServicesContext creates new research project services.
|
|
//
|
|
// Create ResearchProjectServices in the system.
|
|
//
|
|
// Do not use the deprecated [PostResearchProjectServicesParams.Context] with this method: it would be ignored.
|
|
func (a *Client) PostResearchProjectServicesContext(ctx context.Context, params *PostResearchProjectServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectServicesOK, *PostResearchProjectServicesCreated, error) {
|
|
// NOTE: parameters are not validated before sending
|
|
if params == nil {
|
|
params = NewPostResearchProjectServicesParams()
|
|
}
|
|
|
|
op := &runtime.ClientOperation{
|
|
ID: "postResearchProjectServices",
|
|
Method: "POST",
|
|
PathPattern: "/researchprojectservices",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http"},
|
|
Params: params,
|
|
Reader: &PostResearchProjectServicesReader{formats: a.formats},
|
|
AuthInfo: authInfo,
|
|
Client: params.HTTPClient,
|
|
}
|
|
|
|
for _, opt := range opts {
|
|
opt(op)
|
|
}
|
|
|
|
result, err := a.transport.SubmitContext(ctx, op)
|
|
if err != nil {
|
|
return nil, nil, err
|
|
}
|
|
|
|
// several success responses have to be checked
|
|
switch value := result.(type) {
|
|
case *PostResearchProjectServicesOK:
|
|
return value, nil, nil
|
|
case *PostResearchProjectServicesCreated:
|
|
return nil, value, nil
|
|
}
|
|
|
|
// no default response is defined.
|
|
//
|
|
// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
|
|
msg := fmt.Sprintf("unexpected success response for research_projects: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
panic(msg)
|
|
}
|
|
|
|
// PostResearchProjectTopics creates new research project topics.
|
|
//
|
|
// Create ResearchProjectTopics in the system.
|
|
//
|
|
// This method does not support injected context.
|
|
// However, timeout and opentracing contexts are honored whenever enabled.
|
|
//
|
|
// If you need to pass a specific context, use [Client.PostResearchProjectTopicsContext] instead.
|
|
func (a *Client) PostResearchProjectTopics(params *PostResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectTopicsOK, error) {
|
|
var ctx context.Context
|
|
if params.inner.ctx != nil {
|
|
ctx = params.inner.ctx
|
|
} else {
|
|
ctx = context.Background()
|
|
}
|
|
|
|
return a.PostResearchProjectTopicsContext(ctx, params, authInfo, opts...)
|
|
}
|
|
|
|
// PostResearchProjectTopicsContext creates new research project topics.
|
|
//
|
|
// Create ResearchProjectTopics in the system.
|
|
//
|
|
// Do not use the deprecated [PostResearchProjectTopicsParams.Context] with this method: it would be ignored.
|
|
func (a *Client) PostResearchProjectTopicsContext(ctx context.Context, params *PostResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectTopicsOK, error) {
|
|
// NOTE: parameters are not validated before sending
|
|
if params == nil {
|
|
params = NewPostResearchProjectTopicsParams()
|
|
}
|
|
|
|
op := &runtime.ClientOperation{
|
|
ID: "postResearchProjectTopics",
|
|
Method: "POST",
|
|
PathPattern: "/researchprojecttopics",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http"},
|
|
Params: params,
|
|
Reader: &PostResearchProjectTopicsReader{formats: a.formats},
|
|
AuthInfo: authInfo,
|
|
Client: params.HTTPClient,
|
|
}
|
|
|
|
for _, opt := range opts {
|
|
opt(op)
|
|
}
|
|
|
|
result, err := a.transport.SubmitContext(ctx, op)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
// only one success response has to be checked
|
|
success, ok := result.(*PostResearchProjectTopicsOK)
|
|
if ok {
|
|
return success, nil
|
|
}
|
|
|
|
// unexpected success response.
|
|
|
|
// no default response is defined.
|
|
//
|
|
// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
|
|
msg := fmt.Sprintf("unexpected success response for postResearchProjectTopics: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
panic(msg)
|
|
}
|
|
|
|
// PostResearchProjects creates new research projects.
|
|
//
|
|
// Create ResearchProjects in the system.
|
|
//
|
|
// This method does not support injected context.
|
|
// However, timeout and opentracing contexts are honored whenever enabled.
|
|
//
|
|
// If you need to pass a specific context, use [Client.PostResearchProjectsContext] instead.
|
|
func (a *Client) PostResearchProjects(params *PostResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectsOK, error) {
|
|
var ctx context.Context
|
|
if params.inner.ctx != nil {
|
|
ctx = params.inner.ctx
|
|
} else {
|
|
ctx = context.Background()
|
|
}
|
|
|
|
return a.PostResearchProjectsContext(ctx, params, authInfo, opts...)
|
|
}
|
|
|
|
// PostResearchProjectsContext creates new research projects.
|
|
//
|
|
// Create ResearchProjects in the system.
|
|
//
|
|
// Do not use the deprecated [PostResearchProjectsParams.Context] with this method: it would be ignored.
|
|
func (a *Client) PostResearchProjectsContext(ctx context.Context, params *PostResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectsOK, error) {
|
|
// NOTE: parameters are not validated before sending
|
|
if params == nil {
|
|
params = NewPostResearchProjectsParams()
|
|
}
|
|
|
|
op := &runtime.ClientOperation{
|
|
ID: "postResearchProjects",
|
|
Method: "POST",
|
|
PathPattern: "/researchprojects",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http"},
|
|
Params: params,
|
|
Reader: &PostResearchProjectsReader{formats: a.formats},
|
|
AuthInfo: authInfo,
|
|
Client: params.HTTPClient,
|
|
}
|
|
|
|
for _, opt := range opts {
|
|
opt(op)
|
|
}
|
|
|
|
result, err := a.transport.SubmitContext(ctx, op)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
// only one success response has to be checked
|
|
success, ok := result.(*PostResearchProjectsOK)
|
|
if ok {
|
|
return success, nil
|
|
}
|
|
|
|
// unexpected success response.
|
|
|
|
// no default response is defined.
|
|
//
|
|
// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
|
|
msg := fmt.Sprintf("unexpected success response for postResearchProjects: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
panic(msg)
|
|
}
|
|
|
|
// PutResearchProjectCompanies updates research project companies.
|
|
//
|
|
// Update ResearchProjectCompany in the system.
|
|
//
|
|
// This method does not support injected context.
|
|
// However, timeout and opentracing contexts are honored whenever enabled.
|
|
//
|
|
// If you need to pass a specific context, use [Client.PutResearchProjectCompaniesContext] instead.
|
|
func (a *Client) PutResearchProjectCompanies(params *PutResearchProjectCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectCompaniesOK, error) {
|
|
var ctx context.Context
|
|
if params.inner.ctx != nil {
|
|
ctx = params.inner.ctx
|
|
} else {
|
|
ctx = context.Background()
|
|
}
|
|
|
|
return a.PutResearchProjectCompaniesContext(ctx, params, authInfo, opts...)
|
|
}
|
|
|
|
// PutResearchProjectCompaniesContext updates research project companies.
|
|
//
|
|
// Update ResearchProjectCompany in the system.
|
|
//
|
|
// Do not use the deprecated [PutResearchProjectCompaniesParams.Context] with this method: it would be ignored.
|
|
func (a *Client) PutResearchProjectCompaniesContext(ctx context.Context, params *PutResearchProjectCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectCompaniesOK, error) {
|
|
// NOTE: parameters are not validated before sending
|
|
if params == nil {
|
|
params = NewPutResearchProjectCompaniesParams()
|
|
}
|
|
|
|
op := &runtime.ClientOperation{
|
|
ID: "putResearchProjectCompanies",
|
|
Method: "PUT",
|
|
PathPattern: "/researchprojectcompanies",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http"},
|
|
Params: params,
|
|
Reader: &PutResearchProjectCompaniesReader{formats: a.formats},
|
|
AuthInfo: authInfo,
|
|
Client: params.HTTPClient,
|
|
}
|
|
|
|
for _, opt := range opts {
|
|
opt(op)
|
|
}
|
|
|
|
result, err := a.transport.SubmitContext(ctx, op)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
// only one success response has to be checked
|
|
success, ok := result.(*PutResearchProjectCompaniesOK)
|
|
if ok {
|
|
return success, nil
|
|
}
|
|
|
|
// unexpected success response.
|
|
|
|
// no default response is defined.
|
|
//
|
|
// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
|
|
msg := fmt.Sprintf("unexpected success response for putResearchProjectCompanies: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
panic(msg)
|
|
}
|
|
|
|
// PutResearchProjectDocuments updates research project documents.
|
|
//
|
|
// Update ResearchProjectDocument in the system.
|
|
//
|
|
// This method does not support injected context.
|
|
// However, timeout and opentracing contexts are honored whenever enabled.
|
|
//
|
|
// If you need to pass a specific context, use [Client.PutResearchProjectDocumentsContext] instead.
|
|
func (a *Client) PutResearchProjectDocuments(params *PutResearchProjectDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectDocumentsOK, error) {
|
|
var ctx context.Context
|
|
if params.inner.ctx != nil {
|
|
ctx = params.inner.ctx
|
|
} else {
|
|
ctx = context.Background()
|
|
}
|
|
|
|
return a.PutResearchProjectDocumentsContext(ctx, params, authInfo, opts...)
|
|
}
|
|
|
|
// PutResearchProjectDocumentsContext updates research project documents.
|
|
//
|
|
// Update ResearchProjectDocument in the system.
|
|
//
|
|
// Do not use the deprecated [PutResearchProjectDocumentsParams.Context] with this method: it would be ignored.
|
|
func (a *Client) PutResearchProjectDocumentsContext(ctx context.Context, params *PutResearchProjectDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectDocumentsOK, error) {
|
|
// NOTE: parameters are not validated before sending
|
|
if params == nil {
|
|
params = NewPutResearchProjectDocumentsParams()
|
|
}
|
|
|
|
op := &runtime.ClientOperation{
|
|
ID: "putResearchProjectDocuments",
|
|
Method: "PUT",
|
|
PathPattern: "/researchprojectdocuments",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http"},
|
|
Params: params,
|
|
Reader: &PutResearchProjectDocumentsReader{formats: a.formats},
|
|
AuthInfo: authInfo,
|
|
Client: params.HTTPClient,
|
|
}
|
|
|
|
for _, opt := range opts {
|
|
opt(op)
|
|
}
|
|
|
|
result, err := a.transport.SubmitContext(ctx, op)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
// only one success response has to be checked
|
|
success, ok := result.(*PutResearchProjectDocumentsOK)
|
|
if ok {
|
|
return success, nil
|
|
}
|
|
|
|
// unexpected success response.
|
|
|
|
// no default response is defined.
|
|
//
|
|
// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
|
|
msg := fmt.Sprintf("unexpected success response for putResearchProjectDocuments: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
panic(msg)
|
|
}
|
|
|
|
// PutResearchProjectProducts updates research project products.
|
|
//
|
|
// Update ResearchProjectProduct in the system.
|
|
//
|
|
// This method does not support injected context.
|
|
// However, timeout and opentracing contexts are honored whenever enabled.
|
|
//
|
|
// If you need to pass a specific context, use [Client.PutResearchProjectProductsContext] instead.
|
|
func (a *Client) PutResearchProjectProducts(params *PutResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectProductsOK, error) {
|
|
var ctx context.Context
|
|
if params.inner.ctx != nil {
|
|
ctx = params.inner.ctx
|
|
} else {
|
|
ctx = context.Background()
|
|
}
|
|
|
|
return a.PutResearchProjectProductsContext(ctx, params, authInfo, opts...)
|
|
}
|
|
|
|
// PutResearchProjectProductsContext updates research project products.
|
|
//
|
|
// Update ResearchProjectProduct in the system.
|
|
//
|
|
// Do not use the deprecated [PutResearchProjectProductsParams.Context] with this method: it would be ignored.
|
|
func (a *Client) PutResearchProjectProductsContext(ctx context.Context, params *PutResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectProductsOK, error) {
|
|
// NOTE: parameters are not validated before sending
|
|
if params == nil {
|
|
params = NewPutResearchProjectProductsParams()
|
|
}
|
|
|
|
op := &runtime.ClientOperation{
|
|
ID: "putResearchProjectProducts",
|
|
Method: "PUT",
|
|
PathPattern: "/researchprojectproducts",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http"},
|
|
Params: params,
|
|
Reader: &PutResearchProjectProductsReader{formats: a.formats},
|
|
AuthInfo: authInfo,
|
|
Client: params.HTTPClient,
|
|
}
|
|
|
|
for _, opt := range opts {
|
|
opt(op)
|
|
}
|
|
|
|
result, err := a.transport.SubmitContext(ctx, op)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
// only one success response has to be checked
|
|
success, ok := result.(*PutResearchProjectProductsOK)
|
|
if ok {
|
|
return success, nil
|
|
}
|
|
|
|
// unexpected success response.
|
|
|
|
// no default response is defined.
|
|
//
|
|
// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
|
|
msg := fmt.Sprintf("unexpected success response for putResearchProjectProducts: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
panic(msg)
|
|
}
|
|
|
|
// PutResearchProjectServices updates research project services.
|
|
//
|
|
// Update ResearchProjectService in the system.
|
|
//
|
|
// This method does not support injected context.
|
|
// However, timeout and opentracing contexts are honored whenever enabled.
|
|
//
|
|
// If you need to pass a specific context, use [Client.PutResearchProjectServicesContext] instead.
|
|
func (a *Client) PutResearchProjectServices(params *PutResearchProjectServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectServicesOK, *PutResearchProjectServicesCreated, error) {
|
|
var ctx context.Context
|
|
if params.inner.ctx != nil {
|
|
ctx = params.inner.ctx
|
|
} else {
|
|
ctx = context.Background()
|
|
}
|
|
|
|
return a.PutResearchProjectServicesContext(ctx, params, authInfo, opts...)
|
|
}
|
|
|
|
// PutResearchProjectServicesContext updates research project services.
|
|
//
|
|
// Update ResearchProjectService in the system.
|
|
//
|
|
// Do not use the deprecated [PutResearchProjectServicesParams.Context] with this method: it would be ignored.
|
|
func (a *Client) PutResearchProjectServicesContext(ctx context.Context, params *PutResearchProjectServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectServicesOK, *PutResearchProjectServicesCreated, error) {
|
|
// NOTE: parameters are not validated before sending
|
|
if params == nil {
|
|
params = NewPutResearchProjectServicesParams()
|
|
}
|
|
|
|
op := &runtime.ClientOperation{
|
|
ID: "putResearchProjectServices",
|
|
Method: "PUT",
|
|
PathPattern: "/researchprojectservices",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http"},
|
|
Params: params,
|
|
Reader: &PutResearchProjectServicesReader{formats: a.formats},
|
|
AuthInfo: authInfo,
|
|
Client: params.HTTPClient,
|
|
}
|
|
|
|
for _, opt := range opts {
|
|
opt(op)
|
|
}
|
|
|
|
result, err := a.transport.SubmitContext(ctx, op)
|
|
if err != nil {
|
|
return nil, nil, err
|
|
}
|
|
|
|
// several success responses have to be checked
|
|
switch value := result.(type) {
|
|
case *PutResearchProjectServicesOK:
|
|
return value, nil, nil
|
|
case *PutResearchProjectServicesCreated:
|
|
return nil, value, nil
|
|
}
|
|
|
|
// no default response is defined.
|
|
//
|
|
// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
|
|
msg := fmt.Sprintf("unexpected success response for research_projects: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
panic(msg)
|
|
}
|
|
|
|
// PutResearchProjectTopics updates research project topics.
|
|
//
|
|
// Update ResearchProjectTopic in the system.
|
|
//
|
|
// This method does not support injected context.
|
|
// However, timeout and opentracing contexts are honored whenever enabled.
|
|
//
|
|
// If you need to pass a specific context, use [Client.PutResearchProjectTopicsContext] instead.
|
|
func (a *Client) PutResearchProjectTopics(params *PutResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectTopicsOK, error) {
|
|
var ctx context.Context
|
|
if params.inner.ctx != nil {
|
|
ctx = params.inner.ctx
|
|
} else {
|
|
ctx = context.Background()
|
|
}
|
|
|
|
return a.PutResearchProjectTopicsContext(ctx, params, authInfo, opts...)
|
|
}
|
|
|
|
// PutResearchProjectTopicsContext updates research project topics.
|
|
//
|
|
// Update ResearchProjectTopic in the system.
|
|
//
|
|
// Do not use the deprecated [PutResearchProjectTopicsParams.Context] with this method: it would be ignored.
|
|
func (a *Client) PutResearchProjectTopicsContext(ctx context.Context, params *PutResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectTopicsOK, error) {
|
|
// NOTE: parameters are not validated before sending
|
|
if params == nil {
|
|
params = NewPutResearchProjectTopicsParams()
|
|
}
|
|
|
|
op := &runtime.ClientOperation{
|
|
ID: "putResearchProjectTopics",
|
|
Method: "PUT",
|
|
PathPattern: "/researchprojecttopics",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http"},
|
|
Params: params,
|
|
Reader: &PutResearchProjectTopicsReader{formats: a.formats},
|
|
AuthInfo: authInfo,
|
|
Client: params.HTTPClient,
|
|
}
|
|
|
|
for _, opt := range opts {
|
|
opt(op)
|
|
}
|
|
|
|
result, err := a.transport.SubmitContext(ctx, op)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
// only one success response has to be checked
|
|
success, ok := result.(*PutResearchProjectTopicsOK)
|
|
if ok {
|
|
return success, nil
|
|
}
|
|
|
|
// unexpected success response.
|
|
|
|
// no default response is defined.
|
|
//
|
|
// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
|
|
msg := fmt.Sprintf("unexpected success response for putResearchProjectTopics: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
panic(msg)
|
|
}
|
|
|
|
// PutResearchProjects updates research projects.
|
|
//
|
|
// Update ResearchProject in the system.
|
|
//
|
|
// This method does not support injected context.
|
|
// However, timeout and opentracing contexts are honored whenever enabled.
|
|
//
|
|
// If you need to pass a specific context, use [Client.PutResearchProjectsContext] instead.
|
|
func (a *Client) PutResearchProjects(params *PutResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectsOK, error) {
|
|
var ctx context.Context
|
|
if params.inner.ctx != nil {
|
|
ctx = params.inner.ctx
|
|
} else {
|
|
ctx = context.Background()
|
|
}
|
|
|
|
return a.PutResearchProjectsContext(ctx, params, authInfo, opts...)
|
|
}
|
|
|
|
// PutResearchProjectsContext updates research projects.
|
|
//
|
|
// Update ResearchProject in the system.
|
|
//
|
|
// Do not use the deprecated [PutResearchProjectsParams.Context] with this method: it would be ignored.
|
|
func (a *Client) PutResearchProjectsContext(ctx context.Context, params *PutResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectsOK, error) {
|
|
// NOTE: parameters are not validated before sending
|
|
if params == nil {
|
|
params = NewPutResearchProjectsParams()
|
|
}
|
|
|
|
op := &runtime.ClientOperation{
|
|
ID: "putResearchProjects",
|
|
Method: "PUT",
|
|
PathPattern: "/researchprojects",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{"application/json"},
|
|
Schemes: []string{"http"},
|
|
Params: params,
|
|
Reader: &PutResearchProjectsReader{formats: a.formats},
|
|
AuthInfo: authInfo,
|
|
Client: params.HTTPClient,
|
|
}
|
|
|
|
for _, opt := range opts {
|
|
opt(op)
|
|
}
|
|
|
|
result, err := a.transport.SubmitContext(ctx, op)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
// only one success response has to be checked
|
|
success, ok := result.(*PutResearchProjectsOK)
|
|
if ok {
|
|
return success, nil
|
|
}
|
|
|
|
// unexpected success response.
|
|
|
|
// no default response is defined.
|
|
//
|
|
// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
|
|
msg := fmt.Sprintf("unexpected success response for putResearchProjects: 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.ContextualTransport) {
|
|
a.transport = transport
|
|
}
|
|
|
|
// innerParams captures internal fields so they don't conflict with user-supplied parameters.
|
|
type innerParams struct {
|
|
timeout time.Duration
|
|
|
|
// Deprecated: use the operation call with context to pass the context instead of [ResearchProjectsParams].
|
|
ctx context.Context
|
|
}
|